customerCustomFieldDefinitions
Requires a customer (portal or buyer app) session.
Lists the organization's own fields on one kind of record that the signed-in buyer may see, for the portal's and the buyer app's forms. Never staff-only or archived fields. Requires a signed-in buyer.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query CustomerCustomFieldDefinitions($entity: String!) {
customerCustomFieldDefinitions(entity: $entity) {
id
type
archived
carryForward
defaultValue
editPermission
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomerCustomFieldDefinitions($entity: String!) {\n customerCustomFieldDefinitions(entity: $entity) {\n id\n type\n archived\n carryForward\n defaultValue\n editPermission\n }\n}",
"variables": {
"entity": "string"
}
}
EOF
Variables:
{
"entity": "string"
}
Response:
{
"data": {
"customerCustomFieldDefinitions": [
{
"id": "id",
"type": "string",
"archived": true,
"carryForward": true,
"defaultValue": {},
"editPermission": "string"
}
]
}
}
customerCustomFieldDefinitions(
entity: String!
placement: String
): [CustomFieldDefinition!]!
Arguments
customerCustomFieldDefinitions.entity ● String! non-null scalar
The kind of record, e.g. customer, address or contact.
customerCustomFieldDefinitions.placement ● String scalar
Only fields placed here, e.g. portal.form or buyer_app.form. Omit for every field the buyer may see.
Type
CustomFieldDefinition object
A field the organization added to one kind of record.