Containers
Write Containers
As a shipping provider, you can create a new container or update an existing one. Containers are used to group and track multiple deliveries / shipments together through their delivery journey.
A container is limited to 100 status changes. They are intended to be used for a single trip and typically range between 10 - 25 tracking updates.
Create Container
You can create a container with no request body, but ideally you would provide an array for delivery / shipment IDs that you wanted to include in the container. You can, however, always add those deliveries / shipments later.
Request Body Parameters
add string[]
Array of shipment IDs to add to the container. This parameter is optional.
remove string[]
Array of shipment IDs to remove from the container. This parameter is optional.
status string
Current status of the container. If not provided, defaults to created
for new containers.
metadata object
Custom key-value pairs for additional container data. This parameter is optional.
location_id string
ID of the hub location where this container is assigned. This parameter is optional.
layout_id string
ID of the storage layout for this container. Requires a valid location_id
.
coordinates [number, number]
Latitude and longitude coordinates of the container.
tracking_update object
Detailed tracking information:
Show Details
user_id string
User identifier to associate with the container. Set to null
to remove association.
estimated_delivery_at string
<br
Estimated delivery timestamp in ISO format or epoch seconds.
Validations
- Shipment Ownership:
- All shipments must belong to the same organization as the API key.
- Shipments cannot be already assigned to another container.
- Layout Assignment:
- A layout_id cannot be assigned without a valid location_id.
- The layout must belong to the specified location.
Usage Examples
- Create Empty Container
- Create Container with Shipments
- Create Container with Location and Layout
Create a container with specific location, layout, and delivery estimate:
- Create Container with Image
Create a container with images and location coordinates:
- Create Container with Custom Metadata
Create a container with custom metadata and user assignment:
- Create Container with Address Object
Create a container with detailed address information:
- Create Container with Address ID
- Create Container with Location ID
Error Handling
- When attempting to add shipments that are already assigned to another container, the API returns:
- When attempting to add shipments that belong to a different organization, the API returns:
- When attempting to assign a layout without specifying a location, the API returns:
- When the system encounters issues processing uploaded images, it returns: