API Support for Shipment Tracking Events
-----------------------------------------------------
Release Date: September 24, 2026
- * *
What's New
A new API endpoint is now available in the Legacy project to allow system users and applications to create tracking events for shipments programmatically.
The API accepts a shipment tracking number and tracking code, identifies the corresponding shipment and tracking code configuration, and creates a new record in the shipmenttrackingevent table.
The tracking event is automatically generated based on the configured tracking code, with the event timestamp set to the current EST date/time.
- * *
Why?
Previously, creating a tracking event required the event to be generated through an existing application workflow.
The new API provides a programmatic way to add tracking events directly to a shipment using its tracking number and tracking code.
This allows external systems and internal applications to create consistent tracking events while using the existing tracking code configuration.
- * *
How It Works
The API accepts the following information:-
tracknbr -
trackingcode -
location -
eventsource
- Uses
tracknbrto locate the corresponding shipment. - Uses
trackingcodeto locate the corresponding tracking code configuration. - Retrieves the required
shipment.idandtrackingcodevalue.id. - Determines the tracking event from the tracking code configuration.
- Creates a new record in the
shipmenttrackingeventtable. - Sets the event date/time to the current EST date/time.
- Stores the provided location.
- Stores the provided event source.
- * *
Request Payload
{
"tracknbr": "123",
"trackingcode": "610",
"location": "Buffalo, NY",
"eventsource": "Portal"
}
- * *
Tracking Code Mapping
The tracking event is derived from the existing tracking code configuration. For example:| Tracking Code | Event |
|---|---|
| 610 | Returned / ParcelReturned |
tracknbr: 123
trackingcode: 610
the API identifies tracking code 610 and creates the corresponding ParcelReturned tracking event for shipment 123.
The API does not require the caller to provide the event name separately.
- * *
Event Date and Time
The tracking event timestamp is automatically generated when the API request is processed.
The event date/time is always set using the current EST date/time.
The caller does not need to provide an event timestamp in the request payload.
- * *
Shipment Identification
The shipment is identified using the provided tracking number.
For example:
tracknbr = 123
The API searches for the corresponding shipment and retrieves its shipment.id.
The identified shipment ID is then used when creating the tracking event.
- * *
Tracking Code Identification
The tracking code is identified using the provided tracking code value.
For example:
trackingcode = 610
The API retrieves the corresponding trackingcodevalue.id and event configuration.
The configured event is then used to create the shipment tracking event.
- * *
Tracking Event Creation
Once the shipment and tracking code are successfully identified, the API creates a new record in theshipmenttrackingevent table.
The created event contains:
| Field | Details |
|---|---|
| Shipment | Identified using tracknbr |
| Tracking Code | Identified using trackingcode |
| Event | Derived from tracking code configuration |
| Event Date/Time | Current EST date/time |
| Location | Provided in the API request |
| Event Source | Provided in the API request |
- * *
Example Flow
API Request
│
├── tracknbr = 123
├── trackingcode = 610
├── location = Buffalo, NY
└── eventsource = Portal
│
▼
Find Shipment
│
└── shipment.id
│
▼
Find Tracking Code
│
└── trackingcodevalue.id
│
▼
Read Tracking Code Configuration
│
└── 610 → ParcelReturned
│
▼
Create shipmenttrackingevent
│
├── Event = ParcelReturned
├── Date/Time = Current EST
├── Location = Buffalo, NY
└── Event Source = Portal
- * *
Success Response
When the tracking event is successfully created, the API returns an appropriate success response confirming that the tracking event was created for the shipment.
The response should provide sufficient information to identify the created event and associated shipment.
- * *
Validation and Error Handling
The API validates the supplied shipment tracking number and tracking code before creating the event. An appropriate error response is returned when:- The provided tracking number does not exist.
- The provided tracking code does not exist.
- The shipment cannot be identified.
- The tracking code configuration cannot be identified.
- The tracking event cannot be created.
- * *
Benefits
- Allows tracking events to be created programmatically.
- Uses the existing tracking code configuration.
- Automatically generates the appropriate tracking event.
- Ensures consistent event mapping across applications.
- Automatically records the current EST date/time.
- Supports location and event source information.
- Provides validation for invalid shipment tracking numbers and tracking codes.
- Can be consumed by Legacy or Portal 2.0 workflows.
- * *
Applicable Projects
The API endpoint can be implemented in:- Legacy
- Portal 2.0
- * *

)




4225-b1b4-23f4f54d4afc/media__1780637371923.png)