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

# Business Categories

> Fetch the business category and sub-category IDs required by registerBusiness.

## Overview

The **getBusinessCategories** query returns every active business category with its sub-categories. Both IDs are required by [registerBusiness](/business-registration), and a sub-category is only valid alongside the category it belongs to.

Let the user pick a category and one of that category's sub-categories in your UI, then pass both UUIDs through.

<Warning>
  **Do not hardcode these UUIDs.** Only currently-active categories are returned, the list differs between environments, and it changes over time. Fetch at runtime — a sub-category from a different category is rejected at registration with `BS-0006`.
</Warning>

## Required scopes

| Property        | Value                                       |
| --------------- | ------------------------------------------- |
| Endpoint        | GraphQL API                                 |
| Authentication  | OAuth Bearer Token, account type `CONSUMER` |
| Required Scopes | `REGISTER_BUSINESS`                         |

Use the same consumer token you will use for `registerBusiness`. A business-account token is rejected, and Basic authentication is not accepted.

## Basic query structure

```graphql theme={null}
query GetBusinessCategories {
  getBusinessCategories {
    businessCategoryId
    categoryName
    categoryDescription
    businessSubCategories {
      businessSubCategoryId
      subCategoryName
    }
  }
}
```

This query takes no arguments.

## Response details

| Field                   | Type                    | Description                                                      |
| ----------------------- | ----------------------- | ---------------------------------------------------------------- |
| `businessCategoryId`    | `UUID`                  | Category ID — pass as `businessCategoryId` on `registerBusiness` |
| `categoryName`          | `String`                | Category display name                                            |
| `categoryDescription`   | `String`                | Category description. May be `null`                              |
| `businessSubCategories` | `[BusinessSubCategory]` | Sub-categories that belong to this category                      |

### BusinessSubCategory

| Field                   | Type     | Description                                                             |
| ----------------------- | -------- | ----------------------------------------------------------------------- |
| `businessSubCategoryId` | `UUID`   | Sub-category ID — pass as `businessSubCategoryId` on `registerBusiness` |
| `subCategoryName`       | `String` | Sub-category display name                                               |

Categories are returned sorted by `categoryName`, ascending.

## cURL Example

```bash theme={null}
curl -X POST https://transactional-graph.staging.fluzapp.com/api/v1/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -d '{
    "query": "query GetBusinessCategories { getBusinessCategories { businessCategoryId categoryName categoryDescription businessSubCategories { businessSubCategoryId subCategoryName } } }"
  }'
```

## Example Response

```json theme={null}
{
  "data": {
    "getBusinessCategories": [
      {
        "businessCategoryId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "categoryName": "Technology",
        "categoryDescription": "Software and IT services",
        "businessSubCategories": [
          {
            "businessSubCategoryId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
            "subCategoryName": "SaaS"
          }
        ]
      }
    ]
  }
}
```

## Error Codes

This query returns all failures in the top-level `errors` array — there is no `success: false` payload.

| Code        | Name               | Description                                                        | How to resolve                                                                                  |
| ----------- | ------------------ | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- |
| `AUTH-0002` | InvalidCredentials | Basic auth was used, or the token's account type is not `CONSUMER` | Use a consumer-account Bearer token                                                             |
| `AUTH-0031` | InvalidScope       | The token is missing the `REGISTER_BUSINESS` scope                 | Add the scope in [Application Scopes](/fluz-dashboard/application-scopes) and re-mint the token |
| `G-0001`    | InternalError      | Internal error while reading categories                            | Retry once. If it persists, contact support with the timestamp                                  |

## Notes

* Categories a user selects here are read by a human reviewer during KYB, so surface `categoryDescription` in your UI where it helps them choose accurately.
* Sending one ID without the other is rejected at registration with `ARG-0002`. Always pass both.

## Related pages

<CardGroup cols={2}>
  <Card title="KYB overview" href="/kyb-overview">
    Prerequisites and the end-to-end registration flow.
  </Card>

  <Card title="Register a business" href="/business-registration">
    The mutation that consumes these IDs.
  </Card>
</CardGroup>
