The tracking information of a shipment can be added and updated with one API that accepts the same structure for each task. This information can not only include the tracking number for the package, but also properties such as the carrier details, transit time, a URL to the tracking page, and more.
Note that the request body and parameter schemas outlined in this guide are the exact same as in the previous version of OMS, as the Unified Commerce platform supports backwards compatibility for this API. The only change to this request is the format of the base endpoint, as shown in the below table. Remember to provide the x-vol-tenant key for authentication in the headers.
Production URL | https://{tenantId}-translation.mozu.com/api/v2/shipment/action/updateTracking |
Sandbox URL | https://{tenantId}-translation.sandbox.mozu.com/api/v2/shipment/action/updateTracking |
Supported Formats | JSON |
HTTP Method | POST |
Example
This example will set a shipment’s tracking information based on the following properties:
- Shipment ID – 0123456
- Carrier Information – UPS, 1-2 days
Required Parameters
Setting and updating tracking information requires the following properties:
Parameter | Type | Description |
shipmentID | integer | A unique identifier for the shipment. The minimum value is “1”. |
trackingInformation | array | The tracking information for the shipment. |
sendEmails | boolean | Should emails be sent? The default value is “true”. |
Optional Parameters
The two optional properties can be used to provide more details about the shipment if desired.
Parameter | Type | Description |
shipmentDate | string | The shipment date. Supports date-time format. |
externalShipmentID | string | An externally defined shipment reference identifier. |
Tracking Information
Tracking Information is an object that only requires the trackingNumber, but also has additional parameters:
Parameter | Type | Description |
trackingNumber | string | The shipment’s tracking number. The maximum length is 50. |
deliveryType | string | The shipment’s shipping method. |
carrierType | enum | The carrier (USPS, FedEx, etc.) delivering the shipment. See the schema for a full list of possible values. |
carrierTypeOther | string | The carrier’s name if it is not one of Kibo’s listed carriers. The maximum length is 20. |
transitTime | string | The time the shipment is expected to be in transit. The maximum length is 50. |
trackingURL | string | The URL to track the shipment. The maximum length is 400. |
Shipment Tracking Numbers
The tracking number formats that OMS supports are based on each carrier’s unique rules. If OMS cannot validate a tracking number based on its known rules, it will attempt to validate the number on the carrier’s system. The chart below describes the typical tracking numbers in OMS, but be aware that there may be some variations from the carriers.
Carrier | Length | Format Examples | Description |
UPS | 11, 12, or 18 | 1Z9999999999999999, 999999999999, T9999999999. | When a length of 18, the first values are 1Z followed by a 6-character shipper number, a 2-digit service level indicator, and an 8-digit package number. |
USPS | 13 or 20 | EE999999999EE, 99999999999999999999. | When a length of 13, it is alphanumeric with the first value being E,C, or V and the second value being E, C, D, P, S, V, or W. E is for Express. When a length of 20, all values are numeric. |
FedEx | 12 or 7-22 | 999999999999 | Express shipments have a length of 12. All tracking numbers are numeric. |
DHL | 2-11 | 9999999999 | May not be all 0s. The most common length is 10. Note that these rules apply only to basic DHL shipping; the DHL NextDay service does not have tracking number validation built into OMS, due to unknown format rules. |
Royal Mail | 14 | EEE999999999GB | Alphanumeric, ends with “GB.” |
Deutsche Post | 11 | 999999999EE | Alphanumeric. |
La Poste | 13 | EE999999999EE | Alphanumeric. |
Canada Post | 11, 13, or 16 | 99999999999, EEE999999999E, 9999999999999999 | All numeric except for when a length of 13. In that case, it may be alphanumeric. |
DPD (UK) | 10+ | 99999999999999 | Usually numeric. |
DPD (DE) | 14 | EEEE9999999999 | 4 alphanumeric, followed by 10 numerals. |
UK Mail | 9-14 | 99999999999999 | Usually numeric. |
The Full Request
This is the entire request that will update the shipment’s tracking information to the example details.
{ "shipmentID":0123456, "sendEmails":false, "trackingInformation":[ { "trackingNumber":"1Z9999999999999999", "carrierType":"UPS", "transitTime":"1-2 Days" }, ], "shipmentDate":"2014-08-28T10:12:00+08:00" }
The returned response follows the same structure as the Get Shipment API, providing information about the shipment.