updateCart
Updates the customer's ID associated to the cart.
It receives data from the updateCart endpoint exposed by the BigCommerce API
Signature
declare function updateCart(
context: BigcommerceIntegrationContext,
params: UpdateCartParameters
): Promise<UpdateCartResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | BigcommerceIntegrationContext | |
params | Required | UpdateCartParameters |
Returns
Returns a response with the cart object used in storefront cart responses.
Referenced Types
Examples
Updating a customer ID associated to the cart.
import { sdk } from '~/sdk.config.ts';
const updateCartResponse = await sdk.bigcommerce.updateCart({
id: '7c3ab631-782c-4747-8ccc-873e87de5152',
data: {
customer_id: 24346
}
})