> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baanx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Available Products

> Fetch the list of active orderable products available to the current user, including eligibility status.

## 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`](/api-reference/order/create-order).

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token for the authenticated user. Format: `Bearer <userAccessToken>`
</ParamField>

<ParamField header="X-Client-ID" type="string" required>
  Your application's client ID, issued during onboarding.
</ParamField>

### Example Request

<CodeGroup>
  ```javascript Node.js theme={null}
  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);
  ```

  ```python Python theme={null}
  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']]
  ```

  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.baanx.com/v1/order/products/available \
    --header 'Authorization: Bearer <userAccessToken>' \
    --header 'X-Client-ID: your_client_id'
  ```
</CodeGroup>

## Response

### 200 — Success

Returns an array of available products. Each item includes an eligibility flag indicating whether the current user can order it.

```json theme={null}
[
  {
    "id": "PREMIUM_SUBSCRIPTION",
    "description": "Premium subscription",
    "isEligible": true
  }
]
```

<ResponseField name="id" type="string">
  The unique product identifier. Pass this value as `productId` when calling `POST /v1/order`.
</ResponseField>

<ResponseField name="description" type="string">
  A human-readable description of the product. Suitable for display in your UI.
</ResponseField>

<ResponseField name="isEligible" type="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.
</ResponseField>

### Error Responses

<AccordionGroup>
  <Accordion title="401 — Authentication Error">
    The bearer token is missing, expired, or invalid.
  </Accordion>

  <Accordion title="403 — Authorization Error">
    The authenticated user does not have permission to access this resource.
  </Accordion>

  <Accordion title="498 — Invalid Client Key">
    The `X-Client-ID` header value is not recognised.
  </Accordion>

  <Accordion title="499 — Missing Client Key">
    The `X-Client-ID` header is absent from the request.
  </Accordion>

  <Accordion title="500 — Internal Server Error">
    An unexpected server error occurred. Retry with exponential backoff.
  </Accordion>
</AccordionGroup>

## Related Endpoints

<CardGroup cols={2}>
  <Card title="Create Order" icon="plus" href="/api-reference/order/create-order">
    Initiate a new order using a product `id` returned by this endpoint.
  </Card>

  <Card title="Get Order Status" icon="arrow-right" href="/api-reference/order/get-order">
    Poll for the outcome of a previously created order.
  </Card>
</CardGroup>
