Gateway XML Tracking

The carrier gateway XML tracking format is designed by Viya to facilitate the communication of status changes (milestones) from the carrier towards the shipper. Milestones can be communicated on consignment or on handlingunit level. Changes to the format are made based on the feedback from carriers and shippers and the experience of Viya in the field.

Message format guidelines

  • The format(s) should be implemented in a way that additional fields can be added without breaking the implementation.
    • Viya will only remove fields or change the meaning of a field in a new mayor version of the format.
  • Date/Datetime fields are in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ where hh:mm:ss are 00:00:00 for date only
  • XML is in UTF-8 format

Revision history

  • 05-Sep-2024: Initial version
  • 05-Sep-2024: Updated field descriptions

Supported message types

  • Tracking: Message containing NEW status updates (milestones) for consignments or handling units.

Tracking

  • The tracking message can be communicated through SFTP or HTTP.
    • HTTP endpoint is coming soon.
  • The HTTP endpoint will return no body, only a status 200.
  • Only NEW, previously untransmitted milestones should be contained in the tracking file. Do not repeat already communicated milestones in the file.
  • The trackingReference.carrier field can be used to send a tracking reference on consignment or hanlingunit level.
  • The shipper generally wants to be informed on the following events:
    • Departure of the goods (pickup)
    • Out for Delivery
    • Delivered
    • Exception (at least one event indicating a delay in delivery)
  • A fixed list of document types is supported. Please contact Viya in case you require additional document types.

See examples and schema of the XML format.

Format

Root element <tracking>

NameTypeRequired
Description
carrierCarriertrueInformation on the carrier sending the message
milestonesMilestonestrueCollection of milestones for one or more references

Carrier

tracking > carrier

NameTypeRequired
Description
namestringtrueCarrier name
referencestringtrueUnique reference to the carrier. To be agreed with Viya

Milestones

tracking > milestones

NameTypeRequired
Description
milestoneMilestonetrueMilestone for a specific reference

Milestone

tracking > milestones > milestone

NameTypeRequired
Description
trackingReferenceTrackingreferencetrueCollection of tracking references
trackingUrlstringfalseFull URL to the tracking event
equipmentEquipmentfalseInformation on the equipment used for the transport
eventsEventstrueCollection of events for a specific reference

TrackingReference

tracking > milestones > milestone > trackingreference

NameTypeRequired
Description
shipperstringfalseTracking reference code assigned by the shipper
carrierstringtrueTracking reference code assigned by the carrier. This reference can be both consigment or hanlingunit level

Equipment

tracking > milestones > milestone > equipment

NameTypeRequired
Description
licencePlatestringfalseLicence plate of the equipment used for transport

Events

tracking > milestones > milestone > events

NameTypeRequired
Description
eventEventtrueNew event

Event

tracking > milestones > milestone > events > event

NameTypeRequired
Description
eventDatetimedateTimetrueTime at which this event occured. NOTE: Time zone specification is mandatory
eventDescriptionstringfalseGeneral description on the event
scannedBystringfalseName of the entity that scanned the consignment when the event occured
eventMessagestringfalseAny descriptive text accompanying the event
eventTypeEventTypetrueThe type of event as provided by the carrier
eventReasonEventReasonfalseThe reason why the event occured
eventLocationEventLocationfalseDetails on the location where the event took place
documentsDocumentsfalseCollection of documents related to the event

EventType

tracking > milestones > milestone > events > event > eventtype

NameTypeRequired
Description
codestringtrueThe carrier provided type code for the event
descriptionstringfalseThe carrier provided description for the type of event

EventReason

tracking > milestones > milestone > events > event > eventreason

NameTypeRequired
Description
codestringtrueThe carrier provided code for the reason the event took place
descriptionstringfalseThe carrier provided description for the reason the event took place

EventLocation

tracking > milestones > milestone > events > event > eventlocation

NameTypeRequired
Description
companyNamestringfalseName of the company where the event took place
addressAddressfalseAddress where the event took place
airportCodestringfalseUnique reference to an airport where the event took place
seaportCodestringfalseUnique reference to a seaport where the event took place
depotCodestringfalseUnique reference to a depot where the event took place

Documents

tracking > milestones > milestone > events > event > documents

NameTypeRequired
Description
DocumentDocumentfalseDocuments related to the event

EventLocationAddress

tracking > milestones > milestone > events > event > eventlocation > eventlocationaddress

NameTypeRequired
Description
addressLine1stringfalseStreet name / PO Box and number
addressLine2stringfalseApartment, suite, unit, building floor etc.
addressLine3stringfalseAdditional address line for extra details
citystringfalseCity of address
postCodestringfalsePostcode/zipcode
stateCodestringfalseState code used primarily for US, Canada, Italy
countryCodeCountryCodefalse2-digit ISO-3166 Country code

Document

tracking > milestones > milestone > events > event > documents > document

NameTypeRequired
Description
typeDocumentTypetrueThe type of document
contentstringtrueBase64 encoded content of the file

Document Type

tracking > milestones > milestone > events > event > documents > document > documenttype

Name (enum)description
ProofOfDeliverySignatureProof of delivery signature
CMRSigned Convention on the Contract for the International Carriage of Goods by Road
PictureOfDeliveryPicture of delivered goods
PictureOfDeliveryAttemptPicture of the attempt to deliver the goods
PictureOfDamagePicture of the damage on the goods
CashOnDeliveryReceiptReceipt for cash on delivery proof
FreightInvoiceInvoice of the carrier to the shipper for the performed services regarding the shipment
ImportDocuments related to the import of goods
ExportDocuments related to the export of goods

CountryCode

Country codes based on ISO 3166, see wikipedia:
Codes
AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW, AC, CP, CQ, DG, EA, EU, EZ, FX, IC, SU, TA, UK, UN, XK