saveCategoryAttributeDefinition
Requires permission biddesk:assembly:manage.
Creates a category attribute, restores an archived one with the same key, or replaces one (with id and expectedVersion). Type and category are fixed once created; saved choices can be archived but not removed. Refused with VERSION_CONFLICT when someone saved first. Requires Bid Desk and permission to manage assemblies.
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
mutation SaveCategoryAttributeDefinition($input: SaveCategoryAttributeDefinitionInput!) {
saveCategoryAttributeDefinition(input: $input) {
id
type
createdAt
archived
categoryId
key
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SaveCategoryAttributeDefinition($input: SaveCategoryAttributeDefinitionInput!) {\n saveCategoryAttributeDefinition(input: $input) {\n id\n type\n createdAt\n archived\n categoryId\n key\n }\n}",
"variables": {
"input": {
"categoryId": "id",
"key": "string",
"label": "string",
"type": "BOOLEAN"
}
}
}
EOF
Variables:
{
"input": {
"categoryId": "id",
"key": "string",
"label": "string",
"type": "BOOLEAN"
}
}
Response:
{
"data": {
"saveCategoryAttributeDefinition": {
"id": "id",
"type": "BOOLEAN",
"createdAt": "2025-01-15T00:00:00Z",
"archived": true,
"categoryId": "id",
"key": "string"
}
}
}
saveCategoryAttributeDefinition(
input: SaveCategoryAttributeDefinitionInput!
): CategoryAttributeDefinition!
Arguments
saveCategoryAttributeDefinition.input ● SaveCategoryAttributeDefinitionInput! non-null input
The whole attribute definition.
Type
CategoryAttributeDefinition object
One typed technical attribute of a category (for example power or voltage), with an optional unit, a required flag, its choices and its bounds.