Skip to content
ajar.Book a demo

Cart quantity set

amazon.cart.quantity.set

View connector

Change a basket item's quantity by one step or remove it

POST /v1/operations/amazon.cart.quantity.set

Headers

Authorization: Bearer YOUR_AJAR_API_KEY
x-amazon-token: YOUR_AMAZON_TOKEN
x-idempotency-key: YOUR_UNIQUE_ATTEMPT_KEY
Content-Type: application/json

x-idempotency-key identifies one intended action. Generate a unique value, such as crypto.randomUUID(), before sending it. Use 1–128 letters, numbers, hyphens, underscores or periods. A duplicate attempt is rejected; it does not return a cached success. If a request times out, check the provider’s state before starting a new attempt with a new key. See the idempotency guide.

Inputs

ParameterExample typeExample value
item_idstring"00000000-0000-0000-0000-000000000000"
quantitynumber2

Example input

{
  "item_id": "00000000-0000-0000-0000-000000000000",
  "quantity": 2
}
Open JSON schema

Input schema

{
  "$id": "https://useajar.com/schemas/amazon/cart-quantity-set.input.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "item_id": {
      "pattern": "^[0-9a-fA-F-]{36}$",
      "type": "string"
    },
    "quantity": {
      "maximum": 99,
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "item_id",
    "quantity"
  ],
  "title": "Amazon cart-quantity-set input",
  "type": "object"
}