categoryDeliveryDefaults
Requires permission categories:category:read.
Returns a category's own delivery defaults and what applies to the items in it. Requires permission to read categories.
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 CategoryDeliveryDefaults($categoryId: ID!) {
categoryDeliveryDefaults(categoryId: $categoryId) {
categoryName
inheritedFromCategoryName
categoryId
effective {
heightCm
lengthCm
ownPackaging
weightKg
widthCm
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CategoryDeliveryDefaults($categoryId: ID!) {\n categoryDeliveryDefaults(categoryId: $categoryId) {\n categoryName\n inheritedFromCategoryName\n categoryId\n effective {\n heightCm\n lengthCm\n ownPackaging\n weightKg\n widthCm\n }\n }\n}",
"variables": {
"categoryId": "id"
}
}
EOF
Variables:
{
"categoryId": "id"
}
Response:
{
"data": {
"categoryDeliveryDefaults": {
"categoryName": "string",
"inheritedFromCategoryName": "string",
"categoryId": "id",
"effective": {
"heightCm": 0,
"lengthCm": 0,
"ownPackaging": true,
"weightKg": 0,
"widthCm": 0
}
}
}
}
categoryDeliveryDefaults(
categoryId: ID!
): CategoryDeliveryDefaults!
Arguments
categoryDeliveryDefaults.categoryId ● ID! non-null scalar
The ID of the category.
Type
CategoryDeliveryDefaults object
A category's delivery defaults: its own values and what applies to its items (inherited from parents).