> ## 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.

# /realms/{realmId}/organizations/{organizationId}/travel/trips



## OpenAPI

````yaml /api-reference/travel.openapi.json post /realms/{realmId}/organizations/{organizationId}/travel/trips
openapi: 3.0.3
info:
  title: Travel
  version: 1.0.0
  description: >-
    Portão 3 travel API. Generated by tools/openapi from code (routes +
    security) and the hand-written spec (request/response bodies). Search proxy
    (air/hotel/bus/vehicle) + passenger directory. Search POST bodies are
    validated per-vertical in the handler (tier=unknown); passenger bodies carry
    route-level zod schemas (typed). Responses proxied/presented without a
    schema layer. Confidence tiers: generated:typed=4 copied:manual=0
    unknown=17.
servers:
  - url: https://api.travel.v2.portao3.com.br/
    description: production
  - url: https://api.travel.dev.3pers.com.br/
    description: development
security:
  - bearerAuth: []
tags:
  - name: Travel Passengers
  - name: Travel Trips
  - name: Travel Search
paths:
  /realms/{realmId}/organizations/{organizationId}/travel/trips:
    post:
      tags:
        - Travel Trips
      summary: /realms/{realmId}/organizations/{organizationId}/travel/trips
      operationId: postRealmsByRealmIdOrganizationsByOrganizationIdTravelTrips
      parameters:
        - name: realmId
          in: path
          required: true
          schema:
            type: string
        - name: organizationId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                idempotencyKey:
                  type: string
                  minLength: 1
                  maxLength: 120
                  description: >-
                    Client-generated key, unique per organization while the trip
                    is not FAILED (D10). Retrying with the same key
                    resumes/returns the same trip instead of double-booking.
                air:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      searchItemId:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        description: >-
                          An `id` from the `items` array of the matching air
                          search response.
                      leadPassengerId:
                        type: string
                        pattern: ^[0-9a-fA-F]{24}$
                        description: LOCAL passenger id responsible for the reservation.
                      fareId:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        description: The chosen fare option within the air search response.
                      passengers:
                        minItems: 1
                        type: array
                        items:
                          type: string
                          pattern: ^[0-9a-fA-F]{24}$
                        description: LOCAL passenger ids travelling on this fare.
                    required:
                      - searchItemId
                      - leadPassengerId
                      - fareId
                      - passengers
                hotel:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      searchItemId:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        description: >-
                          An `id` from the `items` array of the matching hotel
                          search response.
                      leadPassengerId:
                        type: string
                        pattern: ^[0-9a-fA-F]{24}$
                        description: LOCAL passenger id responsible for the reservation.
                      rooms:
                        minItems: 1
                        type: array
                        items:
                          type: object
                          properties:
                            roomId:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            passengers:
                              minItems: 1
                              type: array
                              items:
                                type: string
                                pattern: ^[0-9a-fA-F]{24}$
                              description: LOCAL passenger ids staying in this room.
                          required:
                            - roomId
                            - passengers
                    required:
                      - searchItemId
                      - leadPassengerId
                      - rooms
                bus:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      searchItemId:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        description: >-
                          An `id` from the `items` array of the matching bus
                          search response.
                      leadPassengerId:
                        type: string
                        pattern: ^[0-9a-fA-F]{24}$
                        description: LOCAL passenger id responsible for the reservation.
                      routes:
                        minItems: 1
                        type: array
                        items:
                          type: object
                          properties:
                            passenger:
                              type: string
                              pattern: ^[0-9a-fA-F]{24}$
                              description: LOCAL passenger id travelling under this route.
                            segments:
                              minItems: 1
                              type: array
                              items:
                                type: object
                                properties:
                                  segmentId:
                                    type: string
                                    format: uuid
                                    pattern: >-
                                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                                  seatNumber:
                                    type: integer
                                    minimum: 0
                                    exclusiveMinimum: true
                                    maximum: 9007199254740991
                                required:
                                  - segmentId
                                  - seatNumber
                          required:
                            - passenger
                            - segments
                    required:
                      - searchItemId
                      - leadPassengerId
                      - routes
                vehicle:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      searchItemId:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        description: >-
                          An `id` from the `items` array of the matching vehicle
                          search response.
                      leadPassengerId:
                        type: string
                        pattern: ^[0-9a-fA-F]{24}$
                        description: LOCAL passenger id responsible for the rental.
                      rentals:
                        minItems: 1
                        type: array
                        items:
                          type: object
                          properties:
                            rentalId:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            passengers:
                              description: >-
                                LOCAL passenger ids travelling under this
                                rental.
                              minItems: 1
                              type: array
                              items:
                                type: string
                                pattern: ^[0-9a-fA-F]{24}$
                          required:
                            - rentalId
                    required:
                      - searchItemId
                      - leadPassengerId
                      - rentals
                customFields:
                  description: >-
                    Validated against the identity TRIP definitions; immutable
                    after creation.
                  type: object
                  additionalProperties: {}
              required:
                - idempotencyKey
      responses:
        default:
          description: Undocumented response (no code type, no existing spec).
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````