Delivery API Documentation

Create One, Create Bulk, and Get One endpoints.

API v1Bearer Auth

Overview

All endpoints require a valid business API key via the Authorization: Bearer <API_KEY> header. Quotas, hub/country permissions, and optional geocoding are enforced server-side.

Base URL/api/v1

Operating Operating Countries & Hubs

Loading operating countries…

Create One Delivery

POST /api/v1/delivery/create-one/

POSTJSON

Authentication

Type:Bearer Token
Authorization: Bearer <API_KEY>
Requests without valid credentials return 401 Unauthorized.

Request Body (JSON)

FieldTypeRequiredDescription
oc_keystring✅ YesOperating country key.
hub_keystring✅ YesOperating country hub key.
dropoff_addressstring✅ YesFull address for delivery drop-off.
dropoff_latitudenumberOptionalLatitude for drop-off. If omitted, will be geocoded.
dropoff_longitudenumberOptionalLongitude for drop-off. If omitted, will be geocoded.
recipient_namestring✅ YesRecipient's full name.
recipient_phonestring✅ YesRecipient's contact number.
recipient_emailstringOptionalRecipient's email address.
recipient_notesstringOptionalDelivery notes or additional instructions.
recipient_package_weightnumberOptionalPackage weight value. Used to match against driver vehicle capacity.
recipient_package_weight_unitstringOptionalPackage weight unit. Allowed values: G, KG, LBS.

Example Request

bash
curl -X POST api/v1/delivery/create-one/ \ -H "Authorization: Bearer df_test_abc123" \ -H "Content-Type: application/json" \ -d '{ "oc_key": "OC-USA", "hub_key": "HUB-NYC-01", "dropoff_address": "123 Main Street, New York, NY", "recipient_name": "John Doe", "recipient_phone": "+1 555 123 4567", "recipient_notes": "Leave at the front desk", "recipient_package_weight": 2.5, "recipient_package_weight_unit": "KG" }'

Example Success (200)

json
{ "delivery_id": "DF-20251009-K92JDX", "message": "Delivery created successfully" }

Errors

Returned when a required field is missing, or when invalid input is provided.
Examples:
{ "error": "oc_key is required" }
{ "error": "Invalid JSON payload" }
{ "error": "recipient_package_weight_unit must be one of G, KG, LBS" }
Domestic Freight