BookCevaShipment
Books an existing shipment with CEVA Logistics. The shipment must already be rated to CEVA; the service loads everything it needs by DM Load Number -- no additional fields are needed from the caller.
Booking functions are carrier-specific. This function books CEVA shipments only; a shipment rated to any other carrier is refused. For FragilePAK last-mile shipments use BookLastMile.
All responses are HTTP 200. Check the status field in the response body for Success or Error.
Function Overview
- Purpose: Book a previously created, CEVA-rated shipment through the CEVA MatrixOrder API and receive the CEVA HAWB number as the shipment's carrier PRO.
- REST Endpoint:
POST /api/public/v1/shipping/BookCevaShipment - SOAP Operation:
BookCevaShipment(BookCevaShipmentRequest) - Authentication: Required -- Bearer token in HTTP Authorization header
Pre-conditions
Before calling BookCevaShipment, the shipment record must:
- Exist and be active (not canceled or deleted)
- Be rated to CEVA -- its carrier must be CEVA Logistics
- Have no
CarrierProNumberalready set -- duplicate booking is rejected - Carry the data CEVA requires: shipper and consignee addresses, an expected pickup date, and at least one line item with pieces and weight
A booking is not retried. If the call times out after CEVA accepted the order, contact your DM integration coordinator before calling again -- a second call is a second real booking at CEVA.
What the booking does
- Submits the shipment to CEVA MatrixOrder and writes the returned HAWB number to the shipment's
CarrierProNumber. - Stores the Bill of Lading CEVA returns as a document on the shipment (category Bill of Lading). The package label is not stored.
- If the BOL cannot be stored, the booking still succeeds:
statusisSuccess,carrierProNumberis populated, and the reason appears inwarnings.
REST Interface
Headers
Authorization: Bearer <token>
Content-Type: application/json
Request Body
{
"dmLoadNumber": 4492830
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
| dmLoadNumber | decimal | Yes | The DM Load Number of the shipment to book |
Response -- Success
{
"status": "Success",
"dmLoadNumber": 4492830,
"carrierProNumber": "MX1163957",
"bolDocumentGuid": "6d2f4a1b-8c3e-4f9a-8b72-1d3e4f5a6b7c",
"warnings": [],
"errors": []
}
Response -- Success with a warning
{
"status": "Success",
"dmLoadNumber": 4492830,
"carrierProNumber": "MX1163957",
"bolDocumentGuid": null,
"warnings": [
"BOL document was not stored: ..."
],
"errors": []
}
Response -- Error
{
"status": "Error",
"dmLoadNumber": 4492830,
"carrierProNumber": null,
"bolDocumentGuid": null,
"warnings": [],
"errors": [
"Requested record not valid for booking."
]
}
Response Fields
| Field | Description |
|---|---|
| status | "Success" or "Error" |
| dmLoadNumber | The DM Load Number of the shipment (echoed from the request on success and on error) |
| carrierProNumber | The CEVA HAWB number, now the shipment's carrier PRO. Populated on success. |
| bolDocumentGuid | Document GUID of the stored Bill of Lading. Null when CEVA returned no BOL or it could not be stored (see warnings). |
| warnings | Non-fatal problems on a successful booking. Empty when none. |
| errors | Array of error messages when status is "Error". |
Error Messages
| Message | Meaning |
|---|---|
| Requested record not valid for booking. | No active shipment has that DM Load Number, or it already carries a carrier PRO number. |
| Requested record is rated to carrier 'XXXX', not CEVA; only a shipment rated to CEVA can be booked here. | The shipment exists but its carrier is not CEVA. Use the booking function for that carrier. |
| Carrier registration failed: ... | CEVA refused the order. The remainder of the message is CEVA's reason. Nothing was written to the shipment. |
Status Codes
- 200 OK -- always returned; check
statusfield for outcome - 401 Unauthorized -- invalid or missing token
SOAP Interface
WSDL
Live WSDL -- /soap/public/v1/shipping?singlewsdl
Authorization: Bearer <token>
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<BookCevaShipment xmlns="http://dmwebservices.com/shipping/public/v1">
<request>
<DMLoadNumber>4492830</DMLoadNumber>
</request>
</BookCevaShipment>
</soapenv:Body>
</soapenv:Envelope>
Namespace note: declare the service namespace as the default namespace on the operation element, as above, so request and DMLoadNumber inherit it. Declaring it only on a prefix and leaving the children unprefixed puts them in no namespace; the request then arrives empty and the service answers Requested record not valid for booking. with DMLoadNumber 0.
SOAP Response -- Success
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<BookCevaShipmentResponse xmlns="http://dmwebservices.com/shipping/public/v1">
<result>
<Status>Success</Status>
<DMLoadNumber>4492830</DMLoadNumber>
<CarrierProNumber>MX1163957</CarrierProNumber>
<BolDocumentGuid>6d2f4a1b-8c3e-4f9a-8b72-1d3e4f5a6b7c</BolDocumentGuid>
<Warnings/>
<Errors/>
</result>
</BookCevaShipmentResponse>
</s:Body>
</s:Envelope>
SOAP Response -- Error
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<BookCevaShipmentResponse xmlns="http://dmwebservices.com/shipping/public/v1">
<result>
<Status>Error</Status>
<DMLoadNumber>4492830</DMLoadNumber>
<CarrierProNumber i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
<BolDocumentGuid i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
<Warnings/>
<Errors xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a:string>Requested record not valid for booking.</a:string>
</Errors>
</result>
</BookCevaShipmentResponse>
</s:Body>
</s:Envelope>