Shipment Status EDI - JSON Specification

Summary

The EDI-flavored JSON for shipment-status EDI, used as the Chain.io file type "chainioEventEDI". A single "freight_status" object drives EDI 214 (Transportation Carrier Shipment Status) and EDI 315 (Ocean Status Details) depending on the adapter's "output_type" configuration. A downstream JSONata map serializes the X12, so values are pre-coded to X12 code lists and any segment references are logical correspondence. There is no "version" or "doc_type". This is a denormalized superset of the canonical Event format; the tables below list every field the adapter emits. The adapter produces this JSON when its file format is set to JSON (otherwise it emits the equivalent XML).
NameDescription
RootThe top level document.
FreightStatusThe shipment status. Most values are strings and are omitted when the source has no value. Named port summaries sit at the root as "<port>_port" objects: by default departure_port, arrival_port, pickup_port, loading_port and delivery_port, plus transshipment_port. When the adapter has a port mapping configured, the mapping replaces the default port set, and the root carries one "<key>_port" object per configured key (a key already ending in "_port" is used as-is) plus transshipment_port.
NamedPortA named port summary at the root. Unlike the "ports" loop, the date is kept split.
EventPortLocationThe event location as a port.
PortA port in the "ports" loop.
VesselVessel details.
CarrierCarrier details.
StatusShipmentA shipment detail entry.
ShipmentDetailsThe event status detail of a shipment.
PurchaseOrderA purchase order.
NativeReferenceNumberA coded reference number from the source system.
EntityNameA party keyed by X12 entity code.
PartyA party linked to the shipment.
ReferenceNumberA configured additional reference number.
ConsolidationDetailsConsolidation references.
ContainerA container.
ShipmentLegA transport leg. Datetimes are ISO 8601, null when not set.
LegCarrierThe carrier of a shipment leg.
NameData TypeDescriptionRequired
freight_statusFreightStatusThe single shipment-status object.YES
NameData TypeDescriptionRequired
additional_reference_numbersArray<ReferenceNumber>The additional reference numbers configured on the adapter. Only references with a value are included.
airway_billStringAir waybill number.
all_marks_and_numbersArray<String>Marks and numbers from every package group that has them.
arrival_portNamedPortArrival port (arrival port date). A named port summary; present only when the shipment has a date for it (or the port mapping requires one).
arrival_port_actualDateTimeActual port arrival. A milestone datetime lifted from the adapter's date collection (ISO 8601); null when the shipment has no value.
arrival_port_estimatedDateTimeEstimated port arrival. A milestone datetime lifted from the adapter's date collection (ISO 8601); null when the shipment has no value.
arrival_unlocodeStringThe arrival port UN/LOCODE.
arrival_unlocode_descriptionStringThe arrival port description.
carrierCarrierCarrier details.
carrier_booking_numberStringThe carrier booking number.
carrier_instructionsStringCarrier instructions.
company_codeStringThe forwarder controlling company code.
consolidation_detailsConsolidationDetailsReferences of the consolidation the shipment belongs to.
containerization_typeStringThe containerization type.
containersArray<Container>Container loop.
customer_referenceStringCustomer reference.
cutoff_timeDateTimeThe physical cutoff time. A milestone datetime lifted from the adapter's date collection (ISO 8601); null when the shipment has no value.
date_timeDateTimeThe event datetime (ISO 8601 UTC). Taken from the event, or from the shipment date or milestone the event mapping names.
date_time_localDateTimeThe event datetime in the event's local time zone, with offset.
delivery_actualDateTimeActual delivery. A milestone datetime lifted from the adapter's date collection (ISO 8601); null when the shipment has no value.
delivery_estimatedDateTimeEstimated delivery. A milestone datetime lifted from the adapter's date collection (ISO 8601); null when the shipment has no value.
delivery_portNamedPortDelivery (final port, delivery date). A named port summary; present only when the shipment has a date for it (or the port mapping requires one).
departure_actualDateTimeActual departure. A milestone datetime lifted from the adapter's date collection (ISO 8601); null when the shipment has no value.
departure_estimatedDateTimeEstimated departure. A milestone datetime lifted from the adapter's date collection (ISO 8601); null when the shipment has no value.
departure_portNamedPortDeparture (port of lading, departure date). A named port summary; present only when the shipment has a date for it (or the port mapping requires one).
entity_namesArray<EntityName>Party loop keyed by X12 entity code. For 214 (and 204) the CN and SH blocks are always written; for other output types a block is written only when the shipment names that party. Absent when there are no parties.
equipment_initialStringContainer owner prefix (first 4 characters of the container number). Optional unless listed in the adapter's additional required fields.
equipment_numberStringContainer serial number (container number after the first 4 characters). Optional unless listed in the adapter's additional required fields.
equipment_sizeStringContainer size code. Optional unless listed in the adapter's additional required fields.
equipment_status_code_overrideStringThe equipment status code override configured for the event mapping.
event_date_local_time_zoneStringThe local time zone of the event; UTC when none is known or recognized.
event_port_locationEventPortLocationThe event location as a port. Always present.
firms_codeStringThe arrival terminal FIRMS code. Optional unless listed in the adapter's additional required fields.
flow_execution_uuidStringThe Chain.io flow execution id that produced the file.
forwarder_controlling_branch_codeStringThe forwarder controlling branch.
house_billStringHouse bill of lading.
lloyds_imoStringThe vessel Lloyds / IMO number. Optional unless listed in the adapter's additional required fields.
loading_portNamedPortLoading (port of lading, loading date). A named port summary; present only when the shipment has a date for it (or the port mapping requires one).
location_identifierStringThe event location (UN/LOCODE), taken from the shipment or event field the event mapping names. Optional unless listed in the adapter's additional required fields.
location_qualifierStringAlways UN.
master_billStringMaster bill of lading. Required unless listed in the adapter's additional optional fields.
notesStringThe event message.
partiesArray<Party>Role-keyed party loop for the parties linked to the shipment. Only parties with a name are included.
pickup_actualDateTimeActual pickup. A milestone datetime lifted from the adapter's date collection (ISO 8601); null when the shipment has no value.
pickup_estimatedDateTimeEstimated pickup. A milestone datetime lifted from the adapter's date collection (ISO 8601); null when the shipment has no value.
pickup_portNamedPortPickup (port of lading, pickup date). A named port summary; present only when the shipment has a date for it (or the port mapping requires one).
port_of_entry_code_mappedStringThe mapped port of entry code. Optional unless listed in the adapter's additional required fields.
portsArray<Port>Port loop with ISO datetimes: one entry per port in the default set (or the configured port mapping) that has a date, plus a relay port when the shipment has a second leg. Transshipment is not included here.
pro_numberStringPRO number for a truck shipment. Optional unless listed in the adapter's additional required fields.
receiving_exception_codeStringThe event receiving exception code.
reference_numberStringThe forwarder reference. Optional unless listed in the adapter's additional required fields.
relay_arrival_actualDateTimeActual arrival of the first shipment leg; present only when the shipment has a second leg. A milestone datetime lifted from the adapter's date collection (ISO 8601); null when the shipment has no value.
relay_arrival_estimatedDateTimeEstimated arrival of the first shipment leg; present only when the shipment has a second leg. A milestone datetime lifted from the adapter's date collection (ISO 8601); null when the shipment has no value.
service_levelStringThe shipment service level.
service_level_descriptionStringThe shipment service level description.
ship_to_nameStringThe shipment ship-to name.
shipment_identifierStringThe shipment identifier from the event.
shipment_import_entry_numberStringThe import entry number. Optional unless listed in the adapter's additional required fields.
shipment_legsArray<ShipmentLeg>Transport leg loop, ordered by leg sequence number.
shipment_modeStringThe transport mode. Required unless listed in the adapter's additional optional fields.
shipmentsArray<StatusShipment>Shipment detail loop (status, weights, POs, references). Always a single entry.
shipper_referenceStringShipper reference. Optional unless listed in the adapter's additional required fields.
shipper_shipment_idStringThe shipper's shipment id from the event.
source_system_shipment_idStringThe shipment identifier from the system of record.
status_codeStringThe mapped event / status code from the adapter's event mapping.
status_reason_codeStringThe status reason code: the mapped reason code, or the source event reason code.
stop_numberStringThe event stop number.
transshipment_portNamedPortTransshipment port (transshipment arrival date). Always part of the named set, with or without a port mapping. A named port summary; present only when the shipment has a date for it (or the port mapping requires one).
vesselVesselVessel details.
NameData TypeDescriptionRequired
cityStringThe UN/LOCODE description.
codeStringThe port key (e.g. departure, arrival_port, transshipment).
code_qualifierStringAlways UN.
countryStringCountry code (2 characters).
dateStringThe date in YYYYMMDD. Optional unless the port mapping requires the date.
date_qualifierString140 when the actual date is used, 139 when the estimate is used.
timeStringThe time in HHmm. Optional unless the port mapping requires the date.
unlocodeStringThe UN/LOCODE. Optional unless the port mapping (or the additional required fields) requires the location.
NameData TypeDescriptionRequired
codeStringThe port key whose location matches the event location, or triggered_event when none does (the unlocode then comes from the event).
code_qualifierStringAlways UN.
date_qualifierString139 when the event mapping marks the date as an estimate, otherwise 140.
date_timeDateTimeThe event datetime (ISO 8601).
unlocodeStringThe event location UN/LOCODE.
NameData TypeDescriptionRequired
cityStringThe UN/LOCODE description.
codeStringThe port key: departure, arrival_port, pickup, loading or delivery by default, the configured keys when a port mapping is set, or relay for the relay port.
code_qualifierStringAlways UN.
countryStringCountry code (2 characters).
date_qualifierString140 when the actual date is used, 139 when the estimate is used.
date_timeDateTimeThe datetime (ISO 8601).
unlocodeStringThe UN/LOCODE. Optional unless the port mapping (or the additional required fields) requires the location.
NameData TypeDescriptionRequired
arrival_dateDateTimeThe estimated port arrival date (midnight UTC).
departure_dateDateTimeThe estimated departure date (midnight UTC).
vessel_codeStringThe vessel name.
vessel_nameStringVessel name.
voyage_numberStringVoyage number.
NameData TypeDescriptionRequired
nameStringCarrier name.
scacStringCarrier SCAC. Required unless listed in the adapter's additional optional fields.
voyageStringVoyage number.
NameData TypeDescriptionRequired
assigned_numberStringAlways 01.
chargeable_weightStringChargeable weight in kilograms.
chargeable_weight_original_uomStringThe source chargeable weight unit.
native_reference_numbersArray<NativeReferenceNumber>Coded reference numbers from the source system.
package_countStringPackage count.
package_type_codeStringPackage type code.
purchase_ordersArray<PurchaseOrder>Purchase orders.
shipment_detailsShipmentDetailsThe event status detail.
volumeStringVolume in cubic meters.
volume_original_uomStringThe source volume unit.
weightStringGross weight in kilograms.
weight_original_uomStringThe source gross weight unit.
NameData TypeDescriptionRequired
cityStringThe event city, from the source the event mapping names. Present only when the event mapping sets a city source, and then required unless listed in the additional optional fields.
countryStringThe event country, from the source the event mapping names. Present only when the event mapping sets a country source, and then required unless listed in the additional optional fields.
date_timeDateTimeThe event datetime (ISO 8601).
event_nameStringThe source event name.
shipment_identifierStringThe shipment identifier from the event.
stateStringThe event state, from the source the event mapping names. Present only when the event mapping sets a state source.
status_codeStringThe source event code. Required.
NameData TypeDescriptionRequired
customer_order_numberStringThe purchase order number.
NameData TypeDescriptionRequired
codeStringThe reference code.
data_sourceStringThe source system.
descriptionStringA description of the reference.
valueStringThe reference value.
value_contextStringContext of the value (e.g. DateTime).
NameData TypeDescriptionRequired
address_1StringAddress line 1. Required for CN / SH on 214 and 204 unless listed in the additional optional fields.
address_2StringAddress line 2.
cityStringCity.
codeStringThe X12 entity code: CN = ship-to, SH = ship-from, N5 = the party that received the shipment (name only).
contact_nameStringContact name.
countryStringCountry code.
location_idStringLocation identifier.
nameStringParty name.
postal_codeStringPostal / ZIP code.
stateStringState / province, translated through the configured state code mapping when one is set.
unlocodeStringUN/LOCODE.
NameData TypeDescriptionRequired
cityStringCity.
countryStringCountry.
nameStringParty name.
owners_idStringThe owner / party code.
roleStringThe party role: shipper, consignee, consignor, carrier, receiving_freight_forwarder, global_customer or forwarder_customer.
stateStringState / province, translated through the configured state code mapping when one is set.
NameData TypeDescriptionRequired
codeStringThe configured reference qualifier.
valueStringThe value read from the configured document and property, or the configured hardcoded value.
NameData TypeDescriptionRequired
forwarder_referenceStringThe consolidation forwarder reference.
shipper_referenceStringThe consolidation shipper reference.
NameData TypeDescriptionRequired
arrival_delivery_actualDateTimeActual arrival delivery (ISO 8601); null when not set.
arrival_delivery_estimatedDateTimeEstimated arrival delivery (ISO 8601); null when not set.
container_numberStringThe full container number.
delivery_modeStringDelivery mode. Optional unless listed in the additional required fields.
equipment_initialStringOwner prefix (first 4 characters).
equipment_numberStringSerial number (after the first 4 characters).
gross_weight_kgsStringGross weight in kilograms.
gross_weight_original_uomStringThe source gross weight unit.
po_numberStringAssociated PO number.
seal_1StringSeal number.
size_codeStringSize code.
size_code_mappedStringThe size code after the configured size code mappings.
tare_weight_kgsStringTare weight in kilograms.
type_codeStringType code.
NameData TypeDescriptionRequired
arrival_actualDateTimeActual arrival.
arrival_estimatedDateTimeEstimated arrival.
arrival_unlocodeStringPort of arrival (UN/LOCODE).
arrival_unlocode_descriptionStringPort of arrival description.
carrierLegCarrierThe leg carrier.
cto_cutoff_endDateTimeThe container terminal cutoff window end.
cto_cutoff_startDateTimeThe container terminal cutoff window start.
departure_actualDateTimeActual departure.
departure_estimatedDateTimeEstimated departure.
lading_unlocodeStringPort of lading (UN/LOCODE).
lading_unlocode_descriptionStringPort of lading description.
leg_sequence_numberStringThe leg order.
leg_typeStringThe leg type (e.g. MAIN).
modeStringTransport mode.
vessel_nameStringVessel name.
voyage_numberStringVoyage number.
NameData TypeDescriptionRequired
nameStringCarrier name.
scacStringCarrier SCAC (the carrier party SCAC, or the leg carrier SCAC).

Example