updateDeliverySettings
Requires permission settings:sales:update.
Changes the organization's delivery settings and returns them. Needs the delivery partners plan feature and permission to update sales settings.
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 UpdateDeliverySettings($input: UpdateDeliverySettingsInput!) {
updateDeliverySettings(input: $input) {
autoDeliverFromCarrier
configured
customerEmailOnDelivered
customerEmailOnShipped
defaultPickupWarehouseId
feeMode
defaultParcel {
heightCm
lengthCm
weightKg
widthCm
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation UpdateDeliverySettings($input: UpdateDeliverySettingsInput!) {\n updateDeliverySettings(input: $input) {\n autoDeliverFromCarrier\n configured\n customerEmailOnDelivered\n customerEmailOnShipped\n defaultPickupWarehouseId\n feeMode\n defaultParcel {\n heightCm\n lengthCm\n weightKg\n widthCm\n }\n }\n}",
"variables": {
"input": {
"feeMode": "FLAT"
}
}
}
EOF
Variables:
{
"input": {
"feeMode": "FLAT"
}
}
Response:
{
"data": {
"updateDeliverySettings": {
"autoDeliverFromCarrier": true,
"configured": true,
"customerEmailOnDelivered": true,
"customerEmailOnShipped": true,
"defaultPickupWarehouseId": "string",
"feeMode": "FLAT",
"defaultParcel": {
"heightCm": 0,
"lengthCm": 0,
"weightKg": 0,
"widthCm": 0
}
}
}
}
updateDeliverySettings(
input: UpdateDeliverySettingsInput!
): DeliverySettingsGql!
Arguments
updateDeliverySettings.input ● UpdateDeliverySettingsInput! non-null input
The delivery settings to change.
Type
DeliverySettingsGql object
The organization's delivery settings.