Skip to main content

updateCategoryDeliveryDefaults

Requires permission categories:category:update.

Replaces a category's delivery defaults and keeps the category's other metadata. Needs the delivery partners plan feature and permission to update 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:

mutation UpdateCategoryDeliveryDefaults($categoryId: ID!, $input: CategoryDeliveryDefaultsInput!) {
updateCategoryDeliveryDefaults(categoryId: $categoryId, input: $input) {
categoryName
inheritedFromCategoryName
categoryId
effective {
heightCm
lengthCm
ownPackaging
weightKg
widthCm
}
}
}

Variables:

{
"categoryId": "id",
"input": {}
}

Response:

{
"data": {
"updateCategoryDeliveryDefaults": {
"categoryName": "string",
"inheritedFromCategoryName": "string",
"categoryId": "id",
"effective": {
"heightCm": 0,
"lengthCm": 0,
"ownPackaging": true,
"weightKg": 0,
"widthCm": 0
}
}
}
}
updateCategoryDeliveryDefaults(
categoryId: ID!
input: CategoryDeliveryDefaultsInput!
): CategoryDeliveryDefaults!

Arguments​

updateCategoryDeliveryDefaults.categoryId ● ID! non-null scalar​

The ID of the category.

updateCategoryDeliveryDefaults.input ● CategoryDeliveryDefaultsInput! non-null input​

The delivery defaults to save for the category.

Type​

CategoryDeliveryDefaults object​

A category's delivery defaults: its own values and what applies to its items (inherited from parents).