Checkout Consignments
Create a Consignment
POST https://yourstore.example.com/api/storefront/checkouts/{checkoutId}/consignmentsRequest
Adds a new Consignment to Checkout.
Perform the following two steps to define the fulfillment of the items in the cart.
For shipping consignments:
Add a new Consignment to Checkout.
- Send a
POST
request to/consignments
with each shipping address, line item IDs, and quantities. Each address can have its own line item IDs. - Provide a full valid customer address before placing the order. If provided, the order placement will succeed.
As part of the request URL make sure to add
include=consignments.availableShippingOptions
to return the available shipping options based on the items, the address, and the shipping location. This will returnavailableShippingOptions
in the response.Required Fields:
shipping_address
(deprecated) oraddress
lineItems
- Send a
Update the Consignment with Shipping Options using the REST Storefront API, the REST Management API or the GraphQL Storefront API.
For pickup consignments:
Create a new consignment object.
- Send a
POST
request to/consignments
with line item IDs and quantities. - Provide a
pickupMethodId
. This is theid
of the Pickup Method provided in the response body of the Storefront Pickup Options API. - Required Fields:
pickupOption
lineItems
- Send a
To learn more about creating a Checkout Consignment, see the Carts and Checkouts Tutorial.
Notes
- Substitute your storefront domain for
yourstore.example.com
. - The Send a Test Request feature is not currently supported for this endpoint.
- Please note that this API endpoint is not concurrent safe, meaning multiple simultaneous requests could result in unexpected and inconsistent results.
- This endpoint requires using Stencil CLI, a local session, and a csrf token to work.
Parameters
- store_domain in path - string
- checkoutId in path - stringrequiredThe ID of the subject checkout. Identical to the cart ID.
- include in query with default of consignments.availableShippingOptions - array
cart.lineItems.physicalItems.options
- physical options
cart.lineItems.digitalItems.options
- digital options
cart.lineItems.physicalItems.categoryNames
- physical categories
cart.lineItems.digitalItems.categoryNames
- digital categories
cart.lineItems.customItems.categoryNames
- custom categories
customer
- customer
customer.customerGroup
- customer group
payments
- payments
promotions
- promotions
consignments.availableShippingOptions
- shipping options
consignments.availablePickupOptions
- pickup options
Type: array[string]Allowed: cart.lineItems.physicalItems.options | cart.lineItems.digitalItems.options | cart.lineItems.physicalItems.categoryNames | cart.lineItems.digitalItems.categoryNames | cart.lineItems.customItems.categoryNames | customer | customer.customerGroup | payments | promotions | consignments.availableShippingOptions | consignments.availablePickupOptions
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
shippingAddressobject
addressobject
lineItemsarray[object]
shippingOptionIdstring
pickupOptionobject
versioninteger
The cart version that you expect to apply the updates. If the provided version doesn't match the current cart version, you will receive a conflict error. This field is optional; if not provided, optimistic concurrency control will not apply.Example: 1
example
Response
Body
billingAddressobject
cartobject
A cart contains a collection of items, prices, discounts, etc. It does not contain customer-related data.channelIdinteger
Channel ID.consignmentsarray[object]
couponsarray[object]
Coupons applied at the checkout level.feesarray[object]
Fees applied at the checkout level.createdTimestring
Time when the cart was created.customerobject
Customer details.customerMessagestring
Shopperʼs message provided as details for the order to be created from this cartgiftCertificatesarray[object]
Applied gift certificate (as a payment method).giftWrappingCostTotalnumber
Gift wrapping cost for all items, including or excluding tax.grandTotalnumber
The total payable amount, before applying any store credit or gift certificate.handlingCostTotalnumber
Handling cost for all consignments including or excluding tax.idstring
isStoreCreditAppliedboolean
true
value indicates StoreCredit has been applied.orderIdstring or null
outstandingBalancenumber
grandTotal
subtract the store-credit amountpaymentsarray[object]
promotionsarray[object]
shippingCostBeforeDiscountnumber
The shipping cost before discounts are applied.shippingCostTotalnumber
Shipping cost before any discounts are applied.shouldExecuteSpamCheckboolean
subtotalnumber
Subtotal of the checkout before applying item-level discounts. Tax inclusive based on the store settings.taxesarray[object]
taxTotalnumber
updatedTimestring
Time when the cart was last updated.versioninteger
The current version of the checkout increments with each successful update. You can use it to enable optimistic concurrency control for subsequent updates.Example: 1
example
Update a Consignment
PUT https://yourstore.example.com/api/storefront/checkouts/{checkoutId}/consignments/{consignmentId}Request
Updates an existing consignment. An update is either one of the following:
- Updates the consignment address and/or line items.
- Selects a specific fulfillment option.
Update the consignment address and line items
For this type of update, the payload is the same as when creating a new consignment. Update each Consignment shippingOptionId
(shipping address and line items) with the availableShippingOption > id
from the POST /consignment
response.
Note:
Updating a consignment could invalidate the value for selectedShippingOption
and selectedPickupOption
.
Select a specific fulfillment option
Before placing an order, each consignment must have a selectedShippingOption
or a selectedPickupOption
.
If the consignment already has a pick-up option selected and a shipping option is provided, the pick-up option will be deselected and the shipping option will be selected instead (and vice versa). The PUT
request will fail if it contains a shipping option ID and a pickup option ID.
Required Fields:
shippingOptionId
orpickupOptionId
lineItems
To learn more about creating a Checkout Consignment see Checkout Consignment API.
Notes
- You cannot pass both an
address
and ashippingOptionId
because the shipping option may not be available for the new address - Substitute your storefront domain for
yourstore.example.com
. - The Send a Test Request feature is not currently supported for this endpoint.
- Please note that this API endpoint is not concurrent safe, meaning multiple simultaneous requests could result in unexpected and inconsistent results.
- This endpoint requires using Stencil CLI, a local session, and a csrf token to work.
Parameters
- store_domain in path - string
- checkoutId in path - stringrequiredThe ID of the subject checkout. Identical to the cart ID.
- consignmentId in path - stringrequiredThe ID of the subject consignment.
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- include in query with default of consignments.availableShippingOptionsconsignments.availablePickupOptions - array
cart.lineItems.physicalItems.options
- physical options
cart.lineItems.digitalItems.options
- digital options
cart.lineItems.physicalItems.categoryNames
- physical categories
cart.lineItems.digitalItems.categoryNames
- digital categories
cart.lineItems.customItems.categoryNames
- custom categories
customer
- customer
customer.customerGroup
- customer group
payments
- payments
promotions
- promotions
consignments.availableShippingOptions
- shipping options
consignments.availablePickupOptions
- pickup options
Type: array[string]Allowed: cart.lineItems.physicalItems.options | cart.lineItems.digitalItems.options | cart.lineItems.physicalItems.categoryNames | cart.lineItems.digitalItems.categoryNames | cart.lineItems.customItems.categoryNames | customer | customer.customerGroup | payments | promotions | consignments.availableShippingOptions | consignments.availablePickupOptions
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
shippingAddressobject
addressobject
lineItemsarray[object]
shippingOptionIdstring
pickupOptionobject
versioninteger
The cart version that you expect to apply the updates. If the provided version doesn't match the current cart version, you will receive a conflict error. This field is optional; if not provided, optimistic concurrency control will not apply.Example: 1
example
Response
Body
billingAddressobject
cartobject
A cart contains a collection of items, prices, discounts, etc. It does not contain customer-related data.channelIdinteger
Channel ID.consignmentsarray[object]
couponsarray[object]
Coupons applied at the checkout level.feesarray[object]
Fees applied at the checkout level.createdTimestring
Time when the cart was created.customerobject
Customer details.customerMessagestring
Shopperʼs message provided as details for the order to be created from this cartgiftCertificatesarray[object]
Applied gift certificate (as a payment method).giftWrappingCostTotalnumber
Gift wrapping cost for all items, including or excluding tax.grandTotalnumber
The total payable amount, before applying any store credit or gift certificate.handlingCostTotalnumber
Handling cost for all consignments including or excluding tax.idstring
isStoreCreditAppliedboolean
true
value indicates StoreCredit has been applied.orderIdstring or null
outstandingBalancenumber
grandTotal
subtract the store-credit amountpaymentsarray[object]
promotionsarray[object]
shippingCostBeforeDiscountnumber
The shipping cost before discounts are applied.shippingCostTotalnumber
Shipping cost before any discounts are applied.shouldExecuteSpamCheckboolean
subtotalnumber
Subtotal of the checkout before applying item-level discounts. Tax inclusive based on the store settings.taxesarray[object]
taxTotalnumber
updatedTimestring
Time when the cart was last updated.versioninteger
The current version of the checkout increments with each successful update. You can use it to enable optimistic concurrency control for subsequent updates.Example: 1
example
Delete a Consignment
DELETE https://yourstore.example.com/api/storefront/checkouts/{checkoutId}/consignments/{consignmentId}Request
Parameters
- store_domain in path - string
- checkoutId in path - stringrequiredThe ID of the subject checkout. Identical to the cart ID.
- consignmentId in path - stringrequiredThe ID of the subject consignment.
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
Body
versioninteger
The cart version that you expect to apply the updates. If the provided version doesn't match the current cart version, you will receive a conflict error. This field is optional; if not provided, optimistic concurrency control will not apply.Example: 1
example
Response
Body
billingAddressobject
cartobject
A cart contains a collection of items, prices, discounts, etc. It does not contain customer-related data.channelIdinteger
Channel ID.consignmentsarray[object]
couponsarray[object]
Coupons applied at the checkout level.feesarray[object]
Fees applied at the checkout level.createdTimestring
Time when the cart was created.customerobject
Customer details.customerMessagestring
Shopperʼs message provided as details for the order to be created from this cartgiftCertificatesarray[object]
Applied gift certificate (as a payment method).giftWrappingCostTotalnumber
Gift wrapping cost for all items, including or excluding tax.grandTotalnumber
The total payable amount, before applying any store credit or gift certificate.handlingCostTotalnumber
Handling cost for all consignments including or excluding tax.idstring
isStoreCreditAppliedboolean
true
value indicates StoreCredit has been applied.orderIdstring or null
outstandingBalancenumber
grandTotal
subtract the store-credit amountpaymentsarray[object]
promotionsarray[object]
shippingCostBeforeDiscountnumber
The shipping cost before discounts are applied.shippingCostTotalnumber
Shipping cost before any discounts are applied.shouldExecuteSpamCheckboolean
subtotalnumber
Subtotal of the checkout before applying item-level discounts. Tax inclusive based on the store settings.taxesarray[object]
taxTotalnumber
updatedTimestring
Time when the cart was last updated.versioninteger
The current version of the checkout increments with each successful update. You can use it to enable optimistic concurrency control for subsequent updates.Example: 1