appUpdateTaxRate
Requires permission products:tax:update.
Change a tax rate the same app created. Another app's rates and the organization's own cannot be changed. Needs write_tax_rates.
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 AppUpdateTaxRate($input: AppUpdateTaxRateInput!) {
appUpdateTaxRate(input: $input) {
id
code
postalCode
name
groupName
type
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation AppUpdateTaxRate($input: AppUpdateTaxRateInput!) {\n appUpdateTaxRate(input: $input) {\n id\n code\n postalCode\n name\n groupName\n type\n }\n}",
"variables": {
"input": {
"id": "id"
}
}
}
EOF
Variables:
{
"input": {
"id": "id"
}
}
Response:
{
"data": {
"appUpdateTaxRate": {
"id": "id",
"code": "string",
"postalCode": "string",
"name": "string",
"groupName": "string",
"type": "string"
}
}
}
appUpdateTaxRate(
input: AppUpdateTaxRateInput!
): TaxRate!
Arguments
appUpdateTaxRate.input ● AppUpdateTaxRateInput! non-null input
The tax rate's ID and the fields to change.
Type
TaxRate object
A tax rate.