POST
/
v3
/
carts
/
{cartId}
/
line-items
/
{lineItemId}
/
adjustments
curl --request POST \
  --url https://api.fabric.inc/v3/v3/carts/{cartId}/line-items/{lineItemId}/adjustments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
  --data '{
  "data": [
    {
      "amount": 60.5,
      "reason": "CSR Adjustment",
      "attributes": {
        "productFamily": "Laptop computers"
      }
    }
  ]
}'
{
  "data": [
    {
      "id": "c695af14-5e33-402c-9d8d-71edcf4856a8",
      "amount": 60.5,
      "reason": "CSR Adjustment",
      "attributes": {
        "productFamily": "Laptop computers"
      },
      "createdAt": "2022-09-06T14:07:17.000Z",
      "updatedAt": "2022-09-06T14:07:17.000Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Headers

x-fabric-tenant-id
string
required

A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.

x-fabric-channel-id
string

x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required.

x-fabric-request-id
string

Unique request ID

Path Parameters

cartId
string
required

Cart ID

Example:

"b8a64b52-dab4-8137-8d6a-f2c2337abc1"

lineItemId
string
required

Line item ID

Example:

"d7e78a21-bee3-4448-bf1c-d5b5461dbda2"

Body

application/json
A sample request containing details of the price adjustment.

Sample request containing price adjustment details

data
object[] | null
required

Price adjustment details

Response

200
application/json
OK

Sample response containing list of adjustments

data
object[] | null
required

Price adjustment details for the specified line item or the specified cart

Was this page helpful?