Use Cohaul APIs as building blocks for freight management products and services like shipment creation, tracking, and more.
The API is RESTful, with predictable, resource-oriented URLs. All responses, including errors, return JSON. POST and PUT request body parameters may be sent as application/json or application/x-www-form-urlencoded.
All requests must be authenticated. Authenticate using your API key, provided by your account manager. Include your API key in the Authorization header.
API endpoints with authentication level Secret are only safe to call server-side. You should use your secret API keys to call these endpoints. Use your Test Secret key for testing and non-production environments. Use your Live Secret key for production environments. Include your API key in the Authorization header.
curl https://api.cohaul.io/v1/shipments \
-H "Authorization: cohaul_live_sk_..."
The API uses standard HTTP response codes.
{
"meta": {
"code": 400,
"param": "weight",
"message": "weight: Invalid weight. Must be greater than 0."
}
}
Retrieves a shipping quote based on the provided shipment details. Returns estimated cost and transit time without creating a shipment.
POST https://api.cohaul.io/v1/quotes
origin_zip | string | Zip code of the pickup location |
destination_zip | string | Zip code of the delivery location |
weight | number | Total weight of the shipment in pounds |
accessorials | array | Array of accessorial services needed |
Creates a new shipment in the Cohaul system. Returns the created shipment object.
POST https://api.cohaul.io/v1/shipments
origin_location_id | string | Unique ID of the pickup location |
destination_location_id | string | Unique ID of the delivery location |
origin_dates | array | Array of dates for pickup (ISO 8601 format) |
destination_dates | array | Array of dates for delivery (ISO 8601 format) |
commodity | string | Description of the freight being shipped |
weight | number | Total weight of the shipment in pounds |
special_instructions | string | Additional instructions for the carrier |
origin_number | string | Your reference number for the pickup location |
destination_number | string | Your reference number for the delivery location |
Deletes an existing shipment from the Cohaul system. Returns a success response if the operation is completed successfully.
DELETE https://api.cohaul.io/v1/shipments/{shipment_id}
shipment_id | string | The unique ID of the shipment to delete |
Tracks a shipment location update. Returns the shipment.
POST https://api.cohaul.io/v1/track
shipment_id | string | Unique ID for the shipment |
bol_number | string | BOL number for the shipment |
origin_number | string | Pickup number for the shipment |
destination_number | string | Delivery number for the shipment |
Searches for shipments that match the specified criteria. Returns an array of shipment objects.
GET https://api.cohaul.io/v1/shipments
status | string | Filter by shipment status |
origin_date_range | array | Filter by pickup date range (ISO 8601 format) |
destination_date_range | array | Filter by delivery date range (ISO 8601 format) |
reference_number | string | Filter by reference number (optional) |
origin_zip | string | Filter by origin zip code (optional) |
destination_zip | string | Filter by destination zip code (optional) |