openapi: 3.1.0
info:
  title: Aero-Plan Provider API
  description: 'The Aero-Plan Provider API enables air ambulance and medical transport
    providers to seamlessly integrate Aero-Plan into their existing platforms and workflows.
    Receive real-time quote requests, submit competitive proposals, and manage the
    full lifecycle of medical transport — from initial quoting through confirmation
    — all through a single, unified API.


    ## Authentication


    This API requires OAuth 2.0 authentication. You must obtain an access token before
    making requests to this API.


    To authenticate:

    1. Register your organization to obtain client credentials

    2. Use the OAuth 2.0 client credentials flow to obtain an access token

    3. Include the access token in the Authorization header of your requests: `Authorization:
    Bearer {access_token}`


    Contact team@aero-plan.com to register your organization and receive your client
    credentials.

    '
  version: 1.0.0
servers:
- url: https://api.aero-plan.com/providers
  description: Production server
- url: https://sandbox-api.aero-plan.com/providers
  description: Sandbox server
tags:
- name: Requests
  description: Browse and view quote requests
- name: Quotes
  description: Create and manage quotes
- name: Webhooks
  description: Register webhook endpoints to receive real-time notifications about
    events relevant to your organization. Contact team@aero-plan.com to configure
    your webhook URL and secret.
paths:
  /v1/requests:
    get:
      tags:
      - Requests
      summary: List available quote requests
      description: 'Retrieve a paginated list of quote requests available to your
        organization. Returns summary information only — patient medical details
        are not included in the list view.


        Use the detail endpoint to access full patient information for a specific request.

        '
      operationId: listQuoteRequests
      security:
      - oauth2:
        - requests:read
      parameters:
      - name: page
        in: query
        description: Page number for pagination (1-based)
        schema:
          type: integer
          minimum: 1
          default: 1
        example: 1
      - name: per_page
        in: query
        description: Number of results per page (max 100)
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 25
        example: 25
      - name: status
        in: query
        description: Filter by request status
        schema:
          type: string
          enum:
          - active
          - accepted
          - confirmed
          - paid
          - canceled
        example: active
      - name: service_type
        in: query
        description: Filter by service type
        schema:
          type: string
          enum:
          - aa
          - cme
        example: aa
      responses:
        '200':
          description: Successful response with list of quote requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '../shared/schemas/QuoteRequestResponse.yaml'
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      per_page:
                        type: integer
                        example: 25
                      total_pages:
                        type: integer
                        example: 4
                      total_count:
                        type: integer
                        example: 89
        '401':
          description: Authentication failed
        '403':
          description: Insufficient permissions
  /v1/requests/{request_id}:
    get:
      tags:
      - Requests
      summary: Get quote request details
      description: 'Retrieve full details of a specific quote request, including patient
        medical information required to prepare a quote.


        This endpoint returns sensitive patient data. Access is logged and subject
        to audit.

        '
      operationId: getQuoteRequest
      security:
      - oauth2:
        - requests:read
      parameters:
      - name: request_id
        in: path
        required: true
        description: Unique identifier of the quote request
        schema:
          type: integer
        example: 12345
      responses:
        '200':
          description: Successful response with full quote request details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderQuoteRequestDetailResponse'
        '401':
          description: Authentication failed
        '403':
          description: Insufficient permissions
        '404':
          description: Quote request not found or not available to your organization
  /v1/quotes:
    post:
      tags:
      - Quotes
      summary: Create a quote
      description: 'Submit a new quote for a quote request. The request must be in
        an active state to accept new quotes.

        '
      operationId: createQuote
      security:
      - oauth2:
        - quotes:write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateQuoteInput'
            example:
              request_id: 12345
              price: 45000.00
              currency: EUR
              earliest_patient_pickup_at: '2024-10-30T14:00:00Z'
              time_to_reach_patient_minutes: 45
              number_of_legs: 1
              aircraft: Learjet 45
              flight_time_estimate_minutes: 180
              ground_transport: true
              quote_valid_until: '2024-10-31T11:15:00Z'
              suggested_eta: At
              suggested_eta_at: '2024-10-30T16:30:00Z'
              suggested_etd: Morning
              suggested_route:
              - from: JFK
                to: LAX
              comments: Immediate availability. Board-certified emergency physician on team.
      responses:
        '201':
          description: Quote created successfully
          content:
            application/json:
              schema:
                $ref: '../shared/schemas/QuoteDetail.yaml'
        '400':
          description: Invalid request - validation errors
          content:
            application/json:
              schema:
                $ref: '../shared/schemas/ErrorResponse.yaml'
        '401':
          description: Authentication failed
        '403':
          description: Insufficient permissions - requires `quotes:write` scope
        '404':
          description: Quote request not found
        '409':
          description: 'Conflict - request is not in an active state'
          content:
            application/json:
              schema:
                $ref: '../shared/schemas/ErrorResponse.yaml'
  /v1/quotes/{quote_id}:
    get:
      tags:
      - Quotes
      summary: Get quote details
      description: Retrieve detailed information about a specific quote submitted
        by your organization.
      operationId: getQuote
      security:
      - oauth2:
        - quotes:read
      parameters:
      - name: quote_id
        in: path
        required: true
        description: Unique identifier of the quote
        schema:
          type: string
        example: 550e8400-e29b-41d4-a716-446655440001
      responses:
        '200':
          description: Successful response with full quote details
          content:
            application/json:
              schema:
                $ref: '../shared/schemas/QuoteDetail.yaml'
        '401':
          description: Authentication failed
        '403':
          description: Insufficient permissions
        '404':
          description: Quote not found
    patch:
      tags:
      - Quotes
      summary: Update a quote
      description: 'Update an existing quote. Only quotes in ACTIVE or PENDING_UPDATE
        status can be updated.


        All fields are optional — only provided fields will be updated.

        '
      operationId: updateQuote
      security:
      - oauth2:
        - quotes:write
      parameters:
      - name: quote_id
        in: path
        required: true
        description: Unique identifier of the quote to update
        schema:
          type: string
        example: 550e8400-e29b-41d4-a716-446655440001
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateQuoteInput'
            example:
              price: 42000.00
              earliest_patient_pickup_at: '2024-10-30T13:30:00Z'
              time_to_reach_patient_minutes: 30
              quote_valid_until: '2024-10-31T12:00:00Z'
      responses:
        '200':
          description: Quote updated successfully
          content:
            application/json:
              schema:
                $ref: '../shared/schemas/QuoteDetail.yaml'
        '400':
          description: Invalid request - validation errors
          content:
            application/json:
              schema:
                $ref: '../shared/schemas/ErrorResponse.yaml'
        '401':
          description: Authentication failed
        '403':
          description: Insufficient permissions
        '404':
          description: Quote not found
        '409':
          description: Quote cannot be updated (not in ACTIVE or PENDING_UPDATE status)
          content:
            application/json:
              schema:
                $ref: '../shared/schemas/ErrorResponse.yaml'
    delete:
      tags:
      - Quotes
      summary: Withdraw a quote
      description: 'Withdraw (cancel) a previously submitted quote. This action is
        irreversible.


        Only quotes in ACTIVE or PENDING_UPDATE status can be withdrawn.

        '
      operationId: deleteQuote
      security:
      - oauth2:
        - quotes:write
      parameters:
      - name: quote_id
        in: path
        required: true
        description: Unique identifier of the quote to withdraw
        schema:
          type: string
        example: 550e8400-e29b-41d4-a716-446655440001
      responses:
        '200':
          description: Quote withdrawn successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier of the withdrawn quote
                    example: 550e8400-e29b-41d4-a716-446655440001
                  status:
                    type: string
                    const: WITHDRAWN
                    description: New status after withdrawal
                  withdrawn_at:
                    type: string
                    format: date-time
                    description: Timestamp when the quote was withdrawn
                    example: '2024-10-30T13:00:00Z'
        '401':
          description: Authentication failed
        '403':
          description: Insufficient permissions
        '404':
          description: Quote not found
        '409':
          description: Quote cannot be withdrawn (not in ACTIVE or PENDING_UPDATE status)
          content:
            application/json:
              schema:
                $ref: '../shared/schemas/ErrorResponse.yaml'
  /v1/quotes/{quote_id}/confirm:
    post:
      tags:
      - Quotes
      summary: Confirm an accepted quote
      description: 'Confirm that your organization will fulfill an accepted quote.
        This finalizes the transport arrangement with confirmed logistics details.


        Only quotes in ACCEPTED status can be confirmed. The confirmation includes
        verified departure/arrival times, route, and aircraft details.

        '
      operationId: confirmQuote
      security:
      - oauth2:
        - quotes:write
      parameters:
      - name: quote_id
        in: path
        required: true
        description: Unique identifier of the accepted quote to confirm
        schema:
          type: string
        example: 550e8400-e29b-41d4-a716-446655440001
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmQuoteInput'
            example:
              confirmed_etd_at: '2024-10-30T12:00:00Z'
              confirmed_eta: Morning
              confirmed_eta_at: '2024-10-30T16:30:00Z'
              confirmed_route:
              - from: JFK
                to: LAX
              aircraft: Learjet 45
              flight_time_estimate_minutes: 180
              number_of_legs: 1
              quote_valid_until: '2024-10-31T11:15:00Z'
              tail_number: N123AB
              comments: Aircraft prepped and medical team assembled.
      responses:
        '201':
          description: Quote confirmed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmedQuoteResponse'
        '400':
          description: Invalid request - validation errors
          content:
            application/json:
              schema:
                $ref: '../shared/schemas/ErrorResponse.yaml'
        '401':
          description: Authentication failed
        '403':
          description: Insufficient permissions
        '404':
          description: Quote not found
        '409':
          description: Quote is not in ACCEPTED status or has already been confirmed
          content:
            application/json:
              schema:
                $ref: '../shared/schemas/ErrorResponse.yaml'
    get:
      tags:
      - Quotes
      summary: Get confirmation details
      description: Retrieve details of a confirmed quote.
      operationId: getConfirmedQuote
      security:
      - oauth2:
        - quotes:read
      parameters:
      - name: quote_id
        in: path
        required: true
        description: Unique identifier of the confirmed quote
        schema:
          type: string
        example: 550e8400-e29b-41d4-a716-446655440001
      responses:
        '200':
          description: Successful response with confirmation details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmedQuoteResponse'
        '401':
          description: Authentication failed
        '403':
          description: Insufficient permissions
        '404':
          description: Confirmation not found
webhooks:
  quoteRequestNew:
    post:
      summary: New Quote Request Available
      description: Triggered when a new quote request matching your organization's
        service area and capabilities becomes available.
      operationId: webhookQuoteRequestNew
      tags:
      - Webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event:
                  type: string
                  const: quote_request.new
                  description: Event type identifier
                request_id:
                  type: integer
                  description: The new quote request ID
                timestamp:
                  type: string
                  format: date-time
                  description: When the event occurred
            example:
              event: quote_request.new
              request_id: 12345
              timestamp: '2024-10-30T10:30:00Z'
      responses:
        '200':
          description: Webhook received successfully
        '400':
          description: Bad request - invalid payload
        '401':
          description: Unauthorized - invalid webhook signature
        '500':
          description: Internal server error
  quoteRequestUpdated:
    post:
      summary: Quote Request Updated
      description: Triggered when a quote request you have quoted on is updated by
        the customer (e.g., changed transfer details, updated patient info).
        Your existing quote will be moved to PENDING_UPDATE status.
      operationId: webhookQuoteRequestUpdated
      tags:
      - Webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event:
                  type: string
                  const: quote_request.updated
                  description: Event type identifier
                request_id:
                  type: integer
                  description: The updated quote request ID
                timestamp:
                  type: string
                  format: date-time
                  description: When the event occurred
            example:
              event: quote_request.updated
              request_id: 12345
              timestamp: '2024-10-30T12:00:00Z'
      responses:
        '200':
          description: Webhook received successfully
        '400':
          description: Bad request - invalid payload
        '401':
          description: Unauthorized - invalid webhook signature
        '500':
          description: Internal server error
  quoteStatusChanged:
    post:
      summary: Quote Status Changed
      description: Triggered when the status of your quote changes — e.g., accepted
        or rejected by the customer.
      operationId: webhookQuoteStatusChanged
      tags:
      - Webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event:
                  type: string
                  const: quote.status_changed
                  description: Event type identifier
                request_id:
                  type: integer
                  description: The quote request this quote belongs to
                quote_id:
                  type: string
                  description: The quote whose status changed
                new_status:
                  type: string
                  enum:
                  - ACTIVE
                  - WITHDRAWN
                  - ACCEPTED
                  - REJECTED
                  - CANCELLED
                  - CONFIRMED
                  - PENDING_UPDATE
                  description: The new status of the quote
                  example: ACCEPTED
                timestamp:
                  type: string
                  format: date-time
                  description: When the event occurred
            example:
              event: quote.status_changed
              request_id: 12345
              quote_id: 550e8400-e29b-41d4-a716-446655440001
              new_status: ACCEPTED
              timestamp: '2024-10-30T15:00:00Z'
      responses:
        '200':
          description: Webhook received successfully
        '400':
          description: Bad request - invalid payload
        '401':
          description: Unauthorized - invalid webhook signature
        '500':
          description: Internal server error
components:
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth 2.0 authentication is required to access this API
      flows:
        clientCredentials:
          tokenUrl: https://api.aero-plan.com/providers/oauth/token
          scopes:
            requests:read: Browse and view quote requests
            quotes:write: Create, update, and withdraw quotes
            quotes:read: Read own quotes and confirmations
  schemas:
    CreateQuoteInput:
      type: object
      required:
      - request_id
      - price
      - earliest_patient_pickup_at
      - time_to_reach_patient_minutes
      - number_of_legs
      - aircraft
      - flight_time_estimate_minutes
      - quote_valid_until
      properties:
        request_id:
          type: integer
          description: ID of the quote request to quote on
          example: 12345
        price:
          type: number
          format: float
          minimum: 99
          description: Total price for the service in the specified currency
          example: 45000.00
        currency:
          type: string
          minLength: 3
          maxLength: 3
          description: Three-letter ISO 4217 currency code
          example: EUR
        earliest_patient_pickup_at:
          type: string
          format: date-time
          description: Earliest time your team can pick up the patient (ISO 8601 format
            with 'Z' suffix)
          example: '2024-10-30T14:00:00Z'
        time_to_reach_patient_minutes:
          type: integer
          minimum: 1
          description: Estimated time in minutes to reach the patient location
          example: 45
        number_of_legs:
          type: integer
          minimum: 0
          description: Number of flight segments/legs in the journey
          example: 1
        aircraft:
          type: string
          description: Type or model of aircraft to be used
          example: Learjet 45
        flight_time_estimate_minutes:
          type: integer
          minimum: 1
          description: Estimated total flight time in minutes
          example: 180
        ground_transport:
          type: boolean
          description: Whether ground transport is included in this quote
          example: true
        quote_valid_until:
          type: string
          format: date-time
          description: When this quote expires (ISO 8601 format with 'Z' suffix)
          example: '2024-10-31T11:15:00Z'
        suggested_eta:
          type: string
          nullable: true
          enum:
          - TBD
          - Morning
          - Noon
          - Afternoon
          - Evening
          - Night
          - At
          description: Suggested estimated time of arrival at destination. Use "At"
            when providing a specific time in suggested_eta_at.
          example: Morning
        suggested_eta_at:
          type: string
          format: date-time
          nullable: true
          description: Specific ETA datetime (ISO 8601 format with 'Z' suffix). Required
            when suggested_eta is "At".
          example: '2024-10-30T16:30:00Z'
        suggested_etd:
          type: string
          nullable: true
          enum:
          - TBD
          - Morning
          - Noon
          - Afternoon
          - Evening
          - Night
          - At
          description: Suggested estimated time of departure. Use "At" when providing
            a specific time in suggested_etd_at.
          example: Morning
        suggested_etd_at:
          type: string
          format: date-time
          nullable: true
          description: Specific ETD datetime (ISO 8601 format with 'Z' suffix). Required
            when suggested_etd is "At".
          example: '2024-10-30T12:00:00Z'
        suggested_route:
          type: array
          nullable: true
          items:
            type: object
            required:
            - from
            - to
            properties:
              from:
                type: string
                description: Departure airport code
                example: JFK
              to:
                type: string
                description: Arrival airport code
                example: LAX
          description: Suggested route as a sequence of flight segments (pairs of airport
            codes)
          example:
          - from: JFK
            to: LAX
        tail_number:
          type: string
          nullable: true
          description: Aircraft tail number/registration
          example: N123AB
        airline:
          type: string
          description: Airline name (required for CME service type)
          example: SkyMedical Transport
        terms_of_payment:
          type: string
          nullable: true
          description: Payment terms and conditions
          example: Payment due within 48 hours of acceptance. 50% deposit required.
        cancellation_policy:
          type: string
          nullable: true
          description: Cancellation policy and associated fees
          example: 'More than 72h: 10% fee. 48-72h: 25%. 24-48h: 50%. Less than 24h: 100%.'
        comments:
          type: string
          nullable: true
          description: Additional comments or notes
          example: Immediate availability. Board-certified emergency physician on team.
    UpdateQuoteInput:
      type: object
      description: All fields are optional — only provided fields will be updated.
      properties:
        price:
          type: number
          format: float
          minimum: 99
          description: Updated price
          example: 42000.00
        currency:
          type: string
          minLength: 3
          maxLength: 3
          description: Updated currency code
          example: EUR
        earliest_patient_pickup_at:
          type: string
          format: date-time
          description: Updated earliest pickup time
          example: '2024-10-30T13:30:00Z'
        time_to_reach_patient_minutes:
          type: integer
          minimum: 1
          description: Updated time to reach patient
          example: 30
        number_of_legs:
          type: integer
          minimum: 0
          description: Updated number of legs
          example: 1
        aircraft:
          type: string
          description: Updated aircraft type
          example: Learjet 45
        flight_time_estimate_minutes:
          type: integer
          minimum: 1
          description: Updated flight time estimate
          example: 180
        ground_transport:
          type: boolean
          description: Updated ground transport inclusion
          example: true
        quote_valid_until:
          type: string
          format: date-time
          description: Updated quote expiration
          example: '2024-10-31T12:00:00Z'
        suggested_eta:
          type: string
          nullable: true
          enum:
          - TBD
          - Morning
          - Noon
          - Afternoon
          - Evening
          - Night
          - At
          description: Updated suggested ETA
          example: Morning
        suggested_eta_at:
          type: string
          format: date-time
          nullable: true
          description: Updated specific ETA datetime. Required when suggested_eta is
            "At".
          example: '2024-10-30T16:00:00Z'
        suggested_etd:
          type: string
          nullable: true
          enum:
          - TBD
          - Morning
          - Noon
          - Afternoon
          - Evening
          - Night
          - At
          description: Updated suggested ETD
          example: Morning
        suggested_etd_at:
          type: string
          format: date-time
          nullable: true
          description: Updated specific ETD datetime. Required when suggested_etd is
            "At".
          example: '2024-10-30T12:00:00Z'
        suggested_route:
          type: array
          nullable: true
          items:
            type: object
            required:
            - from
            - to
            properties:
              from:
                type: string
                description: Departure airport code
                example: JFK
              to:
                type: string
                description: Arrival airport code
                example: LAX
          description: Updated route segments
          example:
          - from: JFK
            to: LAX
        tail_number:
          type: string
          nullable: true
          description: Updated tail number
          example: N123AB
        airline:
          type: string
          description: Updated airline name
          example: SkyMedical Transport
        terms_of_payment:
          type: string
          nullable: true
          description: Updated payment terms
        cancellation_policy:
          type: string
          nullable: true
          description: Updated cancellation policy
        comments:
          type: string
          nullable: true
          description: Updated comments
    ConfirmQuoteInput:
      type: object
      required:
      - confirmed_etd_at
      - confirmed_eta_at
      - confirmed_route
      - aircraft
      - flight_time_estimate_minutes
      - number_of_legs
      - quote_valid_until
      - tail_number
      properties:
        confirmed_etd_at:
          type: string
          format: date-time
          description: Confirmed departure time (ISO 8601 format with 'Z' suffix)
          example: '2024-10-30T12:00:00Z'
        confirmed_eta:
          type: string
          nullable: true
          enum:
          - TBD
          - Morning
          - Noon
          - Afternoon
          - Evening
          - Night
          - At
          description: Confirmed estimated time of arrival. Use "At" when providing
            a specific time in confirmed_eta_at.
          example: Morning
        confirmed_eta_at:
          type: string
          format: date-time
          description: Confirmed arrival time (ISO 8601 format with 'Z' suffix)
          example: '2024-10-30T16:30:00Z'
        confirmed_route:
          type: array
          items:
            type: object
            required:
            - from
            - to
            properties:
              from:
                type: string
                description: Departure airport code
                example: JFK
              to:
                type: string
                description: Arrival airport code
                example: LAX
          description: Confirmed route as a sequence of flight segments (pairs of
            airport codes)
          example:
          - from: JFK
            to: LAX
        aircraft:
          type: string
          description: Confirmed aircraft type
          example: Learjet 45
        flight_time_estimate_minutes:
          type: integer
          minimum: 1
          description: Confirmed total flight time in minutes
          example: 180
        number_of_legs:
          type: integer
          minimum: 0
          description: Confirmed number of flight legs
          example: 1
        quote_valid_until:
          type: string
          format: date-time
          description: Updated quote validity timestamp
          example: '2024-10-31T11:15:00Z'
        tail_number:
          type: string
          description: Aircraft tail number/registration
          example: N123AB
        comments:
          type: string
          nullable: true
          description: Additional confirmation notes
          example: Aircraft prepped and medical team assembled.
    ConfirmedQuoteResponse:
      type: object
      properties:
        confirmation_id:
          type: string
          description: Unique identifier for the confirmation
          example: conf-550e8400-e29b-41d4-a716-446655440001
        quote_id:
          type: string
          description: The confirmed quote ID
          example: 550e8400-e29b-41d4-a716-446655440001
        request_id:
          type: integer
          description: The original quote request ID
          example: 12345
        status:
          type: string
          enum:
          - CONFIRMED
          - COMPLETED
          - CANCELLED
          description: Confirmation status
          example: CONFIRMED
        confirmed_etd_at:
          type: string
          format: date-time
          description: Confirmed departure time
          example: '2024-10-30T12:00:00Z'
        confirmed_eta:
          type: string
          nullable: true
          enum:
          - TBD
          - Morning
          - Noon
          - Afternoon
          - Evening
          - Night
          - At
          description: Confirmed estimated time of arrival
          example: Morning
        confirmed_eta_at:
          type: string
          format: date-time
          description: Confirmed arrival time
          example: '2024-10-30T16:30:00Z'
        confirmed_route:
          type: array
          items:
            type: object
            required:
            - from
            - to
            properties:
              from:
                type: string
                description: Departure airport code
                example: JFK
              to:
                type: string
                description: Arrival airport code
                example: LAX
          description: Confirmed route segments
          example:
          - from: JFK
            to: LAX
        aircraft:
          type: string
          description: Confirmed aircraft type
          example: Learjet 45
        tail_number:
          type: string
          description: Aircraft tail number
          example: N123AB
        flight_time_estimate_minutes:
          type: integer
          description: Confirmed flight time in minutes
          example: 180
        number_of_legs:
          type: integer
          description: Confirmed number of legs
          example: 1
        quote_valid_until:
          type: string
          format: date-time
          description: Quote validity timestamp
          example: '2024-10-31T11:15:00Z'
        confirmed_at:
          type: string
          format: date-time
          description: When the confirmation was created
          example: '2024-10-30T15:30:00Z'
    ProviderQuoteRequestDetailResponse:
      allOf:
      - $ref: '../shared/schemas/QuoteRequestResponse.yaml'
      - type: object
        properties:
          patients:
            type: array
            description: Patient details for this request
            items:
              $ref: '../shared/schemas/PatientInfo.yaml'
          include_ground_transport:
            type: boolean
            description: Whether ground transport is requested
            example: true
          ground_transport_type:
            type: string
            nullable: true
            enum:
            - taxi
            - wc_van
            - bls_ambulance
            - als_ambulance
            - tbd
            description: Type of ground transport requested
            example: bls_ambulance
          required_team:
            type: array
            nullable: true
            items:
              type: string
              enum:
              - physician
              - nurse
              - medic
              - respirator
              - non_medical_escort
            description: Required team members
            example:
            - physician
            - nurse
          required_team_other:
            type: string
            nullable: true
            description: Other team requirements
            example: Pediatric specialist
          allow_pooling:
            type: boolean
            nullable: true
            description: Whether pooling is allowed for this request
            example: false
          additional_info:
            type: string
            nullable: true
            description: Additional information from the customer
            example: Patient requires cardiac monitoring throughout transport
          quotes:
            type: array
            description: Your organization's quotes for this request
            items:
              $ref: '../shared/schemas/QuoteSummary.yaml'
security:
- oauth2:
  - requests:read
  - quotes:read
  - quotes:write
