Skip to main content
GET
/
api
/
sys
/
businesses
/
{businessId}
/
colors
{
  "401 Unauthorized": {},
  "404 Not Found": {}
}

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

businessId
number
required
The numeric identifier of the location whose colour palette you want to retrieve.

Response

Returns a flat Record<string, string> object where each key is a colour token name and each value is a CSS colour string.
{
  "primaryColor": "#ff5100",
  "secondaryColor": "#001279",
  "backgroundColor": "#F9FAFB",
  "textColor": "#111827"
}

TypeScript Integration

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

ContextSource file
Location branding / theme injectionsrc/states/useLocationByRouteContext.tsx

Error Responses

401 Unauthorized
error
The bearer token is missing, expired, or invalid.
404 Not Found
error
No location with the given businessId was found.
MethodEndpointDescription
GET/api/public/businesses/currentGet the current location details
GET/api/public/configurationGet portal configuration for a space