Cancel a pre-order
Stop waiting and get the money for a pre-order back on your balance.
/api/v1/preorder/cancelPre-orders are charged now, filled oldest-first when stock returns, only inside your delivery hours if you set them; cancel any time before it's filled for a full refund to your balance.
Cancel any of your own pre-orders while it is still waiting, placed through the API or on the website. What has not been delivered goes back to the balance it was paid from, in full, at once. It is the same cancel as the button on the website's order page.
It needs a full key. Ownership is checked as on /order, and an order paid from a balance must have been paid from this key's account, since that is where the refund goes. Send a JSON body; the answer is always JSON.
curl -X POST "https://www.nfa.pub/api/v1/preorder/cancel" \ -H "X-Api-Key: rsk_..." \ -H "Content-Type: application/json" \ -d '{"order":"4b53000e7b4677d2-c69a8e94132d75e8"}'Body
| Field | Description |
|---|---|
orderrequired | The order_id from the buy. order_id also works. |
Response
{ "ok": true, "order_id": "4b53000e7b4677d2-c69a8e94132d75e8", "state": "refunded", "refunded_eur": 0.9}refunded_euris what went back to your balance. Nothing delivered: the whole price. Partly filled: you keep the accounts you have, the rest is refunded andstateispartial.- A pre-order is refunded once. A second cancel, or a retry after a timeout, gets
E1623and moves no money, so retrying is safe. - It cannot be cancelled in the moment it is being delivered (
E1623). Try again a few seconds later. - You also get an
order.refundedwebhook, withrefundedCents.
Errors
| Code | HTTP | Meaning |
|---|---|---|
E1001 | 401 | The key is missing, malformed, revoked or unknown. |
E1002 | 429 | Too many requests. Wait for the minute to roll over and retry. See Rate limits. |
E1101 | 400 | No JSON body, no order, or fields that do not fit together. |
E1602 | 404 | No order with that id. |
E1603 | 403 | That order was not bought by this key's account, or it was paid from another account's balance. |
E1622 | 409 | That order is not a pre-order. |
E1623 | 409 | That pre-order is not waiting any more: it is being delivered, or it was delivered, cancelled or refunded. Nothing changed. |
E1701 | 403 | This key is read-only. It can look things up, but not buy, replace, change or cancel a pre-order, export logins with include=accounts or change webhooks. |
E1702 | 403 | The request came from an IP that is not on your allowlist. |
E1624 | 500 | The pre-order is cancelled, but the refund needs a person. We credit it by hand. Do not retry. |
E1000 | 500 | Something went wrong on our side. Retry, and contact support if it keeps happening. |
Rate limits: 60 requests a minute per IP address, and 20 a minute per account across both pre-order endpoints.