Question fréquemment posée
JDISPATCH API Reference Guide
Version 3.0
Comprehensive Integration and Developer Guide
Table of Contents
- 1. Introduction
- 2. General Overview
- 3. Transaction API
- 4. Transaction Overviews
- 5. XML Examples
- 6. JSON Examples
- 7. Status Codes and Limits
Introduction
JDISPATCH enables electronic proof-of-delivery, signature capture, delivery tracking, driver communications, route management, and integration with third-party ERP, POS, and dispatch systems.
General Overview
The platform supports both connected and batch-mode operation. Drivers can continue working while offline and synchronize transactions once connectivity is restored.
Transaction API
Third-party systems interact with JDISPATCH using dispatch and receipt transactions. Documents may be exchanged using XML or JSON.
Document Structure
Every request contains a DocHeader and DocContent section. DocHeader provides authentication and routing information. DocContent contains transaction-specific data.
DocHeader Reference
Field | Required | Description |
DocID | Yes | Unique GUID |
DocType | Yes | Transaction type |
Sender | Yes | Sender identifier |
Date | Yes | ISO 8601 timestamp |
apiKey | Yes | API key provided by AMS |
env | Yes | TEST or PROD |
Supported Document Types
deliveryDispatch - Create, update, cancel or delete deliveries
deliveryReceipt - Delivery confirmation sent back to host system
deliveryResponse - Acknowledgement of receipt processing
jdCustomer - Create/update/delete customers
jdDriver - Create/update/delete drivers
Appendix A - XML Examples
XML Example 1
deliveryDispatch
XML Example 2
jdCustomer
XML Example 3
jdDriver
XML Example 4
deliveryReceipt
XML Example 5
XML Example 6
deliveryResponse
Appendix B - JSON Examples
JSON Example 1
{
"jDispatchRequest": {
"DocHeader": {
"DocID": "",
"DocType": "deliveryDispatch",
"SenderID": "",
"apiKey": "",
"env": "",
"Date": ""
},
"DocContent": {
"DeliveryCount": "",
"Delivery": {
"BranchID": "",
"Status": "",
"OrderDate": "",
"CustomerID": "",
"DriverID": "",
"Invoice": "",
"SubTotal": "",
"Taxes": "",
"Freight": "",
"OtherChg": "",
"DeliveryType": "",
"Total": "",
"Items": {
"LineCode": "",
"PartNumber": "",
"Qty": "",
"Price": "",
"Discount": "",
"Extend": ""
},
"OverrideAddress": {
"Address": "",
"City": "",
"Province": "",
"PostalCode": ""
},
"SignatureRequired": ""
}
}
}
} JSON Example 2
{
"jDispatchRequest": {
"DocHeader": {
"DocID": "",
"DocType": "jdCustomer",
"SenderID": "",
"apiKey": "",
"env": "",
"Date": ""
},
"DocContent": {
"BranchID": "",
"Customer": {
"Status": "",
"CustomerID": "",
"CustomerName": "",
"Address": "",
"City": "",
"Province": "",
"Country": "",
"PhoneNumber": ""
}
}
}
} JSON Example 3
{
"jDispatchRequest": {
"DocHeader": {
"DocID": "",
"DocType": "jdDriver",
"SenderID": "",
"apiKey": "",
"env": "",
"Date": ""
},
"DocContent": {
"Driver": {
"Status": "",
"BranchID": "",
"DriverID": "",
"DriverName": ""
}
}
}
}JSON Example 4
{
"jDispatchResponse": {
"DocHeader": {
"DocID": "",
"DocType": "deliveryReceipt",
"SenderID": "",
"apiKey": "",
"env": "",
"Date": ""
},
"DocContent": {
"CustomerID": "",
"DriverID": "",
"DeliveryDate": "",
"DeliveryTime": "",
"Recipient": "",
"SignatureCode": "",
"Delivery": {
"Invoice": ""
}
}
}
} JSON Example 5
{
"jDispatchResponse": {
"DocHeader": {
"DocID": "",
"DocType": "",
"SenderID": "",
"apiKey": "",
"env": "",
"Date": ""
},
"DocContent": {
"Status": "",
"Code": "",
"Message": ""
}
}
} Field Limits
CustomerID: Alphanumeric, maximum 15 characters
DriverID: Alphanumeric, maximum 6 characters
BranchID: Numeric, maximum 4 digits
Status Codes
Code | Description |
200 | OK |
400 | Bad Request |
401 | Authentication Failure |
403 | Improper Data Format |
404 | Invalid Document Type Passed |
405 | Invalid Document Structure |
412 | Condition Failed |
413 | Request Entity Too Large |
460 | dispatchReceipt failed – Resend requested |
465 | dispatchReceipt failed – Resend not required |
500 | Internal Server Error |
501 | Not Implemented |
503 | Service Unavailable |