POST
/
carts
/
{cartId}
/
actions
/
apply-coupon

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-fabric-tenant-id
string
required

Merchant's 24-character tenant ID

x-fabric-channel-id
string

Sales channel ID

x-fabric-request-id
string

Unique request ID

Path Parameters

cartId
string
required

Cart ID

Body

application/json
couponCode
string
required

Coupon to be applied or removed from cart

Response

200 - application/json
id
string | null

Unique cart identifier

createdAt
string

Time cart was created

updatedAt
string

Time cart was last updated

name
string | null

Cart name

description
string | null

Cart description

lineItems
object[]
totalItems
integer | null

Number of line items in the cart

totalUniqueItems
integer | null

Number of different (unique) line items in the cart based on line item ID

status
enum<string>

Cart status <br/> PENDING - Cart is in pending state <br/> DELETED - Cart is in deleted state

Available options:
PENDING,
DELETED
accountId
string | null

Customer account ID

configuration
object

Cart configurations

customerContext
object

Customer context

totalAmount
number | null

Total price of line items after discount, including shipping and shipping discount

totalDiscount
number | null

Total discount applied to cart

totalFees
number | null

Total fees applied to cart

subTotal
number | null

Total price of line items, including shipping, without discount

currency
string
default: USD

Currency type

attributes
object

Cart attributes

appliedDiscounts
object[]

Applied discounts

fees
object[] | null
suggestedProducts
object[] | null

Suggested free products

orderNumber
string

The order number

error
object

Errors in this cart