> ## Documentation Index
> Fetch the complete documentation index at: https://developer.fabric.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

1. [Create a cart](/v3/cart-and-checkout/api-reference/carts-v3/carts/carts).
2. [Create a fulfillment](/v3/cart-and-checkout/api-reference/carts-v3/fulfillment/create-fulfillments) to add a fulfillment adjustment.
3. [Create an item](/v3/cart-and-checkout/api-reference/carts-v3/items/items) 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:

<Accordion title="Click to expand the JSON example.">
  ```json theme={null}
  {
      "id": "6964b984-49fd-4754-b979-a260e944320c",
      "price": {
          "amount": 10
      },
      "reason": "DelayedOrder",
      "attributes": {
          "reasonDescription": "Price Adjustment due to delayed shipping"
      },
      "updatedAt": "2024-06-20T08:09:58.951Z",
      "createdAt": "2024-06-20T08:09:58.951Z"
  }
  ```
</Accordion>

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:

<Accordion title="Click to expand the JSON example.">
  ```json theme={null}
  "adjustments": {
        "total": 10,
        "collection": [
            {
                "id": "6964b984-49fd-4754-b979-a260e944320c",
                "price": {
                    "amount": 10
                },
                "reason": "DelayedOrder",
                "attributes": {
                    "reasonDescription": "Price Adjustment due to delayed shipping"
                },
                "updatedAt": "2024-06-20T08:09:58.951Z",
                "createdAt": "2024-06-20T08:09:58.951Z"
            }
        ]
    }
  ```
</Accordion>

## Examples

### Making adjustments at the cart level

Use the [create cart adjustment](/v3/cart-and-checkout/api-reference/carts-v3/carts-adjustments/create-adjustments) endpoint to make adjustments at the cart level and credit points available for discounts as in the following example:

<Accordion title="Click to expand the curl example.">
  ```curl theme={null}
      curl --location '{{modular_cart_domain}}/carts/7d403833-8e0c-43f5-aded-72d6a2eaf062/adjustments' \
      --header 'Content-Type: application/json' \
      --header 'x-fabric-tenant-id:  {tenantId}' \
      --data '{
          "price": {
              "amount":10
          },
          "reason":"Avail 1000 Credit Points"
      }'
  ```
</Accordion>

### Using adjustments at the item level

Use the [create item adjustment](/v3/cart-and-checkout/api-reference/carts-v3/item-adjustments/create-item-adjustments) endpoint to make adjustments at the item level and apply the sale price as in the following example:

<Accordion title="Click to expand the curl example.">
  ```curl theme={null}
      curl --location '{{modular_cart_domain}}/carts/7d403833-8e0c-43f5-aded-72d6a2eaf062/items/806d6671-801d-4554-976d-0d38e525a852/adjustments' \
      --header 'Content-Type: application/json' \
      --header 'x-fabric-tenant-id:  {tenantId}' \
      --data '{
          "price": {
              "amount":"10"
          },
          "reason":"Item was a sale item 2 days ago",
          "attributes": {
              "type": "retail"
          }
      }'
  ```
</Accordion>
