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

# List cancellation quotes

> Lists the ways to cancel a trip, each with what it would cost.

Nothing is canceled by this request. When the trip can be canceled you get one quote per way — `VOID` for a trip not issued yet, `REFUND` and `MANUAL_CANCEL` for an issued one, depending on the product and its policy — each with the amounts, in cents, and the time until which it can be confirmed. When the policy doesn't allow it, `cancelable` is `false` and `quotes` is empty. Confirm one by sending its `id` to the cancel request. Visible to an organization admin and to the users the trip carries, like the trip itself.


## OpenAPI

````yaml /api-reference/travel.openapi.json get /realms/{realmId}/organizations/{organizationId}/trips/{tripId}/cancel
openapi: 3.0.3
info:
  title: Travel
  version: 1.0.0
  description: >-
    Portão 3 travel API. Every endpoint requires a bearer token in the
    Authorization header (Authorization: Bearer <token>) unless its page states
    otherwise; see the Authentication guide. That requirement is not repeated
    per endpoint. Generated by tools/openapi from code (routes + security) and
    the hand-written spec (request/response bodies). Passenger directory, trips
    and the search proxy (air/hotel/bus/vehicle). Every route validates path,
    query and body through a zod Input class (`travel/src/domain/*/input`),
    which documents its parameters and body; responses are the named interfaces
    in `travel/src/domain/*/response.ts`. Confidence tiers: generated:typed=53
    copied:manual=0 unknown=0.
servers:
  - url: https://api.travel.v2.portao3.com.br/
    description: production
  - url: https://api.travel.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Passengers
  - name: Trips
  - name: Air search
  - name: Hotel search
  - name: Bus search
  - name: Vehicle search
paths:
  /realms/{realmId}/organizations/{organizationId}/trips/{tripId}/cancel:
    get:
      tags:
        - Trips
      summary: List cancellation quotes
      description: Lists the ways to cancel a trip, each with what it would cost.
      operationId: getRealmsByRealmIdOrganizationsByOrganizationIdTripsByTripIdCancel
      parameters:
        - name: realmId
          in: path
          required: true
          description: |-
            ID of your realm.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
        - name: organizationId
          in: path
          required: true
          description: |-
            ID of the organization the trip belongs to.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
        - name: tripId
          in: path
          required: true
          description: ID of the trip (24 hexadecimal characters).
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          example: 6711b4c0d8e1a30012b7c9f2
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  cancelable:
                    type: boolean
                    description: >-
                      Whether the trip can be canceled. When `false`, `quotes`
                      is empty.
                    example: true
                  quotes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: >-
                            ID of the quote. Send it as `cancellationQuoteId` to
                            confirm the cancellation.
                          example: cancel_quote_V1StGXR8Z5jdHi6BmyT2k
                        cancelType:
                          type: string
                          enum:
                            - CREDIT
                            - REFUND
                            - MANUAL_CANCEL
                            - VOID
                          description: >-
                            Kind of cancellation: `VOID` for a trip not issued
                            yet, `REFUND` for an issued one, `CREDIT` for a
                            credit-based refund, `MANUAL_CANCEL` when the final
                            amounts are settled outside the system.
                          example: VOID
                        originalAmount:
                          type: number
                          description: What the trip cost, in cents.
                          example: 91990
                        remainingAmount:
                          type: number
                          nullable: true
                          description: >-
                            What is given back after the fine, in cents. `null`
                            for `MANUAL_CANCEL`.
                          example: 91990
                        fineAmount:
                          type: number
                          nullable: true
                          description: >-
                            Cancellation fine, in cents. `null` for
                            `MANUAL_CANCEL`.
                          example: 0
                        currency:
                          type: string
                          description: Currency of the amounts (ISO 4217 alphabetic code).
                          example: BRL
                        status:
                          type: string
                          enum:
                            - QUOTE
                            - CONFIRMED
                            - EXPIRED
                            - PROCESSED
                            - FAILED
                          description: >-
                            Status of the quote: `QUOTE` while it awaits
                            confirmation.
                          example: QUOTE
                        expiresAt:
                          type: string
                          description: >-
                            When the quote expires and can no longer be
                            confirmed.
                          example: '2026-10-01T15:00:00.000Z'
                          format: date-time
                        createdAt:
                          type: string
                          description: When the quote was created.
                          example: '2026-10-01T14:00:00.000Z'
                          format: date-time
                        updatedAt:
                          type: string
                          description: When the quote last changed.
                          example: '2026-10-01T14:00:00.000Z'
                          format: date-time
                      required:
                        - id
                        - cancelType
                        - originalAmount
                        - remainingAmount
                        - fineAmount
                        - currency
                        - status
                        - expiresAt
                        - createdAt
                        - updatedAt
                      description: >-
                        A quote to cancel a trip. Confirm it before `expiresAt`
                        by sending its `id`. Amounts are in cents. The currency
                        is the alphabetic ISO 4217 code (`BRL`), unlike the
                        numeric code (`986`) on trips.
                    description: >-
                      The active quotes: up to one `VOID` (trip not issued yet),
                      one `REFUND` and one `MANUAL_CANCEL`, depending on the
                      product and its policy. Confirm one before its
                      `expiresAt`.
                required:
                  - cancelable
                  - quotes
                description: The ways to cancel a trip.
        '400':
          description: >-
            `TRIP_CANNOT_BE_CANCELLED` — The trip's status doesn't allow
            cancellation: it is already canceled, expired or was never reserved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - TRIP_CANNOT_BE_CANCELLED
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - TRAVEL
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: TRIP_CANNOT_BE_CANCELLED
                origin: TRAVEL
                message: Trip status does not allow cancellation
        '404':
          description: >-
            `TRIP_NOT_FOUND` — No trip with this ID is visible to you in the
            organization: it doesn't exist, belongs to another organization, or
            you are neither an organization admin nor a passenger on it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - TRIP_NOT_FOUND
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - TRAVEL
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: TRIP_NOT_FOUND
                origin: TRAVEL
                message: Trip not found
        '422':
          description: >-
            `BAD_REQUEST` — A path parameter is not a valid ID; `fields` lists
            each one.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - TRAVEL
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                  fields:
                    type: array
                    description: >-
                      One entry per invalid request field (validation errors
                      only).
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: >-
                            Path of the invalid field, e.g. `label` or
                            `values[0].value`.
                          example: label
                        message:
                          type: string
                          description: Why the field was rejected.
                          example: label is required
                        code:
                          type: string
                          description: >-
                            `<FIELD>_<REASON>` — e.g. `LABEL_REQUIRED`,
                            `TYPE_ONE_OF`, `VALUES_VALUE_TYPE_ERROR`.
                          example: LABEL_REQUIRED
                        values:
                          type: array
                          items:
                            type: string
                          description: >-
                            The accepted values, when the field is an
                            enumeration.
                      required:
                        - field
                        - message
                        - code
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BAD_REQUEST
                origin: TRAVEL
                message: >-
                  Bad Request: Your request is invalid or incomplete. Please
                  make sure you are requesting with the right fields.
                fields:
                  - field: organizationId
                    message: Invalid UUID
                    code: ORGANIZATIONID_UUID
        '503':
          description: >-
            `PROVIDER_UNAVAILABLE` — The travel provider could not be reached.
            Retry later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - PROVIDER_UNAVAILABLE
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - TRAVEL
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: PROVIDER_UNAVAILABLE
                origin: TRAVEL
                message: Travel provider temporarily unavailable, please retry.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.