3. Create Building
Op name:
scgrids.createBuilding
This creates a Building object for a given Property
Endpoint:
Method: POST
Type: application/json
URL: /v1/actions
Headers:
Key | Value | Description |
---|---|---|
Authorization | (Required) The Acccess Token or HMAC Signature | |
x-sc-identity | external | (Required) |
Query params:
Key | Value | Description |
---|---|---|
op | scgrids.createBuilding | (Required) Operation Name |
org | (Required) Organisation ID | |
pid | scnoop | (Required) Project ID is scnoop when it’s not known |
propid | (Required) Property ID |
Body:
{
"Name": "Test Building",
"OperatingHours": {
"0": [
{
"Start": "0001",
"End": "2359"
}
],
"1": [
{
"Start": "0001",
"End": "2359"
}
],
"2": [
{
"Start": "0001",
"End": "2359"
}
],
"3": [
{
"Start": "0001",
"End": "2359"
}
],
"4": [
{
"Start": "0001",
"End": "2359"
}
],
"5": [
{
"Start": "0001",
"End": "2359"
}
],
"6": [
{
"Start": "0001",
"End": "2359"
}
]
},
"Email": {
"Default": ""
},
"LevelsCount": 1,
"TimeZone": "Asia/Hong_Kong",
"PropID": "",
"IsBeaconEnabled": false,
"IsPropertyAddress": true,
"Country": "",
"Area": 1200,
"CountryLocale": "",
"PID": ""
}
More example Requests/Responses:
I. Example Request: Create Building
Headers:
Key | Value | Description |
---|---|---|
Authorization | (Required) The Login Acccess Token | |
x-sc-identity | external | (Required) |
Query:
Key | Value | Description |
---|---|---|
op | scgrids.createBuilding | (Required) Operation Name |
org | (Required) Organisation ID | |
pid | scnoop | (Required) Project ID is scnoop when it’s not known |
propid | (Required) Property ID |
Body:
{
"Name": "Demo Project (January)",
"OperatingHours": {
"0": [
{
"Start": "0000",
"End": "2359"
}
],
"1": [
{
"Start": "0000",
"End": "2359"
}
],
"2": [
{
"Start": "0000",
"End": "2359"
}
],
"3": [
{
"Start": "0000",
"End": "2359"
}
],
"4": [
{
"Start": "0000",
"End": "2359"
}
],
"5": [
{
"Start": "0000",
"End": "2359"
}
],
"6": [
{
"Start": "0000",
"End": "2359"
}
]
},
"Email": {
"Default": ""
},
"Address": {
"Street": "16th Cross",
"City": "Bangalore",
"State": "Karnataka",
"Country": "India",
"PostalCode": "560078",
"Coordinates": {
"Latitude": 12.44,
"Longitude": 32.44
}
},
"LevelsCount": 2,
"TimeZone": "Asia/Kolkata",
"IsBeaconEnabled": true,
"IsPropertyAddress": false,
"Country": "IND",
"CountryLocale": "BLR"
}
I. Example Response: Create Building
{
"status": 200,
"message": "Successfully created the project!",
"data": {
"PropId": "",
"PID": "",
"Config": {
"Email": {
"Default": ""
}
},
"Coordinates": {},
"Name": "Demo Project (January)",
"Address": {
"Street": "16th Cross",
"City": "Bangalore",
"State": "Karnataka",
"Country": "India",
"PostalCode": "560078",
"Coordinates": {
"Latitude": 12.44,
"Longitude": 32.44
}
},
"Status": "draft",
"TimeZone": "Asia/Kolkata",
"IsBeaconEnabled": true
}
}
Status Code: 200
Error codes: