API reference · Orders
Read an order
GET
/v1/orders/{operationId}Where an order stands. It reports state only: it never carries card codes and never moves an order forward — to recover an order, send it again.
Permission
orders:readAuthenticationSigned read
Staff-set limits it counts towardAll requests
.NET SDK
anis.Orders.GetAsync(operationId)- Allowed with
orders:read, or withorders:createfor your own orders.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
operationIdrequired | path | UUID | A UUID, lower-case with hyphens. |
Request
Signed with your key. No body, no nonce.
Headers: Signature-Input, Signature, X-Anis-Date, Accept-Language (optional). The SDKs set all of them for you.
Body: none.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Success. | Order |
| 401 | Refused: not authenticated. | Problem |
| 403 | Refused: not allowed. | Problem |
| 404 | Refused: not found, or not yours. | Problem |
| 429 | Refused: a limit was reached. | Problem |
| 503 | No decision: a dependency was unavailable. | Problem |
Every answer is signed by Anis; the SDKs check it before you see it.
Refusals
Every refusal is a signed problem. Branch on its code; each links to what it means and what to do.
| Error | Code | Status |
|---|---|---|
| Invalid credentials | invalid_credentials | 401 |
| Insufficient scope | insufficient_scope | 403 |
| Source address not allowed | source_ip_not_allowed | 403 |
| Rate limited | rate_limited | 429 |
| Not found | resource_not_found | 404 |
| Service unavailable | dependency_unavailable | 503 |
| Request timeout | request_timeout | 504 |
| Internal error | internal_error | 500 |
Types
Order
| Field | Type | Notes |
|---|---|---|
operationIdalways present | UUID | The operation id you chose and sent as Idempotency-Key. |
statusalways present | string | processing: accepted, no outcome yet. completed: bought. failed: refused by a business rule, nothing bought. recoveryExhausted: Anis could not learn the outcome yet — it may have completed; keep resuming slowly and tell Anis. Values: processing, recoveryExhausted, completed, failed |
invoiceId | UUID | The invoice the cards are on. Use it to reveal them again later. |
walletId | UUID | The wallet the order was paid from. |
cardId | UUID | The catalogue card bought. |
quantity | integer | How many cards. |
total | Money | What the order cost. |
soldCards | list of RevealedCredential | The card codes. Present only on the answer that FIRST reports the order completed — store them before anything else. |
completedAt | string (date-time) | When the order completed. |
Money
| Field | Type | Notes |
|---|---|---|
amountalways present | string | A decimal string with exactly three decimals, such as "10.500" — never a JSON number. |
currencyalways present | string | The currency code, such as LYD: always the wallet’s currency. |
asOf | string (date-time) | When this price or balance was read. |
RevealedCredential
| Field | Type | Notes |
|---|---|---|
soldCardIdalways present | UUID | The sold card these codes belong to. |
serialNumber | string | The card’s serial number. A secret: store it where you keep secrets and never log it. |
voucher | string | The card’s voucher code. A secret: store it where you keep secrets and never log it. |
revealedAt | string (date-time) | When it was revealed. |