Skip to main content
GET
/
v1
/
order
/
products
/
available
Get Available Products
curl --request GET \
  --url https://api.example.com/v1/order/products/available \
  --header 'Authorization: <authorization>' \
  --header 'X-Client-ID: <x-client-id>'
{
  "id": "<string>",
  "description": "<string>",
  "isEligible": true
}

Overview

Call this endpoint before creating an order to discover which products are available to the authenticated user and whether they are currently eligible to purchase each one. Use the returned id values as the productId when calling POST /v1/order.

Request

Headers

Authorization
string
required
Bearer token for the authenticated user. Format: Bearer <userAccessToken>
X-Client-ID
string
required
Your application’s client ID, issued during onboarding.

Example Request

const response = await fetch('https://api.baanx.com/v1/order/products/available', {
  headers: {
    'X-Client-ID': 'your_client_id',
    'Authorization': `Bearer ${userAccessToken}`
  }
});

const products = await response.json();
const eligible = products.filter(p => p.isEligible);

Response

200 — Success

Returns an array of available products. Each item includes an eligibility flag indicating whether the current user can order it.
[
  {
    "id": "PREMIUM_SUBSCRIPTION",
    "description": "Premium subscription",
    "isEligible": true
  }
]
id
string
The unique product identifier. Pass this value as productId when calling POST /v1/order.
description
string
A human-readable description of the product. Suitable for display in your UI.
isEligible
boolean
Whether the current user is eligible to order this product. If false, the user does not meet the requirements (e.g. KYC status, existing subscription) — do not allow them to initiate an order for this product.

Error Responses

The bearer token is missing, expired, or invalid.
The authenticated user does not have permission to access this resource.
The X-Client-ID header value is not recognised.
The X-Client-ID header is absent from the request.
An unexpected server error occurred. Retry with exponential backoff.