Skip to main content
PATCH
Update one of the signed-in supplier’s travel zones

Authorizations

x-api-key
string
header
required

API key minted in the MarketBox dashboard. Scope is restricted to the projects you select at creation time. Every route needs the key's standard API access (*) except POST /v1/projects/{projectId}/events, which needs events:write; a key without * is refused with 403 CAPABILITY_NOT_GRANTED.

Authorization
string
header
required

The signed-in person's Cognito access token, issued to this application's app client. Sent with the API key on the /clients/me and /suppliers/me routes.

Path Parameters

projectId
string
required

The project (tenant) that owns the resource. Every resource in this API is scoped to a project, and your API key is restricted to the projects it was issued for — a project outside that scope returns 403.

Minimum string length: 1
Example:

"prj_01kv60qgnef2kt3pvqgwmkbzfr"

travelZoneId
string
required

The travel zone — an area the supplier travels to, a circle or a drawn polygon.

Minimum string length: 1
Example:

"stz_01kv60qgnef2kt3pvqgwmkbzfr"

Body

application/json

Fields to update

version
integer
required

The row’s current version, for optimistic concurrency; a stale value is a 409. Send the version you read.

Required range: x > 0
Example:

1

name
string

The zone’s display name, as the supplier and staff see it. Omit to leave it unchanged.

Minimum string length: 1
Example:

"Downtown Toronto"

defaultLanguage
string

The language name is written in (BCP 47). Omit to leave it unchanged.

Minimum string length: 1
Example:

"en"

nameI18n
object

The name in other languages, keyed by BCP 47 language tag. Omit to leave it unchanged.

Example:
addressOneLine
string | null

The address of the zone’s centre, on one line. Omit to leave it unchanged; pass null to clear it.

Example:

"100 Queen St W, Toronto, ON M5H 2N2"

street
string | null

Street address of the zone’s centre. Omit to leave it unchanged; pass null to clear it.

Example:

"100 Queen St W"

city
string | null

City of the zone’s centre. Omit to leave it unchanged; pass null to clear it.

Example:

"Toronto"

state
string | null

State or province of the zone’s centre. Omit to leave it unchanged; pass null to clear it.

Example:

"ON"

country
string | null

Country of the zone’s centre. Omit to leave it unchanged; pass null to clear it.

Example:

"CA"

postalCode
string | null

Postal or ZIP code of the zone’s centre. Omit to leave it unchanged; pass null to clear it.

Example:

"M5H 2N2"

longitude
number

Longitude of the zone’s centre (for a CIRCULAR zone, the centre of the circle). Omit to leave it unchanged.

Example:

-79.3832

latitude
number

Latitude of the zone’s centre (for a CIRCULAR zone, the centre of the circle). Omit to leave it unchanged.

Example:

43.6532

timezone
string | null

IANA time zone of the zone’s area. Omit to leave it unchanged; pass null to clear it.

Minimum string length: 1
Example:

"America/Toronto"

travelZoneType
enum<string>

CIRCULAR = a radius around the centre (travelDistance and travelDistanceUnit); DRAWN = the polygons in travelRegions. Omit to keep the zone’s type; switching it requires the new type’s geometry fields.

Available options:
CIRCULAR,
DRAWN
Example:

"CIRCULAR"

travelDistance
number | null

The radius of a CIRCULAR zone, in travelDistanceUnit. Required for CIRCULAR, null for DRAWN. Omit to leave it unchanged.

Required range: x > 0
Example:

15

travelDistanceUnit
enum<string> | null

The unit of travelDistance. Required for CIRCULAR, null for DRAWN. Omit to leave it unchanged.

Available options:
KM,
MILES,
null
Example:

"KM"

travelRegions
object | null

The area of a DRAWN zone, a GeoJSON Polygon or MultiPolygon. Required for DRAWN, null for CIRCULAR. Omit to leave it unchanged.

Example:
active
boolean

Active zones can be used by schedules; an inactive zone is kept but offers nothing. Omit to leave it unchanged.

Example:

true

Response

Travel zone updated

data
object
required
coverageRecompute
object

Present only when the change moved the zone’s geometry.