Full Inventory Sync

Sync your complete inventory in a single request. Choose between overwrite mode (replace everything) or add mode (only add/update).

POST/inventory/syncinventory:write
Full Inventory Sync

Push your complete inventory catalog. Use 'overwrite' mode for full replacement or 'add' mode to only upsert.

On larger screens, use the API Playground panel on the right to try this endpoint.
NameTypeRequiredDescription
modestringoverwrite | addRequiredSync mode
itemsarrayRequiredArray of inventory items to sync
strictbooleanOptionalIf true, fail entire batch on any error. Default: false (partial success)
bash
curl -X POST "https://api.ctcgx.com/api/v1/inventory/sync" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "overwrite",
  "items": [
    {
      "tcgplayerId": "12345",
      "quantity": 4,
      "price": 599,
      "condition": "NM",
      "finish": "nonfoil"
    },
    {
      "scryfallId": "abc-123-def",
      "quantity": 2,
      "price": 1299,
      "condition": "LP",
      "finish": "foil"
    }
  ]
}'

Response

Returns counts of items processed, created, updated, deleted, and any errors.

json
{
  "success": true,
  "processed": 2,
  "created": 1,
  "updated": 1,
  "deleted": 0,
  "failed": 0,
  "errors": []
}

Item Structure

Each item in the items array requires at least one external ID for product lookup, plus quantity and price for the listing.

Product Identification

At least one of these IDs is required to identify the product:

FieldTypeDescription
ctcgxProductIdstringCTCGX product ID
scryfallIdstringScryfall ID (Magic: The Gathering)
tcgplayerIdstringTCGPlayer product ID
cardmarketIdstringCardmarket ID
cardtraderIdstringCardtrader ID
pokemontcgIdstringPokemon TCG API ID
ygoprodeckIdstringYGOProDeck ID (Yu-Gi-Oh)
fabIdstringFlesh and Blood ID
lorcanaIdstringLorcana ID
optcgIdstringOne Piece TCG ID
swudbIdstringStar Wars Unlimited DB ID

Listing Details

FieldTypeRequiredDescription
quantitynumberYesStock quantity
pricenumberYesPrice in cents CAD (e.g., 599 = $5.99)
conditionstringNoCard condition (see values below)
finishstringNoCard finish (see values below)
languagestringNoCard language (default: "English")
editionstringNoEdition (for games that use editions)
imageUrlstringConditionalRequired for graded, signed, or damaged cards

Graded Cards

FieldTypeDescription
isGradedbooleanSet to true for graded cards
gradingCompanystringRequired if isGraded (see values below)
gradestringRequired if isGraded (e.g., "10", "9.5")
certNumberstringCertification number

Special Attributes

FieldTypeDescription
isSignedbooleanWhether the card is signed
signedBystringWho signed the card
isErrorbooleanWhether the card has a printing error
errorTypestringRequired if isError (see values below)

Valid Values Reference

Condition

Mint, Near Mint, Lightly Played, Moderately Played, Heavily Played, Damaged

Aliases accepted: NM, LP, MP, HP, DMG, SP, EX, GD

Finish

Normal, Foil, Holofoil, Reverse Holofoil, Etched Foil, Cold Foil, Rainbow Foil, Textured Foil

Aliases accepted: nonfoil, non-foil, holo, reverse, etched

Language

English, Japanese, Korean, Chinese (Simplified), Chinese (Traditional), German, French, Italian, Spanish, Portuguese, Russian, Asian-English

Edition

1st Edition, Unlimited, Limited Edition, Shadowless, Alpha, Beta

Grading Company

PSA, BGS, CGC, SGC, ACE

Error Type

Miscut, Crimped, Off-Center, Misprint, Ink Error, Double Print, Missing Ink, Square Cut, Other

Error Handling

By default, the API uses partial success mode: valid items are processed while failed items are collected in the errors array. Each error includes the item index and specific details about what failed.

{
  "success": false,
  "processed": 95,
  "created": 90,
  "updated": 5,
  "deleted": 0,
  "failed": 5,
  "errors": [
    {
      "index": 12,
      "externalId": "99999",
      "error": "Product not found: tcgplayerId=\"99999\" does not match any product in our database."
    },
    {
      "index": 45,
      "externalId": "invalid-id",
      "error": "Product not found: scryfallId=\"invalid-id\" does not match any product in our database."
    }
  ]
}

API Playground

Select an endpoint from the documentation to try it out here.