For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
        • Abandoned Carts
        • Carts
        • Channels
        • Checkouts
        • Currencies
        • Customer Segmentation
        • Geography
        • Infrastructure Hosting
        • Inventory
        • Orders
            • GETGet Order
            • PUTUpdate Order
            • DELArchive Order
            • GETGet Count of Orders
            • GETList Orders
            • POSTCreate Order
            • DELDelete All Orders
              • GETList Order Shipments
              • POSTCreate Order Shipment
              • DELDelete Order Shipments
              • GETGet Count of Order Shipments
              • GETGet Shipment
              • PUTUpdate Shipment
              • DELDelete Order Shipment
        • Order Operations
        • Pickup
        • Pickup Methods
        • Pickup Options
        • Pricing
        • Price Lists
        • Promotions
        • Promotion Settings
        • Redirects
        • Scripts
        • Settings
        • Shipping
        • Sites
        • Subscribers
        • System Logs
        • Tax
        • Wishlists
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminManagementOrdersOrder Shipments

Update Shipment

PUT
https://api.bigcommerce.com/stores/:store_hash/v2/orders/:order_id/shipments/:shipment_id
PUT
/stores/:store_hash/v2/orders/:order_id/shipments/:shipment_id
$curl -X PUT https://api.bigcommerce.com/stores/store_hash/v2/orders/1/shipments/1 \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "order_address_id": 1,
> "tracking_number": "EJ958083578US",
> "merchant_shipping_cost": "1.0000",
> "shipping_provider": "fedex"
>}'
200application/json
1{
2 "id": 11,
3 "order_id": 228,
4 "customer_id": 11,
5 "order_address_id": 131,
6 "date_created": "Wed, 13 Mar 2019 16:35:37 +0000",
7 "tracking_number": "EJ958083578US",
8 "merchant_shipping_cost": "0.0000",
9 "shipping_method": "None",
10 "shipping_provider": "usps",
11 "tracking_carrier": "",
12 "tracking_link": "",
13 "comments": "Ready to go...",
14 "billing_address": {
15 "zip": "78751",
16 "first_name": "Jane",
17 "last_name": "Doe",
18 "company": "",
19 "street_1": "123 Main Street",
20 "street_2": "",
21 "city": "Austin",
22 "state": "Texas",
23 "country": "United States",
24 "country_iso2": "US",
25 "phone": "",
26 "email": "janedoe@example.com"
27 },
28 "shipping_address": {
29 "first_name": "Trishy",
30 "last_name": "Test",
31 "company": "Acme Pty Ltd",
32 "street_1": "666 Sussex St",
33 "street_2": "",
34 "city": "Anywhere",
35 "state": "Some State",
36 "zip": "12345",
37 "country": "United States",
38 "country_iso2": "US",
39 "phone": "",
40 "email": "elsie@example.com"
41 },
42 "items": [
43 {
44 "order_product_id": 194,
45 "product_id": 0,
46 "quantity": 1
47 },
48 {
49 "order_product_id": 195,
50 "product_id": 0,
51 "quantity": 1
52 }
53 ],
54 "shipping_provider_display_name": "USPS",
55 "generated_tracking_link": "http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?strOrigTrackNum=EJ958083578US"
56}
Updates an existing shipment associated with an order.
Was this page helpful?
Previous

Get Shipment

Next

Delete Order Shipment

Built with

Authentication

X-Auth-Tokenstring
### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Orders | modify | `store_v2_orders` | | Orders | read-only | `store_v2_orders_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

Path parameters

order_idintegerRequired
ID of the order.
shipment_idintegerRequired
Shipment ID.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json
The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

Request

This endpoint expects an object.
order_address_idintegerOptional

ID of the desired shipping_address associated with the shipment.

tracking_numberstringOptional
Tracking number of the shipment.
merchant_shipping_coststringOptional
Shipping cost for the merchant.
shipping_methodstringOptional

Additional information to describe the method of shipment (ex. Standard, Ship by Weight, Custom Shipment). Can be used for live quotes from certain shipping providers. If different from shipping_provider, shipping_method should correspond to tracking_carrier.

shipping_providerenum or stringOptional
tracking_carrierstringOptional

Tracking carrier for the shipment. Acceptable values for tracking_carrier include an empty string ("") or one of the valid tracking-carrier values.

tracking_linkstringOptional<=500 characters

The custom tracking link supplied on POST or PUT shipments. For the link to one of our integrated providers or Aftership tracking link see the generated_tracking_link property.

commentsstringOptional<=65535 characters
Comments the shipper wishes to add.

Response

idinteger
Shipment ID.
order_idinteger
ID of the order associated with this shipment.
customer_idinteger

ID of this order’s customer.

order_address_idinteger

ID of the desired shipping_address associated with the shipment.

date_createdstring
Creation date for the shipment.
tracking_numberstring
Tracking number of the shipment.
merchant_shipping_coststring
Shipping cost for the merchant.
shipping_methodstring

Additional information to describe the method of shipment (ex. Standard, Ship by Weight, Custom Shipment). Can be used for live quotes from certain shipping providers. If different from shipping_provider, shipping_method should correspond to tracking_carrier.

shipping_providerenum or string
tracking_carrierstring

Tracking carrier for the shipment. Acceptable values for tracking_carrier include an empty string ("") or one of the valid tracking-carrier values.

tracking_linkstring

The custom tracking link supplied on POST or PUT shipments. For the link to one of our integrated providers or Aftership tracking link, see the generated_tracking_link property.

commentsstring<=65535 characters
Comments the shipper wishes to add.
billing_addressobject
shipping_addressobject
Shipping Address properties common to all requests and responses.
itemslist of objects

The items in the shipment. This object has the following members, all integer: order_product_id (required), quantity (required), product_id (read-only). A sample items value might be: [ {“order_product_id”:16,“product_id”: 0,“quantity”:2} ]

shipping_provider_display_namestringRead-only

The human-readable name for the shipping_provider.

generated_tracking_linkstring

The link to one of our integrated providers or Aftership tracking link that is generated using the combination of either the tracking_number and shipping_provider or tracking_number and tracking_carrier. This will be empty if the custom tracking_link value is provided.

OAuth scopes

UI NamePermissionParameter
Ordersmodifystore_v2_orders
Ordersread-onlystore_v2_orders_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

The MIME type of the response body.