deleteRegion
Requires permission platform:region:manage.
Deletes 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 DeleteRegion($id: String!) {
deleteRegion(id: $id) {
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 DeleteRegion($id: String!) {\n deleteRegion(id: $id) {\n id\n code\n countryCode\n stateCode\n name\n cityName\n }\n}",
"variables": {
"id": "string"
}
}
EOF
Variables:
{
"id": "string"
}
Response:
{
"data": {
"deleteRegion": {
"id": "id",
"code": "string",
"countryCode": "string",
"stateCode": "string",
"name": "string",
"cityName": "string"
}
}
}
deleteRegion(
id: String!
): Region!
Arguments
deleteRegion.id ● String! non-null scalar
The ID of the region.
Type
Region object
A region such as a country, state or city.