Developer Documentation
Welcome to the CDHUB API surface. Scale your logistics visibility and document parsing workflow with our enterprise-grade REST endpoints.
Overview
The CDHUB Intelligent Document Processing (IDP) API allows you to automate the extraction of data from logistics documents like Master Air Waybills (MAWB), Bills of Lading (BL), and Invoices. Our endpoints follow standard REST principles and return structured JSON responses.
Authentication
All requests must be authenticated using a Bearer token. You can obtain your token by authenticating with your enterprise credentials.
Method
Endpoint
curl --location 'https://automate.cargodash.in/api/v1/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "your@example.com",
"password": "your_password"
}'File Upload API
Upload documents for async processing. Supported formats: PDF, PNG, JPG (Max 10MB).
curl --location 'https://automate.cargodash.in/api/v1/doc-parse' \
--header 'Authorization: Bearer {token}' \
--form 'file=@"/path/to/document.pdf"' \
--form 'outputType="AWB"'Webhook Integration
Register a callback URL to receive real-time updates when document processing completes.
Payload Structure
The callback contains a status field and a response object containing the extracted nodes.
{
"id": "uuid-v4",
"status": "COMPLETED",
"originalFileName": "mawb_scan_001.pdf",
"response": [
{
"document_type": "AWB",
"response": {
"awbNo": "098-12345678",
"airCarrier": "AIR FRANCE",
"totalAmount": "442.00"
}
}
]
}Error Handling
CDHUB uses standard HTTP status codes to indicate the success or failure of an API request.
Bad Request
Missing parameters or invalid file format.
Unauthorized
The Bearer token is invalid or expired.
Forbidden
No permission to access the resource.
Payload Large
File exceeds the 10MB limit.