Get shipments list
GET/shipments
Returns the list of shipments filtered by the specified parameters. If no filter is specified, the full list of shipments is returned.
Pagination is supported using the limit
and page
parameters.
The returned has_more
field determines if there are more shipments to retrieve.
The list of shipments is ordered by creation date, from the oldest to the most recent.
The created_after
filter can be used to retrieve only the shipments created after the specified date and time.
The checkpoints_updated_after
filter can be used to retrieve only the shipments with updates in the checkpoints history published after the specified date and time. You can use this parameter to sync your systems by retrieving only shipments that had tracking changes since the previous request.
Request
Query Parameters
completed
is a special status that corresponds todelivered
andreturned_to_sender
shipments.in_progress
is a special status that corresponds to any status except the ones included incompleted
.
Possible values: >= 1
and <= 100
Default value: 30
Maximum number of shipments to return per page. Used for pagination.
Possible values: >= 1
Default value: 1
Page number of the list of shipments. Used for pagination.
Filter shipments with the specified tracking code. More than one result can be returned if multiple shipments with the same tracking code exist in the account.
Filter shipments handled by the specified courier. The list of couriers is available in the Supported couriers page.
Possible values: [in_progress
, completed
, unknown
, info_received
, in_transit
, out_for_delivery
, delivered
, attempt_fail
, available_for_pickup
, exception
, inactive
, returned_to_sender
]
Filter shipments with the specified status. If not specified, shipments with any status will be returned.
Filter shipments with checkpoints history updated after the specified date and time. The datetime must be in ISO 8601 format.
Filter shipments created after the specified date and time. The datetime must be in ISO 8601 format.
Filter shipments that are archived or not archived. For example, pass false
to filter non-archived shipments. If not specified, both archived and non-archived shipments will be returned.
Responses
- 200
- 400
- 401
- 402
- 429
List of shipments filtered with the specified parameters.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
Array [
]
]
data
object[]
Unique identifier of the shipment.
Tracking code of the shipment.
Courier slug. The possible values are listed in the Supported couriers page.
Possible values: [send
, receive
]
Shipment type. Determines if the shipment is outgoing or incoming.
Timestamp of the creation of the shipment in the system. ISO 8601 format.
Optional order number associated with the shipment.
Additional notes that are visible only to the account owner.
Timestamp of the archiving of the shipment. ISO 8601 format.
Possible values: [delivered
, expired
, manual
, null
]
Determines the reason of the archiving of the shipment.
Timestamp of the first in_transit
checkpoint. ISO 8601 format without the UTC offset (local date time). When the time is not specified, it is set to midnight.
Number of days in transit. The first day until midnight is considered as day 0.
Timestamp of the delivery of the shipment. ISO 8601 format without the UTC offset (local date time). When the time is not specified, it is set to midnight.
Timestamp of the last time that the system checked for new checkpoints. ISO 8601 format.
Timestamp of the last time that the checkpoints history was updated. ISO 8601 format.
checkpoints
object[]
Unique identifier of the checkpoint.
Timestamp of the creation of the checkpoint in the system. ISO 8601 format.
Message published by the courier.
Location of the checkpoint, if provided by the courier.
Date and time of the checkpoint, if provided by the courier. ISO 8601 format without the UTC offset (local date time). When the time is not specified, it is set to midnight.
Additional notes provided by the courier.
Possible values: [unknown
, info_received
, in_transit
, out_for_delivery
, delivered
, attempt_fail
, available_for_pickup
, exception
, delayed
, returned_to_sender
]
Status of the checkpoint.
Possible values: [exception_generic
, exception_incorrect_address
, exception_storage
, exception_refused
, exception_damaged
, exception_lost
, exception_returning_to_sender
, null
]
Substatus of the checkpoint, available only when the status is exception
.
Possible values: [unknown
, info_received
, in_transit
, out_for_delivery
, delivered
, attempt_fail
, available_for_pickup
, exception
, inactive
, returned_to_sender
]
Status of the shipment computed from the checkpoints history. It can be different from the status of the last checkpoint.
Possible values: [exception_generic
, exception_incorrect_address
, exception_storage
, exception_refused
, exception_damaged
, exception_lost
, exception_returning_to_sender
, null
]
Substatus of the shipment, available only when the status is exception
.
true
if a delay in the shipment was detected in the tracking history.
Estimated delivery date indicated by the courier. ISO 8601 format with only the date.
Estimated delivery time range indicated by the courier.
Name of the recipient of the shipment.
Email of the recipient.
Origin of the shipment provided by the courier.
Destination of the shipment provided by the courier.
{
"has_more": true,
"data": [
{
"id": "string",
"tracking_code": "string",
"courier": "string",
"type": "send",
"created_at": "2024-01-01T12:00:00Z",
"order_number": "string",
"description": "string",
"archived_at": "2024-01-01T12:00:00Z",
"archive_reason": "delivered",
"shipped_at": "2024-01-01T12:00:00Z",
"transit_days": 0,
"delivered_at": "2024-01-01T12:00:00Z",
"last_check_at": "2024-01-01T12:00:00Z",
"checkpoints_updated_at": "2024-01-01T12:00:00Z",
"checkpoints": [
{
"id": "string",
"created_at": "2024-01-01T12:00:00Z",
"message": "string",
"location": "string",
"date_time": "2024-01-01T12:00:00Z",
"notes": "string",
"status": "unknown",
"substatus": "exception_generic"
}
],
"status": "unknown",
"substatus": "exception_generic",
"is_delayed": true,
"estimated_delivery_date": "2024-01-01",
"estimated_delivery_time": "string",
"recipient_name": "string",
"recipient_email": "user@example.com",
"origin_location": "string",
"destination_location": "string"
}
]
}
{
"has_more": false,
"data": [
{
"id": "Ye7KwZ3",
"tracking_code": "T18B23P142",
"courier": "brt",
"type": "send",
"created_at": "2023-12-10T00:00:00Z",
"order_number": 1234,
"description": "Maglietta rossa moderna",
"archived_at": null,
"archive_reason": null,
"shipped_at": "2023-12-12T08:10:00",
"transit_days": 3,
"delivered_at": null,
"last_check_at": "2023-12-15T14:00:00Z",
"checkpoints_updated_at": "2023-12-13T10:00:00Z",
"checkpoints": [
{
"id": "df0P5Xu",
"created_at": "2023-12-13T10:00:00Z",
"message": "Spedizione presso il centro di smistamento",
"location": "Milano",
"date_time": "2023-12-13T09:50:00",
"notes": null,
"status": "in_transit",
"substatus": null
},
{
"id": "y8Kw8Z3",
"created_at": "2023-12-12T08:25:00Z",
"message": "Spedizione partita",
"location": "Milano",
"date_time": "2023-12-12T08:10:00",
"notes": null,
"status": "in_transit",
"substatus": null
}
],
"status": "in_transit",
"substatus": null,
"is_delayed": false,
"estimated_delivery_date": "2023-12-18",
"estimated_delivery_time": "09:00 - 11:00",
"recipient_name": "Mario Rossi",
"recipient_email": "mario.rossi@example.com",
"origin_location": "Milano",
"destination_location": "Roma"
}
]
}
The request is invalid. See the Error responses page for more details.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
error
object
HTTP status code of the error.
Human-readable message describing the error.
Optional machine-readable code providing details about some 4xx
errors.
errors
object[]
Name of the parameter with invalid value.
Human-readable message describing the error.
{
"error": {
"status": 0,
"message": "string",
"code": "string",
"errors": [
{
"field": "string",
"message": "string"
}
]
}
}
The API token in the request is missing or is invalid. See the Error responses page for more details.
- application/json
- Schema
- Example (from schema)
Schema
error
object
HTTP status code of the error.
Human-readable message describing the error.
Optional machine-readable code providing details about some 4xx
errors.
{
"error": {
"status": 0,
"message": "string",
"code": "string"
}
}
No active plan for the account or plan doesn't allow API/endpoint usage. See the Error responses page for more details.
- application/json
- Schema
- Example (from schema)
Schema
error
object
HTTP status code of the error.
Human-readable message describing the error.
Optional machine-readable code providing details about some 4xx
errors.
{
"error": {
"status": 0,
"message": "string",
"code": "string"
}
}
The API rate limit has been exceeded. See the Error responses page for more details.
- application/json
- Schema
- Example (from schema)
Schema
error
object
HTTP status code of the error.
Human-readable message describing the error.
Optional machine-readable code providing details about some 4xx
errors.
{
"error": {
"status": 0,
"message": "string",
"code": "string"
}
}