Create zones
If your webshop delivers to more than one country, you can create zones. A zone consists of one or more countries and you can apply specific configurations, such as pricing rules, for each zone.
Create a zone
Create zones with the createZone mutation: it requires a name, and an array of countries. Refer to the countries by their country code: CountryEnum.
mutation {
createZone(
input: {
name: "Zone 1",
countries: [HU, SK]
}
)
{
id
}
}
The mutation returns an automatically generated an ID that you can use to refer to the zone:
{
"data": {
"createZone": {
"id": "69e70342-e740-4e67-83b3-9c5efabadff2"
}
}
}
Delete a zone
To delete a zone, you just need to pass the ID of the zone as an argument to the deleteZone mutation:
GraphQL mutation
mutation {
deleteZone(id: "123abc")
}