TTocler Docs
Dashboard
API reference›Shop API

Products

List products of every type, read one with its options and stock, change an option’s price, stock or visibility.

Updated 3 November 2026Live from Tocler
GET /v1/products Your shop’s API keyproducts:read

Every product of the shop (all types), newest first, 50 a page. type filters by product type, q searches names.

  • typestringquery
    A product type: keys, files, software, service, accounts, dynamic, physical, subscription, course, ticket, giftcard, bundle.
  • qstringquery
    Words in the name.
  • pageintegerquery
    Page number (from 1).
Errors
  • 403 missing_scope — The key lacks products:read.
  • 401 invalid_key — No key, a wrong key, or a revoked / expired key (key_revoked, key_expired).
  • 429 rate_limited — Over the key’s requests per minute — wait for RateLimit-Reset.
curl -X GET 'https://api.tocler.com/v1/products' \
  -H 'Authorization: Bearer tk_live_…'
GET /v1/products/{id} Your shop’s API keyproducts:read

A product with every option: price, compare-at price, stock (keys left, a count, or unlimited) and how many are held by checkouts in progress.

  • idstringpathrequired
    The product’s id.
Errors
  • 403 missing_scope — The key lacks products:read.
  • 404 not_found — No such product in this shop.
  • 401 invalid_key — No key, a wrong key, or a revoked / expired key (key_revoked, key_expired).
  • 429 rate_limited — Over the key’s requests per minute — wait for RateLimit-Reset.
curl -X GET 'https://api.tocler.com/v1/products/{id}' \
  -H 'Authorization: Bearer tk_live_…'
PATCH /v1/products/{id}/variants/{variant_id} Your shop’s API keyproducts:write

Change one option’s price (and compare-at price), its stock count (physical goods and counted stock — keys are uploaded in the Dashboard) or whether it is shown. Send only what changes. A new count is written only if the stock is still the number you send as expect (a sale meanwhile → 409, read again). Send an Idempotency-Key header.

  • Idempotency-Keystringheaderrequired
    1–64 letters, digits, _ - : . — the same one when you retry. The same key with another body → 409 idempotency_mismatch.
  • idstringpathrequired
    The product’s id.
  • variant_idstringpathrequired
    The option’s id (a product without options has one built-in option whose id is the product’s id).
  • pricestringbody
    The new price in the shop’s currency, e.g. "12.50".
  • compare_atstringbody
    The crossed-out old price, or null to remove it.
  • stockobjectbody
    { "count": 40, "expect": 35, "reason": "received" } — reasons: received, recount, damaged, lost, returned, correction. Or { "delta": -2, "reason": "damaged" }.
  • hiddenbooleanbody
    true hides the option in the shop (at least one stays visible).
Errors
  • 403 missing_scope — The key lacks products:write.
  • 400 invalid_request — A value is not allowed (the message says which).
  • 404 not_found — No such product or option.
  • 409 conflict — The stock changed since you read it (a sale) — read again.
  • 401 invalid_key — No key, a wrong key, or a revoked / expired key (key_revoked, key_expired).
  • 429 rate_limited — Over the key’s requests per minute — wait for RateLimit-Reset.
curl -X PATCH 'https://api.tocler.com/v1/products/{id}/variants/{variant_id}' \
  -H 'Authorization: Bearer tk_live_…' \
  -H 'Content-Type: application/json' \
  -d '{
  "price": "12.50",
  "stock": {
    "count": 40,
    "expect": 35,
    "reason": "received"
  }
}'
Was this page helpful?