---
updatedAt: 2025-03-06T17:41:15.000Z
agentTools:
  projectIndex: https://spressocommerce.readme.io/llms.txt
---

# Create/Update Shipment

## PUT /v1/fulfillments/:fulfillmentId/shipments ([API Reference](https://spressocommerce.readme.io/reference/updateshipment))

### Description

* Creates or updates an existing shipment on a fulfillment
  * By default, this will create a new shipment. If a shipment with the same tracking number already exists on the fulfillment, this will instead update shipment details.\ <br />
    > 📘 Note
    >
    > Sending in a shipment status of `shipped` or `delivered` will trigger an email for shipment sent or delivered respectively

<br />

### Path Parameters

* (required) **Fulfillment ID**: the fulfillment id for the relevant fulfillment

### Body Parameters

* (required) **carrier**: string — The shipping carrier enum indicating what carrier is used for shipping (i.e. `fedex`)
* (required) **carrierReferenceId**: string — The carrier’s reference id in their system (can use trackingNumber if no such reference id exists)
* (required) **trackingNumber**: string — The trackingNumber for the shipment
* (required) **shipmentVariants**: Array - These are the variants that are shipped for each shipment
  * (required) **variant**: string - The variantId corresponding to the items shipped
  * (required) **quantity**: number - The quantity of the item
* (*optional*) **trackingUrl**: string — The tracking url a customer can use to view the status of the shipment in the carriers system (ex. view the status of UPS delivering a shipment)
* (*optional*) **status**: string - Shipment status enum indicating the status of the shipment (`created`, `shipped` or `delivered`)