Process Booking¶
Booking
Write
Process a confirmed booking to generate a shipment. This endpoint converts a paid booking into an active shipment with tracking ID, shipping labels, and packing list documents ready for dispatch.
Shipment Created
On Success
Labels Generated
Documents
Tracking ID
Assigned
Endpoint¶
POST
{{base_url}}/employee/booking/process-booking/{{bookingId}}
Path Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
bookingId |
string | Yes | The unique identifier of the booking to process |
Headers¶
| Header | Value | Description |
|---|---|---|
Authorization |
Bearer {{ token }} |
Authentication token |
Content-Type |
application/json |
Request content type |
Prerequisites¶
Before processing a booking, ensure:
- The booking exists and is in a confirmed state
- Payment has been confirmed for the booking
- All required booking details (sender, receiver, items) are complete
Sample Request¶
curl --request POST \
--url '{{ base_url }}/employee/booking/process-booking/69028cc7422ff9b0c1a5d970' \
--header 'Authorization: Bearer {{ token }}' \
--header 'Content-Type: application/json'
Response¶
{
"success": true,
"message": "Booking processed successfully",
"data": {
"payload": {
"shipment": {
"tracking_id": "AAJ7F8E2D1C",
"labelDocuments": [
" https://storage.aajexpress.org/labels/AAJ7F8E2D1C-label"
],
"parkingListDocuments": [
"https://storage.aajexpress.org/packing/AAJ7F8E2D1C-packing.pdf"
]
}
}
}
}
Response Fields¶
| Field | Type | Description |
|---|---|---|
success |
boolean | Indicates if the request was successful |
message |
string | Success or error message |
data.payload.shipment |
object | The created shipment details |
data.payload.shipment.tracking_id |
string | Unique tracking identifier for the shipment |
data.payload.shipment.labelDocuments |
array | Array of shipping label documents |
data.payload.shipment.parkingListDocuments |
array | Array of packing list documents |
data.payload.shipment.status |
string | Initial shipment status code |
Shipment Status Codes¶
| Status | Description |
|---|---|
0 |
Pending |
1 |
Received / Ready for processing |
2 |
In Transit |
3 |
Out for Delivery |
4 |
Delivered |
For complete status information, see Shipment Statuses.
Error Responses¶
Booking Not Found¶
{
"success": false,
"message": "Booking not found",
"error": "NOT_FOUND"
}
Payment Not Confirmed¶
{
"success": false,
"message": "Payment must be confirmed before processing",
"error": "PAYMENT_REQUIRED"
}
Already Processed¶
{
"success": false,
"message": "Booking has already been processed",
"error": "ALREADY_PROCESSED"
}
Next Steps
After processing a booking, use the tracking_id to track the shipment via the Track Shipment endpoint. Download and print the label documents for package preparation.