custom namespace, so their endpoints live under /admin/members/metafields/custom/. Any staff user or integration can read custom fields. Only Administrators and custom integrations can create, update, reorder, or delete them.
The custom field object
Whenever you fetch, create, or edit a custom field, the API responds with an array of one or more custom field objects undermembers_metafields.
Parameters
When retrieving custom fields from the Admin API, it’s possible to use thefilter parameter.
Available filter values:
status:archived- for retrieving archived fields onlystatus:[active,archived]- for retrieving active and archived fields
Retrieving a custom field
Creating custom fields
name, type
name- name of the field, up to 191 characters. Must be unique among the site’s custom fields, ignoring case, archived fields includedtype-short_text,long_text,list, oraddress. Can’t be changed latersettings- required forlistfields only.optionsis a list of 2 to 100 unique options, each up to 255 characters and without a|.multipleistrueif a member can pick more than oneaccess-{member}set tonone,read, orwrite. Defaults tonone
201 response with the new fields, which are added to the end of the order.
Each field’s key is generated from its name, so Shipping address becomes shipping_address. If that key is already taken, a number is added, as in shipping_address_2.
If any field in the request is invalid, none are created. The 422 error’s property names the problem, and for a request with several fields, its context may name the field, for example Custom field 2 of 3.
Updating a custom field
name, settings, access, and status of a field can be updated. Fields left out of the request are unchanged. New settings replace both options and multiple, and changing the options doesn’t change the options members have already picked. The key and type of a field can’t be changed.
Archiving a custom field
A field the site no longer uses can be archived by updating itsstatus:
status back to active restores the field and its values.
Reordering custom fields
Deleting a custom field
204 response.
Limits
By default, a site can have up to 100 custom fields, archived fields included. The limit can be changed with themaxDefinitions config option. Requests that would go over the limit are refused with a 403 error whose message states the limit, and nothing is created. Deleting an archived field makes room for another.
