Warehouse Shipping Advice EDI - JSON Specification

Summary

The EDI-flavored JSON for an EDI 945 Warehouse Shipping Advice, used as the Chain.io destination file type "chainio945EDI" (Chain.io 945 EDI). This is an OUTPUT format: Chain.io builds it from canonical shipment, purchase order, pack item, package group and party documents (typically a shipped warehouse order), and a downstream EDI translation engine serializes it to X12. Field names that echo X12 (lx, w12) and the segment references below are logical correspondence. One file is produced per shipment, and the document is a bare object (no wrapper). Every field whose value is null is removed, so any field below may be absent. Dates and times are rendered in UTC. When a mandatory field is missing the run fails and no file is produced.
NameDescription
RootThe top level document: a single warehouse shipping advice, with no envelope. Only the first purchase order, the first commercial invoice on that order, the first shipment event, the first consignee and the first ship-from party linked to the shipment are used. The mandatory fields are transaction_purpose_code, transport_mode, carrier_scac and number_of_packages; the flow's required-field overrides can add further paths (for example lx[].w12[].supplier_product_id).
PartiesThe shipment parties, keyed by role. A role is omitted when no party with that role is linked to the shipment.
PartyA party with its first address. In every field except email, each run of characters other than letters, digits, underscores, whitespace and hyphens is replaced by a single space (so punctuation such as "&", "." or "#" does not reach the EDI).
NoteA single line of the purchase order purchaser notes. The notes are split on the flow's note delimiter (a newline by default, and when the delimiter is blank).
LXA purchase order line with its package detail (logical LX loop). The package fields come from the first package group of the first pack item linked to the line, and are omitted entirely when the line has no package group.
W12Item detail for a purchase order line (logical W12).
NameData TypeDescriptionRequired
arrival_port_estimated_dateStringThe shipment estimated arrival date in YYYYMMDD (UTC).
arrival_port_estimated_timeStringThe shipment estimated arrival time in HHmmss (UTC).
carrier_scacStringRequired. The carrier SCAC (logical W2702). When absent the run fails with reason code MMF.YES
container_countIntegerThe shipment container count.
customer_nameStringThe purchase order customer name.
customer_order_numberStringThe purchase order customer order number.
department_codeStringThe purchase order department code.
department_code_descriptionStringThe purchase order department description.
departure_actual_dateStringThe shipment actual departure date in YYYYMMDD (UTC).
departure_actual_timeStringThe shipment actual departure time in HHmmss (UTC).
divisionStringThe purchase order division code.
division_descriptionStringThe purchase order division description.
event_dateStringThe first shipment event's date in YYYYMMDD (UTC).
event_timeStringThe first shipment event's time in HHmmss (UTC).
freight_method_of_paymentStringThe purchase order freight method of payment.
freight_payment_termStringThe purchase order freight payment term code.
freight_payment_term_descriptionStringThe purchase order freight payment term description.
gross_weight_kgsNumberThe shipment gross weight in kilograms (no unit conversion).
house_billStringThe shipment forwarder reference (house bill).
lxArray<LX>One entry per line on the purchase order, in order (logical LX loop).
master_billStringThe shipment master bill.
notesArray<Note>The purchase order purchaser notes, split into one entry per line of text. Always present; an empty array when the order has no purchaser notes.
number_of_packagesIntegerRequired. The shipment package count (logical W0301). When absent the run fails with reason code MMF.YES
order_type_codeStringThe purchase order type code.
partiesPartiesThe consignee and ship-from parties. Always present; empty when neither party is linked.
payment_termStringThe purchase order payment term code.
payment_term_descriptionStringThe purchase order payment term description.
seller_order_numberStringThe purchase order seller (depositor) order number. Also prefixes any missing-field error message.
ship_method_codeStringThe ship method code, emitted only when every line on the purchase order carries the same value (otherwise omitted).
ship_method_descriptionStringThe ship method description, emitted only when every line on the purchase order carries the same value (otherwise omitted).
supplier_customer_numberStringThe customer number assigned by the supplier.
supplier_idStringThe purchase order supplier id.
supplier_nameStringThe purchase order supplier name.
total_dueNumberThe first commercial invoice's total due, copied unchanged (no currency or cents conversion).
transaction_purpose_codeStringRequired. The purchase order transaction purpose code (logical W0601), e.g. N. When absent the run fails with reason code MMF.YES
transport_modeStringRequired. The shipment mode, copied unchanged (logical W2701), e.g. U = private parcel service. When absent the run fails with reason code MMF.YES
vat_numberStringThe purchase order VAT number.
warehouse_pick_ticketStringThe purchase order warehouse pick ticket number.
NameData TypeDescriptionRequired
consigneePartyThe shipment consignee.
ship_fromPartyThe shipment ship-from party.
NameData TypeDescriptionRequired
address_1StringAddress line 1.
address_2StringAddress line 2.
cityStringCity.
countryStringCountry code.
emailStringThe party email address, emitted unchanged (not sanitized).
nameStringThe party name.
owners_idStringThe party owner's id / party code.
phone_numberStringThe address phone number.
postal_codeStringPostal / ZIP code.
stateStringState / province.
NameData TypeDescriptionRequired
codeStringThe note qualifier set by the flow's note code configuration (the same code on every note), e.g. WHI. The note code is a required flow setting; without it the run fails with reason code IC.
textStringThe note text.
NameData TypeDescriptionRequired
gross_weight_kgsNumberThe package group gross weight in kilograms (no unit conversion).
group_idStringThe package group id.
marks_and_numbersStringThe package group marks and numbers.
package_type_codeStringThe package type code. When the flow has a package type map, a code matching an entry is replaced by that entry's code, then by the map's default code, and otherwise kept.
package_type_descriptionStringThe package type description, overridden by the package type map in the same way as the code.
parcel_tracking_numberStringThe package group parcel tracking number.
w12Array<W12>The line item detail (logical W12). Always an array of exactly one element.
NameData TypeDescriptionRequired
gross_weight_kgsNumberThe gross weight in kilograms of the first pack item linked to the line (no unit conversion).
label_codeStringThe line label code.
quantity_fulfilledNumberThe quantity shipped.
quantity_requestedNumberThe quantity ordered.
supplier_product_idStringThe supplier product id. In the standard flow it is looked up by the line's customer SKU from the value recorded when the matching 940 warehouse order was received.
upcStringThe line UPC.

Example