apidata.one docs Get a key

Saved shapes

A consumer's own shapes, kept so a search or a map can use one by its ID (location.shapeId). Premium only: a key on a Basic account gets 403 tier_insufficient with capability: "shapes" on every route here.

Consumer identity comes only from the auth context, as for favorites: a client token with a pk_ key, or X-Client-Id with an sk_ key. A pk_ request without a token is 401 client_token_required; an sk_ request without X-Client-Id is 400 validation_failed. A shape belongs to one consumer: an ID from another consumer or another account is 404 not_found, never 403.

A shape is a GeoJSON Polygon with one ring, checked exactly as a drawn shape is: closed, 3 to 200 corners, not crossing itself, at most 5,000 km². A consumer may keep up to 100 shapes. A saved shape can't be edited: delete it and save a new one (there is no PATCH).

Searching with a saved shape

location.shapeId in a search or a map, in either form:

GET  /v1/listings?location.shapeId=shp_…
POST /v1/listings/search      { "location": { "shapeId": "shp_…" } }
GET  /v1/listings/map?location.shapeId=shp_…

It needs the same consumer context as the routes above, and finds the shape in that consumer's own shapes only: not found is 404 not_found, and nothing is searched. One shape per request: shapeId together with a drawn shape is 400 validation_failed.

Deleting a consumer, and downgrades

DELETE /v1/clients/{clientId} removes the consumer's saved shapes with everything else of theirs, whatever the account's tier. After a downgrade to Basic nothing is deleted: the shapes stay stored and unreachable (403 here and on location.shapeId) until the account is Premium again, and then they are all back.

Endpoints

Each has its own page, with its parameters, its answers field by field and its errors:

This page as Markdown