POST
/
v2
/
carts
/
{cartId}
/
order-drafts

Headers

x-site-context
string
required

The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.

Path Parameters

cartId
string
required

ID of the cart for which order draft will be generated

Body

application/json

Sample request to create order draft

paymentDetails
object[]
required

Payment details

estimatedTax
object
required

Estimated tax object

orderNumber
string | null

Order number

orderSequence
object

Order sequence details

customer
object

Customer details

orderType
string | null

Order type (WEB, CSC, MOBILE_APP, POS)

orderSubType
string | null

Order sub type (Android/IOS/International)

Response

201 - application/json

Order draft response

cartId
string
required

Cart ID

orderStatus
object
required
orderTotal
number
required

Total amount for the order

orderSubTotal
number
required

Total amount for the order without discounts

taxTotal
number
required

Total tax applied on the order

orderDiscount
number
required

Total discount applied on the order

currency
string
required

Currency code

createdAt
string
required

Time order draft was created

items
object[]
required
shipInfo
object[]
required
orderNumber
string | null

Order number

orderType
string | null

Order type (WEB, CSC, MOBILE_APP, POS)

orderSubType
string | null

Order sub type (Android/IOS/International)

customer
object

Customer details

attributes
object | null

Cart metadata

payments
object[] | null
accountId
string | null

Customer account ID

totalItems
integer | null

Total number of items in the cart

totalUniqueItems
integer | null

Total number of unique line items in the cart

configuration
object

Cart configuration

fees
object[] | null

Fees associated with a specific cart or an individual line item of a cart

orderTotalFees
number | null

Total fees applied on the order

error
object

error object