POST
/ext/dispatch Create a new dispatch requestCreate a new dispatch request with a pickup and delivery address
Request Body (application/json)
{
"pickup": {
"ref_id": "b93d16aa-e34d-4c65-b6ef-acdcca470615",
"lat": 24.712181,
"lng": 46.679747,
"address_line": "ابي البدر الموسوي, As Sulimaniyah, Riyadh 12244, Saudi Arabia"
},
"destination": {
"ref_id": "b93d16aa-e34d-4c65-b6ef-acdcca470615",
"lat": 24.712181,
"lng": 46.679747,
"address_line": "ابي البدر الموسوي, As Sulimaniyah, Riyadh 12244, Saudi Arabia"
},
"user_metadata": {
"id": "15ed2668-f118-40c3-a52c-8ad90fe11ed7",
"username": "theUser",
"firstName": "John",
"lastName": "James",
"email": "john@email.com",
"phone": 9669876654321
},
"vendor_logo_url": "https://picsum.photos/200/300",
"vendor_id": "15ed2668-f118-40c3-a52c-8ad90fe11ed7",
"vendor_name": {
"en-us": "English based text",
"ar-sa": "جملة عربية"
},
"vendor_oid": "15ed2668-f118-40c3-a52c-8ad90fe11ed7",
"vendor_sid": "15EEDFRG",
"vendor_bid": "15ed2668-f118-40c3-a52c-8ad90fe11ed7",
"vendor_payload": {
"pickup_wait_time": 20,
"order_price": 123.65
}
}Responses
201 Successful operation
{
"data": {
"id": "01HQ0PV32FMRA1XGT609QFV2VJ"
}
}400 if a dispatch with a an existing order/vendor_oid exists
{
"error": "generic error",
"error_desc": "identifier 45 not found"
}401 Unauthorized if incorrect api_key is given
{
"error": "generic error",
"error_desc": "identifier 45 not found"
}500 any other errors from the server
{
"error": "generic error",
"error_desc": "identifier 45 not found"
}