Create custom field options

Creates several field options in one call, inside a single transaction: if any option fails validation the whole request is rolled back. Every entry must name the custom field it belongs to in its field property. Entries whose field id does not exist, or names a field the API user cannot access, are silently skipped, and entries whose value already exists on the field return the existing option instead of creating a new one. The response's fieldOptions array can therefore be shorter than the request's and can mix new and pre-existing options; match them to the request by value. label defaults to value. To add one option use POST /fieldOptions; to update or delete one use PUT or DELETE /fieldOptions/{id}.

{
    "fieldOptions": [
        {
            "orderid": 1,
            "value": "X",
            "label": "Option X",
            "isdefault": false,
            "field": "62"
        },
        {
            "orderid": 2,
            "value": "Y",
            "label": "Option Y",
            "isdefault": false,
            "field": "62"
        },
        {
            "orderid": 3,
            "value": "Z",
            "label": "Option Z",
            "isdefault": false,
            "field": "62"
        }
    ]
}
{
    "fieldOptions": [
        {
            "orderid": 1,
            "value": "X",
            "label": "Option X",
            "isdefault": 0,
            "field": "62",
            "cdate": "2023-06-08T15:36:49-05:00",
            "udate": "2023-06-08T15:36:49-05:00",
            "links": {
                "field": "https://{{yourAcccount}}.api-us1.com/api/3/fieldOptions/1/field"
            },
            "id": "1"
        },
        {
            "orderid": 2,
            "value": "Y",
            "label": "Option Y",
            "isdefault": 0,
            "field": "62",
            "cdate": "2023-06-08T15:36:49-05:00",
            "udate": "2023-06-08T15:36:49-05:00",
            "links": {
                "field": "https://{{yourAcccount}}.api-us1.com/api/3/fieldOptions/2/field"
            },
            "id": "2"
        },
        {
            "orderid": 3,
            "value": "Z",
            "label": "Option Z",
            "isdefault": 0,
            "field": "62",
            "cdate": "2023-06-08T15:36:49-05:00",
            "udate": "2023-06-08T15:36:49-05:00",
            "links": {
                "field": "https://{{yourAcccount}}.api-us1.com/api/3/fieldOptions/3/field"
            },
            "id": "3"
        }
    ]
}
Body Params
fieldOptions
array of objects
required
length ≥ 1

The options to create. The endpoint rejects a request that does not carry this array.

fieldOptions*
int32
required

ID of the custom field to add the option to. Entries without it are silently skipped.

string

Name of the option

string
required

Value of the option

int32

Order for displaying the custom field option

boolean

Whether or not this option is the default value

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Choose an example:
application/json