updateRegion
Requires permission platform:region:manage.
Edits a region. Regions are shared by every organization, so this needs the platform permission to manage regions, which only platform administrators hold.
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 UpdateRegion($id: String!, $input: UpdateRegionInput!) {
updateRegion(id: $id, input: $input) {
id
code
countryCode
stateCode
name
cityName
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation UpdateRegion($id: String!, $input: UpdateRegionInput!) {\n updateRegion(id: $id, input: $input) {\n id\n code\n countryCode\n stateCode\n name\n cityName\n }\n}",
"variables": {
"id": "string",
"input": {}
}
}
EOF
Variables:
{
"id": "string",
"input": {}
}
Response:
{
"data": {
"updateRegion": {
"id": "id",
"code": "string",
"countryCode": "string",
"stateCode": "string",
"name": "string",
"cityName": "string"
}
}
}
updateRegion(
id: String!
input: UpdateRegionInput!
): Region!
Arguments
updateRegion.id ● String! non-null scalar
The ID of the region.
updateRegion.input ● UpdateRegionInput! non-null input
The fields to change.
Type
Region object
A region such as a country, state or city.