Deliveries
Retrieve Deliveries
Retrieving a single delivery is pretty straightforward. You'll just use the id of delivery to get it. When you are retrieving multiple deliveries, there are additional search and filter options available.
Retrieve Single Delivery
This endpoint allows you to retrieve detailed information about a specific delivery using its unique identifier. The response includes comprehensive delivery details along with related information such as tracking updates, addresses, etc.
Request Example
List Deliveries
This endpoint enables you to retrieve multiple deliveries with comprehensive filtering, sorting, and search capabilities. The system provides flexible query options to help you find exactly the deliveries you need.
When you want to retrieve multiple deliveries, your data property on the result will always be an array even if you don't have any deliveries.
Basic Usage
Filtering
The API supports comprehensive filtering of deliveries through query parameters.
created_at, pickup_at, estimated_delivery_at, rates_generated_at and start_at support the following operators:
eq: Equals!eq: Not equalsgt: Greater thangte: Greater than or equallt: Less thanlte: Less than or equalbwe: Between exclusive (requires comma-separated dates)bwi: Between inclusive (requires comma-separated dates)in: In list of dates (requires comma-separated dates)!in: Not in list of dates (requires comma-separated dates)
Format: {field}={operator}:{date} or {field}={operator}:{date1},{date2}
Filtering Examples
- Filtering by
status:
- Filtering by
type:
- Filtering by
filter:
- Filtering by
tags:
- Filtering by
layout_id:
- Filtering by
location_id:
- Filtering by
layout_path:
- Filtering by
sender_contact_id:
- Filtering by
recipient_contact_id:
- Filtering by
container_id:
- Filtering by
provider_id:
- Filtering by
service_level:
- Filtering by
rate_type:
- Filtering by
sender_address_id:
- Filtering by
recipient_address_id:
- Filtering by
user_id:
- Filtering by
created_at:
- Filtering by
pickup_at:
- Filtering by
estimated_delivery_at:
- Filtering by
rates_generated_at:
- Filtering by
start_at:
Pagination
The system uses page-based pagination with these properties:
- has_more - Indicates if there are more deliveries available
- page - Current page number (default: 1)
- limit - Number of results per page (default: 25)
- total_count - Total number of deliveries in the database.
To retrieve the next page of results:
Example with pagination:
Sorting
Control the order of results using:
By default, deliveries will be sorted by in ascending order.
Search
The API provides advanced full-text search capabilities through the search parameter, allowing you to filter specific deliveries using fuzzy, typo-tolerant matching across multiple fields.
Below are the properties that are supported by our full text search.
Searchable Properties
search.provider: the provider namesearch.barcode_valuessearch.order_numbersearch.recipient: the recipient name, nickname and emailsearch.sender: the sender name, nickname and emailsearch.tracking_numbersearch.metadata: the custom metadata of the delivery
Each delivery in the search results includes a special _search object that provides detailed information about the match:
To perform a general search, simply provide a string to search by using the search query param. The results will be order by the most relevant first.
To perform a targeted search, or a mixture of targeted search and general search, or to use various modifiers to boost a particular field, refer to the general section on search, while using the searchable properties provided above
If you want to highlight matching search results for a frontend, we provide a special property for search-returned delivery objects called _search which will have the matched text surrounded with <mark> handles.
We also provide a _searchV2 object that has a searchV2.scores property for scores and searchV2.shipment property with all matches highlighted with <mark> handles; this object has the same structure as the delivery object, except only those properties are present where there are highlights.
Ordering Search Results
By default, search results are ordered by relevance score to show the best matches first. However, you can override this by specifying an order_by parameter to sort by other fields like created_at, updated_at, estimated_delivery_at and pickup_at or the search score like _similarity and _relevance. The search functionality can be combined with other filter parameters to refine your results further.