This is an order placed through the API:
POST /api/v2
key=YOUR_API_KEY
action=add
service=645
link=https://www.instagram.com/p/EXAMPLE/
quantity=5000
{ "order": 23501 }
One request, one order number back. Everything a reseller site does is built from a few calls like this one. Each is an HTTP POST request that sends your API key and an action, and each answers in JSON.
The four calls you need
services returns the whole list. Each item has service (the ID), name, category, rate, min, max, and two flags: refill and cancel. Your site reads this to build its own price list.
add places an order. It takes service, link and quantity. For drip-feed, add runs and interval (in minutes).
status tells you where an order is:
{
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
}
start_count is the count on the page when the order began. remains is what was not delivered. charge is what the order cost you. To check many orders in one request, send orders with the IDs separated by commas.
balance returns your funds, for example {"balance": "100.84292", "currency": "USD"}. Check it before you accept a client’s order, not after.
Two more for after delivery
refill asks for a refill on an order and returns a refill ID. refill_status tells you whether it went through: Completed or Rejected. cancel takes up to 100 order IDs at once, and works only on services whose cancel flag is true.
The order to wire them in
- Sync services on a schedule. Rates change. A price list copied once is wrong within a month.
- Add your margin when you store each rate, so your site never shows the provider’s price by accident.
- Check
minandmaxon your side before you send an order. A rejected order after the client paid is a ticket. - Place the order when the client’s balance covers it, and save the order ID you get back.
- Poll
statusuntil the order isCompletedorPartial. OnPartial, give the client back the undelivered share.
Keep the key on your server
The API key spends your balance. It belongs in your server’s environment, never in a web page, an app or a public repository. If it leaks, replace it in your account before you do anything else.
What the API does not tell you
It does not tell you whether a count will hold. That is the refill term on the listing, and you only find out by ordering. See how to read a service listing.