This endpoint is used to retrieve the event history for one or more mail pieces.
Definition
Route: /mailpieces/events
Method: GET
OperationId: MailTrackingEventHistory
Permissions
The user must be a member of one of the following groups to retrieve mail piece events:
mailpieces:manager
mailpieces:viewer
Request
Headers
Name
Description
Notes
accept
The expected format of the response
application/json
osg-client-id
The unique identifier assigned to your organization
Required
client_customer_id
The unique identifier assigned to your client
correlation_id
The unique identifier for correlation
Query Parameters
Name
Type
Required
Description
mail_piece_id
array of string
Yes
One or more mail piece identifiers to retrieve events for. Repeat the parameter for multiple values.
Responses
Headers
Key
Value
Type
Description
content-type
application/json
string
Success
Status
Description
Body
200
All requested mail piece identifiers returned a result.
JSON object
207
Some requested mail piece identifiers did not return a result. The unmatched identifiers are listed in not_found.
JSON object
A 200 is returned only when every requested mail_piece_id resolves to a result; in that case not_found is empty. When one or more identifiers cannot be matched, the endpoint returns 207 Multi-Status and lists the unmatched identifiers in not_found.
Response Body
Field
Type
Nullable
Description
result
object
No
The standard result envelope. See Result.
mail_piece_history
array of object
No
The event history per mail piece. See Mail Piece History.
not_found
array of string
No
Identifiers from the request that could not be matched.
Mail Piece History
Field
Type
Nullable
Description
child_client_id
string
No
The child client the mail piece belongs to.
mail_piece_id
string
No
The unique identifier of the mail piece.
tracking_number
string
Yes
The carrier tracking number, when available.
imb
string
Yes
The Intelligent Mail Barcode, when available.
impb
string
Yes
The Intelligent Mail Package Barcode, when available.
events
array of object
No
The ordered tracking events. See Mail Piece Event.
Mail Piece Event
Field
Type
Nullable
Description
status
string
No
The status recorded by this event.
status_changed
string
No
The UTC timestamp at which the status changed.
city
string
Yes
The city associated with the event, when available.
state
string
Yes
The state associated with the event, when available.
zip
string
Yes
The ZIP code associated with the event, when available.