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

# Get ticket by ID

> Returns a single ticket (order) by its ID. Authenticated via the api-key header; data scoped to the caller's partner. Returns 404 when the ticket does not exist or does not belong to the actor's partner (foreign and unknown are indistinguishable — ADR-0033 §1).



## OpenAPI

````yaml /docs/openapi/openapi.json get /v2/tickets/{id}
openapi: 3.1.0
info:
  title: PREXSELL REST v2
  version: 5.96.1
  description: REST API for the PREXSELL bus booking management platform.
servers:
  - url: https://staging.api.prexsell.com
    description: Staging
  - url: https://api.prexsell.com
    description: Production
security: []
paths:
  /v2/tickets/{id}:
    get:
      tags:
        - Tickets
      summary: Get ticket by ID
      description: >-
        Returns a single ticket (order) by its ID. Authenticated via the api-key
        header; data scoped to the caller's partner. Returns 404 when the ticket
        does not exist or does not belong to the actor's partner (foreign and
        unknown are indistinguishable — ADR-0033 §1).
      operationId: getTicketById
      parameters:
        - schema:
            type: string
            description: Ticket (order) identifier.
            example: ord_abc
          required: true
          description: Ticket (order) identifier.
          name: id
          in: path
      responses:
        '200':
          description: A single ticket.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      ticket:
                        type: object
                        properties:
                          id:
                            type: string
                            description: Order / ticket identifier.
                            example: ord_abc
                          bookingId:
                            type:
                              - string
                              - 'null'
                            description: >-
                              Booking this ticket belongs to. Use this as the
                              crosswalk when the addressing unit changes after a
                              peel-off.
                            example: bkg_1
                          note:
                            type:
                              - string
                              - 'null'
                            description: Order note.
                          status:
                            type:
                              - string
                              - 'null'
                            description: Order status.
                            example: Processing
                          paymentStatus:
                            type: string
                            description: Payment status.
                            example: Unpaid
                          departureDate:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            description: Departure date-time (ISO 8601).
                          source:
                            type:
                              - string
                              - 'null'
                            description: Route source.
                            example: PrexSell
                          refundAmount:
                            description: >-
                              Refund amount after cancellation (populated by
                              updateOrderStatus). ADR-0033 §3 — cancel response
                              carries the just-persisted value.
                            example: 800
                          passenger:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: string
                                description: Passenger identifier.
                                example: pass_1
                              firstName:
                                type: string
                                description: First name.
                                example: Іван
                              lastName:
                                type: string
                                description: Last name.
                                example: Петренко
                              email:
                                type:
                                  - string
                                  - 'null'
                                description: Contact email.
                                example: ivan@example.com
                              phones:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      description: Phone record identifier.
                                      example: ph_1
                                    phone:
                                      type: string
                                      description: Phone number.
                                      example: '+380501234567'
                                    messengers:
                                      type: array
                                      items:
                                        type: string
                                      description: Messenger apps tied to this number.
                                      example:
                                        - Viber
                                  required:
                                    - id
                                    - phone
                                  description: Passenger phone.
                                description: >-
                                  Contact phones
                                  (createdAt/companyId/passengerId stripped by
                                  mapTicketsKeysForRestRes).
                            required:
                              - id
                            description: Passenger details.
                          price:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: string
                              amount:
                                description: Ticket price amount.
                                example: 1200
                              currency:
                                type: string
                                enum:
                                  - CZK
                                  - UAH
                                  - EUR
                                  - USD
                                  - PLN
                                description: >-
                                  Currency code (ADR-0033 §3 — single source:
                                  CURRENCIES).
                                example: UAH
                            required:
                              - id
                              - currency
                            description: Ticket price.
                          discount:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              rule:
                                type: string
                                enum:
                                  - Amount
                                  - Percent
                                  - Overwrite
                              amount:
                                description: Discount amount.
                                example: 200
                              startDate:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                description: Discount validity start (ISO 8601).
                              endDate:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                description: Discount validity end (ISO 8601).
                            required:
                              - id
                              - name
                              - rule
                            description: Applied discount.
                          slices:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  description: Slice identifier.
                                  example: sl_abc
                                duration:
                                  type: number
                                  description: Journey duration in minutes.
                                  example: 480
                                arrivalDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  description: Arrival date-time (ISO 8601).
                                departureDate:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  description: Departure date-time (ISO 8601).
                                seat:
                                  type:
                                    - object
                                    - 'null'
                                  properties:
                                    id:
                                      type: string
                                      description: Seat identifier.
                                      example: seat_1
                                    label:
                                      type: string
                                      description: Seat label.
                                      example: 12A
                                  required:
                                    - id
                                    - label
                                  description: >-
                                    Assigned seat for this slice (ADR-0033 §3 —
                                    'seat made honest'). Populated from
                                    order.busSeat; null when no seat assignment.
                                bus:
                                  type:
                                    - object
                                    - 'null'
                                  properties:
                                    id:
                                      type: string
                                    seatsQty:
                                      type: integer
                                    registrationNumber:
                                      type: string
                                    brand:
                                      type: string
                                    model:
                                      type: string
                                    images:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                            description: Image identifier.
                                            example: img_abc
                                          url:
                                            type: string
                                            description: Image URL (CDN-rewritten).
                                            example: https://example.com/bus.jpg
                                          name:
                                            type: string
                                            description: Image label.
                                            example: Bus exterior
                                        required:
                                          - id
                                          - url
                                        description: A bus image.
                                      description: >-
                                        Bus images (URL-rewritten by CDN
                                        helper).
                                  required:
                                    - id
                                    - seatsQty
                                    - registrationNumber
                                    - brand
                                    - model
                                  description: Bus assigned to the journey slice.
                                carriage:
                                  type:
                                    - object
                                    - 'null'
                                  properties:
                                    id:
                                      type: string
                                    name:
                                      type: string
                                    phones:
                                      type: array
                                      items:
                                        type: string
                                        example: '+380501234567'
                                      description: Carriage contact phones (+ prefixed).
                                  required:
                                    - id
                                    - name
                                  description: Carriage assigned to the journey slice.
                                route:
                                  type:
                                    - object
                                    - 'null'
                                  properties:
                                    id:
                                      type: string
                                    name:
                                      type: string
                                    slug:
                                      type:
                                        - string
                                        - 'null'
                                    description:
                                      type:
                                        - string
                                        - 'null'
                                    company:
                                      type:
                                        - object
                                        - 'null'
                                      properties:
                                        id:
                                          type: string
                                        name:
                                          type:
                                            - string
                                            - 'null'
                                        slug:
                                          type: string
                                          description: Company URL slug.
                                          example: test-carrier
                                        ceo:
                                          type:
                                            - string
                                            - 'null'
                                          description: CEO name.
                                          example: Jane Doe
                                        partnerCompany:
                                          type:
                                            - string
                                            - 'null'
                                          description: Partner company name.
                                        logoUrl:
                                          type:
                                            - string
                                            - 'null'
                                          description: Company logo URL.
                                          example: https://example.com/logo.png
                                        email:
                                          type: string
                                          description: Contact email.
                                          example: ops@carrier.com
                                        website:
                                          type:
                                            - string
                                            - 'null'
                                          description: Company website URL.
                                          example: https://carrier.com
                                        rules:
                                          type:
                                            - string
                                            - 'null'
                                          description: Carrier rules text.
                                        socials:
                                          type: array
                                          items:
                                            type: string
                                          description: Company social media links.
                                          example:
                                            - https://fb.me/carrier
                                      required:
                                        - id
                                        - name
                                      description: >-
                                        Carrier company (secret fields stripped
                                        by mapTicketsKeysForRestRes).
                                    permissions:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                            description: Permission identifier.
                                            example: perm_1
                                          role:
                                            type: string
                                            description: Role this permission applies to.
                                            example: Agent
                                          accesses:
                                            type: array
                                            items:
                                              type: string
                                            description: Access names granted.
                                            example:
                                              - book
                                          type:
                                            type: string
                                            description: Permission type.
                                            example: Partner
                                        required:
                                          - id
                                          - role
                                          - accesses
                                          - type
                                        description: >-
                                          Route permission (filtered to
                                          type=Partner AND role=Agent for
                                          partners).
                                      description: >-
                                        Route permissions filtered to
                                        type=Partner AND role=Agent.
                                    services:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                            description: Service identifier.
                                            example: svc_1
                                          name:
                                            type: string
                                            description: Service name.
                                            example: Wi-Fi
                                        required:
                                          - id
                                          - name
                                        description: >-
                                          An amenity or service offered on this
                                          route.
                                      description: Services available on this route.
                                  required:
                                    - id
                                    - name
                                    - slug
                                    - description
                                  description: Route for this journey slice.
                                stops:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                      arrivalTime:
                                        type:
                                          - string
                                          - 'null'
                                        description: Arrival time at this stop (HH:MM).
                                      departureTime:
                                        type:
                                          - string
                                          - 'null'
                                        description: Departure time from this stop (HH:MM).
                                      platform:
                                        type:
                                          - string
                                          - 'null'
                                        description: Platform number or label.
                                      arrivalDate:
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        description: >-
                                          Arrival date-time at this stop (ISO
                                          8601).
                                      place:
                                        type:
                                          - string
                                          - 'null'
                                        description: Stop place / station name.
                                      latitude:
                                        type:
                                          - number
                                          - 'null'
                                        description: Latitude coordinate.
                                        example: 50.45
                                      longitude:
                                        type:
                                          - number
                                          - 'null'
                                        description: Longitude coordinate.
                                        example: 30.52
                                      city:
                                        type:
                                          - object
                                          - 'null'
                                        properties:
                                          id:
                                            type: string
                                          name:
                                            type: string
                                          slug:
                                            type: string
                                          country:
                                            type: string
                                            enum:
                                              - UA
                                              - TR
                                              - PL
                                              - CZ
                                              - IT
                                              - DE
                                              - SK
                                              - HU
                                              - BE
                                              - NL
                                              - RO
                                              - BG
                                              - FR
                                              - AT
                                              - LT
                                              - LV
                                              - EE
                                              - ES
                                              - LU
                                              - CH
                                              - GR
                                              - MD
                                              - SI
                                          timeZone:
                                            type:
                                              - string
                                              - 'null'
                                        required:
                                          - id
                                          - name
                                          - slug
                                          - country
                                          - timeZone
                                        description: City at this stop.
                                    required:
                                      - id
                                    description: A stop on the journey slice.
                                  description: Ordered stops for this slice.
                              required:
                                - id
                              description: One leg of a multi-slice journey.
                            description: Journey slices for this ticket.
                        required:
                          - id
                          - slices
                        description: A single ticket (order) within a booking.
                    required:
                      - ticket
                    description: Ticket lookup result.
                required:
                  - data
                example:
                  data:
                    ticket:
                      id: ord_abc
                      bookingId: bkg_1
                      note: null
                      status: Processing
                      paymentStatus: Unpaid
                      departureDate: '2026-06-15T00:00:00.000Z'
                      source: PrexSell
                      refundAmount: null
                      passenger:
                        id: pass_1
                        firstName: Іван
                        lastName: Петренко
                        email: ivan@example.com
                        phones:
                          - id: ph_1
                            phone: '+380501234567'
                            messengers:
                              - Viber
                      price:
                        id: price-1
                        amount: 1450
                        currency: UAH
                      discount:
                        id: disc-1
                        name: Студентська знижка
                        rule: Percent
                        amount: 100
                        startDate: '2026-06-01T00:00:00.000Z'
                        endDate: '2026-12-31T23:59:59.000Z'
                      slices:
                        - id: sl_abc
        '401':
          description: Standard error response body.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: AUTH_INVALID_CREDENTIALS
                        errorCode:
                          type: string
                          example: UNAUTHORIZED
                        details: {}
                      required:
                        - message
                required:
                  - errors
                example:
                  errors:
                    - message: AUTH_INVALID_CREDENTIALS
                      errorCode: UNAUTHORIZED
        '404':
          description: Standard error response body.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: AUTH_INVALID_CREDENTIALS
                        errorCode:
                          type: string
                          example: UNAUTHORIZED
                        details: {}
                      required:
                        - message
                required:
                  - errors
                example:
                  errors:
                    - message: RESOURCE_NOT_FOUND
                      errorCode: NOT_FOUND
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Partner API key, sent in the `x-api-key` request header. Required for
        bookable offer search and all booking operations. To obtain a key,
        register as a PREXSELL partner in the backoffice
        (backoffice.prexsell.com, or staging.backoffice.prexsell.com for
        staging) and contact support if you need help.

````