ASN EDI - JSON Specification

Summary

The EDI-flavored JSON for an EDI 856 Advance Ship Notice (ASN), used as the Chain.io file type "chainioASNEDIJSON". It is used both as an input (an EDI translator hands this JSON to Chain.io) and as an output. On INPUT the document is a bare object (the fields below sit at the root). On OUTPUT the same content is wrapped in a "shipment" object and several computed fields are added (gross weight in lbs, volume in cubic feet, aggregate package counts, and a shipment-level copy of the purchase orders). A downstream EDI translation engine performs the X12 serialization, so field values are pre-coded to X12 code lists and segment references are logical. Exactly one shipment is present per file.
NameDescription
RootThe top level document. On input these fields are at the root; on output they are wrapped in a single "shipment" object.
ShipmentThe single shipment. Fields marked output-only are computed by the adapter and appear only on the output form.
NativeReferenceNumberA coded reference number.
PartyA party (ship-to or shipper).
ContainerA container / equipment record.
PurchaseOrderA purchase order.
PurchaseOrderLineA line on a purchase order.
ChargeCommercial-invoice charge detail for a purchase order line.
NameData TypeDescriptionRequired
action_typeStringPurpose code. 00 = create, 05 = update, 03 = delete (logical 856 BSN purpose).
master_billStringMaster bill of lading.
shipmentsArray<Shipment>The shipment loop. Exactly one element (the input is rejected when more than one is present).YES
shipper_referenceStringThe shipment / shipper reference.
NameData TypeDescriptionRequired
arrival_port_estimatedStringEstimated arrival date in YYYYMMDD.
arrival_unlocodeStringPort of discharge (UN/LOCODE).
carrier_nameStringThe carrier name.
carrier_scacStringThe carrier SCAC.
containerization_typeStringOutput-only. Service type (e.g. CY/CY); on input derived from the first non-blank container delivery mode.
containersArray<Container>Container / equipment loop.
delivery_estimatedStringEstimated delivery date in YYYYMMDD.
departure_actualStringActual departure date in YYYYMMDD.
description_of_goodsStringGoods description.
final_port_unlocodeStringFinal destination port (UN/LOCODE).
forwarder_controlling_branch_codeStringThe forwarder branch.
gross_weight_kgsNumberOutput-only. Shipment gross weight in kilograms (sum of containers).
gross_weight_lbsNumberOutput-only. Computed gross weight in pounds.
house_billStringHouse bill of lading.
lading_unlocodeStringPort of lading (UN/LOCODE).
native_reference_numberArray<NativeReferenceNumber>Reference-number loop.
number_of_packagesNumberOutput-only. Total package count (sum of containers).
package_type_codeStringPackage type code (e.g. CT = carton).
port_of_entry_codeStringCustoms Schedule-D port. On output it is derived from "final_port_unlocode" when a mapping exists.
purchase_ordersArray<PurchaseOrder>Output-only. A shipment-level copy of the purchase orders (also present under each container).
ship_toPartyThe consignee / ship-to party (logical 856 N1 ST).
shipperPartyThe shipper / vendor party (logical 856 N1 SF).
transport_modeStringMode of transport. S = SEA, A = AIR.
vessel_nameStringThe vessel name.
volume_cbmsNumberOutput-only. Shipment volume in cubic meters.
volume_cfNumberOutput-only. Computed volume in cubic feet.
voyage_numberStringThe voyage / flight number.
NameData TypeDescriptionRequired
codeStringThe reference qualifier / code.
data_sourceStringThe source system.
descriptionStringA human description of the reference.
valueStringThe reference value.
value_contextStringContext / direction of the reference.
NameData TypeDescriptionRequired
address_codeStringThe address code for the party.
codeStringThe party code (remapped by the "org_code_mapping" configuration).
nameStringThe party name.
NameData TypeDescriptionRequired
delivery_modeStringDelivery / containerization mode.
equipment_initialStringOwner prefix (4 characters).
equipment_numberStringContainer serial number.
gross_volume_cbmsNumberContainer volume in cubic meters.
gross_weight_kgsNumberContainer gross weight in kilograms.
number_of_packagesStringPackage count. A STRING on input; the shipment-level aggregate is a number on output.
purchase_ordersArray<PurchaseOrder>Purchase order loop under the container.
seal_numberStringThe seal number.
type_codeStringISO container type code.
NameData TypeDescriptionRequired
customer_order_numberStringThe customer purchase order number.
purchase_order_linesArray<PurchaseOrderLine>Purchase order line loop.
shipper_mid_codeStringManufacturer id; hoisted to the shipper party as its customs MID code.
NameData TypeDescriptionRequired
chargeChargeCharge / commercial-invoice detail for the line.
country_of_originStringCountry of origin.
customer_skuStringThe customer SKU.
gross_weight_kgsNumberLine gross weight in kilograms.
hts_codeStringHTS / commodity code.
line_idStringThe PO line number.
quantity_fulfilledNumberQuantity shipped.
quantity_requestedNumberOutput-only. Quantity ordered.
sku_descriptionStringThe item description.
unit_of_measureStringUnit of measure.
volume_cbmsNumberLine volume in cubic meters.
zone_statusStringInput-only. FTZ zone status; parsed but not re-emitted on output.
NameData TypeDescriptionRequired
charge_codeStringInput-only. Accepted but not mapped.
currencyStringThe currency.
invoice_dateStringThe commercial invoice date in YYYYMMDD.
invoice_numberStringThe commercial invoice number. Required on input: the input converter rejects a charge line without it (it is the grouping key for invoices). Optional on output: omitted when the related commercial invoice has no invoice number.
unit_priceNumberThe unit price.

Example