/ims/waybills/bill-of-lading (and every equivalent inbound EDI message). Missing or malformed data surfaces as an 816* or 825* error code on the resulting waybill.
When the requirements apply
The Carta Porte data block is required when both of the following are true:shipmentQualifieris one of6(split first bill),7(split subordinate),B(single BOL),C(consolidated),F(stop-off),M(master BOL),S(submaster BOL),W(revenue empty).- Exactly one of
originStationanddestinationStationresolves to Mexico (origin xor destination — pure intra-Mexico moves are currently not validated by this rule). Cedar resolves the country fromcountryCodeif present, otherwise fromstateOrProvince.
1, 8, E, G, H, I, N, X) are exempt regardless of route.
Where the data goes
Carta Porte data is attached to the equipment, not to the top-levellineItems[] array:
The two arrays are not interchangeable.
waybill.lineItems[].quantity is a nested LineItemQuantity object (billedAsQuantity, weightQualifier, etc.); shipmentInfo[].lineItems[].quantity is a flat numeric field corresponding to the X12 417 N1001 element. A cross-border waybill needs both populated.
When waybillTemplateId is set on a /ims/waybills/bill-of-lading request, Cedar merges template data with the request rather than replacing the waybill wholesale.
equipmentDetails[].shipmentInfo[]
- Template fields (for example
referenceIdQualifier,referenceId,extendedReferenceInfo, commodity scaffolding on line items) fill in when the request omits them. - Request fields override template values only when the request value is non-null. An explicit
nullor omitted field in the request does not clear template data. - When the request includes a non-null
shipmentInfo[].lineItems[].weight, that value is also written to the lead equipment’snetWeightLbsandgrossWeightLbs(converted to pounds whenweightUnitCodeisK).
shipmentInfo containing only dynamic line-item fields (quantity, weight, weightUnitCode) and rely on the template for Carta Porte reference data.
parties[]
- Shipper, consignee, freight bill party, and in-care-of (one per bill): Cedar merges each matching pair. Request address data is kept unless the template party includes a non-empty address block (name, address lines, city/state/zip, etc.), in which case the template address block is used. Administrative contacts, billing info, and reference info from the request and template are all retained.
- All other party types (for example Rule 11): every party from the request and every party from the template is kept. Nothing is replaced or deduplicated.
Required content of each shipmentInfo[] entry
For each commodity on each piece of equipment:
Hazardous shipments
If the waybill has anyhazardousInfo[] entries, every shipmentInfo[] block with referenceIdQualifier = UNC must additionally include at least one extendedReferenceInfo[] entry with referenceIdQualifier = MHC (Mexico SAT Hazardous Code). The MHC value must be prefixed with UN and must exist in the Carta Porte reference data.
Required shipper contact
Cross-border waybills must include aparties[] entry with partyType = SH (shipper) that has at least one administrativeContacts[] entry containing all of:
contactFunctionCode = SP- a non-empty
name communicationNumbers[]with the first entryqualifier = TE(telephone) and a non-emptynumber, and the second entryqualifier = EM(email) and a non-emptynumber
The same validation runs whether a waybill is created via
/ims/waybills/bill-of-lading or arrives over EDI. The error codes returned in 824 application advice are identical, so the troubleshooting flow is the same regardless of source.