Endpoint
You can query the Jobs via the following endpoint:
https://[subdomain].manageworkonline.com/awt/api/jobs
Methods
GET
/jobs
Retreive all Jobs
Example Url
https://[subdomain].manageworkonline.com/awt/api/jobs
Response
{
Success: bool,
ErrorMessage: string,
Data: Array<object>
}
GET
/jobs/[id]
Retreive single Job
Example Url
https://[subdomain].manageworkonline.com/awt/api/jobs/[id]
Response
{
Success: bool,
ErrorMessage: string,
Data: object
}
Schema
Job Schema Definition:
Field | Data Type | Nullable |
---|---|---|
Id | int | NO |
ApprovalDate | datetime | YES |
SurveyedBy | string | YES |
PropertyId | int | NO |
Uprn | string | YES |
IsApproved | boolean | NO |
JobReference | string | YES |
CustomSurveyRef | string | YES |
JobTypeId | int | NO |
JobStatusId | int | NO |
JobDescription | string | YES |
DateOfCreation | datetime | YES |
DateOfModification | datetime | YES |
StartDueDate | datetime | YES |
CompletionDueDate | datetime | YES |
CreatedBy | string | YES |
ModifiedBy | string | YES |
RequesterName | string | YES |
RequesterPhone | string | YES |
RequesterEmail | string | YES |
ReferralDate | datetime | YES |
WorkstreamId | int | YES |
ExpenditureCode | string | YES |
TennantName | string | YES |
TennantContact | string | YES |
TennantInfo | string | YES |
Vulnerability | boolean | YES |
Password | boolean | YES |
Measurement | string | YES |
ExternalJobNo | string | YES |
ServiceProviderId | int | YES |
Priority | string | YES |
AdditionalInfo | string | YES |
Caveats | string | YES |
Cost | string | YES |
Notifiable | string | YES |
JSON Example
{
"Id": 171,
"ApprovalDate": null,
"SurveyedBy": null,
"PropertyId": 18,
"Uprn": "18Abc",
"IsApproved": false,
"JobReference": "2016-11-29-165-1",
"CustomSurveyRef": "2016-11-29-165-1",
"JobTypeId": 2,
"JobStatusId": 3,
"JobDescription": "Re-Inspection",
"DateOfCreation": "/Date(1480416370117+0000)/",
"DateOfModification": null,
"StartDueDate": "/Date(1480377600000+0000)/",
"CompletionDueDate": "/Date(1480809600000+0000)/",
"CreatedBy": "Default User",
"ModifiedBy": null,
"RequesterName": "Requester Job",
"RequesterPhone": "123456789",
"ReferralDate": "/Date(1480416369790+0000)/",
"RequesterEmail": "Requester@email.com",
"WorkstreamId": 2,
"ExpenditureCode": "",
"TennantName": "David Tenants",
"TennantContact": "1231894561",
"Measurement": "",
"TennantInfo": "Customer Information",
"Vulnerability": false,
"Password": false,
"ExternalJobNo": "",
"ServiceProviderId": 1,
"Priority": "General",
"AdditionalInfo": "",
"Caveats": "Caveats",
"Cost": null,
"Notifiable": null
}
Request Example
function getJobs(){
var success = function(loginResponse) {
if(loginResponse.Success){
$.ajax({
type: "GET",
url: 'https://[subdomain].manageworkonline.com/awt/api/jobs',
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.