post
/api/v2/zones/custom/batchesPython SDK method:
client.zones.custom_zone_batch(params).run()Batch create custom zones
Creates multiple custom zones from a GeoJSON FeatureCollection supplied directly in the request body. The server handles the file upload, so no pre-signed URL round trip is needed. Use the file-based custom zone import flow instead when the payload is too large to send inline. Poll the job status endpoint until the batch completes, then fetch per-zone outcomes from GET /api/v2/zones/custom/batches/{id}.
Request Body
Zones to create and the sub-type IDs to assign to them.
application/json: object
| Name | Type | Input Shape | Values | Description | Value Required |
|---|---|---|---|---|---|
columns | object | comments: string; customerZoneId: string; zoneName: string | - | Mapping of feature property keys to zone fields. Omit to use the defaults 'name', 'comments' and 'customerZoneId'. | N |
customZoneTypeIds | array<string> | - | - | Sub-type IDs to assign to every zone in the collection. | Y |
zones | object | - | - | GeoJSON FeatureCollection containing the zones to import. Each feature needs a geometry and a property holding the zone name. | Y |
Examples
Create two zones inline
Feature properties use the default column keys, so the columns mapping can be omitted.
{
"customZoneTypeIds": [
"zt-00001"
],
"zones": {
"features": [
{
"geometry": {
"coordinates": [
[
[
-115.3,
36.1
],
[
-115.2,
36.1
],
[
-115.2,
36.2
],
[
-115.3,
36.2
],
[
-115.3,
36.1
]
]
],
"type": "Polygon"
},
"properties": {
"comments": "Primary depot",
"customerZoneId": "customer-zone-001",
"name": "Depot North"
},
"type": "Feature"
},
{
"geometry": {
"coordinates": [
[
[
-115.1,
36
],
[
-115,
36
],
[
-115,
36.1
],
[
-115.1,
36.1
],
[
-115.1,
36
]
]
],
"type": "Polygon"
},
"properties": {
"comments": "Overflow depot",
"customerZoneId": "customer-zone-002",
"name": "Depot South"
},
"type": "Feature"
}
],
"type": "FeatureCollection"
}
}Success Responses
202 response: object
Job accepted and queued for processing. Poll the location header URL to check status.
| Name | Type | Description |
|---|---|---|
error | object | Details about why the job failed (RFC 7807 format), or null if it succeeded. |
id | string | Unique job identifier. |
links | object | Navigation URLs for polling and result retrieval. |
status | string | Current job lifecycle state: PENDING, QUEUED, RUNNING, DONE, FAILED, CANCELED, or NOT_FOUND. |
Response Errors
| HTTP Status Code | Reason |
|---|---|
| 400 | The request body or parameters are invalid. |
| 401 | Authentication is required or the provided credentials are invalid. |
| 403 | The authenticated user lacks permission to perform this operation. |
| 409 | The operation conflicts with the current state of the resource. |
| 422 | The request is syntactically valid but semantically cannot be processed. |
| 429 | The request rate limit has been exceeded. |
| 500 | An unexpected server error occurred. |