List all custom fields
This API helps you to list all custom fields.
HTTP Request
Available parameters
| Parameter | Type | Description |
|---|---|---|
page |
integer | Current page of the collection. Default is 1. |
per_page |
integer | Maximum number of items to be returned in result set. Default is 20. |
filter |
string |
You can filter custom fields by its type. Available filters are all, ticket_fields, agentonly_fields, and customer_fields.Default is all.
|
Example
curl --location --request GET 'http://localhost/wp-json/supportcandy/v2/custom-fields?page=1&per_page=20&filter=all' \
--header 'Authorization: Basic YWRtaW46bjVJWSBYc3pUIGlxN3MgSHhKWCA3YVdBIDlOblI='
Get single custom field
This API helps you to list a single custom field.
HTTP Request
Example
curl --location --request GET 'http://localhost/wp-json/supportcandy/v2/custom-fields/2' \
--header 'Authorization: Basic YWRtaW46bjVJWSBYc3pUIGlxN3MgSHhKWCA3YVdBIDlOblI='
Get custom field options
This API helps you to list options for the custom field. Custom field API response includes the field has_options which you can use to determine whether this custom field has options or not.
HTTP Request
Example
curl --location --request GET 'http://localhost/wp-json/supportcandy/v2/custom-fields/40/options' \
--header 'Authorization: Basic YWRtaW46bjVJWSBYc3pUIGlxN3MgSHhKWCA3YVdBIDlOblI='
Get single option
This API helps you to list a single custom field option.
HTTP Request
Example
curl --location --request GET 'http://localhost/wp-json/supportcandy/v2/custom-fields/29/options/1' \
--header 'Authorization: Basic YWRtaW46bjVJWSBYc3pUIGlxN3MgSHhKWCA3YVdBIDlOblI='