Optibus Driver Absences API

API endpoints for managing absences for drivers - i.e. periods where they are unavailable for work.

OpenAPI Specification

optibus-driver-absences-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Optibus Operations Driver Absences API
  version: 2.8.17
  description: '**Welcome to the Optibus Operations API documentation!**


    Optibus Operations is a cloud-based software solution that enables public transport providers to optimize their operations, planning, and scheduling. Our API provides programmatic access to Optibus Operations'' functionality, allowing you to integrate it with your own applications and systems.



    '
  license:
    name: Optibus Ltd, All rights reserved
  contact: {}
servers:
- url: https://YOUR-OPTIBUS-ACCOUNT.api.ops.optibus.co
  description: Contact your Optibus Customer Success Manager for the actual baseURL and API credentials to use.
tags:
- name: Driver Absences
  description: API endpoints for managing absences for drivers - i.e. periods where they are unavailable for work.
paths:
  /v2/drivers/absences:
    get:
      operationId: GetAbsencesV2
      responses:
        '200':
          description: Driver absences fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAbsencesV2SuccessfulResponse'
        '400':
          description: 'Possible error types: `Invalid request schema` (schema of your request does not match the specification), `invalidDatesCombination` (the combination of fromDate and toDate is invalid)'
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/GetAbsencesV2ErrorResponse'
                - $ref: '#/components/schemas/SchemaValidationErrorResponse'
        '404':
          description: 'Possible error types: `pageNotFound` (requested page number is out of range; details.totalPages indicates the number of pages available)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAbsencesV2ErrorResponse'
      description: "List existing driver absences in the system, with optional filtering capability.\n\nNotes:\n- The result is paginated. Check the `pagination` property in the response to see the total number of pages and the current page number.\n- Information about the modelling of date/time periods for each entry:\n  - `startDate` is mandatory\n  - `endDate` is optional - if omitted, the absence will be ongoing indefinitely\n  - `startTime` and `endTime` are optional - if omitted, the absence will be for the entire day(s) specified by `startDate` and `endDate`"
      summary: List driver absences
      tags:
      - Driver Absences
      security:
      - api_key: []
      parameters:
      - description: '- Comma-separated list of driver IDs to filter for'
        in: query
        name: driverIds
        required: false
        schema:
          type: array
          items:
            type: string
      - description: '- Comma-separated list of absence type codes to filter for'
        in: query
        name: absenceCode
        required: false
        schema:
          type: array
          items:
            type: string
      - description: '- Date string formatted as `YYYY-MM-dd`. Only absences that end on or after this date are returned.'
        in: query
        name: fromDate
        required: false
        schema:
          $ref: '#/components/schemas/StringifyDate'
      - description: '- Date string formatted as `YYYY-MM-dd`. Only absences that start on or before this date are returned.'
        in: query
        name: toDate
        required: false
        schema:
          $ref: '#/components/schemas/StringifyDate'
      - description: '- 1-indexed integer indicating which page of results to pull'
        in: query
        name: page
        required: false
        schema:
          $ref: '#/components/schemas/PageNumber'
  /v1/absences:
    post:
      operationId: PostDriverAbsences
      responses:
        '200':
          description: Drivers information imported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostDriverAbsencesSuccess'
        '400':
          description: 'Possible error types: `Invalid request schema` (schema of your request does not match the specification). Other errors are possible and will returned in the legacy style in an array of `messages` in the root of the response.'
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/LegacyImportErrorResponse'
                - $ref: '#/components/schemas/SchemaValidationErrorResponse'
        '422':
          description: 'Possible error types: `negativeBalanceViolation` (one or more absences would cause negative balance violations), `absenceTypeCapExceeded` (one or more absences would push a driver past the configured yearly cap for their absence type)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostDriverAbsencesErrorResponse'
              examples:
                Example 1:
                  value:
                    error:
                      type: negativeBalanceViolation
                      message: One or more absences would cause negative balance violations
                      details:
                        drivers:
                        - driverId: string
                          violatedBanks:
                          - string
                        summary:
                          affectedDrivers: 0
      description: "Creates or updates absences for drivers. As input, provide a list of absence entries to create or update.\n\nNotes:\n- Behaviour of the `absenceId` field:\n  - If an `absenceId` is specified that already exists, the existing absence will be updated.\n  - If an `absenceId` is specified that does not already exist, a new absence will be created with the specified ID.\n  - We recommend you set the `absenceId` to a corresponding fixed identifier from your external system that you are synchronizing with.\n- Information about the modelling of date/time periods for each entry:\n  - `startDate` is mandatory\n  - `endDate` is optional - if omitted, the downtime will be ongoing indefinitely\n  - `startTime` and `endTime` are optional - if omitted, the downtime will be for the entire day(s) specified by `startDate` and `endDate`\n- Each request is atomic - either all downtimes listed in the request are created/updated successfully, or none are created/updated.\n- This API does not auto-unassign overlapping duties. When absences are created via the web client, the UI automatically unassigns drivers from any duties that overlap the new absences. This API does not perform that step — drivers will remain assigned to any overlapping duties.\n- If your Ops instance has the `entitlementBanksEffectiveDate` feature active (you can ask your Optibus contact about this), then the API will perform additional validations:\n  - The API will validate that the absences do not cause negative balance violations for entitlement banks that do not allow negative balances.\n  - If violations are detected, the API will return HTTP 422 with details about which drivers have violations and which banks are affected.\n  - The HTTP 422 error can only occur when ALL of the following conditions are met:\n    - The `entitlementBanksEffectiveDate` feature flag is enabled\n    - Entitlement banks are configured and do NOT allow negative balances\n    - The driver has entitlements\n    - The absence is connected to the bank (by absence type)\n    - The driver would violate the balance constraints (would cause negative balance)\n    - The `skipBalanceValidation` query parameter is NOT set to `true` (validation is enabled by default when the parameter is not provided)\n- If your Ops instance has the `entitlementBanksDeductionOrder` feature active and absence-type yearly caps are enabled (via the `absenceCapEnabled` Absences preference), the API will additionally validate that no absence-type exceeds its configured yearly `maxCap` (in calendar days, per bank-year window):\n  - If, after applying the imports, a driver would exceed the cap for a given absence type, the API will return HTTP 422 with error type `absenceTypeCapExceeded` and a list of the (driver, absence-type) pairs that exceed the cap. Individual absence IDs are NOT enumerated — the driver is the unit that exceeds the cap, and the caller resolves it by reducing the driver's total days for that absence type however they choose.\n  - The `skipBalanceValidation=true` query parameter ALSO skips this cap validation (a single opt-out for all entitlement-driven validation)."
      summary: Create/update driver absences
      tags:
      - Driver Absences
      security:
      - api_key: []
      parameters:
      - description: "- Optional query parameter. When set to `true`, skips ALL entitlement-driven validation: both negative-balance checks (when `entitlementBanksEffectiveDate` is enabled) and absence-type yearly-cap checks (when `entitlementBanksDeductionOrder` + `absenceCapEnabled` are enabled).\n  Defaults to `false` (validation enabled)."
        in: query
        name: skipBalanceValidation
        required: false
        schema:
          type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostDriverAbsencesRequest'
  /v1/drivers/time-off-balances:
    get:
      operationId: GetTimeOffBalances
      responses:
        '200':
          description: Driver time off balances
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTimeOffBalancesResponse'
        '414':
          description: The request URI exceeds 10240 bytes which is not supported. This usually results from querying more than a thousand driverIds at once. Please chunk your request.
      description: "Returns time off (entitlement) balances for drivers grouped by driver and bank.\n\nEach driver's balances are grouped by bank. For each bank you get the total balance, used portion,\nplanned future usage, remaining balance, and historical balance changes. Use this endpoint to sync\ntime-off data with external HR systems or to display balance dashboards.\n\nNotes:\n- Numeric fields can be null when data is unavailable.\n- If querying many drivers, consider chunking requests to avoid hitting URI length limits.\n- When the `entitlementBanksEffectiveDate` feature flag is enabled, the balance calculation uses\n  effective-date logic for entitlement banks;\n- When the `scheduledPayout` feature flag is enabled, scheduled payouts (partial and remaining)\n  are factored into the balance calculation and may appear in `payoutDates` (as arrays per date) and affect\n  `usedBalance` and `plannedBalance`."
      summary: List driver time-off balances
      tags:
      - Driver Absences
      security:
      - api_key: []
      parameters:
      - description: '- Filter by driver IDs (required)'
        in: query
        name: driverIds
        required: true
        schema:
          type: array
          items:
            $ref: '#/components/schemas/UUID'
      - description: '- Filter by bank names; if omitted default banks may be returned (optional)'
        in: query
        name: bankNames
        required: false
        schema:
          type: array
          items:
            type: string
      - description: '- Calculate balances as of this date (YYYY-MM-DD); defaults to today (optional)'
        in: query
        name: onDate
        required: false
        schema:
          $ref: '#/components/schemas/StringifyDate'
    post:
      operationId: PutTimeOffBalances
      responses:
        '200':
          description: Time off balances updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PutTimeOffBalancesResponse'
        '400':
          description: Invalid request schema, empty balances array, invalid date format (expected YYYY-MM-DD), invalid balance values, invalid units, missing drivers, or invalid bank names.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaValidationErrorResponse'
      description: "Updates time off (entitlement) balances for drivers with effective dates.\n\nUse this endpoint to import accrual-based policies from an external HR system or to pre-load\nbalances for upcoming years. Each record sets the total balance for a driver/bank as of a\nspecific effective date. The system will merge these with existing absences and payouts.\n\nNotes:\n- Each request is atomic — either all records are applied successfully, or none are.\n- Bank names must match the entitlement bank configuration (case-insensitive).\n- If `unit` is omitted, the bank's configured unit (days or hours) is used.\n- Negative balance validation: by default, the API rejects imports that would create negative\n  balances for banks that do not allow them. Set `skipNegativeBalanceValidation: true` to allow\n  such imports (e.g. for migration or correction scenarios).\n- The negative balance validation uses the same balance calculation as the GET endpoint\n  (`getTimeOffBalances`), so it is affected by the `entitlementBanksEffectiveDate` and\n  `scheduledPayout` feature flags. Contact your Optibus representative for feature flag availability."
      summary: Create/update driver time-off balances
      tags:
      - Driver Absences
      security:
      - api_key: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutTimeOffBalancesRequest'
  /v1/drivers/absence-quotas-query:
    post:
      operationId: GetAbsenceQuotas
      responses:
        '200':
          description: Absence quotas and usage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAbsenceQuotasResponse'
        '400':
          description: 'Possible error types: `Invalid request schema` (e.g. missing `from`/`to` or invalid date format)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaValidationErrorResponse'
      description: "Returns configured **absence quota** definitions for the customer together with **aggregated usage**\n(unique drivers per day / per week, by absence type where applicable) for the requested calendar window.\n\nQuotas and limits come from Ops preferences (same configuration as the internal planner). Usage is derived\nfrom all drivers' absences and depot/operational-unit assignments in the widened date range needed for\nweekly quota windows.\n\n**Request scope**\n- `from` / `to` (inclusive, `YYYY-MM-DD`) define the visible range for `usage.byDay` and `meta`. Weekly\n  aggregates in `usage.byWeek` still reflect full ISO weeks that overlap that range.\n- Optional `depotId`: restrict results to quotas for that region (depot) and count only driver-days\n  attributed to that depot.\n- Optional `unitIds`: further restrict to quotas that apply to those operational units\n  and count only driver-days in those units. Omit or leave empty for no unit filter.\n\n**Unit quotas vs depot-level `quota`**\n- When a quota row has **unit-level limits** (`depotQuota.unitQuotas` is non-empty), effective caps and\n  aggregate usage follow those **per-unit** rows. Inspect `usage.byUnit` for per-unit usage; the\n  optional top-level `depotQuota.quota` field is **not** the active limit for totals in that configuration\n  (it may still be present in the response for schema compatibility—**ignore it for enforcement** when\n  unit rows exist).\n- When there are **no** unit rows (`unitQuotas` is an empty array), the depot-level `depotQuota.quota`\n  applies to the whole depot bucket for that quota."
      summary: List absence quota usage
      tags:
      - Driver Absences
      security:
      - api_key: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetAbsenceQuotasRequest'
components:
  schemas:
    DayUsage:
      properties:
        limit:
          type: number
          format: double
          nullable: true
          description: '`null` = no numeric cap for that day.'
        used:
          type: number
          format: double
      required:
      - limit
      - used
      type: object
      description: 'One calendar day: actual daily `used` + effective `limit` (after exceptions, scope).'
    TypedApiErrorResponse_Invalidrequestschema_:
      properties:
        error:
          $ref: '#/components/schemas/TypedErrorResponse_Invalidrequestschema_'
      required:
      - error
      type: object
    TypedApiErrorResponse_PostDriverAbsencesErrorTypes_:
      properties:
        error:
          $ref: '#/components/schemas/TypedErrorResponse_PostDriverAbsencesErrorTypes_'
      required:
      - error
      type: object
    AbsenceQuotasMeta:
      properties:
        unitIds:
          items:
            type: string
          type: array
          description: Selected operational units; empty = no unit filter (depot / fallback rules).
        depotId:
          type: string
          nullable: true
        to:
          type: string
          description: Inclusive, `YYYY-MM-DD`.
        from:
          type: string
          description: Inclusive, `YYYY-MM-DD`.
      required:
      - unitIds
      - depotId
      - to
      - from
      type: object
    TypedErrorResponse_GetAbsencesV2ErrorTypes_:
      properties:
        details: {}
        message:
          type: string
        type:
          $ref: '#/components/schemas/GetAbsencesV2ErrorTypes'
      required:
      - message
      - type
      type: object
    Record_string.WeekUsage_:
      properties: {}
      additionalProperties:
        $ref: '#/components/schemas/WeekUsage'
      type: object
      description: Construct a type with a set of properties K of type T
    CalculationTimeFrame:
      type: string
      enum:
      - daily
      - weekly
    QuotaUsage:
      properties:
        byUnit:
          $ref: '#/components/schemas/Record_string.UnitQuotaUsage_'
          description: 'Present when `depotQuota.unitQuotas` is non-empty. Keys = `unitId`.

            Omitted when `unitQuotas` is `[]`.'
        byAbsenceType:
          $ref: '#/components/schemas/Record_string.Record_string._used-number___'
          description: 'Outer key: ISO date.'
        byWeek:
          $ref: '#/components/schemas/Record_string.WeekUsage_'
        byDay:
          $ref: '#/components/schemas/Record_string.DayUsage_'
      required:
      - byWeek
      - byDay
      type: object
    PostDriverAbsencesSuccess:
      properties: {}
      type: object
    UUID:
      type: string
      description: Stringified ID for a resource. Cannot exceed 36 characters.
    ScheduledPayoutType:
      enum:
      - remainingBalance
      - partialBalance
      type: string
    PayoutData:
      properties:
        type:
          $ref: '#/components/schemas/ScheduledPayoutType'
          description: Type of the payout
        effectiveDate:
          $ref: '#/components/schemas/StringifyDate'
          description: Effective date of the payout
        amount:
          type: number
          format: double
          description: Amount paid out on this date
      required:
      - type
      - effectiveDate
      - amount
      type: object
    TypedErrorResponse_Invalidrequestschema_:
      properties:
        details: {}
        message:
          type: string
        type:
          type: string
          enum:
          - Invalid request schema
          nullable: false
      required:
      - message
      - type
      type: object
    Pagination:
      properties:
        totalPages:
          $ref: '#/components/schemas/Integer'
          description: Total number of pages.
        nextPage:
          $ref: '#/components/schemas/PageNumber'
          description: Next page number (1-indexed). If undefined, there is no next page.
        currentPage:
          $ref: '#/components/schemas/PageNumber'
          description: Current page number (1-indexed).
      required:
      - totalPages
      - currentPage
      type: object
      description: 'Metadata about the pagination of a list of items. When a list of items is too large to be returned in a single response, it is split into multiple pages.

        This object informs you about the current page, the next page, and the total number of pages.'
    UnitQuotaDef:
      properties:
        quota:
          type: number
          format: double
        unitId:
          type: string
      required:
      - quota
      - unitId
      type: object
      description: Unit-level quota definition inside the API response (distinct from the preference-stored `UnitQuota`).
    SameDayMinutesFromMidnightTime:
      type: integer
      format: int32
      description: 'Same-calendar-day wall clock time, represented as minutes since midnight. For example, `0` is midnight (start of the day), `120` is 02:00 (2 hours after midnight), `180` is 02:30 (2.5 hours after midnight), etc.

        Valid range is 0–1439 (00:00 through 23:59). Cross-midnight ranges must use the next date rather than values at or above 1440.'
    PageNumber:
      $ref: '#/components/schemas/Integer'
      description: Page number (1-indexed). Defaults to 1.
      minimum: 1
    PostDriverAbsencesErrorTypes:
      type: string
      enum:
      - negativeBalanceViolation
      - absenceTypeCapExceeded
    GetAbsencesV2SuccessfulResponse:
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
          description: Pagination metadata
        absences:
          items:
            $ref: '#/components/schemas/DriverAbsenceV2'
          type: array
          description: Array of driver absences
      required:
      - pagination
      - absences
      type: object
    TypedApiErrorResponse_GetAbsencesV2ErrorTypes_:
      properties:
        error:
          $ref: '#/components/schemas/TypedErrorResponse_GetAbsencesV2ErrorTypes_'
      required:
      - error
      type: object
    BaseAbsenceTime:
      properties:
        endTimeNextDay:
          type: boolean
          deprecated: true
        startTimeNextDay:
          type: boolean
          deprecated: true
        endTime:
          $ref: '#/components/schemas/SameDayMinutesFromMidnightTime'
          description: 'The end time in minutes from midnight (on the end date).

            Without end time the absence is until the end of the operational day'
        endDate:
          $ref: '#/components/schemas/StringifyDate'
          description: The absence end date. absence can be without end date
        startTime:
          $ref: '#/components/schemas/SameDayMinutesFromMidnightTime'
          description: 'The start time in minutes from midnight (on the start date).

            Without start time the absence is form the start of the operational day'
        startDate:
          $ref: '#/components/schemas/StringifyDate'
          description: The absence start date
      required:
      - startDate
      type: object
    TimeOffBankBalance:
      properties:
        payoutDates:
          $ref: '#/components/schemas/Record_StringifyDate.PayoutData-Array_'
          description: Payout days mapped by date with amounts
        balances:
          items:
            $ref: '#/components/schemas/TimeOffBankHistoricalBalance'
          type: array
          description: Historical total balance changes (ascending by effectiveDate)
        remainingBalance:
          type: number
          format: double
          nullable: true
          description: Remaining = total - used - planned (null if total is null)
        plannedBalance:
          type: number
          format: double
          nullable: true
          description: Planned future usage after onDate
        usedBalance:
          type: number
          format: double
          nullable: true
          description: Used portion up to onDate (exclusive of planned)
        totalBalance:
          type: number
          format: double
          nullable: true
          description: Latest total balance effective on / before onDate
        unit:
          type: string
          enum:
          - days
          - hours
          description: Measurement unit (days or hours)
        bankName:
          type: string
          description: Display / normalized bank name
      required:
      - balances
      - remainingBalance
      - plannedBalance
      - usedBalance
      - totalBalance
      - unit
      - bankName
      type: object
    Record_StringifyDate.PayoutData-Array_:
      properties: {}
      additionalProperties:
        items:
          $ref: '#/components/schemas/PayoutData'
        type: array
      type: object
      description: Construct a type with a set of properties K of type T
    Record_string.Record_string._used-number___:
      properties: {}
      additionalProperties:
        $ref: '#/components/schemas/Record_string._used-number__'
      type: object
      description: Construct a type with a set of properties K of type T
    ResponseDepotQuota:
      properties:
        unitQuotas:
          items:
            $ref: '#/components/schemas/UnitQuotaDef'
          type: array
          description: '`[]` = limits come from `quota` on this depot only (no per-unit split).'
        quota:
          type: number
          format: double
          description: Default depot-level cap; omit if limits are only in `unitQuotas`.
        depotId:
          type: string
      required:
      - unitQuotas
      - depotId
      type: object
    PostDriverAbsencesErrorResponse:
      $ref: '#/components/schemas/TypedApiErrorResponse_PostDriverAbsencesErrorTypes_'
    Record_string._used-number__:
      properties: {}
      additionalProperties:
        properties:
          used:
            type: number
            format: double
        required:
        - used
        type: object
      type: object
      description: Construct a type with a set of properties K of type T
    DriverAbsenceV2:
      properties:
        note:
          type: string
          description: Optional note associated with the absence
        endTime:
          $ref: '#/components/schemas/SameDayMinutesFromMidnightTime'
          description: Minutes from midnight on endDate (0–1439). Omit for end of operational day.
        startTime:
          $ref: '#/components/schemas/SameDayMinutesFromMidnightTime'
          description: Minutes from midnight on startDate (0–1439). Omit for start of operational day.
        endDate:
          $ref: '#/components/schemas/StringifyDate'
        startDate:
          $ref: '#/components/schemas/StringifyDate'
          description: The start date of the absence (YYYY-MM-DD)
        absenceRequestId:
          $ref: '#/components/schemas/UUID'
          description: Links this absence to the originating absence request from the Driver App (if applicable)
        updatedOn:
          $ref: '#/components/schemas/StringifyDateTime'
          description: UTC ISO datetime when absence was last updated
        createdOn:
          $ref: '#/components/schemas/StringifyDateTime'
          description: UTC ISO datetime when absence was created
        driverId:
          type: string
          description: The driver ID this absence belongs to
        absenceCode:
          type: string
          description: The absence type code
        absenceId:
          type: string
          description: The unique identifier for this absence
      required:
      - startDate
      - driverId
      - absenceCode
      - absenceId
      type: object
      description: A single driver absence record in the V2 response format
    GetAbsenceQuotasRequest:
      properties:
        unitIds:
          items:
            type: string
          type: array
          description: Operational unit IDs to scope unit-level quota limits; omit or empty for depot-only behaviour.
        depotId:
          type: string
        to:
          $ref: '#/components/schemas/StringifyDate'
        from:
          $ref: '#/components/schemas/StringifyDate'
      required:
      - to
      - from
      type: object
    UnitQuotaUsage:
      properties:
        byAbsenceType:
          $ref: '#/components/schemas/Record_string.Record_string._used-number___'
        byWeek:
          $ref: '#/components/schemas/Record_string.WeekUsage_'
        byDay:
          $ref: '#/components/schemas/Record_string.DayUsage_'
      required:
      - byWeek
      - byDay
      type: object
    DriverAbsence:
      allOf:
      - $ref: '#/components/schemas/BaseAbsence'
      - properties:
          driver:
            $ref: '#/components/schemas/UUID'
            description: Which driver have this absence
        required:
        - driver
        type: object
    PostDriverAbsencesRequest:
      items:
        $ref: '#/components/schemas/DriverAbsence'
      type: array
    TimeOffBankHistoricalBalance:
      properties:
        totalBalance:
          type: number
          format: double
          nullable: true
          description: Total balance value that became effective on this date
        effectiveDate:
          $ref: '#/components/schemas/StringifyDate'
          description: Effective date for which this total balance applied
      required:
      - totalBalance
      - effectiveDate
      type: object
    TypedErrorResponse_PostDriverAbsencesErrorTypes_:
      properties:
        details: {}
        message:
          type: string
        type:
          $ref: '#/components/schemas/PostDriverAbsencesErrorTypes'
      required:
      - message
      - type
      type: object
    AbsenceQuotaWithUsage:
      properties:
        usage:
          $ref: '#/components/schemas/QuotaUsage'
        depotQuota:
          $ref: '#/components/schemas/ResponseDepotQuota'
        absenceTypes:
          items:
            type: string
          type: array
        calculationTimeFrame:
          $ref: '#/components/schemas/CalculationTimeFrame'
          description: "- `daily`: each calendar day is evaluated against that day's `byDay[date].limit`.\n- `weekly`: compare week totals in `byWeek[weekKey]` to `byWeek[weekKey].limit`.\n  `byDay` is still per-day `used` (not a repeated week total)."
        allowExceedQuota:
          type: boolean
          description: '`true` = exceeding effective limits is allowed (soft / warn). `false` = hard cap

            for clients that block or show errors.'
        hidden:
          type: boolean
          description: When `true`, hide by default in UIs; response may still include the row.
        quotaName:
          type: string
        quotaId:
          type: string
      required:
      - usage
      - depotQuota
      - absenceTypes
      - calculationTimeFrame
      - allowExceedQuota
      - hidden
      - quotaName
      - quotaId
      type: object
      description: 'Quota config from preferences (base depot + unit rows). Effective caps after exceptions

        and scope are in `usage.byDay` / `usage.byWeek` (and `usage.byUnit`).'
    TimeOffBalanceRecord:
      properties:
        unit:
          type: string
          enum:
          - days
          - hours
          description: Measurement unit (days or hours); defaults to bank configuration if not provided
        totalBalance:
          type: number
          format: double
          description: Total balance value
        effectiveDate:
          $ref: '#/components/schemas/StringifyDate'
          description: Effective date for this balance (YYYY-MM-DD format)
        bankName:
          type: string
          description: Bank identifier or display name
        driverId:
          $ref: '#/components/schemas/UUID'
          description: Driver identifier (UUID)
      required:
      - totalBalance
      - effectiveDate
      - bankName
      - driverId
      type: object
    Record_string.UnitQuotaUsage_:
      properties: {}
      additionalProperties:
        $ref: '#/components/schemas/UnitQuotaUsage'
      type: object
      description: Construct a type with a set of properties K of type T
    TimeOffBalances:
      properties:
        banks:
          items:
            $ref: '#/components/schemas/TimeOffBankBalance'
          t

# --- truncated at 32 KB (37 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/optibus/refs/heads/main/openapi/optibus-driver-absences-api-openapi.yml