curl --request POST \
--url https://api-test.drop-hub.com/api/v2/external/shipments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference": "ORDER-1042",
"pickup": {
"latitude": 24.7136,
"longitude": 46.6753
},
"destination": {
"latitude": 24.774265,
"longitude": 46.738586
},
"recipient": {
"name": "Noura",
"mobile": "0551234567"
}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"status": "CREATED",
"trackingUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"version": 1,
"codAmount": 1,
"deliveryFeeAmount": 1,
"deliveryFeeCurrency": "SAR",
"eta": {
"target": "PICKUP",
"estimatedArrivalAt": "2023-11-07T05:31:56Z",
"estimatedMinutes": 123,
"calculatedAt": "2023-11-07T05:31:56Z",
"distanceMetres": 123
},
"proofAvailable": true,
"proofType": "PHOTO",
"deliveredAt": "2023-11-07T05:31:56Z",
"failureReasonCode": "<string>",
"cancellationReasonCode": "<string>",
"driver": {
"firstName": "<string>",
"phone": "<string>",
"vehicleType": "MOTORCYCLE",
"vehiclePlate": "<string>"
}
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"status": "CREATED",
"trackingUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"version": 1,
"codAmount": 1,
"deliveryFeeAmount": 1,
"deliveryFeeCurrency": "SAR",
"eta": {
"target": "PICKUP",
"estimatedArrivalAt": "2023-11-07T05:31:56Z",
"estimatedMinutes": 123,
"calculatedAt": "2023-11-07T05:31:56Z",
"distanceMetres": 123
},
"proofAvailable": true,
"proofType": "PHOTO",
"deliveredAt": "2023-11-07T05:31:56Z",
"failureReasonCode": "<string>",
"cancellationReasonCode": "<string>",
"driver": {
"firstName": "<string>",
"phone": "<string>",
"vehicleType": "MOTORCYCLE",
"vehiclePlate": "<string>"
}
}{
"type": "https://api.drophub.example/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drophub.example/problems/authentication-required",
"title": "Authentication required",
"status": 401,
"detail": "Authentication is required for this resource.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "AUTHENTICATION_REQUIRED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drophub.example/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drophub.example/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drophub.example/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drophub.example/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drophub.example/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}Create one shipment from a merchant reference and two location pins
DropHub derives address and city context, route, coverage, pricing, carrier eligibility, service and dispatch decisions, SAR/payment defaults, lifecycle defaults, and the customer tracking URL. Idempotency-Key is optional because the merchant reference is the default key. With quoteId the delivery fee is the quoted one. Quote refusals: 422 QUOTE_NOT_FOUND (unknown or another merchant’s), 422 QUOTE_EXPIRED, 422 QUOTE_MISMATCH (different pickup or destination point), 409 QUOTE_ALREADY_USED (already priced another shipment). An idempotent replay of the same request returns the original shipment with 200.
curl --request POST \
--url https://api-test.drop-hub.com/api/v2/external/shipments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reference": "ORDER-1042",
"pickup": {
"latitude": 24.7136,
"longitude": 46.6753
},
"destination": {
"latitude": 24.774265,
"longitude": 46.738586
},
"recipient": {
"name": "Noura",
"mobile": "0551234567"
}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"status": "CREATED",
"trackingUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"version": 1,
"codAmount": 1,
"deliveryFeeAmount": 1,
"deliveryFeeCurrency": "SAR",
"eta": {
"target": "PICKUP",
"estimatedArrivalAt": "2023-11-07T05:31:56Z",
"estimatedMinutes": 123,
"calculatedAt": "2023-11-07T05:31:56Z",
"distanceMetres": 123
},
"proofAvailable": true,
"proofType": "PHOTO",
"deliveredAt": "2023-11-07T05:31:56Z",
"failureReasonCode": "<string>",
"cancellationReasonCode": "<string>",
"driver": {
"firstName": "<string>",
"phone": "<string>",
"vehicleType": "MOTORCYCLE",
"vehiclePlate": "<string>"
}
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"status": "CREATED",
"trackingUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"version": 1,
"codAmount": 1,
"deliveryFeeAmount": 1,
"deliveryFeeCurrency": "SAR",
"eta": {
"target": "PICKUP",
"estimatedArrivalAt": "2023-11-07T05:31:56Z",
"estimatedMinutes": 123,
"calculatedAt": "2023-11-07T05:31:56Z",
"distanceMetres": 123
},
"proofAvailable": true,
"proofType": "PHOTO",
"deliveredAt": "2023-11-07T05:31:56Z",
"failureReasonCode": "<string>",
"cancellationReasonCode": "<string>",
"driver": {
"firstName": "<string>",
"phone": "<string>",
"vehicleType": "MOTORCYCLE",
"vehiclePlate": "<string>"
}
}{
"type": "https://api.drophub.example/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drophub.example/problems/authentication-required",
"title": "Authentication required",
"status": 401,
"detail": "Authentication is required for this resource.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "AUTHENTICATION_REQUIRED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drophub.example/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drophub.example/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drophub.example/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drophub.example/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}{
"type": "https://api.drophub.example/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "Access to this resource is denied.",
"instance": "/api/v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206",
"code": "ACCESS_DENIED",
"timestamp": "2026-08-22T18:30:00Z",
"correlationId": "018f2d8a-1f00-7000-8000-000000000207",
"requestId": "018f2d8a-1f00-7000-8000-000000000208"
}Authorizations
Headers
Optional. Retry safety is handled for you: when this header is absent DropHub derives the key from the reference you already send — the order number on a shipment create, the shipment id on a cancel — scoped to your merchant account. Two calls naming the same order are treated as one submission and the second returns the original result. Send your own key only if you want to control the replay window yourself; an explicit key always wins.
16 - 128"merchant-order-20260822-0001"
Body
Response
Minimal partner-safe shipment
ASSIGNED covers an offer awaiting the driver's acceptance and an accepted one. NO_DRIVER_AVAILABLE means the bounded driver search ended without a driver; the shipment can still be cancelled.
CREATED, ASSIGNED, PICKED_UP, OUT_FOR_DELIVERY, DELIVERED, FAILED, NO_DRIVER_AVAILABLE, CANCELLED 