Update an inventory line
Changes a single inventory line — its quantity, condition, language, finish, grading, customId, comment, notes, location, or tags. Send only the fields you want to change.
finish and language must be ones the product exists in — see the product's finishes and languages on GET /v1/products/{productId}. A finish the product doesn't come in is rejected with INVALID_FINISH; a language it doesn't come in with INVALID_LANGUAGE.
Quantity takes either {"set": n} (new total) or {"adjust": n} (signed change). A change that would leave zero or fewer cards is rejected with INSUFFICIENT_QUANTITY — use DELETE /v1/inventory/{inventoryId} to remove a line.
location takes a location name, or null to move the line to no location. tags takes {"set": [...]} (replace the whole set, [] clears), {"add": [...]} (add, keep the rest), or {"remove": [...]} (remove only those). location and tags names must already exist — a name that matches none of your labels returns LOCATION_NOT_FOUND or TAG_NOT_FOUND. notes is your private note; pass null to remove it.
count applies the attribute changes to only part of the line. When count is lower than the line's quantity, the line splits: count cards take the changes and come back as line, the rest stays unchanged and comes back as remainder. The split-off part inherits the original line's comment unless you send a new one, and never inherits its customId — send customId to give the new part its own. count needs at least one attribute change and cannot be combined with quantity.
If the changes make this line identical to another of your lines (same product, finish, condition, language, grading, and listing state, neither line carrying a customId), the two merge; line is the surviving line.
Send an Idempotency-Key header to make retries safe: the same key returns the same response for 24 hours.
Requires the inventory:write scope.
- Type: stringinventory
Id min length:1requiredThe inventory line's identifier. Returned by
GET /v1/inventory. Path parameter.
- Type: string ·commentmax length:2000nullable
Free-text note for the line, shown to buyers on your Marketplace listing. Pass
nullto remove it.Free-text note attached to this inventory line. Buyers see it when they view your listing.
- Type: string · enumcondition
New condition:
NM,LP,MP,HP, orDMG.values- N
M Near Mint.
- L
P Lightly Played.
- M
P Moderately Played.
- H
P Heavily Played.
- D
M G Damaged.
- Type: integercountmin:1max:9007199254740991
Apply the attribute changes to only this many cards. When
countis lower than the line's quantity, the line splits:countcards take the changes and come back asline, the rest stays unchanged and comes back asremainder. Cannot be combined withquantity. - Type: string ·custom
Id min length:1max length:255nullableYour own stable identifier for this line, unique across your live lines. Pass
nullto remove it.Your own stable identifier for this inventory line, unique across your live lines. CardNexus never modifies it.
- Type: string enumfinish
New finish, e.g.
Standard,Foil,Reverse Holo.values- Standard
A standard, non-foil card.
- Foil
A foil card.
- Rainbow
- Gold
- Rainbow
Foil
- Type: object nullablegraded
New grading details, or
nullto turn the line back into a raw card (setconditionin the same call). - Type: stringlanguagemin length:1
New language, as a two-letter code, e.g.
en. - Type: stringlocationmin length:1max length:100nullable
The location for this line, by name. Must match one of your existing locations. Pass
nullto move the line to no location.The label's name. Matched case-insensitively, with surrounding spaces ignored —
Shelf Aandshelf aare the same label. - Type: stringnotesmax length:2000nullable
Private note for the line, visible only to you. Pass
nullto remove it.Private free-text note attached to this inventory line, visible only to you. Never shown to buyers.
- quantity
Quantity change:
{"set": n}replaces the quantity,{"adjust": n}adds or removes cards — one or the other, never both. A change that would leave zero or fewer cards is rejected — useDELETE /v1/inventory/{inventoryId}to remove a line.Quantity change:
{"set": n}replaces the quantity,{"adjust": n}adds or removes cards — one or the other, never both. A change that would leave zero or fewer cards is rejected — useDELETE /v1/inventory/{inventoryId}to remove a line.- setType: integermin:1max:9007199254740991required
The line's new total quantity.
How to change the line's tags:
{"set": [...]}replaces the whole set ({"set": []}clears them),{"add": [...]}adds without removing others,{"remove": [...]}removes only the ones you name. Choose exactly one. Every name must match one of your existing tags.How to change the line's tags:
{"set": [...]}replaces the whole set ({"set": []}clears them),{"add": [...]}adds without removing others,{"remove": [...]}removes only the ones you name. Choose exactly one. Every name must match one of your existing tags.- setType: array string[] …50required
Replace the line's tags with exactly these. Send
[]to remove all tags.
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
curl 'https://public-api.cardnexus.com/v1/inventory/{inventoryId}' \
--request PATCH \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"quantity": {
"set": 1
},
"condition": "NM",
"language": "",
"finish": "Standard",
"graded": {
"grade": "9.5",
"certification": "0084712663",
"gradingService": "PSA"
},
"customId": "YRG|5555-5DS1-2EX-006-f-2-2008-08-01",
"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
}'
{
"line": {
"id": "665f3a2b1c8d4e9f7a6b5c52",
"customId": "YRG|5555-5DS1-2EX-006-f-2-2008-08-01-B",
"comment": "Minor whitening on the bottom edge",
"notes": "Bought at the March show",
"location": "Shelf A",
"tags": [
"Trade binder",
"Graded pile"
],
"productId": 50212,
"game": "ygo",
"finish": "Standard",
"condition": "LP",
"language": "en",
"quantity": 2,
"graded": null,
"forSale": true,
"listing": {
"price": {
"amount": 42.5,
"currency": "EUR"
}
},
"updatedAt": "2026-06-10T09:15:31.000Z"
},
"remainder": {
"id": "665f3a2b1c8d4e9f7a6b5c4d",
"customId": "YRG|5555-5DS1-2EX-006-f-2-2008-08-01",
"comment": "Minor whitening on the bottom edge",
"notes": "Bought at the March show",
"location": "Shelf A",
"tags": [
"Trade binder"
],
"productId": 50212,
"game": "ygo",
"finish": "Standard",
"condition": "NM",
"language": "en",
"quantity": 3,
"graded": null,
"forSale": true,
"listing": {
"price": {
"amount": 42.5,
"currency": "EUR"
}
},
"updatedAt": "2026-06-10T09:15:31.000Z"
}
}