GET account/getCategories

GET /api/v2/account/getCategories

Returns participant categories for an event. Can return all categories for an event, or a single category by its ID.


Authentication

Authorization: Bearer <your_api_key>

Endpoint

GET /api/v2/account/getCategories

Query Parameters

At least one of event_id or id must be provided.

Parameter

Type

Required

Accepted Values / Format

Description

event_id

integer

Required when id is not provided

Valid event ID

Returns all categories for the event

id

integer

Required when event_id is not provided

Valid category ID

Returns a single category by its ID


Response

Success Response — list by event (HTTP 200)

JSON
{
  "code": 200,
  "errors": null,
  "data": [
    { "id": 5, "name": "Visitor", "is_buyer": false },
    { "id": 8, "name": "Buyer", "is_buyer": true }
  ],
  "response_id": "1700000000.12345"
}

Success Response — single category by ID (HTTP 200)

JSON
{
  "code": 200,
  "errors": null,
  "data": [
    { "id": 8, "title": "Buyer", "is_buyer": true }
  ],
  "response_id": "1700000000.12345"
}

Note: When fetching by event_id, the category name field is keyed as name. When fetching by id, it is keyed as title.

Response Item Fields

Field

Type

Description

id

integer

Category ID

name

string

Category name (present when fetched by event_id)

title

string

Category name (present when fetched by id)

is_buyer

boolean

Whether this is a buyer category


Error Responses

HTTP Code

Condition

Error Message

400

Neither event_id nor id is provided

Missing required parameter: event_id

400

event_id or id is not a valid integer

Param must be a integer: {param}

400

id provided but no matching category found

Invalid Participant Category ID

400

event_id references a non-existent event

Could not find an event with id = {id}

403

Missing or invalid API key

Forbidden


Example Request — list all categories for an event

Bash
curl -X GET "https://your-event-domain.com/api/v2/account/getCategories?event_id=7" \
  -H "Authorization: Bearer your_api_key_here"

Example Request — get a single category by ID

Bash
curl -X GET "https://your-event-domain.com/api/v2/account/getCategories?id=8" \
  -H "Authorization: Bearer your_api_key_here"