Skip to main content
GET
/
api
/
utils
/
enums
{
  "Id": 123,
  "Name": "<string>",
  "Label": "<string>",
  "400 Bad Request": {},
  "401 Unauthorized": {}
}

Get Enum Values

Returns all valid values for a named Nexudus enumeration. Enums are used throughout the platform to represent fixed sets of choices — for example, invoice status, resource types, booking states, or delivery status. The portal uses this endpoint to build dropdowns and validate field values dynamically.

Authentication

Requires a valid customer bearer token.

Query Parameters

name
string
required
The name of the enumeration to retrieve. This must match the exact server-side enum name (e.g. "InvoiceStatus", "ResourceType").

Response

Returns an array of enum entry objects. The exact shape depends on the enum requested, but each entry typically includes:
Id
number
Numeric value of the enum entry (as stored in the database).
Name
string
Machine-readable key for the enum entry.
Label
string
Human-readable localised label for display in the UI.

Example Response

[
  { "Id": 1, "Name": "Draft", "Label": "Draft" },
  { "Id": 2, "Name": "Sent", "Label": "Sent" },
  { "Id": 3, "Name": "Paid", "Label": "Paid" },
  { "Id": 4, "Name": "Cancelled", "Label": "Cancelled" }
]

TypeScript Integration

import endpoints from '@/api/endpoints'

const url = endpoints.system.enum('InvoiceStatus')
// => '/api/utils/enums?name=InvoiceStatus'

const response = await httpClient.get<{ Id: number; Name: string; Label: string }[]>(url)
const enumValues = response.data

Usage in Portal

ContextSource file
Dynamic dropdowns for resource fieldssrc/views/bookings/
Checkout and product configurationsrc/views/checkout/

Error Responses

400 Bad Request
error
The name parameter is missing or does not match a known server-side enum.
401 Unauthorized
error
The bearer token is missing, expired, or invalid.
MethodEndpointDescription
GET/api/public/configurationGet full portal configuration including settings
GET/api/public/resources/fields/searchableGet searchable custom fields for resources