Create Booking API Documentation
This API allows clients to create a booking with multiple delivery addresses and related details.
Endpoint
POST /api/v1/create_booking
Headers
Authorization
: Bearer client_secret_key (required) you will get in profile page.Content-Type
: application/json
Request Body
{ "keyclient_id": "your_client_id", "keytimezone": "Asia/Tbilisi", "keybooking_item_data": { "booking_item_list": [ { "keycustomer_name": "John Doe", "keycustomer_phone": "1234567890", "keycomments": "Urgent delivery", "keypickup_address": "29a Batumi Street, Tbilisi, Georgia", "keydropoff_address": "Dighomi Massive, Tbilisi, Georgia" }, { "keycustomer_name": "Jane Smith", "keycustomer_phone": "9876543210", "keycomments": "Handle with care", "keypickup_address": "Liberty Square, Tbilisi, Georgia", "keydropoff_address": "Vake Park, Tbilisi, Georgia" } ] } }
Response
On success, the API returns a 200 OK
response with a JSON object containing the booking results:
{ "results": [ { "status": "success", "barcode_no": "101", "message": "Address inserted successfully." }, { "status": "success", "barcode_no": "102", "message": "Address inserted successfully." } ] }
Error Responses
401 Unauthorized
: Authentication failed. Missing or invalidAuthorization
header.400 Bad Request
: Invalid JSON input or missing required parameters.
Example PHP Client Code
$service_url = 'https://deliverers.ge/api/v1/create_booking'; $curl = curl_init($service_url); CURLOPT_POSTFIELDS =>'{ "keyclient_id": "your_client_id", "keytimezone": "Asia/Tbilisi", "keybooking_item_data": { "booking_item_list": [ { "keycustomer_name": "John Doe", "keycustomer_phone": "1234567890", "keycomments": "Urgent delivery", "keypickup_address": "29a Batumi Street, Tbilisi, Georgia", "keydropoff_address": "Dighomi Massive, Tbilisi, Georgia" }, { "keycustomer_name": "Jane Smith", "keycustomer_phone": "9876543210", "keycomments": "Handle with care", "keypickup_address": "Liberty Square, Tbilisi, Georgia", "keydropoff_address": "Vake Park, Tbilisi, Georgia" } ] } }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json', 'Authorization: ••••••' ), curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data); $curl_response = curl_exec($curl); curl_close($curl); echo $curl_response;