PUT /carts/{cartId}
Updates a Cartʼs customer_id.
Notes
Changing the Cart customer_id will remove any promotions or shipping calculations on the Cart. These are tied to the customer depending on cart conditions and any customer groups.
To prevent lost updates due to concurrent requests overriding changes made by others, it is recommended to enable optimistic concurrency control by including the version field in the request payload. If the provided version does not match the version on the server, a conflict error will be returned, which the client can handle accordingly.
Servers
- https://api.bigcommerce.com/stores/{store_hash}/v3
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
cartId |
String | Yes |
The identifier of a specific cart. |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Accept |
String | Yes |
The MIME type of the response body. Default value: "application/json" |
Content-Type |
String | Yes |
Default value: "application/json" |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
include[] |
Array | No |
|
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
customer_id |
Integer | No | |
version |
Integer | No |
The cart version that you expect to apply the updates. If the provided version doesn't match the current cart version, you will receive a conflict error. This field is optional; if not provided, optimistic concurrency control will not apply. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.