Aggregator API

Gift card Aggregator API reference

One REST integration for catalogue, best-price orders, and inventory — prepaid USD balance, crypto or bank top-up, sandbox before go-live.

API v1Stable
Production base URL
https://api.business.bsvmarket.com/v1
Sandbox base URL
https://sandbox.api.business.bsvmarket.com/v1
Authentication
Bearer <api_key>

#Introduction

The BSV Business Aggregator API lets bulk and business buyers procure digital gift cards across 2,000+ brands through a single integration — instead of wiring dozens of vendor APIs.

Two paths share the same catalogue and balance:

  • API — automate catalogue sync, orders, and inventory from your platform or ops stack
  • Customer portal — dashboard buying, funding, and API key / IP whitelist management

Orders use best-price routing across connected vendors, with automatic retry when a selected vendor fails.

What you can build

  • Sync catalogue and pricing into your marketplace or ops stack
  • Place bulk orders with automatic vendor selection and retry
  • Retrieve redeem codes and reconcile inventory against your ledger

#Quick start

Follow these steps to validate your integration in sandbox before switching to production keys.

  1. Request access and complete business onboarding.
  2. Create sandbox API keys and set an IP whitelist in the portal.
  3. Top up your prepaid USD balance (sandbox uses test credits).
  4. List products, place a test order, then poll order / inventory status.
  5. Switch to production keys when validation is complete.
POST /orders
curl -X POST https://sandbox.api.business.bsvmarket.com/v1/orders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-001" \
  -d '{
  "product_id": "steam-wallet-50-usd",
  "quantity": 100,
  "currency": "USD",
  "route": "best_price",
  "client_reference": "po-77821"
}'

#Authentication

All requests require HTTPS. Authenticated endpoints use a bearer token issued per account:

Authorization: Bearer <api_key>

Create, rotate, and revoke keys in the customer portal. Restrict production traffic with the portal IP whitelist.

Security

Never embed API keys in client-side code or public repositories. Rotate keys immediately if one is exposed.

#Conventions

#Versioning

Public endpoints use URI versioning under /v1/.... Breaking changes ship under a new major version with a migration window.

#Required headers

HeaderRequiredDescription
AuthorizationYesBearer <api_key>
Content-TypePOST/PUTapplication/json
Idempotency-KeyRecommendedUnique key for create/order mutations

#Money & IDs

Amounts are decimal strings or numbers in USD unless otherwise noted. Product and order IDs are opaque strings. Timestamps are ISO-8601 UTC.

#Order lifecycle

From catalogue discovery to delivered redeem codes — five stages your integration should handle.

01
Discover

List or search catalogue products available to your account.

02
Order

Create an order against your prepaid balance with quantity and product ID.

03
Route

Best-price matching selects among connected vendors and enriches metadata.

04
Fulfill

Vendor fulfillment runs; failed attempts retry on alternate vendors when available.

05
Deliver

Codes and redeem instructions appear in inventory / order detail for your systems.

#Catalogue

Retrieve products available to your commercial terms — including brand, denomination, region, images, and redeem guidance where supplied.

GET /products
GET /v1/products?brand=steam&region=US&limit=50
Authorization: Bearer YOUR_API_KEY

#Orders

Create bulk orders and poll status. Use route: "best_price" for automatic vendor selection.

Order payload
{
  "product_id": "steam-wallet-50-usd",
  "quantity": 100,
  "currency": "USD",
  "route": "best_price",
  "client_reference": "po-77821"
}

#Inventory

List purchased stock, filter by order or date, and retrieve redeem payloads for fulfilled units. Inventory history supports ops and finance reconciliation.

#Balance

Read available prepaid USD balance and recent ledger activity. Top-ups are completed in the portal via crypto or bank transfer — the API does not initiate bank wires.

#Errors & idempotency

Errors return JSON with a machine-readable code, human message, and optional request_id. Retry safe GETs; for POSTs reuse the same Idempotency-Key to avoid duplicate orders.

HTTPMeaning
400Validation error — check payload fields
401Missing or invalid API key
403IP not whitelisted or key lacks scope
409Conflict / insufficient balance
429Rate limited — back off and retry
5xxTransient server or upstream issue

#Sandbox

Sandbox mirrors production behaviour for catalogue, orders, and inventory with test credits. Use sandbox keys only against the sandbox host.

Before go-live

Run your full integration checklist in sandbox — auth, catalogue sync, order placement, inventory retrieval, and error handling — then promote to production keys.

#All endpoints

MethodPathDescription
GET/v1/productsList catalogue products available to your account
GET/v1/products/{product_id}Product detail, denomination, and redeem metadata
POST/v1/ordersCreate a bulk order with best-price routing
GET/v1/orders/{order_id}Order status and fulfillment summary
GET/v1/inventoryList purchased inventory items
GET/v1/inventory/{item_id}Inventory item detail and redeem payload
GET/v1/balancePrepaid USD balance and holds

Exact field schemas and additional filters are provided with your integration pack after access approval.

#FAQ

A single REST API for bulk gift card procurement across 2,000+ brands — catalogue, best-price orders, and inventory on one prepaid USD balance.