Retrieve the current active cart for the specified token.
This method retrieves the cart along with its line items, and links to subresources such as billing address, shipping address, and shipping options.
Query parameters
tokenstringOptional
Provide the authorized or anonymous token for a shopper.
expandstringOptional
Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.
fieldsstringOptional
Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.
Responses
200
Successful response.
application/json
Responseone of
or
400
invalid-request
application/json
401
invalid_token
application/json
404
resource-not-found
application/json
409
ip-address-restriction-error
invalid-ip-address
cart-failure
invalid-product-id
application/json
get
/v1/shoppers/me/carts/active
Update the current cart
post
Adds a product to a cart on an API consumer-hosted page by product ID or external reference ID.
The response returns the contents of the cart. You can also apply a promotional or coupon code to a cart.
The promoCode query parameter is required to apply the promotional code.
Promotional codes are also called coupon codes or discount codes.
Query parameters
tokenstringOptional
Provide the authorized or anonymous token for a shopper.
externalReferenceIdstringOptional
Provide the external reference identifier for your product. The externalReferenceId is your company's internal identifier or stock keeping unit (SKU) for a product.
offerIdstringOptional
Provide the offer identifier associated with the cart. You must pass the offerId in conjunction with the productId or externalReferenceId.
productIdstringOptional
Provide a comma-separated list of one or more product identifiers to include in the response. This parameter is required if the inventory status is requested to be included in the response.
parentLineItemIdstringOptional
Provide the line item ID for the parent product when adding a child product to the cart to ensure the child product is correctly associated with the parent product line item. Remember also to include the offer ID.
promoCodestringOptional
Provide the promotional code to apply to the cart.
quantitystringOptional
Provide the number of products added to the cart. The value must be a valid integer. If the quantity is not explicitly specified, the default is 1.
termIdstringOptional
Provide the finance term ID associated with the cart. You must pass the termId in conjunction with the productId or externalReferenceId.
expandstringOptional
Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.
fieldsstringOptional
Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.
suppressorderconfirmationemailbooleanOptional
When set to true, this parameter suppresses an order's confirmation email. To use this feature, contact Customer Success.