Retrieve the cart of this customer
GET {{api_url}}/cart/{{tenant}}/carts?siteCode=main
Creates a new cart. When a cart is created, its status is set to open.
Note: There can be only one open cart per customer. If another cart needs to be created for a specific customer, you need to update the existing cart's status to closed.
Required scopes
cart.cart_manageNote: Only required if the following conditions are met:
- You want to create a cart for a logged in customer.
- The
access_tokenused to authorize the request and thecustomerIdin the request body belong to different customers.
Request Params
| Key | Datatype | Required | Description |
|---|---|---|---|
siteCode | string |
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
session-id | number | Anonymous customer's unique session identifier. |
Note: The session-id is only required if you want to create a cart for an anonymous customer.
|
| saas-token | string | | Customer’s saasToken generated when the customer token is generated.
Note: The saas-token is only required if you want to create a cart for a logged in customer.
|
| Content-Type | string | | |
| Authorization | string | | |
RESPONSES
status: Created
{"cartId":"{cartId}","yrn":"{cartYrn}"}