v1Current
Avirqo Public API

Rewards infrastructure,
ready to integrate.

Give your teams and customers instant access to eligible gift vouchers, wallet balances, and reliable order fulfillment through one clean API.

Access requirement. Every Public API endpoint requires an active customer with approved KYB.
REFERENCE CONTRACT

OpenAPI specification

The complete machine-readable contract for the Avirqo Public API. Import it into Postman, Insomnia, or your preferred API tooling to generate requests, validate responses, and build client SDKs.

GET/openapi.yamlOpenAPI 3.1

Canonical definition: https://developers.avirqo.com/openapi.yaml

01 / AUTHENTICATION

Authenticate

All API calls use a short-lived OAuth 2.0 bearer token. Your Avirqo administrator provides a Client ID and Client Secret. Keep both credentials on your server.

POST/oauth/token

Use the client_credentials grant to receive a token valid for 15 minutes.

cURL
curl https://api.avirqo.com/v1/oauth/token \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=client_credentials&client_id=avq_live_...&client_secret=avq_secret_...'
Security note. Never expose the client secret or voucher response in browser, mobile-app, or frontend code.
02 / CATALOG

List products

Products are filtered using the customer’s configured currencies, denominations, and account rules.

GET/products

Optional query parameters: search matches a product name, brand, or public Avirqo product ID; country_code, currency_code, and page are also supported. A brand search may return multiple products.

cURL
curl 'https://api.avirqo.com/v1/products?search=amazon' \
  -H 'Authorization: Bearer TOKEN'
03 / WALLET

Balance check

Balances are returned by currency and bucket. Amounts are decimal strings to avoid floating-point rounding errors.

GET/balances

Returns voucher balance, service-charge balance, and available balance.

04 / WALLET

Balance history

Use cursor pagination for reliable transaction history at any account size.

GET/balance-history

Filter by currency_code and type. Use cursor and limit for pagination.

05 / ORDERS

Place an order

Every write request requires a unique Idempotency-Key. Retrying the same key returns the original order; changing the request with the same key returns a conflict.

POST/orders

Creates an order for exactly one voucher.

cURL
curl https://api.avirqo.com/v1/orders \
  -H 'Authorization: Bearer TOKEN' \
  -H 'Idempotency-Key: order-98412' \
  -H 'Content-Type: application/json' \
  -d '{"items":[{"product_id":123,"currency_code":"INR","denomination":1000}]}'
06 / ORDERS

Place a bulk order

Submit multiple product lines in one atomic request. Customer-level product, denomination, quantity, balance, and rate limits are enforced before fulfillment.

POST/bulk-orders

The configured customer limits apply. If one line fails, the request is rolled back and no balance is charged.

07 / FULFILLMENT

Retrieve vouchers

Retrieve voucher codes for any completed order owned by the authenticated customer. Every retrieval is recorded in the API audit log.

GET/orders/{order_number}/vouchers

Treat this response as sensitive. Codes are encrypted at rest and returned only with the vouchers.read permission.

08 / OPERATIONS

Errors & limits

Errors contain a stable machine-readable code and a human-readable message.

StatusMeaningWhat to do
401Invalid or expired credentialsRequest a new token.
403Permission, customer, or IP policy rejectedCheck the client configuration in Avirqo Settings.
409Idempotency conflictReuse the original request key only for the same payload.
422Validation, inventory, or balance failureCorrect the request or retry after resolving the business error.
429Rate limit exceededHonor Retry-After and back off.
Need help? Contact api@avirqo.com with your request ID. Do not include secrets or voucher codes.