Endpoint
You can query the properties via the following endpoint:
https://[subdomain].manageworkonline.com/awt/api/properties
Methods
GET
/properties
Retreive all properties
Example Url
https://[subdomain].manageworkonline.com/awt/api/properties
Response
{
Success: bool,
ErrorMessage: string,
Data: Array<object>
}
GET
/properties/[id]
Retreive single property
Example Url
https://[subdomain].manageworkonline.com/awt/api/properties/[id]
Response
{
Success: bool,
ErrorMessage: string,
Data: object
}
Schema
Property Schema Definition:
Field | Data Type | Nullable |
---|---|---|
Id | int | NO |
SiteName | string | YES |
SiteAdd1 | string | YES |
SiteAdd2 | string | YES |
SiteAdd3 | string | YES |
SiteAdd4 | string | YES |
SiteAdd5 | string | YES |
SitePostCode | string | YES |
PropertyNo | string | YES |
PropertyName | string | YES |
PropField1 | string | YES |
PropField2 | string | YES |
PropField3 | string | YES |
PropField4 | string | YES |
FloorCount | int | YES |
RoomCount | int | YES |
YearBuilt | int | YES |
Uprn | string | NO |
IsInspected | boolean | NO |
IsDoesContainAsbestos | boolean | YES |
IsDidContainAsbestos | boolean | YES |
IsLiableToAsbestos | boolean | YES |
IsAnyToDos | boolean | YES |
ClientName | string | YES |
PropertyStatus | string | YES |
CreatedBy | string | YES |
ModifiedBy | string | YES |
DateOfCreation | datetime | YES |
DateOfModification | datetime | YES |
FullAddress | string | YES |
JSON Example
{
"Id": 647,
"SiteName": "Property 957 C",
"SiteAdd1": null,
"SiteAdd2": "168 First St.",
"SiteAdd3": null,
"SiteAdd4": null,
"SiteAdd5": null,
"SitePostCode": "DH4 5DW",
"PropertyNo": "476 ",
"PropertyName": "The White House",
"PropField1": "Leisure Development ",
"PropField2": null,
"PropField3": "Housing ",
"PropField4": "Flat 9672",
"RoomCount": null,
"FloorCount": null,
"YearBuilt": null,
"Uprn": "647",
"IsInspected": false,
"IsDoesContainAsbestos": false,
"IsDidContainAsbestos": false,
"IsAnyToDos": false,
"ClientName": null,
"PropertyStatus": null,
"CreatedBy": null,
"ModifiedBy": null,
"DateOfModification": "/Date(1468281546370+0100)/",
"DateOfCreation": "/Date(1466728744210+0100)/",
"IsLiableToAsbestos": true,
"FullAddress": "647, Property 957 C, 168 First St., , DH4 5DW"
}
Request Example
function getProperties(){
var success = function(loginResponse) {
if(loginResponse.Success){
$.ajax({
type: "GET",
url: 'https://[subdomain].manageworkonline.com/awt/api/properties',
crossDomain: true,
xhrFields: { withCredentials: true },
success: function(response){
if(response.Success){
alert(response.Data.length);
}
},
dataType: "json"
});
}
};
window.login(success);
}
Post your comment on this topic.