try out ↗

← API Index


/api/admin/tour/setpolygon

Sets the delivery area polygon of a tour from a KML document, overriding any polygon previously stored for that tour (including one provided by the backend). Only the first polygon of the KML document is used, with its holes. An empty kml parameter clears the stored polygon. The polygon becomes visible in /api/tours9 immediately. Requires operator or superuser permissions.

Parameters

Name Description Type
tourid the tour id (required) int
kml KML document containing the tour polygon (first polygon is used, holes included); empty to clear the polygon string
oo-rf optionally define the response-format for this call. One of: compact (default) | compacts | full | fulls | json | md | html | js | openapi | yaml String
oo-auth optionally force the API to check against the role (instead of silently not returning data). For guests or public access, the default is -1. 0 (regular customer) and above define the role for which the current session is expected to be authorized. int

Error Responses

HTTP Status Error Code Description
400 parameter_error Missing or invalid tourid parameter
400 tour_not_found No tour exists with the given tourid
400 invalid_kml The kml parameter can not be parsed as a KML document
400 invalid_polygon The KML contains no polygon, or the polygon has fewer than 3 distinct points
400 polygon_too_large The polygon has too many points to be stored
403 not_auth Not authenticated, or missing operator/superuser permissions

Response Types

Type Version Description
TourPolygonResult 1 Result of setting or clearing a tour area polygon

OpenAPI

See setpolygon.yaml