> For the complete documentation index, see [llms.txt](https://help.openloyalty.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.openloyalty.io/api-reference/custom-field-group/list-custom-field-groups.md).

# List custom field groups

Management\
\
Returns all custom field groups for the given entity type. Results are ordered by sortOrder ascending.

````json
{"openapi":"3.0.0","info":{"title":"Open Loyalty","version":"0.0.1"},"tags":[{"name":"Custom Field Group","description":"These endpoints allow you to manage custom field groups and their definitions."}],"servers":[{"url":"http://openloyalty.localhost"}],"security":[{"Bearer":[]},{"token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Open Loyalty has the JWT authorization.\nTo learn what a JSON Web Token is and how it works, check out Introduction to JSON Web Tokens <https://jwt.io/introduction/>\n\n### Obtain an access token\n\nSend a request with the parameters username and password\n\n#### Definition\n\n`POST /api/admin/login_check` [Go to definition](#operation/adminLoginCheck)\\\n`POST /api/{storeCode}/member/login_check` [Go to definition](#operation/memberLoginCheck)\n\n#### Example\n\n```bash\ncurl {HOST}/api/admin/login_check\n    -H 'Content-Type: application/json;charset=UTF-8'\n    -H 'Accept: application/json, text/plain, */*'\n    --data-binary '{\"username\":\"admin\",\"password\":\"password\"}'\n```\n\n#### Example Response\n\n```json\n{\n    \"token\":\"eyJhbGciOiJSUzI1NiIsInR5cCI6...\",\n    \"refresh_token\":\"0558f8bb29948c4e54c443f...\"\n}\n```\n\n### Using JSON Web Token\n\nAdd authorization header to each request\\\n`Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...`\\\nYou can now access any API method you want under the /api prefix.\n\n#### Example\n```bash\ncurl {HOST}/api/{storeCode}/analytics/members\n    -H 'Accept: application/json'\n    -H 'Content-type: application/x-www-form-urlencoded'\n    -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...'\n```\n\n### Refresh JSON Web Token\nYou can refresh token using refresh_token that was given during login.\\\nThere are two endpoints\\\nTo refresh admin token `POST /api/token/refresh` [Go to definition](#operation/tokenRefresh)\\\nTo refresh member token `POST /api/{storeCode}/token/refresh` [Go to definition](#operation/tokenRefreshMember)\n","bearerFormat":"JWT","scheme":"bearer"},"token":{"type":"apiKey","name":"X-AUTH-TOKEN","in":"header"}},"parameters":{"storeCode":{"name":"storeCode","in":"path","description":"Store code","required":true,"schema":{"type":"string"}},"page":{"name":"_page","in":"query","description":"Number of page with results, starts from 1","required":false,"schema":{"type":"integer","default":1,"minimum":1}},"itemsOnPage":{"name":"_itemsOnPage","in":"query","description":"Items on one page","required":false,"schema":{"type":"integer","default":10,"maximum":50,"minimum":1}},"orderBy":{"name":"_orderBy","in":"query","description":"Sorting order. If sorting is not chosen, the rows will be returned in an unspecified order. Sort order: * `asc` - Ascending, from A to Z * `desc` - Descending, from Z to A","required":false,"style":"deepObject","explode":true,"schema":{"type":"object","additionalProperties":{"type":"string","enum":["asc","desc"]}}}},"schemas":{"CustomFieldEntityType":{"type":"string","description":"Entity type the custom field is associated with.","enum":["member","direct-campaign","automation-campaign","referral-campaign","leaderboard","challenge","reward","fortune-wheel-reward"]},"CustomFieldGroupResponse":{"type":"object","required":["customFieldGroupId","groupKey","name","entityType","definitions","createdAt","updatedAt"],"properties":{"customFieldGroupId":{"type":"string","format":"uuid","description":"Unique identifier of the group"},"groupKey":{"type":"string","description":"Immutable machine-readable identifier"},"name":{"type":"string","description":"Human-readable name of the group"},"description":{"type":"string","nullable":true,"description":"Optional description of the group"},"entityType":{"$ref":"#/components/schemas/CustomFieldEntityType"},"sortOrder":{"type":"integer","nullable":true,"description":"Display order position"},"definitions":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldDefinitionInGroupResponse"},"description":"Field definitions belonging to this group"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last modification timestamp"},"deletedAt":{"type":"string","format":"date-time","nullable":true,"description":"Soft-deletion timestamp (null if not deleted)"}}},"CustomFieldDefinitionInGroupResponse":{"type":"object","required":["customFieldDefinitionId","key","name","fieldType","config","required","active","createdAt","updatedAt"],"properties":{"customFieldDefinitionId":{"type":"string","format":"uuid","description":"Unique identifier of the field definition"},"key":{"type":"string","description":"Immutable machine-readable identifier"},"name":{"type":"string","description":"Human-readable name of the field"},"description":{"type":"string","nullable":true,"description":"Optional description of the field"},"fieldType":{"$ref":"#/components/schemas/CustomFieldType"},"config":{"type":"object","additionalProperties":true,"description":"Field-type-specific configuration. Structure depends on `fieldType`.\nSee `TextFieldConfig`, `IntegerFieldConfig`, `FloatFieldConfig`,\n`BooleanFieldConfig`, `DateFieldConfig`, `DateTimeFieldConfig`, `SelectFieldConfig` for the per-type shapes.\nValidated server-side against the schema selected by the sibling `fieldType`.\n"},"required":{"type":"boolean","description":"Whether this field must be filled in"},"active":{"type":"boolean","description":"Whether this field definition is currently active"},"sortOrder":{"type":"integer","nullable":true,"description":"Display order position"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last modification timestamp"}}},"CustomFieldType":{"type":"string","description":"Type of the custom field value. Determines the allowed JSON type and the shape\nof `config` on the definition.\n\n| Type            | Value JSON type          | Config required field    |\n|-----------------|--------------------------|--------------------------|\n| `text`          | string                   | `maxLength`              |\n| `integer`       | integer                  | —                        |\n| `float`         | number                   | —                        |\n| `boolean`       | boolean                  | —                        |\n| `date`          | string (YYYY-MM-DD)      | —                        |\n| `datetime`      | string (YYYY-MM-DD HH:mm:ss.SSSSSS) | —             |\n| `single_select` | string                   | `groupOfValuesId`        |\n| `multi_select`  | array of strings         | `groupOfValuesId`        |\n| `object_array`  | array of objects / null  | `objectFields`, `maxItems` |\n","enum":["text","integer","float","boolean","date","datetime","single_select","multi_select","object_array"]},"SearchableTotalResponse":{"required":["all","filtered","estimated"],"properties":{"all":{"type":"integer","deprecated":true},"filtered":{"type":"integer","deprecated":true},"estimated":{"description":"Field estimated is used to show that the results are estimated. It might happen when there are more than 5000 results due to performance optimization.","type":"boolean","deprecated":true}},"type":"object","deprecated":true},"ExpiredToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"InvalidToken":{"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Unauthorized":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}},"responses":{"BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"required":["code","message","errors"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"errors":{"type":"array","items":{"required":["message","parameters","plural","code","path"],"properties":{"message":{"type":"string"},"parameters":{},"plural":{"type":"integer","nullable":true},"code":{"type":"string"},"path":{"type":"string"}},"type":"object"}}},"type":"object"}}}},"AccessDenied":{"description":"Forbidden.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}},"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}}}}},"paths":{"/api/{storeCode}/custom-field-groups/{entityType}":{"get":{"operationId":"_customFieldGroupList","tags":["Custom Field Group"],"summary":"List custom field groups","description":"<label style=\"background-color: #D4EDBC;padding:5px;\">Management</label><br><br>\nReturns all custom field groups for the given entity type.\nResults are ordered by sortOrder ascending.\n","parameters":[{"$ref":"#/components/parameters/storeCode"},{"name":"entityType","in":"path","required":true,"description":"Entity type","schema":{"$ref":"#/components/schemas/CustomFieldEntityType"}},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/itemsOnPage"},{"$ref":"#/components/parameters/orderBy"},{"name":"customFieldGroupId","in":"query","required":false,"description":"Filter by group UUID","schema":{"type":"string","format":"uuid"}},{"name":"name","in":"query","required":false,"description":"Filter by group name (partial match)","schema":{"type":"string"}},{"name":"key","in":"query","required":false,"description":"Filter by group key (partial match)","schema":{"type":"string"}},{"name":"includeDeleted","in":"query","required":false,"description":"Whether to include soft-deleted groups. Defaults to `false`.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"List of custom field groups","content":{"application/json":{"schema":{"type":"object","required":["items","total"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldGroupResponse"}},"total":{"$ref":"#/components/schemas/SearchableTotalResponse"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ExpiredToken"},{"$ref":"#/components/schemas/InvalidToken"},{"$ref":"#/components/schemas/Unauthorized"}]}}}},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.openloyalty.io/api-reference/custom-field-group/list-custom-field-groups.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
