post
/api/v2/zones/custom/batches
Python 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

NameTypeInput ShapeValuesDescriptionValue Required
columnsobjectcomments: string; customerZoneId: string; zoneName: string-Mapping of feature property keys to zone fields. Omit to use the defaults 'name', 'comments' and 'customerZoneId'.N
customZoneTypeIdsarray<string>--Sub-type IDs to assign to every zone in the collection.Y
zonesobject--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.

NameTypeDescription
errorobjectDetails about why the job failed (RFC 7807 format), or null if it succeeded.
idstringUnique job identifier.
linksobjectNavigation URLs for polling and result retrieval.
statusstringCurrent job lifecycle state: PENDING, QUEUED, RUNNING, DONE, FAILED, CANCELED, or NOT_FOUND.

Response Errors

HTTP Status CodeReason
400The request body or parameters are invalid.
401Authentication is required or the provided credentials are invalid.
403The authenticated user lacks permission to perform this operation.
409The operation conflicts with the current state of the resource.
422The request is syntactically valid but semantically cannot be processed.
429The request rate limit has been exceeded.
500An unexpected server error occurred.