Warehouse Order EDI - JSON Specification

Summary

The EDI-flavored JSON for an EDI 940 Warehouse Shipping Order, used as the Chain.io source file type "ediJSON940WarehouseOrder" (EDI JSON 940 Warehouse Order). This is an INPUT format: an EDI translator converts an inbound X12 940 into this JSON, which Chain.io maps to canonical purchase order, purchase order line, note, party and location documents. Reference and note qualifiers follow X12 conventions; any segment references are logical correspondence. Each file holds one warehouse order, and several files may be sent together. No individual field is required: a file is rejected only when its body is not valid JSON. Arrays, when present, must be arrays (null is not accepted). Dates are YYYYMMDD and are read as UTC midnight; a date that does not parse is dropped. The customer SKU of each line is recorded against its supplier product id so the matching 945 Warehouse Shipping Advice can return it.
NameDescription
RootThe top level document.
PurchaseOrderA single warehouse order, mapped to one canonical purchase order. The canonical transaction purpose code is always N (new).
PartyA party. A party record (with its location) is created for ship_to, bill_to and mark_for even when the object is absent.
LocationA party address with contact details.
ReferenceNumberA coded reference number.
NoteA free-text note.
PurchaseOrderLineA single order line, mapped to one canonical purchase order line.
NameData TypeDescriptionRequired
purchase_orderPurchaseOrderThe warehouse order. When absent, an empty purchase order (with empty parties) is still produced.
NameData TypeDescriptionRequired
bill_toPartyThe bill-to party, linked to the purchase order.
cancel_after_dateStringThe cancel-after date in YYYYMMDD. Copied onto every purchase order line.
customer_order_numberStringThe customer purchase order number.
freight_method_of_paymentStringThe freight method of payment, e.g. CC = collect, PP = prepaid.
latest_delivery_dateStringThe latest delivery date in YYYYMMDD. Copied onto every purchase order line.
mark_forPartyThe mark-for party, linked to every purchase order line.
notesArray<Note>Header notes, grouped by qualifier: GFT goes to the gift note; WHI, PKG and SPH go to the instructions; every other qualifier goes to the purchaser notes. Each group is rendered as one "<label> - <body>" line per note joined by newlines, where the label is the flow's description for that qualifier or, when none is configured, the qualifier itself.
order_dateStringThe order date in YYYYMMDD.
purchase_order_linesArray<PurchaseOrderLine>The order lines.
reference_numbersArray<ReferenceNumber>Header reference numbers. Each becomes a purchase order note whose type is the qualifier and whose body is the code and body joined by " - ". A reference with qualifier SC also supplies the ship method code (its code) and description (its body) on every line.
requested_ship_dateStringThe requested ship date in YYYYMMDD. Copied onto every purchase order line.
seller_order_numberStringThe depositor / seller order number.
ship_modeStringThe ship mode code, e.g. U = private parcel service. Copied onto every purchase order line.
ship_toPartyThe ship-to party, linked to every purchase order line.
transaction_purpose_codeStringAccepted but ignored: the canonical purchase order always gets transaction purpose code N.
warehouse_pick_ticketStringThe warehouse pick ticket number.
NameData TypeDescriptionRequired
locationLocationThe party address and contact details.
nameStringThe party name.
owners_idStringThe party owner's id / party code.
NameData TypeDescriptionRequired
address_1StringAddress line 1.
address_2StringAddress line 2.
cityStringCity.
countryStringCountry code.
emailStringThe email address (mapped to the party, not the location).
phoneStringThe phone number (mapped to the location phone number).
postal_codeStringPostal / ZIP code.
stateStringState / province.
NameData TypeDescriptionRequired
bodyStringA description of the reference value.
codeStringThe reference code / value.
qualifierStringThe X12 reference qualifier, e.g. SC = ship method (header) or LB = label code (line).
NameData TypeDescriptionRequired
bodyStringThe note text.
qualifierStringThe note qualifier, e.g. GFT = gift message, WHI = warehouse instructions.
NameData TypeDescriptionRequired
color_codeStringThe color code.
color_descriptionStringThe color description.
customer_skuStringThe customer SKU, typically the UPC. Mapped to both the customer SKU and the UPC of the line.
line_idStringThe line number.
notesArray<Note>Line notes, rendered into the line purchaser notes as "<label> - <body>" lines joined by newlines, using the same qualifier labels as the header notes.
product_codeStringWhen SLN (a subline), the line is dropped and not mapped. Not otherwise mapped.
product_nameStringThe product name.
quantity_requestedString | NumberThe quantity ordered, copied unchanged.
reference_numbersArray<ReferenceNumber>Line reference numbers. Only qualifier LB is mapped (its code becomes the line label code); the rest are accepted and ignored.
retail_unit_priceString | NumberThe retail unit price, copied unchanged (no currency or cents conversion).
size_descriptionStringThe size description.
supplier_product_idStringThe supplier / vendor product id.
unit_of_measureStringThe unit of measure, e.g. EA.

Example