Table of contents Overview API Endpoints Authentication File Upload API Getting Started with Webhook Get Document Data By Id Output Parameters Processing Status Error Handling Notes Overview This document describes the Intelligent Document Processing (IDP) module APIs from CD AUTOMATION. APIs follow OpenAPI/REST standards and can be tested via Postman or integrated into ERP systems. Webhooks use POST for callbacks and GET for verification.
Authentication All API requests require a Bearer token. Obtain it by sending credentials to the authentication endpoint.
Endpoint URL: https://automate-dev.cargodash.in/api/v1/loginMethod: POSTHeaders: Content-Type: application/jsonRequest Example curl --location 'https://automate-dev.cargodash.in/api/v1/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "your@example.com",
"password": "your_password"
}' Successful Response Example {
"result": {
"token": "eyJhbGciOiJIUzI1NiJ9....",
"expiry": "2025-01-01 01:01:01"
}
} 📂 File Upload API Use this endpoint to upload documents for processing. Maximum file size is 10MB .
Endpoint URL: https://automate-dev.cargodash.in/api/v1/doc-parseMethod: POSTHeaders: Authorization: Bearer {token}Form Parameters file — file to upload (max 10MB)outputType — desired output type (e.g. AWB)Sample Request curl --location 'https://automate-dev.cargodash.in/api/v1/doc-parse' \
--header 'Authorization: Bearer {token}' \
--form 'file=@"/path/to/your/document.pdf"' \
--form 'outputType="AWB"' Successful Response {
"document_id": "uuid-here",
"message": "File uploaded successfully"
} Webhook Integration Webhooks allow CD AUTOMATION to push processed document results directly to your server in real time. To use webhooks, create an HTTPS endpoint on your server that supports:
GET — verification call (to confirm the endpoint is reachable).POST — JSON payload with document processing updates.Register your webhook URL in the CD AUTOMATION app (go to IDP → Add Webhook ).
Sample Webhook Payload (AWB) {
"id": "a4a793f5-3ce1-4f3a-a300-4cb5223f05ae",
"originalFileName": "Job Upload-182895-.46.pdf",
"fileFormat": "PDF",
"status": "COMPLETED",
"response": [
{
"document_type": "AWB",
"Document_no": "930226f6-ef39-..._098-99999999",
"start_page_number": 1,
"end_page_number": 1,
"response": {
"awbNo": "098-99999999",
"flightNo": "AI-111",
"flightDate": "30-08-2024",
"airCarrier": "AIR INDIA",
"departureAirportCode": "BOM",
"destinationAirportCode": "JED",
"shipperName": "ABC PVT LTD.",
"consigneeName": "New Engineering Pvt. Ltd.",
"totalAmount": "66279.00",
"totalAmountCurrency": "INR",
"details": [
{
"noOfPackages": "8",
"grossWeight": "232.21",
"chargeableWeight": "233.00",
"dimensionsValue": ["43X43X52_6","43X43X45_2"],
"rate": "202.00",
"amount": "55800.00",
"productDescription": "MITOCONAZOLE, HS CODE:29332999; ..."
}
]
}
}
],
"totalPages": 1
}(Payload trimmed for clarity — actual payload may include additional fields.)
Get Parsed Document by ID Use this endpoint to fetch processed document results by document_id.
Endpoint Sample Response (AWB) {
"id": "a4a793f5-3ce1-4f3a-a300-4cb5223f05ae",
"originalFileName": "Job Upload-182895-.46.pdf",
"fileFormat": "PDF",
"status": "COMPLETED",
"response": [
{
"document_type": "AWB",
"Document_no": "930226f6-ef39-..._098-99999999",
"start_page_number": 1,
"end_page_number": 1,
"response": {
"awbNo": "098-99999999",
"flightNo": "AI-111",
"flightDate": "30-08-2024",
"airCarrier": "AIR INDIA",
"departureAirportCode": "BOM",
"destinationAirportCode": "JED",
"shipperName": "ABC PVT LTD.",
"consigneeName": "New Engineering Pvt. Ltd.",
"totalAmount": "66279.00",
"totalAmountCurrency": "INR",
"details": [
{
"noOfPackages": "8",
"grossWeight": "232.21",
"chargeableWeight": "233.00",
"dimensionsValue": ["43X43X52_6","43X43X45_2"],
"rate": "202.00",
"amount": "55800.00",
"productDescription": "MITOCONAZOLE, HS CODE:29332999; ..."
}
]
}
}
],
"totalPages": 1
}(Response trimmed for clarity — full response may include additional fields.)