Update a cart item's quantity

Sets how many units of a listing your cart holds. Unlike POST /v1/cart/items, which adds to the existing quantity, this replaces it. A quantity past a per-listing limit the seller sets is rejected with 400 Bad Request.

quantity: 0 removes the item from your cart. A listing that is not in your cart returns 404 Not Found.

Send an Idempotency-Key header to make retries safe: the same key returns the same response for 24 hours.

Requires the cart:write scope.

Path Parameters
  • listingId
    Type: string
    min length:  
    1
    required

    The listing to update, as it appears in your cart. Path parameter.

Body
required
application/json
  • quantity
    Type: integer
    min:  
    0
    max:  
    9007199254740991
    required

    The new quantity. 0 removes the item from your cart.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/cart/items/{listingId}
curl 'https://public-api.cardnexus.com/v1/cart/items/{listingId}' \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "quantity": 0
}'
{
  "deliveryCountry": "FR",
  "itemCount": 2,
  "sellers": [
    {
      "seller": {
        "id": "665f3a2b1c8d4e9f7a6b5c4d",
        "username": "north_arena_tcg",
        "country": "DE",
        "type": "pro",
        "rating": {
          "average": 4.9,
          "count": 214
        },
        "shipping": {
          "amount": 3.5,
          "currency": "EUR"
        }
      },
      "itemsSubtotal": {
        "amount": 9,
        "currency": "EUR"
      },
      "items": [
        {
          "listingId": "665f3a2b1c8d4e9f7a6b5c52",
          "productId": 50212,
          "productName": "Dark Magician (SDMY-EN001)",
          "imageUrl": "https://images.cardnexus.com/yugioh/SDMY-EN001.png",
          "condition": "NM",
          "language": "en",
          "finish": "Standard",
          "graded": null,
          "quantity": 2,
          "unitPrice": {
            "amount": 4.5,
            "currency": "EUR"
          },
          "lineTotal": {
            "amount": 9,
            "currency": "EUR"
          },
          "addedAt": "2026-07-12T15:02:00.000Z"
        }
      ]
    }
  ]
}