# Attraction constants

Returns localised attraction constants, including category and subcategory metadata.

- Use this endpoint to retrieve and cache the category ID-to-name mapping before performing attraction searches with category filters.
- Call this endpoint during initial integration or periodically to refresh cached values.
- To retrieve all constants, send an empty request body.

Endpoint: POST /attractions/constants
Version: 3.2
Security: BearerAuth

## Security:

  - `BearerAuth` (unknown)
    http bearer string

## Header parameters:

  - `X-Affiliate-Id` (integer, required)
    Include here your Affiliate identifier number

## Request fields (application/json):

  - `languages` (array)
    List of language codes used to localise category names. Each category name is returned as an object keyed by language code.
- If a requested language is not available, it may be omitted from the response.
- If not provided, `en-gb` is used by default.
    Example: ["es"]

## Request examples:

  - `Request with English language` (unknown)

## Response 200:

  - `200` (unknown)
    Successful response. Returns localised attraction category constants.

## Response 200 fields (application/json):

  - `request_id` (string)
    Uniquely identifies the request. Please provide this identifier when contacting support.

  - `data` (object)

  - `data.categories` (array)

  - `data.categories.id` (string, required)
    The unique identifier of the category.
    Example: PTCMCuXtHgrC

  - `data.categories.name` (object, required)
    A string localised in multiple languages.

  - `data.categories.parent` (string | null)
    The unique identifier of the parent category. Null for root categories. Use this field to reconstruct the category hierarchy.
    Example: null

## Response 400:

  - `400` (unknown)
    Bad request. The request is invalid or contains unsupported parameters. Refer to the [Error handling section](/demand/docs/support/error-handling/about-errors) for details.

## Response 400 fields (application/json):

  - `request_id` (string, required)
    Uniquely identifies the request. Please provide this identifier when contacting support.

  - `errors` (array, required)

  - `errors.id` (string, required)

  - `errors.message` (string, required)

## Response 401:

  - `401` (unknown)
    Unauthorised. Authentication failed or the API key is missing or invalid. Refer to the [Authentication section](/demand/docs/development-guide/authentication) for details.

## Response 401 fields (application/json):

  - `request_id` (string, required)
    Uniquely identifies the request. Please provide this identifier when contacting support.

  - `errors` (array, required)

  - `errors.id` (string, required)

  - `errors.message` (string, required)

## Response 500:

  - `500` (unknown)
    Internal server error. An unexpected error occurred on the server.

## Response 500 fields (application/json):

  - `request_id` (string, required)
    Uniquely identifies the request. Please provide this identifier when contacting support.

  - `errors` (array, required)

  - `errors.id` (string, required)

  - `errors.message` (string, required)

## Response 200 examples:

  - `Response with default language (en-gb)` (unknown)

  - `Response with multiple languages` (unknown)

## Response 400 examples:

  - `Unsupported language code` (unknown)

## Response 500 examples:

  - `Unexpected server error` (unknown)

