Skip to content

List custom field definitions

Request

Get all custom field definitions for the tenant. Filter by entityType to get fields for a specific entity.

Security
authJWT
Query
entityTypestring

Filter by entity type

Enum:"user""business""campaign""redemption"
includestring

Pass translations to include the raw per-locale translations map (admin editing).

Headers
x-localestring, <= 35 characters

Optional BCP 47 locale (e.g. de, de-AT). Translatable fields are returned in this locale, falling back per field to the base text; the fields that came from a translation are listed in localizedFields. Absent or invalid values are ignored. Accept-Language is deliberately not used (browsers send it on every request, and localization must stay opt-in so editing flows keep reading base text) and no Content-Language is sent (a response can mix localized and base text).

Example:de-AT
curl -i -X GET \
  'https://docs.pers.ninja/_mock/swagger/custom-field-definitions?entityType=user&include=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'x-locale: de-AT'

Responses

List of custom field definitions

Bodyapplication/json
Array [
idstringrequired

Unique identifier (UUID)

tenantIdstringrequired

Tenant ID

entityTypestringrequired

Entity type this field applies to

Enum:"user""business""campaign""redemption"
keystringrequired

Unique key within tenant+entityType (camelCase)

labelstringrequired

Human-readable label for form display

descriptionobject

Help text / description

fieldTypestringrequired

Field type: text, email, phone, number, date, boolean, url, select, multiselect

Default:"text"
Enum:"text""email""phone""number""date""boolean""url""select""multiselect"
selectOptionsArray of objects

For select/multiselect types: static options array

selectOptionsSourceobject

For select/multiselect types: dynamic options from entity

validationobject

Validation rules for the field

translationsobject

Per-locale translations of label, description and select option labels (option.<value>), keyed by locale. Only returned with include=translations.

sortOrdernumberrequired

Display order (lower = first)

Default:0
isCustomobjectread-onlyrequired

Marker to distinguish from built-in fields. Custom fields are stored in user.customData

Default:true
createdAtstring, (date-time)required

Creation timestamp

updatedAtstring, (date-time)required

Last update timestamp

]
Response
[ { "id": "string", "tenantId": "string", "entityType": "user", "key": "string", "label": "string", "description": {}, "fieldType": "text", "selectOptions": [ … ], "selectOptionsSource": {}, "validation": {}, "translations": { … }, "sortOrder": 0, "isCustom": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ]