Skip to main content
Mexican law (SAT Carta Porte) requires customs and tariff data on top of a standard bill of lading whenever a shipment crosses the US–Mexico border. Cedar checks a waybill against the rules on this page with the Waybill - Validate Carta Porte requirements automation step. The check runs only where the railroad’s automation workflows include that step. A waybill created or updated through /ims/waybills/bill-of-lading or received over EDI is not checked otherwise, and the API accepts it either way. When the check runs, missing or malformed data shows up as an 816* or 825* error code in the waybill’s application advice (824). Whether or not your railroad runs the check, send the data described here on every cross-border bill: Mexican customs needs it.

When the requirements apply

The Carta Porte data block is required when both of the following are true:
  • shipmentQualifier is one of 6 (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 originStation and destinationStation resolves to Mexico (origin xor destination — pure intra-Mexico moves are currently not validated by this rule). Cedar resolves each station’s country from its stateOrProvince first: a US, Canadian or Mexican state or province code decides the country. Only when stateOrProvince is not one of those codes does Cedar use countryCode. For example, a station in NL (Nuevo León) counts as Mexico even if its countryCode says otherwise.
Empty, intermodal, switch, blind-memo, and company-business qualifiers (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-level lineItems[] 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[]

  • When the request includes commodityCode or commodityDescription on a shipmentInfo line item, that block is taken from the request as-is (template values for that block are not merged in).
  • Otherwise, template Carta Porte scaffolding (for example referenceIdQualifier, referenceId, extendedReferenceInfo, and commodity codes on line items) is deep-merged with the request. Request non-null fields such as quantity, weight, and weightUnitCode override the template at the field level.
  • Omitted or null request fields do not clear template data.
  • When the request sends a weight on the first line item of the lead equipment’s first shipmentInfo entry, that value is also written to the lead equipment’s netWeightLbs and grossWeightLbs, rounded to whole pounds. Cedar converts it from the line item’s weightUnitCode: L (pounds), K (kilograms), S (short tons), T (long tons) or E (metric tons); any other code is read as pounds. Weights on other line items, other shipmentInfo entries and other equipment do not change these fields.
You can send minimal request shipmentInfo containing only dynamic line-item fields (quantity, weight, weightUnitCode) and rely on the template for Carta Porte reference data and commodity codes.

parties[]

  • Shipper, consignee, freight bill party, and in-care-of (one per bill): if the request party includes any body field (name, address, city, and so on), the request owns the entire party body. Otherwise Cedar uses the template party body. administrativeContacts, billingInfo, and referenceInfo from the request and template are all retained — for example, a request shipper address plus template Carta Porte contacts.
  • All other party types (for example Rule 11): every party from the request and every party from the template is kept.

Required content of each shipmentInfo[] entry

For each commodity on each piece of equipment:

Hazardous shipments

If the waybill has any hazardousInfo[] 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

When any shipmentInfo[] entry on a cross-border waybill has referenceIdQualifier = UNC, each parties[] entry with partyType = SH (shipper) must have at least one administrativeContacts[] entry containing all of:
  • contactFunctionCode = SP
  • a non-empty name
  • communicationNumbers[] with the first entry qualifier = TE (telephone) and a non-empty number, and the second entry qualifier = EM (email) and a non-empty number
The check looks only at shipper parties the waybill already has. A waybill with no shipper party, or with no UNC entry, is not flagged by this rule, but Mexican customs still needs the shipper contact, so always include it.
The check is the same whether a waybill was created through /ims/waybills/bill-of-lading, received over EDI, or entered in ARMS, as long as an automation workflow runs it.⁠‌​​‌​‌‌‌‌‌‌​​​​‌​‌​​‌​​​⁠ The error codes in the application advice (824) are identical, so the troubleshooting flow is the same regardless of source.