anyshop docs homeStatusOpen the dashboard

API reference Products Update a product

API referenceProducts

Update a product

PATCH methodhttps://api.anyshop.io/v1/products/{id}

Changes the fields you send and nothing else. The catalog is shared by live and test mode, so this needs a live key.

  • Scope products:write
  • Live keys only
  • Idempotent with Idempotency-Key
  • 403 store_suspended while suspended

Path parameters

  • idstring required

Body

application/json0 required, 8 optional
  • namestring What buyers see on your storefront and in their email1 to 120 characters
  • descriptionstring Shown on the product pageUp to 10,000 characters
  • max_quantity_per_orderinteger How many one buyer can take in one order, default 11 to 100
  • low_stock_thresholdinteger or null Serial keys only. Below this many keys you get the daily low stock email and a stock.low event0 to 1,000,000
  • platformstring or null Serial keys only. Where the key is used, such as Windows and macOSUp to 60 characters
  • regionstring or null Serial keys only. Where the key worksUp to 60 characters
  • delivery_instructionsstring Shown with what was delivered: how to redeem a key, or what happens next for a serviceUp to 4,000 characters
  • dynamic_endpoint_urlstring or null Dynamic products: your https server, which anyshop calls after each payment with a Standard Webhooks signed request; its answer is deliveredUp to 2,048 characters

Headers

  • Idempotency-Keystring Up to 255 characters. A retry with the same key and request gets the first answer, without running twice (24 hours).

Returns

The product object.

Errors

Status and error.type
  • 400invalid_requestThe request is not valid; error.param names the field
  • 401authenticationNo API key, or it is not valid
  • 403permissionThe key does not have the scope this needs, it is a test key where only a live key may act (the catalog), or the store is suspended (store_suspended)
  • 404not_foundNot found in the key's store and mode
  • 409conflictConflicts with the object's state (type conflict), or an Idempotency-Key reused for another request (type idempotency, code idempotency_key_reused)
  • 429rate_limitedToo many requests; see Retry-After