Create a product
POST methodhttps://api.anyshop.io/v1/products
Adds a product to your catalog as a draft, with one variant, Standard, at the price you give. Publish it to put it on sale. The catalog is shared by live and test mode, so this needs a live key.
Body
application/json4 required, 7 optionalnamestring requiredWhat buyers see on your storefront and in their email1 to 120 characterstypeenum requiredHow it is delivered: serial keys from your stock, license keys anyshop issues, a file download, your own server (dynamic), or instructions for a serviceseriallicensefiledynamicservicecategoryenum requiredWhere it is listedgame_keyssoftware_licensesdigital_filesaccess_membershipsservicespriceinteger requiredThe price of its Standard variant, in minor units of your store currency: 1999 is $19.99, 0 makes it freeAt least 0descriptionstring Shown on the product pageUp to 10,000 charactersmax_quantity_per_orderinteger How many one buyer can take in one order, default 11 to 100low_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,000platformstring or null Serial keys only. Where the key is used, such as Windows and macOSUp to 60 charactersregionstring or null Serial keys only. Where the key worksUp to 60 charactersdelivery_instructionsstring Shown with what was delivered: how to redeem a key, or what happens next for a serviceUp to 4,000 charactersdynamic_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.type400invalid_requestThe request is not valid;error.paramnames the field401authenticationNo API key, or it is not valid403permissionThe 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 mode409conflictConflicts 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