Sample Data Validation
The following codes describe the JSON file with the work orders.
{
"workOrders": [
{
"geoLocation": {
"latitude": 24.317776,
"longitude": 54.474686
},
"serviceDuration": "PT3H",
"importance": 1,
"preferredStart": "2024-04-22T03:30:00Z",
"preferredEnd": "2024-04-23T11:30:00Z",
"isAvailableForOvernightStay": false,
"applyEfficiencyFactor": true,
"workOrderId": "2fc48f70-9fa9-4f9d-8a0a-ed9d7e2f9d0b",
"accessHours": [
{
"begin": "2024-04-22T10:03:02.449Z",
"end": "2024-04-23T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-23T07:00:00Z",
"end": "2024-04-24T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-24T07:00:00Z",
"end": "2024-04-25T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-25T07:00:00Z",
"end": "2024-04-26T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-26T07:00:00Z",
"end": "2024-04-27T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-27T07:00:00Z",
"end": "2024-04-28T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-28T07:00:00Z",
"end": "2024-04-29T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-29T07:00:00Z",
"end": "2024-04-30T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-30T07:00:00Z",
"end": "2024-05-01T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-01T07:00:00Z",
"end": "2024-05-02T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-02T07:00:00Z",
"end": "2024-05-02T10:03:02.449Z",
"preferredHour": false
}
]
},
{
"geoLocation": {
"latitude": 0,
"longitude": 0
},
"serviceDuration": "PT3H",
"importance": 1,
"preferredStart": "2024-04-22T03:30:00Z",
"preferredEnd": "2024-04-23T11:30:00Z",
"isAvailableForOvernightStay": false,
"applyEfficiencyFactor": true,
"workOrderId": "WO-1",
"accessHours": [
{
"begin": "2024-04-22T10:03:02.449Z",
"end": "2024-04-23T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-23T07:00:00Z",
"end": "2024-04-24T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-24T07:00:00Z",
"end": "2024-04-25T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-25T07:00:00Z",
"end": "2024-04-26T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-26T07:00:00Z",
"end": "2024-04-27T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-27T07:00:00Z",
"end": "2024-04-28T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-28T07:00:00Z",
"end": "2024-04-29T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-29T07:00:00Z",
"end": "2024-04-30T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-30T07:00:00Z",
"end": "2024-05-01T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-01T07:00:00Z",
"end": "2024-05-02T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-02T07:00:00Z",
"end": "2024-05-02T10:03:02.449Z",
"preferredHour": false
}
]
},
{
"serviceDuration": "PT3H",
"importance": 1,
"preferredStart": "2024-04-22T03:30:00Z",
"preferredEnd": "2024-04-23T11:30:00Z",
"isAvailableForOvernightStay": false,
"applyEfficiencyFactor": true,
"workOrderId": "WO-2",
"accessHours": [
{
"begin": "2024-04-22T10:03:02.449Z",
"end": "2024-04-23T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-23T07:00:00Z",
"end": "2024-04-24T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-24T07:00:00Z",
"end": "2024-04-25T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-25T07:00:00Z",
"end": "2024-04-26T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-26T07:00:00Z",
"end": "2024-04-27T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-27T07:00:00Z",
"end": "2024-04-28T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-28T07:00:00Z",
"end": "2024-04-29T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-29T07:00:00Z",
"end": "2024-04-30T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-30T07:00:00Z",
"end": "2024-05-01T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-01T07:00:00Z",
"end": "2024-05-02T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-02T07:00:00Z",
"end": "2024-05-02T10:03:02.449Z",
"preferredHour": false
}
]
},
{
"geoLocation": {
"latitude": 24.317776,
"longitude": 54.474686
},
"serviceDuration": "PT3H",
"importance": 1,
"preferredStart": "2024-04-22T03:30:00Z",
"preferredEnd": "2024-04-23T11:30:00Z",
"isAvailableForOvernightStay": false,
"applyEfficiencyFactor": true,
"workOrderId": "57e541be-b6f3-47e6-b83a-323fc9d91bac",
"accessHours": [
{
"begin": "2024-04-22T10:03:02.449Z",
"end": "2024-04-23T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-23T07:00:00Z",
"end": "2024-04-24T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-24T07:00:00Z",
"end": "2024-04-25T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-25T07:00:00Z",
"end": "2024-04-26T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-26T07:00:00Z",
"end": "2024-04-27T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-27T07:00:00Z",
"end": "2024-04-28T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-28T07:00:00Z",
"end": "2024-04-29T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-29T07:00:00Z",
"end": "2024-04-30T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-30T07:00:00Z",
"end": "2024-05-01T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-01T07:00:00Z",
"end": "2024-05-02T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-02T07:00:00Z",
"end": "2024-05-02T10:03:02.449Z",
"preferredHour": false
}
]
},
{
"geoLocation": {
"latitude": 24.317776,
"longitude": 54.474686
},
"serviceDuration": "PT3H",
"importance": 1,
"preferredStart": "2024-04-22T03:30:00Z",
"preferredEnd": "2024-04-23T11:30:00Z",
"isAvailableForOvernightStay": false,
"applyEfficiencyFactor": true,
"workOrderId": "0ec0358d-ac1a-4df6-889c-6e0c48b80045",
"accessHours": [
{
"begin": "2024-04-22T10:03:02.449Z",
"end": "2024-04-23T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-23T07:00:00Z",
"end": "2024-04-24T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-24T07:00:00Z",
"end": "2024-04-25T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-25T07:00:00Z",
"end": "2024-04-26T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-26T07:00:00Z",
"end": "2024-04-27T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-27T07:00:00Z",
"end": "2024-04-28T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-28T07:00:00Z",
"end": "2024-04-29T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-29T07:00:00Z",
"end": "2024-04-30T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-30T07:00:00Z",
"end": "2024-05-01T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-01T07:00:00Z",
"end": "2024-05-02T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-02T07:00:00Z",
"end": "2024-05-02T10:03:02.449Z",
"preferredHour": false
}
]
},
{
"geoLocation": {
"latitude": 24.317776,
"longitude": 54.474686
},
"serviceDuration": "PT3H",
"importance": 1,
"preferredStart": "2024-04-22T03:30:00Z",
"preferredEnd": "2024-04-23T11:30:00Z",
"isAvailableForOvernightStay": false,
"applyEfficiencyFactor": true,
"workOrderId": "f60de79f-277f-4754-93a2-9d100b629882",
"accessHours": [
{
"begin": "2024-04-22T10:03:02.449Z",
"end": "2024-04-23T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-23T07:00:00Z",
"end": "2024-04-24T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-24T07:00:00Z",
"end": "2024-04-25T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-25T07:00:00Z",
"end": "2024-04-26T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-26T07:00:00Z",
"end": "2024-04-27T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-27T07:00:00Z",
"end": "2024-04-28T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-28T07:00:00Z",
"end": "2024-04-29T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-29T07:00:00Z",
"end": "2024-04-30T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-30T07:00:00Z",
"end": "2024-05-01T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-01T07:00:00Z",
"end": "2024-05-02T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-02T07:00:00Z",
"end": "2024-05-02T10:03:02.449Z",
"preferredHour": false
}
]
},
{
"geoLocation": {
"latitude": 24.317776,
"longitude": 54.474686
},
"serviceDuration": "PT3H",
"importance": 1,
"preferredStart": "2024-04-22T03:30:00Z",
"preferredEnd": "2024-04-23T11:30:00Z",
"isAvailableForOvernightStay": false,
"applyEfficiencyFactor": true,
"workOrderId": "67e01412-57fd-4fa8-94e8-dde7d117916c",
"accessHours": [
{
"begin": "2024-04-22T10:03:02.449Z",
"end": "2024-04-23T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-23T07:00:00Z",
"end": "2024-04-24T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-24T07:00:00Z",
"end": "2024-04-25T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-25T07:00:00Z",
"end": "2024-04-26T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-26T07:00:00Z",
"end": "2024-04-27T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-27T07:00:00Z",
"end": "2024-04-28T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-28T07:00:00Z",
"end": "2024-04-29T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-29T07:00:00Z",
"end": "2024-04-30T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-04-30T07:00:00Z",
"end": "2024-05-01T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-01T07:00:00Z",
"end": "2024-05-02T07:00:00Z",
"preferredHour": false
},
{
"begin": "2024-05-02T07:00:00Z",
"end": "2024-05-02T10:03:02.449Z",
"preferredHour": false
}
]
}
],
"resources": [
{
"geoLocation": {
"latitude": 24.317776,
"longitude": 54.474686
},
"maxDistance": "200.0 km",
"avgTravelSpeed": "50.0 km/h",
"resourceId": "3740c5e4-48c1-44cd-aa92-0874790ef870",
"workingHours": [
{
"begin": "2024-04-22T10:03:02.449Z",
"end": "2024-04-22T20:00:00Z"
},
{
"begin": "2024-04-22T20:00:00Z",
"end": "2024-04-23T20:00:00Z"
},
{
"begin": "2024-04-23T20:00:00Z",
"end": "2024-04-24T20:00:00Z"
},
{
"begin": "2024-04-24T20:00:00Z",
"end": "2024-04-25T20:00:00Z"
},
{
"begin": "2024-04-25T20:00:00Z",
"end": "2024-04-26T20:00:00Z"
},
{
"begin": "2024-04-26T20:00:00Z",
"end": "2024-04-27T20:00:00Z"
},
{
"begin": "2024-04-27T20:00:00Z",
"end": "2024-04-28T20:00:00Z"
},
{
"begin": "2024-04-28T20:00:00Z",
"end": "2024-04-29T20:00:00Z"
},
{
"begin": "2024-04-29T20:00:00Z",
"end": "2024-04-30T20:00:00Z"
},
{
"begin": "2024-04-30T20:00:00Z",
"end": "2024-05-01T20:00:00Z"
},
{
"begin": "2024-05-01T20:00:00Z",
"end": "2024-05-02T10:03:02.449Z"
}
]
},
{
"geoLocation": {
"latitude": 24.317776,
"longitude": 54.474686
},
"maxDistance": "200.0 km",
"avgTravelSpeed": "50.0 km/h",
"resourceId": "5ddf2c18-83c7-4592-b08e-3d4f8662a792",
"workingHours": [
{
"begin": "2024-04-22T10:03:02.449Z",
"end": "2024-04-22T20:00:00Z"
},
{
"begin": "2024-04-22T20:00:00Z",
"end": "2024-04-23T20:00:00Z"
},
{
"begin": "2024-04-23T20:00:00Z",
"end": "2024-04-24T20:00:00Z"
},
{
"begin": "2024-04-24T20:00:00Z",
"end": "2024-04-25T20:00:00Z"
},
{
"begin": "2024-04-25T20:00:00Z",
"end": "2024-04-26T20:00:00Z"
},
{
"begin": "2024-04-26T20:00:00Z",
"end": "2024-04-27T20:00:00Z"
},
{
"begin": "2024-04-27T20:00:00Z",
"end": "2024-04-28T20:00:00Z"
},
{
"begin": "2024-04-28T20:00:00Z",
"end": "2024-04-29T20:00:00Z"
},
{
"begin": "2024-04-29T20:00:00Z",
"end": "2024-04-30T20:00:00Z"
},
{
"begin": "2024-04-30T20:00:00Z",
"end": "2024-05-01T20:00:00Z"
},
{
"begin": "2024-05-01T20:00:00Z",
"end": "2024-05-02T10:03:02.449Z"
}
]
},
{
"geoLocation": {
"latitude": 24.317776,
"longitude": 54.474686
},
"maxDistance": "200.0 km",
"avgTravelSpeed": "50.0 km/h",
"resourceId": "19c53f2b-af00-46e4-9d18-b8dceef77741",
"workingHours": [
{
"begin": "2024-04-22T10:03:02.449Z",
"end": "2024-04-22T20:00:00Z"
},
{
"begin": "2024-04-22T20:00:00Z",
"end": "2024-04-23T20:00:00Z"
},
{
"begin": "2024-04-23T20:00:00Z",
"end": "2024-04-24T20:00:00Z"
},
{
"begin": "2024-04-24T20:00:00Z",
"end": "2024-04-25T20:00:00Z"
},
{
"begin": "2024-04-25T20:00:00Z",
"end": "2024-04-26T20:00:00Z"
},
{
"begin": "2024-04-26T20:00:00Z",
"end": "2024-04-27T20:00:00Z"
},
{
"begin": "2024-04-27T20:00:00Z",
"end": "2024-04-28T20:00:00Z"
},
{
"begin": "2024-04-28T20:00:00Z",
"end": "2024-04-29T20:00:00Z"
},
{
"begin": "2024-04-29T20:00:00Z",
"end": "2024-04-30T20:00:00Z"
},
{
"begin": "2024-04-30T20:00:00Z",
"end": "2024-05-01T20:00:00Z"
},
{
"begin": "2024-05-01T20:00:00Z",
"end": "2024-05-02T10:03:02.449Z"
}
]
},
{
"geoLocation": {
"latitude": 24.317776,
"longitude": 54.474686
},
"maxDistance": "200.0 km",
"avgTravelSpeed": "50.0 km/h",
"resourceId": "3155bc20-dd75-438c-a417-18c6b0f69bf3",
"workingHours": [
{
"begin": "2024-04-22T10:03:02.449Z",
"end": "2024-04-22T20:00:00Z"
},
{
"begin": "2024-04-22T20:00:00Z",
"end": "2024-04-23T20:00:00Z"
},
{
"begin": "2024-04-23T20:00:00Z",
"end": "2024-04-24T20:00:00Z"
},
{
"begin": "2024-04-24T20:00:00Z",
"end": "2024-04-25T20:00:00Z"
},
{
"begin": "2024-04-25T20:00:00Z",
"end": "2024-04-26T20:00:00Z"
},
{
"begin": "2024-04-26T20:00:00Z",
"end": "2024-04-27T20:00:00Z"
},
{
"begin": "2024-04-27T20:00:00Z",
"end": "2024-04-28T20:00:00Z"
},
{
"begin": "2024-04-28T20:00:00Z",
"end": "2024-04-29T20:00:00Z"
},
{
"begin": "2024-04-29T20:00:00Z",
"end": "2024-04-30T20:00:00Z"
},
{
"begin": "2024-04-30T20:00:00Z",
"end": "2024-05-01T20:00:00Z"
},
{
"begin": "2024-05-01T20:00:00Z",
"end": "2024-05-02T10:03:02.449Z"
}
]
},
{
"address": "Abu Dhabi, Abu Dhabi, United Arab Emirates",
"geoLocation": {
"latitude": 24.453835,
"longitude": 54.377401
},
"maxDistance": "200.0 km",
"avgTravelSpeed": "50.0 km/h",
"resourceId": "3d095172-6558-4f13-bef1-008c9658673f",
"workingHours": [
{
"begin": "2024-04-22T10:03:02.449Z",
"end": "2024-04-22T20:00:00Z"
},
{
"begin": "2024-04-22T20:00:00Z",
"end": "2024-04-23T20:00:00Z"
},
{
"begin": "2024-04-23T20:00:00Z",
"end": "2024-04-24T20:00:00Z"
},
{
"begin": "2024-04-24T20:00:00Z",
"end": "2024-04-25T20:00:00Z"
},
{
"begin": "2024-04-25T20:00:00Z",
"end": "2024-04-26T20:00:00Z"
},
{
"begin": "2024-04-26T20:00:00Z",
"end": "2024-04-27T20:00:00Z"
},
{
"begin": "2024-04-27T20:00:00Z",
"end": "2024-04-28T20:00:00Z"
},
{
"begin": "2024-04-28T20:00:00Z",
"end": "2024-04-29T20:00:00Z"
},
{
"begin": "2024-04-29T20:00:00Z",
"end": "2024-04-30T20:00:00Z"
},
{
"begin": "2024-04-30T20:00:00Z",
"end": "2024-05-01T20:00:00Z"
},
{
"begin": "2024-05-01T20:00:00Z",
"end": "2024-05-02T10:03:02.449Z"
}
]
},
{
"address": "Abu Dhabi, Abu Dhabi, United Arab Emirates",
"geoLocation": {
"latitude": 24.453835,
"longitude": 54.377401
},
"maxDistance": "200.0 km",
"avgTravelSpeed": "50.0 km/h",
"resourceId": "e7feaa92-733e-4acf-8f3a-7ab7fe822253",
"workingHours": [
{
"begin": "2024-04-22T10:03:02.449Z",
"end": "2024-04-22T20:00:00Z"
},
{
"begin": "2024-04-22T20:00:00Z",
"end": "2024-04-23T20:00:00Z"
},
{
"begin": "2024-04-23T20:00:00Z",
"end": "2024-04-24T20:00:00Z"
},
{
"begin": "2024-04-24T20:00:00Z",
"end": "2024-04-25T20:00:00Z"
},
{
"begin": "2024-04-25T20:00:00Z",
"end": "2024-04-26T20:00:00Z"
},
{
"begin": "2024-04-26T20:00:00Z",
"end": "2024-04-27T20:00:00Z"
},
{
"begin": "2024-04-27T20:00:00Z",
"end": "2024-04-28T20:00:00Z"
},
{
"begin": "2024-04-28T20:00:00Z",
"end": "2024-04-29T20:00:00Z"
},
{
"begin": "2024-04-29T20:00:00Z",
"end": "2024-04-30T20:00:00Z"
},
{
"begin": "2024-04-30T20:00:00Z",
"end": "2024-05-01T20:00:00Z"
},
{
"begin": "2024-05-01T20:00:00Z",
"end": "2024-05-02T10:03:02.449Z"
}
]
}

],
"events": [
{
"geoLocation": {
"latitude": 24.317776,
"longitude": 54.474686
},
"eventDuration": "PT3H",
"assignedResourceId": "5ddf2c18-83c7-4592-b08e-3d4f8662a792",
"eventType": "CALENDAR_GEO_ITEM",
"isForcedStayNode": false,
"eventId": "e02cb32a-4cef-40ec-b49f-3b39c64ab956",
"accessHours": [
{
"begin": "2024-04-22T08:38:00Z",
"end": "2024-04-22T11:38:00Z",
"preferredHour": false
}
]
},
{
"geoLocation": {
"latitude": 24.317776,
"longitude": 54.474686
},
"eventDuration": "PT3H",
"assignedResourceId": "19c53f2b-af00-46e4-9d18-b8dceef77741",
"eventType": "CALENDAR_GEO_ITEM",
"isForcedStayNode": false,
"eventId": "5950b40c-7989-4431-a161-74a49ad5a1b0",
"accessHours": [
{
"begin": "2024-04-22T08:45:00Z",
"end": "2024-04-22T11:45:00Z",
"preferredHour": false
}
]
}
],
"parameters": {
"modeOfTravel": "Driving",
"modeOfJob": "ShortTermPlan",
"distanceProvider": "Heuristic"
}
}
Response
In the following response, the WO-1 and Wo-2 are invalid work orders and Optimization ignores these work orders and run with other valid work orders in the JSON.
"badSchedulingElements": [
{
"id": "WO-2",
"reason": "geoLocation, address, Both fields cannot be empty",
"reasonCode": -517,
"unscheduledElementType": "BAD_WORK_ORDER"
},
{
"id": "WO-1",
"reason": "geoLocation, Provided latitude and/or longitude are invalid",
"reasonCode": -540,
"unscheduledElementType": "BAD_WORK_ORDER"
}
],
Was this helpful?