Shipments
Update Shipments
This endpoint enables you to update various aspects of an existing shipment, including tracking information, status updates, and associated metadata.
POST
`/v1/shipments/:shipment`
Request Parameters
Path Parameters
Request Body
The request body can include any combination of the following fields:
Request Examples
Comment-Only Update
You can add a comment to a shipment's tracking timeline without changing its status. Omit status from tracking_update and provide only comment. The API creates a new tracking timeline entry that copies the shipment's current status and attaches your comment.
Behavior notes:
- The new tracking update entry inherits the shipment's most recent status and carries your comment.
- The
shipment.updatedwebhook fires for a comment-only update, just as it does for any other tracking update. - Customer-facing pickup and delivery notifications are NOT re-sent for a comment-only update (the repeated status does not re-trigger them).
- A comment-only update is treated like any other tracking update: it bumps the shipment's
updated_attimestamp and, when the status ispickup_available, counts toward the pickup-reminder limit the same way any repeatedpickup_availableentry does. - If the shipment has no prior tracking update with a status, a
400error is returned with codeinvalid:comment.
Basic Information Update
Status Update Example
Customs Update Example (International)
Update Restrictions
Container-Related Restrictions
- Cannot update
statusorlocationfor shipments in containers. Either unlink the shipment or update the container directly.
- Cannot update
Purchased Shipment Restrictions
- Cannot modify
provider_id - Cannot update
tracking_number - Cannot change
service_level_id - Cannot modify
dimensionsorweight
- Cannot modify
Status Update Restrictions
- Must provide valid status transitions
- Location and layout must be compatible
International Field Restrictions
- A shipment is treated as international when sender and recipient countries differ. International shipping must be enabled in your organization settings; otherwise a
400error is returned when attempting to rate or update international customs. - For international shipments,
customsfields must satisfy validation (e.g.,contents_explanationrequired whencontents_typeisother, andrestriction_commentsrequired whenrestriction_typeis notnone).
- A shipment is treated as international when sender and recipient countries differ. International shipping must be enabled in your organization settings; otherwise a
Error Handling
Common error scenarios include:
- Invalid Updates
- Validation Errors
- Comment-Only on a Shipment With No Prior Status
- Permission Errors