> ## Documentation Index
> Fetch the complete documentation index at: https://docs.classquill.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Refresh Isochrones

> (Re)compute the org's in-person tutors' drive-time isochrones from Mapbox, caching
them for the accurate coverage overlay + the gate's ST_Contains leg.

Skips serves_all_areas / online tutors (no bounded reach to model) and any tutor
whose home coordinate has not moved since its cached isochrone (the skip-guard), so
repeat calls cost nothing. When MAPBOX_TOKEN is unset, `enabled` is false and nothing
is computed — the map keeps using the max_travel_km radius circle. Intended for a
cron / Hermes trigger; bounded by MAPBOX_ISOCHRONE_MAX_PER_REFRESH per call.



## OpenAPI

````yaml /openapi.json post /v1/coverage/isochrones/refresh
openapi: 3.1.0
info:
  title: EquateIt Public API
  description: >-
    REST API for EquateIt tutoring organisations. Pipe your sessions, invoices,
    payments, tutor earnings, students, and more into your own tools. Most
    endpoints are reads; a focused set of writes (each gated by a *:write scope)
    create or update data, including creating student/tutor/parent accounts.


    Authenticate every request with an org API key:

        Authorization: Token token=ei_live_...

    Mint keys in the EquateIt app under Settings → Developers.
  version: 1.0.0
servers: []
security:
  - ApiKeyAuth: []
tags:
  - name: General
  - name: Sessions
  - name: Tutors
  - name: Students & Parents
  - name: Billing
  - name: Curriculum
  - name: Coursework
  - name: Operations
  - name: Pricing
  - name: Bookings
  - name: Blog
  - name: Reports
paths:
  /v1/coverage/isochrones/refresh:
    post:
      tags:
        - General
      summary: Refresh Isochrones
      description: >-
        (Re)compute the org's in-person tutors' drive-time isochrones from
        Mapbox, caching

        them for the accurate coverage overlay + the gate's ST_Contains leg.


        Skips serves_all_areas / online tutors (no bounded reach to model) and
        any tutor

        whose home coordinate has not moved since its cached isochrone (the
        skip-guard), so

        repeat calls cost nothing. When MAPBOX_TOKEN is unset, `enabled` is
        false and nothing

        is computed — the map keeps using the max_travel_km radius circle.
        Intended for a

        cron / Hermes trigger; bounded by MAPBOX_ISOCHRONE_MAX_PER_REFRESH per
        call.
      operationId: refresh_isochrones_v1_coverage_isochrones_refresh_post
      parameters:
        - name: subject
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Only refresh tutors who teach this subject id
            title: Subject
          description: Only refresh tutors who teach this subject id
        - name: minutes
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 60
                minimum: 5
              - type: 'null'
            description: Drive-time contour in minutes (default from config)
            title: Minutes
          description: Drive-time contour in minutes (default from config)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IsochroneRefreshResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    IsochroneRefreshResult:
      properties:
        enabled:
          type: boolean
          title: Enabled
          default: false
        considered:
          type: integer
          title: Considered
          default: 0
        computed:
          type: integer
          title: Computed
          default: 0
        cached:
          type: integer
          title: Cached
          default: 0
        failed:
          type: integer
          title: Failed
          default: 0
      type: object
      title: IsochroneRefreshResult
      description: >-
        Outcome of POST /v1/coverage/isochrones/refresh. `enabled` is false when
        no

        MAPBOX_TOKEN is configured (nothing was computed; the map uses radius
        circles).

        `computed` were fetched from Mapbox, `cached` were already fresh
        (skip-guard),

        `failed` errored, `considered` is how many in-person tutors were in
        scope.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Org API key as `Token token=ei_live_...`

````