Created
September 15, 2015 22:17
-
-
Save micahnz/600c21828687759c529e to your computer and use it in GitHub Desktop.
POST /api/rest/v1/orders/calculate - Calculate and sign an order with price, distance and duration for posting to order createoi
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
// post body example | |
{ | |
"pickupAt": "2015-08-19T14:40:34.427Z", | |
"pickupAddress": { | |
"streetNumber": "street number", | |
"streetName": "street name", | |
"subDistrict": "sub district", | |
"district": "district", | |
"city": "city", | |
"state": "state", | |
"country": "country", | |
"postcode": "postcode", | |
"lat": -45.903260, | |
"long": 170.507233 | |
}, | |
"note": "note", | |
"jobs": [ | |
{ | |
"deliveryAddress": { | |
"streetNumber": "street number", | |
"streetName": "street name", | |
"subDistrict": "sub district", | |
"district": "district", | |
"city": "city", | |
"state": "state", | |
"country": "country", | |
"postcode": "postcode", | |
"lat": -45.901939, | |
"long": 170.507531 | |
}, | |
"parcels": [ | |
{ | |
"recipientName": "recipientName", | |
"phoneNumber": "phoneNumber", | |
"note": "note", | |
"services": [ | |
{ | |
"type": 0 | |
}, | |
{ | |
"type": 1 | |
}, | |
{ | |
"type": 2 | |
}, | |
{ | |
"type": 3 | |
}, | |
{ | |
"type": 4 | |
}, | |
{ | |
"type": 5 | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
// response body example | |
{ | |
"pickupAt": "2015-08-19T14:40:34.427Z", | |
"pickupAddress": { | |
"streetNumber": "street number", | |
"streetName": "street name", | |
"subDistrict": "sub district", | |
"district": "district", | |
"city": "city", | |
"state": "state", | |
"country": "country", | |
"postcode": "postcode", | |
"lat": -45.90326, | |
"long": 170.507233 | |
}, | |
"note": "note", | |
"jobs": [ | |
{ | |
"deliveryAddress": { | |
"streetNumber": "street number", | |
"streetName": "street name", | |
"subDistrict": "sub district", | |
"district": "district", | |
"city": "city", | |
"state": "state", | |
"country": "country", | |
"postcode": "postcode", | |
"lat": -45.901939, | |
"long": 170.507531 | |
}, | |
"parcels": [ | |
{ | |
"recipientName": "recipientName", | |
"phoneNumber": "phoneNumber", | |
"note": "note", | |
"services": [ | |
{ | |
"type": 0 | |
}, | |
{ | |
"type": 1 | |
}, | |
{ | |
"type": 2 | |
}, | |
{ | |
"type": 3 | |
}, | |
{ | |
"type": 4 | |
}, | |
{ | |
"type": 5 | |
} | |
] | |
} | |
], | |
"distance": 221, | |
"duration": 36, | |
"price": 2.21 | |
} | |
], | |
"id": "1e0ae416-a550-4fe2-b115-3877fdbecd7d", | |
"price": 2.21, | |
"distance": 221, | |
"duration": 36 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment