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.

Permissionorders:read
AuthenticationSigned read
Staff-set limits it counts towardAll requests
.NET SDKanis.Orders.GetAsync(operationId)
  • Allowed with orders:read, or with orders:create for your own orders.

Parameters

NameInTypeNotes
operationIdrequiredpathUUIDA 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

StatusMeaningBody
200Success.Order
401Refused: not authenticated.Problem
403Refused: not allowed.Problem
404Refused: not found, or not yours.Problem
429Refused: a limit was reached.Problem
503No 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.

ErrorCodeStatus
Invalid credentialsinvalid_credentials401
Insufficient scopeinsufficient_scope403
Source address not allowedsource_ip_not_allowed403
Rate limitedrate_limited429
Not foundresource_not_found404
Service unavailabledependency_unavailable503
Request timeoutrequest_timeout504
Internal errorinternal_error500

Types

Order

FieldTypeNotes
operationIdalways presentUUIDThe operation id you chose and sent as Idempotency-Key.
statusalways presentstringprocessing: 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
invoiceIdUUIDThe invoice the cards are on. Use it to reveal them again later.
walletIdUUIDThe wallet the order was paid from.
cardIdUUIDThe catalogue card bought.
quantityintegerHow many cards.
totalMoneyWhat the order cost.
soldCardslist of RevealedCredentialThe card codes. Present only on the answer that FIRST reports the order completed — store them before anything else.
completedAtstring (date-time)When the order completed.

Money

FieldTypeNotes
amountalways presentstringA decimal string with exactly three decimals, such as "10.500" — never a JSON number.
currencyalways presentstringThe currency code, such as LYD: always the wallet’s currency.
asOfstring (date-time)When this price or balance was read.

RevealedCredential

FieldTypeNotes
soldCardIdalways presentUUIDThe sold card these codes belong to.
serialNumberstringThe card’s serial number. A secret: store it where you keep secrets and never log it.
voucherstringThe card’s voucher code. A secret: store it where you keep secrets and never log it.
revealedAtstring (date-time)When it was revealed.