a84d4905fdbb

latestOpenAPI 3.1.02026-08-143874115.7 MB
Shipments

Update Shipment

Updates a shipment's tracking number and re-tracks it with the carrier.

patch/shipments/{id}

Request body

tracking_numberstring required

The new carrier-assigned tracking number.

Example request

{
  "tracking_number": "9400111899223456789012"
}

Response

shipment updated

account_idstring required

The account that owns this shipment, prefixed biz_.

carrierstring nullable required

The shipping carrier detected for this shipment. Null until a tracking update identifies it.

created_atstring required

The datetime the shipment was created (ISO 8601).

idstring required

Shipment ID, prefixed ship_.

payment_idstring required

The payment this shipment fulfills, prefixed pay_.

status'unknown' | 'pre_transit' | 'in_transit' | 'out_for_delivery' | 'delivered' | 'available_for_pickup' | 'return_to_sender' | 'failure' | 'cancelled' | 'error' required

The current delivery status of this shipment.

tracking_numberstring required

The carrier-assigned tracking number used to look up shipment progress.

tracking_urlstring required

A customer-facing URL to track this shipment's progress.

updated_atstring required

The datetime the shipment was last updated (ISO 8601).

Example response

{
  "account_id": "biz_xxxxxxxxxxxxxx",
  "carrier": "ups",
  "checkpoints": [
    {
      "location": "PHILADELPHIA, PA",
      "message": "Picked up",
      "status": "in_transit",
      "timestamp": "2026-01-01T12:00:00.000Z"
    }
  ],
  "created_at": "2026-01-01T12:00:00.000Z",
  "id": "ship_xxxxxxxxxxxxxx",
  "payment_id": "pay_xxxxxxxxxxxxxx",
  "status": "in_transit",
  "tracking_number": "1Z999AA10123456784",
  "tracking_url": "https://track.aftership.com/xxxxxxxxxxxxxxxxxx",
  "updated_at": "2026-01-01T12:00:00.000Z"
}