Skip to main content

createRegion

Requires permission platform:region:manage.

Creates 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:

mutation CreateRegion($input: CreateRegionInput!) {
createRegion(input: $input) {
id
code
countryCode
stateCode
name
cityName
}
}

Variables:

{
"input": {
"code": "string",
"isActive": true,
"name": "string"
}
}

Response:

{
"data": {
"createRegion": {
"id": "id",
"code": "string",
"countryCode": "string",
"stateCode": "string",
"name": "string",
"cityName": "string"
}
}
}
createRegion(
input: CreateRegionInput!
): Region!

Arguments​

createRegion.input ● CreateRegionInput! non-null input​

The region's details.

Type​

Region object​

A region such as a country, state or city.