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

# Retrieve a plan's resource



## OpenAPI

````yaml /openapi.yaml get /agencies/{agencyId}/plans/{planId}/resources/{resourceId}
openapi: 3.0.3
info:
  title: Kardinal ARO API
  version: 2.55.0
  description: This document specifies the REST API of Kardinal ARO v2.
  contact:
    url: https://kardinal.ai/
    email: contact@kardinal.ai
servers:
  - url: /api/v2
security:
  - access_token: []
tags:
  - name: Authenticate
    description: How to authenticate, and manage the access and refresh tokens.
  - name: Plan
    description: How to create, retrieve, update and delete plans.
  - name: Resource
    description: How to create, retrieve, update and delete resources in a plan.
  - name: Order
    description: How to create, retrieve, update and delete orders in a plan.
  - name: SimplePlan
    description: How to create a plan through the use of a simple plan.
paths:
  /agencies/{agencyId}/plans/{planId}/resources/{resourceId}:
    parameters:
      - $ref: '#/components/parameters/agencyId'
      - $ref: '#/components/parameters/planId'
      - $ref: '#/components/parameters/resourceId'
    get:
      tags:
        - Resource
      summary: Retrieve a plan's resource
      operationId: getPlanResource
      responses:
        '200':
          description: Resource response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvelopedResource'
        '401':
          $ref: '#/components/responses/NotAuthenticated'
        '403':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    agencyId:
      name: agencyId
      description: The agency id.
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/AgencyId'
    planId:
      name: planId
      description: The plan id.
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/RegexIdValidation'
    resourceId:
      name: resourceId
      description: The resource id.
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/RegexIdValidation'
  schemas:
    EnvelopedResource:
      type: object
      properties:
        item:
          $ref: '#/components/schemas/Resource'
        agencyId:
          $ref: '#/components/schemas/AgencyId'
        planId:
          $ref: '#/components/schemas/PlanId'
        planVersion:
          $ref: '#/components/schemas/PlanVersion'
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    AgencyId:
      description: The agency id.
      readOnly: true
      example: LND_Agency-42
      allOf:
        - $ref: '#/components/schemas/RegexPrefixedIdValidation'
    RegexIdValidation:
      type: string
      description: >-
        At least one character among those allowed: unaccented alpha-numeric
        characters, "-", ".", "_", "~", ":", "@", "!", "$", ",".
      pattern: ^[a-zA-Z0-9-._~:@!$,]+$
    Resource:
      type: object
      properties:
        id:
          description: Resource ids must be unique within a plan.
          allOf:
            - $ref: '#/components/schemas/RegexIdValidation'
        properties:
          $ref: '#/components/schemas/Properties'
          description: >-
            Free-form key-value pairs (strings only) with no impact on
            optimization, such as the driver's name. Returned unchanged in the
            plan and its solution.
        state:
          allOf:
            - $ref: '#/components/schemas/State'
          description: >-
            [TO_VALIDATE] Believed to describe the resource's manual-mode state
            (current mode and any forced stop/break assignments), used by the
            manual planning endpoints. Needs confirmation.
        cost:
          allOf:
            - $ref: '#/components/schemas/Cost'
          description: >-
            Defines a custom cost model for this resource (for example per
            kilometer, per capacity unit transported, or a fixed cost), used by
            the minimizeCosts objective. See the Cost schema below for every
            available cost component and its semantics.
        CO2EmissionCalculation:
          description: >
            Optional CO2 emission calculation parameters for this resource. The
            object is `Cost`-shaped.

            Typical fields:
              - `km`: emission per travelled kilometre (e.g. `costCoeff` in g/km);
              - `costPerCapacityPerTravelledKm`: per-capacity emission per travelled kilometre;
              - `costPerCapacityPerTravelledHour`: per-capacity emission per travel hour (travel duration only).
            When set, the resulting emissions are reported on the tour as
            `CO2Emission`.

            Takes precedence over any matching plan-level declaration.
          allOf:
            - $ref: '#/components/schemas/Cost'
          example:
            km:
              costCoeff: 0.55
            costPerCapacityPerTravelledKm:
              weight:
                costCoeff: 0.2
            costPerCapacityPerTravelledHour:
              weight:
                costCoeff: 0.05
        priority:
          description: 0 by default, can be negative.
          type: integer
          default: 0
        skills:
          type: array
          uniqueItems: true
          items:
            type: string
            allOf:
              - $ref: '#/components/schemas/RegexIdValidation'
          example:
            - forklift
            - truck
        preferredStopTags:
          type: array
          items:
            type: string
            allOf:
              - $ref: '#/components/schemas/RegexIdValidation'
          uniqueItems: true
          example:
            - access:parking33
            - capa:bat22
            - setup:france
        tags:
          type: array
          uniqueItems: true
          items:
            type: string
            allOf:
              - $ref: '#/components/schemas/RegexIdValidation'
          example:
            - trailer
        vehicleProfile:
          oneOf:
            - $ref: '#/components/schemas/VehicleProfileFly'
            - $ref: '#/components/schemas/VehicleProfilePedestrian'
            - $ref: '#/components/schemas/VehicleProfileBicycle'
            - $ref: '#/components/schemas/VehicleProfileScooter'
            - $ref: '#/components/schemas/VehicleProfileMotorbike'
            - $ref: '#/components/schemas/VehicleProfileCar'
            - $ref: '#/components/schemas/VehicleProfileTruck'
          description: >-
            Describes how this resource travels between stops: the mode of
            transport and its constraints. One of fly, pedestrian, bicycle,
            scooter, motorbike, car, or truck, each exposing different
            parameters (for example traffic sensitivity, weight, or hazardous
            goods restrictions).
        capacities:
          allOf:
            - $ref: '#/components/schemas/Capacities'
          description: >-
            The carrying capacity of the resource, as free-form key-value pairs
            (for example weight, volume, or temperature zones). The same
            capacity keys must also be declared on eligible stops for the
            algorithm to assign them to this resource.
        departure:
          allOf:
            - $ref: '#/components/schemas/Position'
          description: >-
            The starting location of the resource's route, typically a home or
            depot. If omitted, the algorithm assumes working time starts from
            the first visited stop.
        arrival:
          oneOf:
            - $ref: '#/components/schemas/Position'
            - $ref: '#/components/schemas/AtFirstPositionArrival'
          description: >-
            The ending location of the resource's route, typically a home or
            depot. If omitted, the algorithm assumes working time ends at the
            last visited stop.
        workingTimeWindow:
          allOf:
            - $ref: '#/components/schemas/TimeWindow'
          description: >-
            The time window during which the resource is available to work.
            Often used together with maxWorkingDuration.
        maxWorkingDuration:
          allOf:
            - $ref: '#/components/schemas/Duration'
        maxDistanceInKm:
          type: number
          description: >-
            The maximum distance the resource can travel, used to constrain its
            service area.
        maxInterStopDistanceInKm:
          description: |
            Maximum distance, in km, between two consecutive stops on a tour.
            Accepts either:
              - a scalar value — applied uniformly to every travel of the tour;
              - a structured object with independent bounds per segment (`firstTravel`, `interStop`, `lastTravel`); an absent key means no constraint on that segment.
          oneOf:
            - type: number
              description: Uniform bound, in km, applied to every travel of the tour.
              example: 50
            - $ref: '#/components/schemas/MaxInterStopDistanceInKmBounds'
        maxInterStopDuration:
          description: |
            Maximum duration between two consecutive stops on a tour.
            Accepts either:
              - a scalar value — applied uniformly to every travel of the tour;
              - a structured object with independent bounds per segment (`firstTravel`, `interStop`, `lastTravel`); an absent key means no constraint on that segment.
          oneOf:
            - $ref: '#/components/schemas/Duration'
            - $ref: '#/components/schemas/MaxInterStopDurationBounds'
        breaks:
          type: array
          items:
            $ref: '#/components/schemas/Break'
          description: >-
            The breaks (lunch, legal driving/working breaks, etc.) the resource
            must take during its working time window. Breaks count as working
            time unless stated otherwise.
        operationDurationPolicies:
          type: array
          items:
            $ref: '#/components/schemas/OperationDurationPolicy'
        travelTimeCoefficient:
          type: number
          format: float
          example: 1.05
          description: >-
            [TO_VALIDATE] Believed to be a multiplier applied to this resource's
            travel time calculations. Exact behavior needs confirmation.
        emptyThresholdByCapacity:
          description: >
            Thresholds for capacities below which a resource is considered
            "empty" for empty distance calculation.

            A resource is "empty" (kilometers traveled count as empty distance)
            when all capacities are at or below their threshold.
          allOf:
            - $ref: '#/components/schemas/Capacities'
          example:
            weight: 100
            volume: 50
        avoidEarlyLoadings:
          type: array
          description: >-
            Early loading declarations for this resource. Each entry identifies
            a stop tag and optional capacities used to compute the
            minimizeEarlyLoadings objective.
          items:
            $ref: '#/components/schemas/AvoidEarlyLoading'
      required:
        - id
        - vehicleProfile
        - workingTimeWindow
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    PlanId:
      description: The plan id.
      readOnly: true
      example: plan-AB
      allOf:
        - $ref: '#/components/schemas/RegexIdValidation'
    PlanVersion:
      type: integer
      description: The plan version.
      readOnly: true
      minimum: 1
      example: 42
    EnvelopedErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    RegexPrefixedIdValidation:
      type: string
      description: An id beginning with a prefix and an underscore.
      pattern: ^[A-Z]{3,6}_[a-zA-Z0-9-._~:@!$,]+$
    Properties:
      type: object
      additionalProperties:
        type: string
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    State:
      type: object
      properties:
        mode:
          $ref: '#/components/schemas/ResourceMode'
        assignments:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/AssignmentStop'
              - $ref: '#/components/schemas/AssignmentBegin'
              - $ref: '#/components/schemas/AssignmentBreak'
              - $ref: '#/components/schemas/AssignmentEnd'
          description: >-
            [TO_VALIDATE] Believed to list manually forced stop/break
            assignments for the resource. Needs confirmation.
      description: >-
        [TO_VALIDATE] Believed to describe a resource's manual-mode state. Needs
        confirmation.
    Cost:
      type: object
      properties:
        workedHours:
          $ref: '#/components/schemas/CostFloorsAndCoeffs'
        km:
          $ref: '#/components/schemas/CostFloorsAndCoeffs'
        using:
          type: number
          description: >-
            A one-off, fixed cost added once per resource that carries this cost
            object and is used in the plan (for example a flat dispatch or
            vehicle-assignment charge) — independent of distance, duration, or
            transported capacity, and contributed once per resource rather than
            per unit of any other quantity.
        costsByStopTag:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/CostFloorsAndCoeffs'
          description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
        costsByCapacity:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TaggedCostFloorsAndCoeffs'
          description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
        costPerCapacityPerTravelledKm:
          type: object
          description: >
            Contribution to cost proportional to travelled distance and
            transported capacity.

            For each capacity, the contribution is `costCoeff × distance(km) ×
            transportedCapacity`.

            Unit: cost per capacity unit per kilometre (e.g. €/tonne/km).

            Cumulable with `costPerCapacityPerTravelledHour` and with the other
            cost fields; the two travelled-cost maps are independent.
          additionalProperties:
            $ref: '#/components/schemas/CostFloorsAndCoeffs'
          example:
            weight:
              costCoeff: 0.2
            volume:
              costCoeff: 0.1
        costPerCapacityPerTravelledHour:
          type: object
          description: >
            Contribution to cost proportional to travel duration and transported
            capacity.

            For each capacity, the contribution is `costCoeff ×
            travelDuration(h) × transportedCapacity`.

            Unit: cost per capacity unit per hour (e.g. €/tonne/h).

            The `Travelled` qualifier means travel duration only — not total
            working time.

            Cumulable with `costPerCapacityPerTravelledKm` and with the other
            cost fields; the two travelled-cost maps are independent.
          additionalProperties:
            $ref: '#/components/schemas/CostFloorsAndCoeffs'
          example:
            weight:
              costCoeff: 0.05
      description: >-
        A composable cost model used by the minimizeCosts objective — every
        field set on this object (`workedHours`, `km`, `using`, and the
        per-stop-tag / per-capacity / per-travelled maps) contributes its own
        component, and the components of every populated field are summed to
        produce the total, rather than being mutually exclusive alternatives.
    VehicleProfileFly:
      type: object
      properties:
        type:
          type: string
          enum:
            - fly
          description: 'Discriminator value: "fly".'
        kmph:
          type: number
          description: >-
            The constant speed in kilometers per hour used for crow-fly travel
            time calculations.
      required:
        - type
      description: >-
        A crow-fly (straight-line) mode of transportation, useful for quick
        testing since it is computed extremely fast.
    VehicleProfilePedestrian:
      type: object
      properties:
        type:
          type: string
          enum:
            - pedestrian
          description: 'Discriminator value: "pedestrian".'
        avoidFerry:
          type: boolean
          description: When true, avoids ferry crossings when calculating routes.
        avoidSeasonalClosure:
          type: boolean
          description: When true, avoids roads that are seasonally closed.
        avoidDirtRoad:
          type: boolean
          description: When true, avoids unpaved or dirt roads.
        excludedCountries:
          $ref: '#/components/schemas/CountryCodes'
          description: The list of countries to exclude from calculated routes.
      required:
        - type
      description: >-
        A walking "driver" profile. Pedestrians are unaffected by traffic
        variations.
    VehicleProfileBicycle:
      type: object
      properties:
        type:
          type: string
          enum:
            - bicycle
          description: 'Discriminator value: "bicycle".'
        avoidFerry:
          type: boolean
          description: When true, avoids ferry crossings when calculating routes.
        avoidSeasonalClosure:
          type: boolean
          description: When true, avoids roads that are seasonally closed.
        avoidTunnel:
          type: boolean
          description: When true, avoids tunnels.
        avoidDirtRoad:
          type: boolean
          description: When true, avoids unpaved or dirt roads.
        excludedCountries:
          $ref: '#/components/schemas/CountryCodes'
          description: The list of countries to exclude from calculated routes.
      required:
        - type
      description: A cyclist profile. Unaffected by traffic variations.
    VehicleProfileScooter:
      type: object
      properties:
        type:
          type: string
          enum:
            - scooter
          description: 'Discriminator value: "scooter".'
        avoidFerry:
          type: boolean
          description: When true, avoids ferry crossings when calculating routes.
        avoidSeasonalClosure:
          type: boolean
          description: When true, avoids roads that are seasonally closed.
        avoidCarShuttleTrain:
          type: boolean
          description: When true, avoids routes requiring a car shuttle train.
        avoidTunnel:
          type: boolean
          description: When true, avoids tunnels.
        avoidDirtRoad:
          type: boolean
          description: When true, avoids unpaved or dirt roads.
        excludedCountries:
          $ref: '#/components/schemas/CountryCodes'
          description: The list of countries to exclude from calculated routes.
        speedCap:
          type: number
          description: >-
            Caps the vehicle's maximum speed used in travel time calculations,
            in km/h.
      required:
        - type
      description: >-
        A 50cc to 125cc motorized profile, with limited access to certain
        highways and high-speed roads. Unaffected by traffic variations.
    VehicleProfileMotorbike:
      type: object
      properties:
        type:
          type: string
          enum:
            - motorbike
          description: 'Discriminator value: "motorbike".'
        avoidFerry:
          type: boolean
          description: When true, avoids ferry crossings when calculating routes.
        avoidSeasonalClosure:
          type: boolean
          description: When true, avoids roads that are seasonally closed.
        avoidControlledAccessHighway:
          type: boolean
          description: When true, avoids controlled-access highways (e.g. motorways).
        avoidCarShuttleTrain:
          type: boolean
          description: When true, avoids routes requiring a car shuttle train.
        avoidTunnel:
          type: boolean
          description: When true, avoids tunnels.
        avoidDirtRoad:
          type: boolean
          description: When true, avoids unpaved or dirt roads.
        excludedCountries:
          $ref: '#/components/schemas/CountryCodes'
          description: The list of countries to exclude from calculated routes.
        speedCap:
          type: number
          description: >-
            Caps the vehicle's maximum speed used in travel time calculations,
            in km/h.
      required:
        - type
      description: >-
        A motorized profile for vehicles over 125cc, unrestricted in terms of
        roads. Unaffected by traffic variations.
    VehicleProfileCar:
      type: object
      properties:
        type:
          type: string
          enum:
            - car
          description: 'Discriminator value: "car".'
        withTraffic:
          type: boolean
          description: >-
            Enables the separately billed predictive traffic feature, which
            accounts for traffic variations by time slot and road segment so
            that tours remain resilient to fluctuations and road events beyond
            just average or live travel times.
        avoidTollRoad:
          type: boolean
          description: When true, treats toll roads as restricted.
        avoidFerry:
          type: boolean
          description: When true, avoids ferry crossings when calculating routes.
        avoidSeasonalClosure:
          type: boolean
          description: When true, avoids roads that are seasonally closed.
        avoidControlledAccessHighway:
          type: boolean
          description: When true, avoids controlled-access highways (e.g. motorways).
        avoidCarShuttleTrain:
          type: boolean
          description: When true, avoids routes requiring a car shuttle train.
        avoidTunnel:
          type: boolean
          description: When true, avoids tunnels.
        avoidDirtRoad:
          type: boolean
          description: When true, avoids unpaved or dirt roads.
        avoidUTurns:
          type: boolean
          description: When true, avoids U-turns when calculating routes.
        excludedCountries:
          $ref: '#/components/schemas/CountryCodes'
          description: The list of countries to exclude from calculated routes.
        speedCap:
          type: number
          description: >-
            Caps the vehicle's maximum speed used in travel time calculations,
            in km/h.
      required:
        - type
      description: A light-weight vehicle profile. Affected by traffic variations.
    VehicleProfileTruck:
      type: object
      properties:
        type:
          type: string
          enum:
            - truck
          description: 'Discriminator value: "truck".'
        grossWeight:
          type: number
          description: >-
            The weight of the vehicle while loaded, used to calculate impacts on
            road restrictions and travel times.
        withTraffic:
          type: boolean
          description: >-
            Enables the separately billed predictive traffic feature, which
            accounts for traffic variations by time slot and road segment so
            that tours remain resilient to fluctuations and road events beyond
            just average or live travel times.
        avoidTollRoad:
          type: boolean
          description: When true, treats toll roads as restricted.
        avoidFerry:
          type: boolean
          description: When true, avoids ferry crossings when calculating routes.
        avoidSeasonalClosure:
          type: boolean
          description: When true, avoids roads that are seasonally closed.
        avoidControlledAccessHighway:
          type: boolean
          description: When true, avoids controlled-access highways (e.g. motorways).
        avoidCarShuttleTrain:
          type: boolean
          description: When true, avoids routes requiring a car shuttle train.
        avoidTunnel:
          type: boolean
          description: When true, avoids tunnels.
        avoidDirtRoad:
          type: boolean
          description: When true, avoids unpaved or dirt roads.
        avoidUTurns:
          type: boolean
          description: When true, avoids U-turns when calculating routes.
        shippedHazardousGoods:
          type: array
          items:
            $ref: '#/components/schemas/ShippedHazardousGood'
          example:
            - explosive
            - gas
            - flammable
          description: >-
            The list of hazardous goods restrictions carried by the vehicle (for
            example explosive, gas, flammable, combustible, organic, poison,
            radioactive, corrosive, poisonousInhalation, harmfulToWater, other),
            used to respect road transport restrictions.
        excludedCountries:
          $ref: '#/components/schemas/CountryCodes'
          description: The list of countries to exclude from calculated routes.
        height:
          type: number
          description: >-
            The vehicle's height in meters, used to respect road height
            restrictions.
        width:
          type: number
          description: >-
            The vehicle's width in meters, used to respect road width
            restrictions.
        length:
          type: number
          description: >-
            The vehicle's length in meters, used to respect road length
            restrictions.
        tunnelCategory:
          $ref: '#/components/schemas/TunnelCategory'
          description: >-
            The vehicle's tunnel restriction category (relevant for hazardous
            goods transport), used to respect tunnel access restrictions.
        speedCap:
          type: number
          description: >-
            Caps the vehicle's maximum speed used in travel time calculations,
            in km/h.
      required:
        - type
      description: >-
        A heavy-weight vehicle profile. Affected by both traffic variations and
        road restrictions (weight, height, hazardous goods, etc.).
    Capacities:
      type: object
      additionalProperties:
        type: number
      example:
        volume: 9.5
        weight: 2200
        nbPackages: 23
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    Position:
      type: object
      properties:
        lon:
          type: number
          minimum: -180
          maximum: 180
          description: Longitude coordinate.
        lat:
          type: number
          minimum: -90
          maximum: 90
          description: Latitude coordinate.
      required:
        - lon
        - lat
      example:
        lon: 2.3269331
        lat: 48.8812658
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    AtFirstPositionArrival:
      type: string
      description: The resource must go back to it's Tour first position.
      enum:
        - atFirstPosition
    TimeWindow:
      type: object
      properties:
        begin:
          $ref: '#/components/schemas/DateTime'
        end:
          $ref: '#/components/schemas/DateTime'
      required:
        - begin
        - end
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    Duration:
      type: string
      description: A period of time, expressed in the ISO8601 **duration** format.
      pattern: ^P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?$
      example: PT4M
    MaxInterStopDistanceInKmBounds:
      type: object
      description: >
        Per-segment maximum distance, in km, between two consecutive stops on a
        tour.

        Each key is independent; an absent key means no constraint on that
        segment.
      properties:
        firstTravel:
          description: >-
            Maximum distance, in km, between the resource's departure and the
            first stop.
          type: number
        interStop:
          description: >-
            Maximum distance, in km, between two consecutive intermediate stops
            (excluding the first and last travels).
          type: number
        lastTravel:
          description: >-
            Maximum distance, in km, between the last stop and the resource's
            arrival.
          type: number
      example:
        firstTravel: 10
        interStop: 25
        lastTravel: 15
    MaxInterStopDurationBounds:
      type: object
      description: >
        Per-segment maximum duration between two consecutive stops on a tour.

        Each key is independent; an absent key means no constraint on that
        segment.
      properties:
        firstTravel:
          description: >-
            Maximum duration between the resource's departure and the first
            stop.
          allOf:
            - $ref: '#/components/schemas/Duration'
        interStop:
          description: >-
            Maximum duration between two consecutive intermediate stops
            (excluding the first and last travels).
          allOf:
            - $ref: '#/components/schemas/Duration'
        lastTravel:
          description: Maximum duration between the last stop and the resource's arrival.
          allOf:
            - $ref: '#/components/schemas/Duration'
      example:
        firstTravel: PT15M
        interStop: PT30M
        lastTravel: PT20M
    Break:
      oneOf:
        - $ref: '#/components/schemas/TimeWindowBreak'
        - $ref: '#/components/schemas/TravelDurationSlidingBreak'
        - $ref: '#/components/schemas/WorkingDurationSlidingBreak'
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    OperationDurationPolicy:
      type: object
      description: >-
        Policy to indicate which operation duration must not be taken into
        account.
      properties:
        policy:
          type: string
          enum:
            - withoutFirstOperationDuration
            - withoutOperationDurations
          description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
        stopTags:
          type: array
          items:
            type: string
            allOf:
              - $ref: '#/components/schemas/RegexIdValidation'
          uniqueItems: true
          example:
            - access:parking33
            - capa:bat22
            - setup:france
      required:
        - policy
    AvoidEarlyLoading:
      type: object
      description: >-
        Declares a stop tag and optional capacities for early loading
        computation.
      properties:
        stopTag:
          type: string
          description: >-
            The stop tag identifying stops where early loading should be
            avoided.
          allOf:
            - $ref: '#/components/schemas/RegexIdValidation'
        capacities:
          type: array
          description: >-
            Capacities to consider. If empty or omitted, all capacities are
            considered.
          items:
            type: string
          uniqueItems: true
      required:
        - stopTag
      example:
        stopTag: depot1
        capacities:
          - weight
          - volume
    Error:
      type: object
      readOnly: true
      properties:
        code:
          type: string
          description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
        message:
          type: string
          description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
        properties:
          $ref: '#/components/schemas/ErrorProperties'
      required:
        - message
        - code
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    ResourceMode:
      type: string
      enum:
        - free
        - fixed
      default: free
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    AssignmentStop:
      description: >-
        The beginTime is set to arrivalTime if not setted. If the stopId is the
        id of an alternative, arrivalTime, beginTime, and departureTime cannot
        be set and the chosen alternative stop is optimized by the solver.
      type: object
      properties:
        type:
          type: string
          enum:
            - stop
          description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
        status:
          $ref: '#/components/schemas/AssignmentStatus'
        stopId:
          $ref: '#/components/schemas/RegexIdValidation'
        arrivalTime:
          $ref: '#/components/schemas/DateTime'
        beginTime:
          $ref: '#/components/schemas/DateTime'
        departureTime:
          $ref: '#/components/schemas/DateTime'
      required:
        - stopId
    AssignmentBegin:
      type: object
      properties:
        type:
          type: string
          enum:
            - begin
          description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
        status:
          $ref: '#/components/schemas/AssignmentStatus'
        departureTime:
          $ref: '#/components/schemas/DateTime'
      required:
        - type
        - departureTime
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    AssignmentBreak:
      type: object
      properties:
        type:
          type: string
          enum:
            - break
          description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
        status:
          $ref: '#/components/schemas/AssignmentStatus'
        arrivalTime:
          $ref: '#/components/schemas/DateTime'
        departureTime:
          $ref: '#/components/schemas/DateTime'
      required:
        - type
        - arrivalTime
        - departureTime
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    AssignmentEnd:
      type: object
      properties:
        type:
          type: string
          enum:
            - end
          description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
        status:
          $ref: '#/components/schemas/AssignmentStatus'
        arrivalTime:
          $ref: '#/components/schemas/DateTime'
      required:
        - type
        - arrivalTime
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    CostFloorsAndCoeffs:
      type: object
      description: >-
        Cost floors and coefficients. A cost cannot be empty. An overcost cannot
        be set if there is no cost, and the overcostFloor must be greater than
        costFloor.
      properties:
        constantCost:
          type: number
          description: >-
            A one-off cost added once whenever this cost component applies,
            independent of any measured quantity (distance, duration, or
            capacity) — use it for a flat charge that doesn't scale with usage.
        costFloor:
          type: number
          description: >-
            The quantity (distance, duration, or capacity — whatever this object
            is scoped to) below which no cost accrues from this component.
            `costCoeff` applies only to the portion of the quantity above this
            floor.
        costCoeff:
          type: number
          description: >-
            The rate charged per unit of quantity above `costFloor` (for example
            cost per km, per hour, or per capacity unit) — the linear component
            of this cost.
        overcostFloor:
          type: number
          description: >-
            A second, higher quantity threshold at which the `overcostCoeff`
            rate starts applying instead of `costCoeff`, for the portion of the
            quantity above this threshold (for example an overtime-style tariff
            beyond a normal-usage allowance). Must be strictly greater than
            `costFloor`, and can only be set alongside `overcostCoeff`.
        overcostCoeff:
          type: number
          description: >-
            The rate charged per unit of quantity above `overcostFloor` — the
            higher, second-tier rate for usage beyond the range already covered
            by `costFloor`/`costCoeff`. Requires `overcostFloor` to also be set.
    TaggedCostFloorsAndCoeffs:
      type: object
      allOf:
        - $ref: '#/components/schemas/CostFloorsAndCoeffs'
      properties:
        stopTags:
          type: array
          items:
            type: string
            allOf:
              - $ref: '#/components/schemas/RegexIdValidation'
          uniqueItems: true
          example:
            - warehouse
            - stop
    CountryCodes:
      type: array
      items:
        $ref: '#/components/schemas/CountryCode'
      example:
        - Switzerland
        - BE
        - ITA
    ShippedHazardousGood:
      type: string
      enum:
        - explosive
        - gas
        - flammable
        - combustible
        - organic
        - poison
        - radioactive
        - corrosive
        - poisonousInhalation
        - harmfulToWater
        - other
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    TunnelCategory:
      type: string
      enum:
        - B
        - C
        - D
        - E
      description: Tunnel category restriction for truck routing (ADR tunnel categories)
    DateTime:
      type: string
      description: >-
        A full calendar date time, expressed in the ISO8601 **date** format:
        YYYY-MM-DDThh:mm:ssZ.
      example: '2019-11-15T12:34:56Z'
    TimeWindowBreak:
      type: object
      description: A required break of a given duration in a given time window.
      properties:
        type:
          type: string
          enum:
            - timeWindowBreak
          description: >-
            Discriminator value: "timeWindowBreak". A standard break (e.g.
            lunch) defined by a fixed time frame.
        duration:
          allOf:
            - $ref: '#/components/schemas/Duration'
          description: The duration (ISO 8601) of the break.
        timeWindow:
          allOf:
            - $ref: '#/components/schemas/TimeWindow'
          description: >-
            The time frame within which the break must be taken. Acts similarly
            to a workingTimeWindow combined with a maxWorkingDuration.
      required:
        - duration
        - timeWindow
    TravelDurationSlidingBreak:
      type: object
      description: Limitation rule on max travel duration without any break.
      properties:
        type:
          type: string
          enum:
            - travelDurationSlidingBreak
          description: >-
            Discriminator value: "travelDurationSlidingBreak". Represents a
            break tied to driving time, such as a legal break required after a
            maximum amount of driving (for example, a 10-minute break every 4
            hours of driving).
        minBreakDuration:
          allOf:
            - $ref: '#/components/schemas/Duration'
          description: The minimum duration of the break.
        maxInterBreakDuration:
          allOf:
            - $ref: '#/components/schemas/Duration'
          description: The maximum duration of travel allowed between two breaks.
      required:
        - type
        - minBreakDuration
        - maxInterBreakDuration
    WorkingDurationSlidingBreak:
      type: object
      description: Limitation rule on max working duration without any break.
      properties:
        type:
          type: string
          enum:
            - workingDurationSlidingBreak
          description: >-
            Discriminator value: "workDurationSlidingBreak". Represents a break
            tied to working time, such as a legal break required after a maximum
            amount of work (for example, a 10-minute break every 6 hours of
            work).
        minBreakDuration:
          allOf:
            - $ref: '#/components/schemas/Duration'
          description: The minimum duration of the break.
        maxInterBreakDuration:
          allOf:
            - $ref: '#/components/schemas/Duration'
          description: The maximum duration of work allowed between two breaks.
      required:
        - type
        - minBreakDuration
        - maxInterBreakDuration
    ErrorProperties:
      type: object
      additionalProperties:
        type: string
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    AssignmentStatus:
      type: string
      enum:
        - fixed
        - assigned
      default: fixed
      description: '[TO_VALIDATE] Description pending review by a Kardinal engineer.'
    CountryCode:
      type: string
      description: A country standard name or Alpha-2 code or Alpha-3 code.
  responses:
    NotAuthenticated:
      description: The caller is not authenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnvelopedErrors'
    Unauthorized:
      description: The caller is not authorized to perform this action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnvelopedErrors'
    NotFound:
      description: The specified resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnvelopedErrors'
    InternalServerError:
      description: An internal server error has occurred.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnvelopedErrors'
  securitySchemes:
    access_token:
      type: http
      scheme: bearer
      bearerFormat: JWT

````