Process Booking (Get Label)¶
Process a confirmed booking to generate a shipment label. This is the second step in the booking workflow, converting a booking into an active shipment with tracking ID, shipping labels, and packing list documents.
Endpoint¶
{{base_url}}/partner/booking/process-booking/{{bookingId}}
cURL Example¶
curl -X POST "https://booking.aajexpress.org/api/v2/partner/booking/process-booking/693abab0f2829e4b2e076968" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
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
- All required booking details (sender, receiver, items) are complete
- Your wallet has sufficient balance or credit facility is available
Payment Deducted Here
This is when payment is processed. When you call this endpoint, the booking amount will be deducted from your wallet or charged to your credit facility. The Create Booking step only creates a quote - this step finalizes the transaction.
Sample Request¶
No request body is required. The booking ID is passed in the URL path.
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.