Update inventory lines in bulk

Changes up to 200 inventory lines in one call, without a file round-trip. Each item names one line — by inventoryId or by customId — and carries the changes to apply: quantity, condition, language, finish, comment, notes, location, or tags. Send only the fields you want to change. Each line can appear in only one item per call; further items naming the same line are rejected with INVALID_ITEM. The same change rules as PATCH /v1/inventory/{inventoryId} apply, including count splits, merging into an identical line, the location name (or null to clear), and the tags {"set"|"add"|"remove"} change. location and tags names must already exist, or the item is rejected with LOCATION_NOT_FOUND or TAG_NOT_FOUND.

Items are checked one by one. Items that fail — unknown line, quantity underflow, invalid count — come back in results with status: "error" and do not block the rest. All items that pass are applied together: either every one of them takes effect, or — when they collide with each other or with another of your lines — none do and the call fails with CONFLICT.

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

Requires the inventory:write scope.

Body
required
application/json
  • items
    Type: array object[] 1…200
    required

    The changes to apply — between 1 and 200 items per call.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/inventory/bulk/update
curl https://public-api.cardnexus.com/v1/inventory/bulk/update \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "items": [
    {
      "inventoryId": "",
      "customId": "YRG|5555-5DS1-2EX-006-f-2-2008-08-01",
      "quantity": {
        "set": 1
      },
      "condition": "NM",
      "language": "",
      "finish": "Standard",
      "comment": "Slight edge wear on the back corner",
      "notes": "Bought at the March show, restock from supplier A",
      "location": "Trade binder",
      "tags": {
        "set": [
          "Trade binder"
        ]
      },
      "count": 1
    }
  ]
}'
{
  "results": [
    {
      "index": 0,
      "status": "ok",
      "inventoryId": "665f3a2b1c8d4e9f7a6b5c4d"
    },
    {
      "index": 1,
      "status": "error",
      "code": "NOT_FOUND",
      "data": {
        "customId": "YRG|5555-5DS1-2EX-006-f-2-2008-08-01"
      }
    },
    {
      "index": 2,
      "status": "error",
      "code": "INSUFFICIENT_QUANTITY",
      "data": {
        "inventoryId": "665f3a2b1c8d4e9f7a6b5c52",
        "available": 3,
        "requested": 5
      }
    }
  ]
}