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

# Get Business Colors

> Retrieve the custom brand color palette configured for a specific Nexudus location.

# Get Business Colors

Returns a key-value map of colour tokens configured for a specific location. The portal uses these values to apply the operator's brand palette at runtime, overriding the default theme. Colours are stored as CSS-compatible hex or RGB strings.

## Authentication

Requires a valid customer bearer token.

## Path Parameters

<ParamField path="businessId" type="number" required>
  The numeric identifier of the location whose colour palette you want to retrieve.
</ParamField>

## Response

Returns a flat `Record<string, string>` object where each key is a colour token name and each value is a CSS colour string.

```json theme={null}
{
  "primaryColor": "#ff5100",
  "secondaryColor": "#001279",
  "backgroundColor": "#F9FAFB",
  "textColor": "#111827"
}
```

## TypeScript Integration

```typescript theme={null}
import endpoints from '@/api/endpoints'
import { useTypedData } from '@/api/fetchData'

const endpoint = endpoints.system.colors(businessId)
// endpoint.type is Record<string, string>

const { resource: colors } = useTypedData(httpClient, endpoint)
```

## Usage in Portal

| Context                             | Source file                                |
| ----------------------------------- | ------------------------------------------ |
| Location branding / theme injection | `src/states/useLocationByRouteContext.tsx` |

## Error Responses

<ResponseField name="401 Unauthorized" type="error">
  The bearer token is missing, expired, or invalid.
</ResponseField>

<ResponseField name="404 Not Found" type="error">
  No location with the given `businessId` was found.
</ResponseField>

## Related Endpoints

| Method | Endpoint                         | Description                          |
| ------ | -------------------------------- | ------------------------------------ |
| `GET`  | `/api/public/businesses/current` | Get the current location details     |
| `GET`  | `/api/public/configuration`      | Get portal configuration for a space |
