Endpoint

You can query the Rooms via the following endpoint:

https://[subdomain].manageworkonline.com/awt/api/rooms

Methods

GET
/rooms
Retreive all Rooms

Example Url

https://[subdomain].manageworkonline.com/awt/api/rooms

Response

{
   Success: bool,
   ErrorMessage: string,
   Data: Array<object>
}

GET
/rooms/[id]
Retreive single Room

Example Url

https://[subdomain].manageworkonline.com/awt/api/rooms/[id]

Response

{
   Success: bool,
   ErrorMessage: string,
   Data: object
}

Schema

Room Schema Definition:

Field Data Type Nullable
Id int NO
FloorId int NO
Description string NO
PropertyId int NO
OrderId int YES
Uprn string NO
IsInspected boolean YES
IsDoesContainAsbestos boolean YES
IsDidContainAsbestos boolean YES
IsAnyToDos boolean YES
CreatedBy string NO
ModifiedBy string NO
DateOfModification DateTime YES
DateOfCreation DateTime YES
IsActive boolean YES

JSON Example

{
    "Id": 10,
    "FloorId": 10,
    "Description": "Room 1",
    "PropertyId": 1,
    "OrderId": null,
    "Uprn": "1abc",
    "IsInspected": true,
    "IsDoesContainAsbestos": false,
    "IsDidContainAsbestos": false,
    "IsAnyToDos": false,
    "CreatedBy": "DIEU66",
    "ModifiedBy": null,
    "DateOfModification": null,
    "DateOfCreation": "/Date(1473068824867+0100)/",
    "IsActive": true,
    "IsLiableToAsbestos": false
}

Request Example

function getRooms(){
   var success = function(loginResponse) {
      if(loginResponse.Success){
         $.ajax({
            type: "GET",
            url: 'https://[subdomain].manageworkonline.com/awt/api/rooms',
            crossDomain: true,
            xhrFields: { withCredentials: true },
            success: function(response){
               if(response.Success){
                  alert(response.Data.length);
               }
            },
            dataType: "json"
         });
      }
   };
   window.login(success);
}

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Please do not use this for support questions.
For customer support, please contact us here.

Post Comment