AvrixDocumentation
API referenceStatusAvrix.ioConsole
Seller API

Welcome

  • Home
  • Getting started
  • Topic index
  • Glossary

Get started

  • Overview
  • How Avrix works
  • Architecture patterns
  • Quickstart
  • Integration tutorial
  • Authentication
  • OAuth tokens
  • Environments
  • Sandbox

Connect a partner

  • Partner onboarding
  • Sellable SKU readiness
  • Territory enforcement
  • AI assistants (MCP)
  • Connect your AI client
  • Sign-in and permissions

Catalog

  • Catalog & allocations
  • Product field matrix
  • Pricing authority
  • Currency and FX
  • Promotions
  • Caching & fairness

Sell an order

  • Store integration profiles
  • Order preview
  • Creating orders
  • Idempotency
  • Order context
  • Checkout holds
  • Hot drop
  • Fulfillment & keys
  • Keyless fulfilment
  • Order lifecycle
  • Refunds & returns

Stay in sync

  • Webhooks
  • Event reference
  • Polling & reconciliation
  • Reconciliation
  • Finance & settlement

Operate

  • Error reference
  • Troubleshooting
  • Key recovery
  • Rate limits
  • Security
  • Secrets & config
  • API key management
  • IP allowlist
  • Monitoring & support
  • Data handling
  • Partner runbook

Go live

  • Testing
  • Certification
  • Integration checklist
  • Sandbox to production
  • Go-live
  • Deployment targets

Reference

  • Integration recipes
  • Scope matrix
  • Commerce platforms
  • API clients
  • Client & helpers
  • Versioning
  • Changelog
  • FAQ
  • API reference
  1. Home
  2. /Reference
  3. /Integration recipes

Integration recipes

Scopes, call order, and idempotency for each flow.

TopicsReference

Canonical user journeys for the Seller API (GET /api/seller/v1/openapi). Each recipe lists scopes, call order, and idempotency so humans, agents, and generated clients stay aligned.

New to the API? Follow 30-minute quickstart first (health → partners → products → order → webhooks). For storefront call sequences, see Store integration profiles.

OpenAPI (canonical): GET /api/seller/v1/openapi (e.g. https://api.avrix.io/api/seller/v1/openapi).
Interactive docs (canonical): GET /api/seller/v1/docs on the same host.

Unversioned URLs (/api/seller/openapi, /api/seller/docs) redirect to the v1 paths; prefer the v1 URLs in new integrations.

All paths below are under /api/seller/v1/ unless noted. Prefer response field data for lists; legacy top-level keys are deprecated.


Recipe: browse-catalog#

FieldValue
DescriptionDiscover partners and products, then load detail and regional pricing.
Scopesseller:products:read
IdempotencyNot applicable (GET only).

Order of calls

  1. GET /partners — connected vendors (data[]: publisherCompanyId legacy field name, …).
  2. GET /products — paginate with cursor / limit; optional partner, q, status, updatedSince (ISO 8601 incremental sync).
  3. GET /products/{productId} — editions, releases, SKUs; optional expand=base.
  4. GET /products/{productId}/pricing — per release / country; optional country=US,DE.

Incremental sync: Store the latest of each product’s updatedAt / createdAt (from detail or list) or the webhook product.updated payload updatedAt, then call GET /products?updatedSince=... on a schedule to fetch deltas. Full scans are optional.

Very large catalogs: Prefer partner (iterate per vendor), q, or slug to parallelize jobs. Pagination is keyset (stable pages). See Catalog sync & caching.


Recipe: check-before-pull#

FieldValue
DescriptionVerify allocation + inventory headroom before pulling keys.
Scopesseller:products:read (for SKU identity) and seller:keys:pull for pull endpoints.
IdempotencyNot applicable for GET /availability.

Order of calls

  1. Obtain skuCode or skuId from product detail (GET /products/{productId}).
  2. GET /availability?skuCode=... or ?skuId=... — read data.available, allocationRemaining, inventoryAvailable (sum of dedicatedAvailable + sharedPoolAvailable), maxFulfillableQuantity, and backorderEligible.
  3. For a cart line quantity q, add &quantity=q — use data.canFulfill before enabling Pay; when cannotFullyFulfill (alias allOrNothingWillFail) is true, POST /orders returns 409 NO_AVAILABLE_KEYS with zero keys — orders are all-or-nothing, never partial. partialFulfillmentExpected is the deprecated name for the same boolean and does not mean partial delivery.
  4. Optional checkout race reduction: after Order preview, call POST /orders/hold when whoami.capabilities.checkoutHoldEnabled is true.

Recipe: pull-keys#

FieldValue
DescriptionPull keys from an allocation (non-order flow).
Scopesseller:keys:pull
IdempotencyRequired for safe retries: Idempotency-Key header on POST /keys/pull (same rules as orders).

Order of calls

  1. Optional: GET /availability (recipe check-before-pull).
  2. POST /keys/pull with body per OpenAPI — include Idempotency-Key (UUID or 1–64 alphanumeric characters).

Recipe: create-order#

FieldValue
DescriptionCreate an order and receive keys (primary purchase flow).
Scopesseller:keys:pull (and typically seller:products:read to resolve SKUs).
IdempotencyRequired: Idempotency-Key on POST /orders — retries must reuse the same key to receive the cached response.

External stores (game shops, first-party storefronts): send a full body for reconciliation and finance evidence: orderReference, metadata, and especially integrationOrderContext (declared retail country, currency, gross/net minors). Production keys require commercial evidence fields; sandbox keys do not: see Sandbox and environments.

Order of calls

  1. POST /orders/preview — do not charge unless canFulfill is true.
  2. Optional: POST /orders/hold then pass checkoutHoldId on POST /orders when checkout hold is enabled (whoami.capabilities.checkoutHoldEnabled).
  3. POST /orders with Idempotency-Key and your orderReference.

Recipe: pre-order#

FieldValue
DescriptionPurchase a SKU that is not yet released: keys are reserved until release, then fulfilled automatically.
Scopesseller:keys:pull
IdempotencyIdempotency-Key on POST /orders (or /orders/bulk). Idempotency-Key on POST /orders/cancel to cancel reservations safely.

Order of calls

  1. Optional: GET /availability — pre-order SKUs may show reserved paths per product rules.
  2. POST /orders — response type: pre-order when keys are reserved (not plaintext in response).
  3. Optional: POST /orders/cancel with { "orderReference": "<your id>" } — releases reservations; webhook order.returned.
  4. Otherwise: wait for release — order.preorder_fulfilled / order.fulfilled when keys are delivered (cron-driven unlock).

Recipe: get-order#

FieldValue
DescriptionReconcile a store order id against Avrix pulls and reservations.
Scopesseller:products:read
IdempotencyGET only.

Order of calls

  1. GET /orders?orderReference=<your store order id> — aggregated lines (fulfilled pulls, active pre-order reservations).

Recipe: return-keys#

FieldValue
DescriptionReturn keys after fulfillment (refund/chargeback flows). See Key return policy.
Scopesseller:refunds:write (legacy seller:keys:pull accepted during the deprecation window)
IdempotencyIdempotency-Key on POST /keys/return.

Order of calls

  1. POST /keys/return with required keyIds (from the fulfilled order response or order.fulfilled webhook) and optional reason. The body does not accept orderReference.
  2. Alternatively POST /refunds with type, refundReference and either keyIds or quantity + orderReference — the latter quarantines the newest quantity live keys sold under that reference (partial refunds without tracking key ids by position).

Recipe: recover-keys#

FieldValue
DescriptionYour store lost the POST /orders response (crash between the pull and your own database write) and needs the keys it already paid for.
Scopesseller:keys:pull (or seller:orders:write)
IdempotencyNot required — the call never pulls new inventory; every call is audited as a key reveal.

Order of calls

  1. GET /orders?orderReference=<your store order id> — confirms status: "fulfilled" (never returns plaintext).
  2. POST /orders/recover-keys { "orderReference": "<your store order id>" } — returns the live keys and keyIds sold under that reference. Returned / refunded keys are excluded; 404 NOT_FOUND means nothing is live under the reference.
  3. Re-posting POST /orders with the same orderReference and the same quantity replays the same keys as well (documented idempotent replay); prefer recover-keys because it needs no price binding.

Recipe: list-history#

FieldValue
DescriptionAudit key pulls and orders via transactions.
Scopesseller:products:read
IdempotencyGET only.

Order of calls

  1. GET /transactions — paginate with cursor, filter orderReference, from, to as needed (one row per key pulled).

Recipe: promotions#

FieldValue
DescriptionReview and respond to platform shares and custom deals.
Scopesseller:promotions:read for GET; seller:promotions:respond for accept / decline / respond.
IdempotencyPOST accept/decline/respond — use unique logical operations; confirm idempotency in OpenAPI per operation if added later.

Order of calls

  1. GET /promotions/summary
  2. GET /promotions/shares → GET /promotions/shares/{shareId} → POST .../accept or .../decline
  3. GET /promotions/deals → GET /promotions/deals/{responseId} → POST .../respond

Recipe: webhooks#

FieldValue
DescriptionRegister HTTPS endpoints for Seller API events.
Scopesseller:webhooks:read, seller:webhooks:write
IdempotencyNot specified for webhook CRUD; use unique URLs per endpoint.

Order of calls

  1. GET /webhooks
  2. POST /webhooks to create
  3. DELETE /webhooks/{id} to remove

Optional

  • POST /webhooks/{id}/test — queue a test.ping delivery to verify URL + signature.
  • PATCH /webhooks/{id} — update url / events, or rotateSecret: true for a new signing secret.
  • POST /webhooks/{id}/enable — re-enable after automatic disable (circuit breaker).
  • POST /webhooks/{id}/deliveries/{deliveryId}/retry — retry a failed delivery.

Recipe: usage#

FieldValue
DescriptionAggregate API call counts from audit logs (per endpoint, errors).
Scopesseller:products:read
IdempotencyGET only.

Order of calls

  1. GET /usage?from=...&to=... (ISO 8601 UTC; defaults to last 7 days).

Recipe: manage-api-keys#

FieldValue
DescriptionList, create, or revoke seller API keys via the API.
Scopesseller:keys:write on the calling key
IdempotencyFollow OpenAPI for POST /keys; protect create with your own deduplication if needed.

Order of calls

  1. GET /keys
  2. POST /keys / DELETE /keys/{id}

Create behavior (POST /keys)

  • Body: name (required), optional allowed_ips (string array), optional includeFinanceScope.
  • New keys receive the server default scope set intersected with the calling key’s scopes (children never exceed the parent ceiling). See API key management.

Generated TypeScript client#

Prefer a typed client generated from OpenAPI, or plain fetch. See Client & helpers.

Related#

  • Order preview — read-only checkout estimate before POST /orders
  • Catalog sync & caching — snapshot + allocations sync pattern
  • Webhooks — push-first fulfillment and catalog deltas
  • 30-minute quickstart — end-to-end golden path through these recipes
  • SDK & helpers — generated TypeScript client and transport helpers

What links here

Published guides that link to this page.

  • Caching & fairnessETag, snapshot caching, rate-limit classes, and fair multi-route usage.
  • Commerce platformsShopify, WooCommerce, Magento, keyshops, game backends, and platform-store boundaries.
  • Order contextintegrationOrderContext field matrix, production evidence, and validation layers.
  • Order lifecycleStates, transitions, and recovery from preview to fulfillment.
  • Order previewRead-only price and fulfillment estimate before checkout.
  • Partner runbookSandbox vs production, strict mode, and operational checks.
  • Pricing authorityList vs wholesale vs declared retail — which price binds at checkout.
  • Seller API promotionsList, accept, and decline platform event shares and custom vendor deals that change what you can sell through the API.
PreviousDeployment targetsNextScope matrix

Need help with this page?

Contact support

AI tools

  • Ask ChatGPT
  • Ask Claude

On this page

  • Recipe: `browse-catalog`
  • Recipe: `check-before-pull`
  • Recipe: `pull-keys`
  • Recipe: `create-order`
  • Recipe: `pre-order`
  • Recipe: `get-order`
  • Recipe: `return-keys`
  • Recipe: `recover-keys`
  • Recipe: `list-history`
  • Recipe: `promotions`
  • Recipe: `webhooks`
  • Recipe: `usage`
  • Recipe: `manage-api-keys`
  • Generated TypeScript client
  • Related

Search docs

Search documentation…

Related pages

  • Integration tutorialEnd-to-end walkthrough from authentication to reconciliation, including failure paths.
  • Order previewRead-only price and fulfillment estimate before checkout.
  • Creating ordersPOST /orders fields, safe creation pattern, and unknown-outcome recovery.
  • Store integration profilesProfile A/B/C checkout patterns — preview, hold, and hot-drop.
  • WebhooksSigned delivery, event types, retries, and verification.