Configuring Adjustment
This feature in Carts API provides you the flexibility to apply adjustments at the cart, item, or fulfillment level. Adjustments are deductible elements that modify the total amount and are non-taxable.
Prerequisites
The following prerequisites must be completed sequentially to configure an adjustment.
- Create a cart.
- Create a fulfillment to add a fulfillment adjustment.
- Create an item to add an item adjustment.
Adjustment Initialization
You can apply adjustments at multiple levels, including the cart, individual items, or fulfillment. The adjustment maintains a consistent structure across all levels.
The following code sample provides the structure of an adjustment object:
As multiple adjustments can be applied to a single cart, item, or fulfillment, adjustments are displayed as a collection.
The following code sample provides the structure of an adjustment object in a collection:
Examples
Making adjustments at the cart level
Use the create cart adjustment endpoint to make adjustments at the cart level and credit points available for discounts as in the following example:
Using adjustments at the item level
Use the create item adjustment endpoint to make adjustments at the item level and apply the sale price as in the following example:
Was this page helpful?