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>'import requests
url = "https://api.example.com/v1/order/products/available"
headers = {
"Authorization": "<authorization>",
"X-Client-ID": "<x-client-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'X-Client-ID': '<x-client-id>'}
};
fetch('https://api.example.com/v1/order/products/available', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/order/products/available",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"X-Client-ID: <x-client-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/order/products/available"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("X-Client-ID", "<x-client-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/order/products/available")
.header("Authorization", "<authorization>")
.header("X-Client-ID", "<x-client-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/order/products/available")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["X-Client-ID"] = '<x-client-id>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"description": "<string>",
"isEligible": true
}Orders
Get Available Products
Fetch the list of active orderable products available to the current user, including eligibility status.
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>'import requests
url = "https://api.example.com/v1/order/products/available"
headers = {
"Authorization": "<authorization>",
"X-Client-ID": "<x-client-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'X-Client-ID': '<x-client-id>'}
};
fetch('https://api.example.com/v1/order/products/available', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/order/products/available",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"X-Client-ID: <x-client-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/order/products/available"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("X-Client-ID", "<x-client-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/order/products/available")
.header("Authorization", "<authorization>")
.header("X-Client-ID", "<x-client-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/order/products/available")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["X-Client-ID"] = '<x-client-id>'
response = http.request(request)
puts response.read_body{
"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 returnedid values as the productId when calling POST /v1/order.
Request
Headers
string
required
Bearer token for the authenticated user. Format:
Bearer <userAccessToken>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);
import requests
response = requests.get(
'https://api.baanx.com/v1/order/products/available',
headers={
'X-Client-ID': 'your_client_id',
'Authorization': f'Bearer {user_access_token}'
}
)
products = response.json()
eligible = [p for p in products if p['isEligible']]
curl --request GET \
--url https://api.baanx.com/v1/order/products/available \
--header 'Authorization: Bearer <userAccessToken>' \
--header 'X-Client-ID: your_client_id'
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
}
]
string
The unique product identifier. Pass this value as
productId when calling POST /v1/order.string
A human-readable description of the product. Suitable for display in your UI.
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
401 — Authentication Error
401 — Authentication Error
The bearer token is missing, expired, or invalid.
403 — Authorization Error
403 — Authorization Error
The authenticated user does not have permission to access this resource.
498 — Invalid Client Key
498 — Invalid Client Key
The
X-Client-ID header value is not recognised.499 — Missing Client Key
499 — Missing Client Key
The
X-Client-ID header is absent from the request.500 — Internal Server Error
500 — Internal Server Error
An unexpected server error occurred. Retry with exponential backoff.
Related Endpoints
Create Order
Initiate a new order using a product
id returned by this endpoint.Get Order Status
Poll for the outcome of a previously created order.
Was this page helpful?