openapi: 3.0.1 info: title: Fleetbase Contacts Zones API description: RESTful API for the Fleetbase open-source logistics and supply chain operating system. Manage orders, places, contacts, drivers, vehicles, fleets, zones, service rates, tracking, and webhooks. Available self-hosted (AGPL-3.0) or via managed Fleetbase Cloud. termsOfService: https://www.fleetbase.io/terms contact: name: Fleetbase Support email: hello@fleetbase.io url: https://docs.fleetbase.io license: name: AGPL-3.0 url: https://www.gnu.org/licenses/agpl-3.0.en.html version: '1.0' servers: - url: https://api.fleetbase.io/v1 description: Fleetbase Cloud / self-hosted REST API security: - bearerAuth: [] tags: - name: Zones description: Service-area geofences. paths: /zones: get: operationId: listZones tags: - Zones summary: List zones parameters: - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/offset' responses: '200': description: A list of zones. content: application/json: schema: type: array items: $ref: '#/components/schemas/Zone' post: operationId: createZone tags: - Zones summary: Create a zone requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Zone' responses: '200': description: The created zone. content: application/json: schema: $ref: '#/components/schemas/Zone' /zones/{id}: get: operationId: getZone tags: - Zones summary: Retrieve a zone parameters: - $ref: '#/components/parameters/id' responses: '200': description: The requested zone. content: application/json: schema: $ref: '#/components/schemas/Zone' put: operationId: updateZone tags: - Zones summary: Update a zone parameters: - $ref: '#/components/parameters/id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Zone' responses: '200': description: The updated zone. content: application/json: schema: $ref: '#/components/schemas/Zone' delete: operationId: deleteZone tags: - Zones summary: Delete a zone parameters: - $ref: '#/components/parameters/id' responses: '200': description: Confirmation the zone was deleted. components: schemas: Zone: type: object properties: id: type: string name: type: string description: type: string border: type: object description: GeoJSON polygon describing the zone boundary. parameters: offset: name: offset in: query description: Number of records to skip for pagination. schema: type: integer default: 0 limit: name: limit in: query description: Number of records to return (default 25, max 100). schema: type: integer default: 25 maximum: 100 id: name: id in: path required: true description: The unique public identifier of the resource. schema: type: string securitySchemes: bearerAuth: type: http scheme: bearer description: API key passed as a Bearer token in the Authorization header. Test keys are prefixed flb_test_ and live keys flb_live_.