Queries and mutations for managing Zones in the platform.

Queries

Query Zones

QUERYzones
Arguments
where​
String​
sort​
Array of String​
limit​
Int​
offset​
Int​

Get Zone

QUERYzone
Arguments
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Output:Zone

Mutations

Create Zone

MUTATIONcreateZone
Arguments
draft​
Output:Zone

Update Zone

MUTATIONupdateZone
Arguments
version​
Long​
actions​
Array of ZoneUpdateAction​
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Output:Zone

Delete Zone

MUTATIONdeleteZone
Arguments
version​
Long​
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Output:Zone

Output types

Zone

Zones allow defining ShippingRates for specific Locations.

name​
String​

Name of the Zone.

key​
String​

User-defined unique identifier of the Zone.

description​
String​

Description of the Zone.

locations​
Array of Location​

List of locations that belong to the Zone.

id​
String​

Unique identifier of the Zone.

version​
Long​

Current version of the Zone.

createdAt​

Date and time (UTC) the Zone was initially created.

lastModifiedAt​

Date and time (UTC) the Zone was last updated.

createdBy​

IDs and references that created the Zone.

lastModifiedBy​

IDs and references that last modified the Zone.

Location

A geographical location representing a country and optionally a state within this country. A location can only be assigned to one Zone.

country​

Country code of the geographic location.

state​
String​

State within the country.

ZoneQueryResult

offset​
Int​
count​
Int​
total​
Long​
exists​
Boolean​
results​
Array of Zone​

Input types

CreateZone

name​
String​
key​
String​
description​
String​
locations​
Array of ZoneLocation​
Default: []​

ZoneLocation

country​
state​
String​

ZoneUpdateAction

addLocation​
changeName​
removeLocation​
setDescription​
setKey​

Update actions

Add Location

location​

Location to be added to the Zone.

Change Name

name​
String​

New name of the Zone.

Remove Location

location​

Location to be removed from the Zone.

Set Description

description​
String​

Description of the Zone.

Set Key

key​
String​
If key is absent or null, the existing key, if any, will be removed.