Stock
Live stock for every product. No key needed.
GETPOST
/api/v1/stockEvery product id, with how many we sell right now and a stock state. Prices are in /products.
Request
curl "https://www.nfa.pub/api/v1/stock?result=json"curl "https://www.nfa.pub/api/v1/stock?product=prime-ready&result=json"Response
{ "ok": true, "count": 2, "stock": [ { "id": "prime-ready", "available": 128, "inStock": true, "state": "in" }, { "id": "rust-1000-plus-hours", "available": null, "inStock": false, "state": "unknown" } ]}Parameters
| Parameter | Description |
|---|---|
product | One product id. An id we do not sell is refused with E1104. |
result | json for JSON. Text is one product per line, tab separated: id, available, and in_stock or out_of_stock. |
States
| State | Meaning |
|---|---|
in | In stock. |
low | 10 or fewer left. |
critical | 3 or fewer left. |
out | Sold out. |
paused | The supplier's account checks are down for this product for a few minutes. Not for sale, and available is 0. A buy gets E1506 with Retry-After, or a pre-order with preorder=1. |
unknown | Our supplier has not answered recently. available is null. |
Errors
| Code | HTTP | Meaning |
|---|---|---|
E1002 | 429 | Too many requests. Wait for the minute to roll over and retry. See Rate limits. |
E1104 | 400 | No product matches that id or type. |
E1000 | 500 | Something went wrong on our side. Retry, and contact support if it keeps happening. |
Rate limit: 60 requests a minute per IP address.