Created
September 15, 2015 22:37
-
-
Save micahnz/ea83beeebbe21f39f068 to your computer and use it in GitHub Desktop.
GET /api/rest/v1/customer/orders/active - Customer gets active orders. eg. orders that have had one or more jobs started
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// response body | |
{ | |
"success": true, | |
"result": { | |
"total": 1, | |
"length": 1, | |
"items": [ | |
{ | |
"id": 2, | |
"createdAt": "2015-09-15T21:35:24.061Z", | |
"updatedAt": "2015-09-15T22:36:35.997Z", | |
"pickupAt": "2015-08-19T14:40:34.427Z", | |
"customerId": 1, | |
"distributorId": 1, | |
"type": null, | |
"status": 2, | |
"distance": null, | |
"duration": null, | |
"note": "note", | |
"price": null, | |
"paid": null, | |
"currency": null, | |
"customer": { | |
"id": 1, | |
"createdAt": "2015-09-15T21:31:28.937Z", | |
"updatedAt": "2015-09-15T21:31:28.937Z", | |
"contactAddressId": null, | |
"billingAddressId": null, | |
"roles": null, | |
"type": null, | |
"status": null, | |
"contactName": "Customer McTest", | |
"companyName": "ABC Testing Co.", | |
"phoneNumber": "1800-4-TESTING", | |
"businessCode": "test-1337", | |
"paymentMethod": null, | |
"email": "test@example.com" | |
}, | |
"jobs": [ | |
{ | |
"id": 2, | |
"createdAt": "2015-09-15T21:35:24.087Z", | |
"updatedAt": "2015-09-15T22:36:36.007Z", | |
"pickupAddressId": 3, | |
"deliveryAddressId": 4, | |
"assignmentId": 2, | |
"orderId": 2, | |
"driverId": 1, | |
"type": null, | |
"status": 2, | |
"distance": null, | |
"duration": null, | |
"price": null, | |
"paid": null, | |
"currency": null, | |
"pickupAddress": { | |
"id": 3, | |
"createdAt": "2015-09-15T21:35:24.079Z", | |
"updatedAt": "2015-09-15T21:35:24.079Z", | |
"streetNumber": "street number", | |
"streetName": "street name", | |
"subDistrict": "sub district", | |
"district": "district", | |
"city": "city", | |
"state": "state", | |
"country": "country", | |
"postcode": "postcode", | |
"lat": 18.516722, | |
"long": 99.275992 | |
}, | |
"deliveryAddress": { | |
"id": 4, | |
"createdAt": "2015-09-15T21:35:24.084Z", | |
"updatedAt": "2015-09-15T21:35:24.084Z", | |
"streetNumber": "street number", | |
"streetName": "street name", | |
"subDistrict": "sub district", | |
"district": "district", | |
"city": "city", | |
"state": "state", | |
"country": "country", | |
"postcode": "postcode", | |
"lat": 18.516722, | |
"long": 99.275992 | |
}, | |
"driver": { | |
"id": 1, | |
"createdAt": "2015-09-15T21:31:28.939Z", | |
"updatedAt": "2015-09-15T21:31:28.939Z", | |
"locatedAt": null, | |
"currentOrderId": null, | |
"photoId": null, | |
"lat": null, | |
"long": null, | |
"roles": null, | |
"type": null, | |
"status": null, | |
"online": true, | |
"name": "Driver Testingson", | |
"phoneNumber": "1800-4-TESTING", | |
"bankName": null, | |
"accountName": null, | |
"accountNumber": null, | |
"services": null, | |
"vehicles": null | |
}, | |
"parcels": [ | |
{ | |
"id": 2, | |
"createdAt": "2015-09-15T21:35:24.094Z", | |
"updatedAt": "2015-09-15T22:36:36.021Z", | |
"deliveryAddressId": 4, | |
"code": null, | |
"status": 1, | |
"type": null, | |
"recipient": null, | |
"email": null, | |
"phoneNumber": "phoneNumber", | |
"note": "note", | |
"deliveryAddress": { | |
"id": 4, | |
"createdAt": "2015-09-15T21:35:24.084Z", | |
"updatedAt": "2015-09-15T21:35:24.084Z", | |
"streetNumber": "street number", | |
"streetName": "street name", | |
"subDistrict": "sub district", | |
"district": "district", | |
"city": "city", | |
"state": "state", | |
"country": "country", | |
"postcode": "postcode", | |
"lat": 18.516722, | |
"long": 99.275992 | |
}, | |
"services": [ | |
{ | |
"id": 7, | |
"createdAt": "2015-09-15T21:35:24.103Z", | |
"updatedAt": "2015-09-15T21:35:24.103Z", | |
"type": 0, | |
"data": null | |
}, | |
{ | |
"id": 8, | |
"createdAt": "2015-09-15T21:35:24.105Z", | |
"updatedAt": "2015-09-15T21:35:24.105Z", | |
"type": 1, | |
"data": null | |
}, | |
{ | |
"id": 9, | |
"createdAt": "2015-09-15T21:35:24.110Z", | |
"updatedAt": "2015-09-15T21:35:24.110Z", | |
"type": 2, | |
"data": null | |
}, | |
{ | |
"id": 10, | |
"createdAt": "2015-09-15T21:35:24.117Z", | |
"updatedAt": "2015-09-15T21:35:24.117Z", | |
"type": 3, | |
"data": null | |
}, | |
{ | |
"id": 11, | |
"createdAt": "2015-09-15T21:35:24.122Z", | |
"updatedAt": "2015-09-15T21:35:24.122Z", | |
"type": 4, | |
"data": null | |
}, | |
{ | |
"id": 12, | |
"createdAt": "2015-09-15T21:35:24.125Z", | |
"updatedAt": "2015-09-15T21:35:24.125Z", | |
"type": 5, | |
"data": null | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment