Site

Familiarize yourself with particulars of the site endpoint.

Description

A site, in general terms, refers to a specific location or area where activities, events or developments take place.
The entity site within the BuildingMinds platform serves as a "hub" for collaboration and communication among various stakeholders, such as building owners, managers, tenants and service providers.

Add site

POST Request: {{BASE_URL}}/site

Pre-Requisite: For a site to be on-boarded via BuildingMinds API under an address, an address must be onboarded with an AddressIDs first.

  • For the site to be added, {{addressID}}from the added address is necessary.
  • In case you try to on-board a site, with random address ID, the site entity will remain in NEW state.
  • The siteID can be a random string based on the requirements of the customer.

Field attributes

FieldTypeDescription
addressIdsstring, arrayArray of address Ids.
minLength: 1max; Length: 50 (mandatory)
energyRatingIdsstring, arrayArray of energyRating Ids.
minLength: 1; maxLength: 50
eventTypestring,enumType of the event as specific domain event.

Options: SiteAdded, SiteUpdated, SiteDeletedextensionData
extensionDatajsonExtension data for storing any custom data
siteCodestringUser specific Site Code.
minLength: 1; maxLength: 70
namestringName of Site.
minLength: 1; maxLength: 50 (mandatory)
siteIdstringUnique identifier; must either originate from the previous system or be explicitly defined.
minLength: 1; maxLength: 50 (mandatory)
statusstringStatus of Site
minLength: 1; maxLength: 50
typestring,enumType of site
Options: Education, Health Care, Hotel, Industrial, Lodging, Leisure & Recreation, Mixed Use, Office, Residential, Retail, Technology/Science, Other (mandatory)
validFromstringThe records can be used from this date onwards in yyyy-mm-ddThh:mm:ssZ form (conform to ISO 8061).
minLength: 20 (mandatory)
validUntilstringThe records can be used from this date onwards in yyyy-mm-ddThh:mm:ssZ form (conform to ISO 8061).
minLength: 20 (mandatory)

Sample payload


[
    {
        "addressIds": [
            "{{addressUID}}"
        ],
        "eventType": "SiteAdded",
        "energyRatingIds": [
            "energy-123"
        ],
        "extensionData": {
            "remark": "abc",
            "aoFunctionName": "ao-name",
            "aoFunctionCode": "1356",
            "gbScope": "a878",
            "architecturalObjectId": "987h",
            "resisId": "12",
            "statusId": 1
        },
        "name": "Site {{$randomFirstName}}",
        "siteId": "{{siteUID}}",
        "type": "Education",
        "validFrom": "{{validFromDate}}",
        "validUntil": "{{validUntilDate}}"
    }
]

Update site

Update Site is a post request, too. You can update any fields based on your requirements. For the site to be updated, {{addressID}} from the related Address is required.

eventType: SiteAdded must be used to ensure the site can be updated.

POST Request:{{BASE_URL}}/site


[
    {
        "addressIds": [
            "{{addressUID}}"
        ],
        "eventType": "SiteAdded",
        "energyRatingIds": [
            "energy-123"
        ],
        "extensionData": {
            "remark": "abc",
            "aoFunctionName": "ao-name1",
            "aoFunctionCode": "1356",
            "gbScope": "a878",
            "architecturalObjectId": "987h",
            "resisId": "12",
            "statusId": 1
        },
        "name": "Site {{$randomFirstName}}",
        "siteId": "{{siteUID}}",
        "type": "Education",
        "validFrom": "{{validFromDate}}",
        "validUntil": "{{validUntilDate}}"
    }
]

Delete site

Most of the schema will be the same as the on-boarding and this will be a POST request as well. The only required change will be in the eventType: SiteDeleted.

  • For the site to be deleted, {{addressID}} from the related Address is required.
  • In case you delete a site, only the site should be deleted , not the on-boarded address.

POST Request:{{BASE_URL}}/site


[
    {
        "addressIds": [
            "{{addressUID}}"
        ],
        "eventType": " SiteDeleted",
        "energyRatingIds": [
            "energy-123"
        ],
        "extensionData": {
            "remark": "abc",
            "aoFunctionName": "ao-name1",
            "aoFunctionCode": "1356",
            "gbScope": "a878",
            "architecturalObjectId": "987h",
            "resisId": "12",
            "statusId": 1
        },
        "name": "Site {{$randomFirstName}}",
        "siteId": "{{siteUID}}",
        "type": "Education",
        "validFrom": "{{validFromDate}}",
        "validUntil": "{{validUntilDate}}"
    }

View site status

Based on the batchID generated when you on-board an address, you can GET the batch of the on-boarded address via the below-mentioned request. This will be the same for Update and Delete.

GET Request:{{BASE_URL}}/batch/{id}/inbound