API Documentation
The BTD API is a production-grade logistics engine designed for scale. Seamlessly quote, process orders, track shipments, and synchronize state via enterprise-standard webhooks.
Authentication
Authenticating your requests is handled via custom headers.
HTTP Headers
X-API-KEY: your_api_key
X-API-SECRET: your_api_secret
Content-Type: application/json
Integration Lifecycle
1Fetch metadata
2Calculate quote metrics
3Convert Quote to Order
4Generate Shipments
5OPS synchronization
6Real-time Webhooks
Get Source Countries
GET /countries_v1/
GET https://connect.mdscargo.com/countries_v1/
Get Destination Countries
GET /countries_v2/
GET https://connect.mdscargo.com/countries_v2/
Create Quote
POST /quotes
{
"source_country_id": 1,
"destination_country_id": 7,
"destination_state_id": 1,
"collection_required": 1,
"delivery_required": 1,
"service_type": "AIR",
"packages": [
{
"package_type_id": 1,
"length": 30, "width": 20, "height": 10,
"weight": 5, "quantity": 2
}
]
}
Retrieve Quote
GET /quotes/get/{uuid}
GET https://connect.mdscargo.com/quotes/get/{quote_uuid}
Create Order
POST /orders
POST /orders { "quote_uuid": "{uuid}", "service_type": "AIR" }
Retrieve Order
GET /orders/get/{uuid}
GET https://connect.mdscargo.com/orders/get/{order_uuid}
Order Shipments
GET /orders/shipments/{uuid}
GET https://connect.mdscargo.com/orders/shipments/{order_uuid}
POST
Shipment Initialization
POST /shipments { "order_uuid": "{uuid}" }
Retrieve Shipment
GET /shipments/get/{uuid}
GET https://connect.mdscargo.com/shipments/get/{shipment_uuid}
Shipment Status Timeline
GET /shipments/get_status/{uuid}
GET https://connect.mdscargo.com/shipments/get_status/{shipment_uuid}
POST Shipment Status Update
POST /shipments/get_status/index.php?uuid={uuid}
{ "status": "IN_TRANSIT", "remarks": "Departed hub" }
{ "status": "IN_TRANSIT", "remarks": "Departed hub" }
Webhooks
Configured per client in api_clients.
Idempotency
Idempotency-Key: {key}Logging
Transactions are logged for auditing.
Error Reference
| Code | Description |
|---|---|
| 400 | Validation error |
| 401 | Authentication failed |
| 404 | Resource not found |
| 409 | State conflict |
| 410 | Expired resource |