Skip to main content
This page is for a store’s resellers. Both are on your panel’s API & Delivery page: delivery URLs for the account’s owner and members with Manage Delivery URLs, API keys for those with Manage API Keys.

Delivery URLs

A delivery URL sells one product from your panel on your own shop. Paste it into your shop’s dynamic delivery for that product. On every sale there, your shop calls the URL, which buys the product from your balance at your price and answers with the keys.
  1. On API & Delivery, press Add Delivery URL and choose the product.
  2. Optionally give it a Daily Cap, the most it delivers in a day (UTC), and a Signing Secret (below).
  3. Copy the URL and paste it into your shop’s dynamic delivery for that product.
Anyone who has a delivery URL can buy with your balance, so the page shows only the last characters of each. The eye beside it shows the whole URL, and the copy button always copies all of it. The URL works on your panel’s own domain and on your store’s myshoply.gg address alike. It sells keys and made-on-demand products, which is everything the panel sells.

What it answers

The quantity is read from the call: a Shoply store’s quantity, SellAuth’s item.quantity, and otherwise quantity in a JSON body or in the address (?quantity=3). One call buys from 1 to 1,000.

The same sale, called again

If your shop calls again for a sale it already called about, the URL answers with the same keys and buys nothing more. A sale is told apart by a Shoply store’s delivery ID, by SellAuth’s Idempotency-Key, and by an Idempotency-Key header from any other shop. A call with none of these buys every time.

Signing secret

With a signing secret, the URL refuses any call your shop didn’t sign. Paste your shop’s own webhook secret:
  • A Shoply store: its dynamic delivery’s signing secret. X-Shoply-Signature is checked, and refused when its timestamp is more than five minutes old.
  • SellAuth and others: the secret they sign with. X-Signature, the HMAC-SHA256 of the request’s body, is checked.

When it can’t deliver

Your shop’s buyer is told only This item could not be delivered right now. Please contact the seller. The reason is under the URL’s product on API & Delivery: your balance was too low, it reached its daily cap, the call wasn’t signed, and the like. Top up, and a call made again for the same sale goes through.

API keys

An API key lets your own code read your balance, the panel’s products and your orders, and buy. It reads and buys as the member who made it, with that member’s permissions, and stops working when they are taken off the team or lose Manage API Keys. A request their permissions don’t cover is refused with 403 and the code reseller_permission, and needs lists the permissions any one of which would allow it: GET /api/resellers/v1/balance wants balance.view, the products products.view, buying products.buy, the orders orders.view, and an order’s keys orders.keys (without it, an order is read without its keys). On API & Delivery, press Add API Key and name it. The key, shoply_rk_ followed by 48 characters, is shown once: copy it then. Send it in each request:
Use your panel’s own address: your store’s myshoply.gg address, or your panel’s own domain. Every answer is {"success": true, "data": ...}, and a refusal {"success": false, "message": "...", "code": "..."} with its HTTP status.

Buying

To buy several things in one order, send lines in place of variantId and quantity: up to 50 of them, and 1,000 at the most in all. Every line is bought or none is: a line that can’t be bought is refused with its error under lines.<n>.quantity, counted from 0, and nothing is taken from your balance. The same variantId twice is one line.
Then read the order for its keys:
boughtBy is who bought it, as the key’s member sees it: you, owner or member (a team member), never an email. profit is what the order would have cost at the panel’s list prices, less what you paid. waiting is true while a product made on demand is still being fetched. GET /api/resellers/v1/orders lists each order with the first option it bought, its lines (how many options it bought), its total and its profit. Beside the list, counts has how many orders were bought each way, and figures has the orders, spent, units and profit of what the search and via show. A product’s variantId, your price, its stock (keys left, or null for one made on demand), minQty and leftToday come from GET /api/resellers/v1/products. Beside its products, a line for each option, that answer has catalogue: each product in the panel’s order, with its productId, name, category (its first category, or ""), badges (its status and labels on the panel, which the store sets for it there: {"label", "color", "kind"}, kind being status for at most one of them), images (its pictures’ addresses, in the store’s order), features (the store’s feature list for it: {"type": "feature", "name"}, or {"type": "category", "name", "features": [names]}) and variantIds, its options in products. And guideUrl, the store’s setup guide, or "" where it has none. Each line of products names its product’s productId.

Limits

  • A delivery URL takes 120 calls a minute, and a reseller’s URLs 600 between them.
  • An API key makes 120 requests a minute.
  • Past either, the answer is 429. A shop’s calls are never counted by its address: the shops that call share servers.