Loading...

GET /api/zones

To reuse a depot boundary for other vehicles, first find the zone saved in Plaspy. The catalog describes each zone by its name, type and the map points that define its shape.

Administrators see the account’s zones. A sub-user without administrator privileges sees the zones they created. Check the points to distinguish places with similar names, then copy the public ID of the zone you want to assign to trackers.

Request Details

HTTP method GET
Path /api/zones

The example identifiers are fictional. Use the identifiers returned by your account’s list for the resource you want to look up or change.

Request Parameters

ParameterTypeRequiredDescription
limitIntegerOptionalIntegerNoQuery parameter. Defaults to 500 zones. Values are clamped to the range from 1 to 1,000.

Authentication Required

You need access to the map page.

Send a valid bearer token in the authorization header. See Authentication.

Example Request

GET /api/zones?limit=10 HTTP/1.1 Host: api.plaspy.com Authorization: Bearer {token}

Response Parameters

The Presence column describes an HTTP 200 response. Conditional fields are omitted when they have no value. For a list, presence applies to each returned item.

Each entry in zones has an id with the zon- prefix, name, type, and points containing latitude/longitude pairs in degrees. Where applicable, width is expressed in meters for checkpoints or routes. Usage is one unit per returned zone, with a minimum of one.

An empty list returns HTTP 200 with zones: [].

FieldTypePresenceDescription
zonesObject arrayAlwaysObject arrayAlwaysVisible zones, sorted by name.
apiUsageIntegerAlwaysIntegerAlwaysUsage units for this request.
apiDailyUsageIntegerAlwaysIntegerAlwaysAccount usage for the day before this request is added.

Fields in each zones item

FieldTypePresenceDescription
idStringAlwaysStringAlwaysPublic zone ID (zon-).
nameStringAlwaysStringAlwaysZone name.
typeStringAlwaysStringAlwaysZone type: allowed, forbidden, checkpoint, checkpoint_area or route.
widthIntegerConditionalIntegerConditionalWidth in meters for a checkpoint or route, when applicable.
pointsObject arrayAlwaysObject arrayAlwaysGeometry points. Each point has numeric latitude and longitude values in degrees.

Example Successful Response

HTTP 200.

{ "zones": [ { "id": "zon-QmXvWNpRkY", "name": "North gate", "type": "checkpoint", "width": 50, "points": [ { "latitude": 4.65, "longitude": -74.08 } ] } ], "apiUsage": 1, "apiDailyUsage": 24 }

Errors

HTTP statusWhen it occurs
400If limit cannot be read as a signed 32-bit integer, the errors object contains the parameter validation error. If the request quota has been reached, error contains the reason.
401A valid bearer token is missing.
403If the user cannot access the map.
500An unexpected error occurred while processing the request.

In an error response that includes success, its value is false and error contains the message.

Example Error Response

{ "success": false, "error": "Your user does not have permission to do this." }
Index
Questions?

We answer all support request within 24 business hours approximately, If you have a question that needs an immediate resolution, please contact us by other way.

We answer you in business hours, as soon as possible. We are located in Bogotá, Colombia, time zone (GMT-5).

Last modification: 2026-11-30 11:01:33