TicTacTrip Booking API

The Booking API from TicTacTrip — 9 operation(s) for booking.

OpenAPI Specification

tictactrip-booking-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: '@tictactrip/api Autocomplete Booking API'
  version: 2.1489.0
  description: Tictactrip's API service
  license:
    name: UNLICENSED
  contact:
    name: Tictactrip
    email: dev@tictactrip.eu
    url: https://www.tictactrip.eu
servers:
- url: /
tags:
- name: Booking
paths:
  /booking/v3/carts/{cartId}:
    get:
      operationId: GetCart
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  cart:
                    $ref: '#/components/schemas/ISerializedCart'
                required:
                - cart
                type: object
              examples:
                Example 1:
                  value:
                    cart:
                      id: 6771146ca0b7432b
                      partnerId: null
                      partnerExternalId: null
                      paidPrice: 1420
                      rawPrice: 1320
                      totalPrice: 1420
                      isIdentityDocumentRequired: false
                      trips:
                        outboundTrip:
                          id: '1165021'
                          uuid: 1f945779-4d9d-47ae-a711-c32bbcbf7639
                          origin:
                            id: 12709
                            city: Pralognan La Vanoise
                            country: France
                            station: PRALOGNAN LA VANOISE Airelles
                          destination:
                            id: 549
                            city: Moûtiers
                            country: France
                            station: Moûtiers - Salins-les-Thermes - Brides-les-Bains
                          originOffset: '+0200'
                          destinationOffset: '+0200'
                          priceCents: 1420
                          feeCents: 0
                          paidPrice: 1420
                          departureUTC: 1663561920
                          arrivalUTC: 1663566300
                          durationMinutes: 73
                          companies:
                          - Altibus
                          segments:
                          - id: '1764084'
                            company: Altibus
                            mean: bus
                            origin:
                              city: Pralognan La Vanoise
                              country: France
                              station: PRALOGNAN LA VANOISE Airelles
                              lat: 45.3819
                              long: 6.72121
                            destination:
                              city: Moûtiers
                              country: France
                              station: Moûtiers - Salins-les-Thermes - Brides-les-Bains
                              lat: 45.4852
                              long: 6.5291
                            isBookable: true
                            priceCents: 1420
                            feeCents: 100
                            includedProviderFeeCents: 120
                            departureUTC: 1663561920
                            arrivalUTC: 1663566300
                            originOffset: '+0200'
                            destinationOffset: '+0200'
                            durationMinutes: 73
                            redirectionLink: /redirect?company=21&trip=MOG577&date=19/09/2022&env=production
                            isPresale: false
                          mean: BUS
                          co2g: 669
                      passengers:
                      - id: 1445751
                        lastName: null
                        firstName: null
                        title: null
                        isCustomer: false
                        discountCardId: null
                        category: adults
                        discountCards: []
                        age: 30
                        birthdate: null
        '404':
          description: If cart does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorCodeResponse'
              examples:
                Example 1:
                  value:
                    errorKey: carts:client:cartNotFound
                    errorMessage: Cart was not found
        '500':
          description: If an unexpected error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorCodeResponse'
              examples:
                Example 1:
                  value:
                    errorKey: general:internal:unexpected
                    errorMessage: An unexpected error occurred
      description: Get a cart by its id and its matching order if it exists.
      security:
      - authentication:
        - admin
        - bookPartner
      parameters:
      - in: path
        name: cartId
        required: true
        schema:
          type: string
        example: 6771146ca0b7432b
      tags:
      - Booking
    patch:
      operationId: UpdateCart
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                properties:
                  isAvailable:
                    type: boolean
                  priceCentsDiff:
                    type: number
                    format: double
                  cart:
                    $ref: '#/components/schemas/ISerializedCart'
                required:
                - isAvailable
                - priceCentsDiff
                - cart
                type: object
              examples:
                Example 1:
                  value:
                    cart:
                      id: 6771146ca0b7432b
                      partnerId: null
                      partnerExternalId: null
                      paidPrice: 1180
                      totalPrice: 1180
                      rawPrice: 1080
                      isIdentityDocumentRequired: false
                      trips:
                        outboundTrip:
                          id: '1165021'
                          uuid: 1f945779-4d9d-47ae-a711-c32bbcbf7639
                          origin:
                            id: 12709
                            city: Pralognan La Vanoise
                            country: France
                            station: PRALOGNAN LA VANOISE Airelles
                          destination:
                            id: 549
                            city: Moûtiers
                            country: France
                            station: Moûtiers - Salins-les-Thermes - Brides-les-Bains
                          originOffset: '+0200'
                          destinationOffset: '+0200'
                          priceCents: 1080
                          feeCents: 0
                          paidPrice: 1180
                          departureUTC: 1663561920
                          arrivalUTC: 1663566300
                          durationMinutes: 73
                          companies:
                          - Altibus
                          segments:
                          - id: '1764084'
                            company: Altibus
                            mean: bus
                            origin:
                              city: Pralognan La Vanoise
                              country: France
                              station: PRALOGNAN LA VANOISE Airelles
                              lat: 45.3819
                              long: 6.72121
                            destination:
                              city: Moûtiers
                              country: France
                              station: Moûtiers - Salins-les-Thermes - Brides-les-Bains
                              lat: 45.4852
                              long: 6.5291
                            isBookable: true
                            priceCents: 1180
                            feeCents: 100
                            includedProviderFeeCents: 120
                            departureUTC: 1663561920
                            arrivalUTC: 1663566300
                            originOffset: '+0200'
                            destinationOffset: '+0200'
                            durationMinutes: 73
                            redirectionLink: /redirect?company=21&trip=MOG577&date=19/09/2022&env=production
                            isPresale: false
                          mean: BUS
                          co2g: 669
                      passengers:
                      - id: 1445752
                        lastName: name
                        firstName: firstName
                        title: MR
                        isCustomer: true
                        discountCardId: null
                        category: adults
                        discountCards: []
                        age: 30
                        birthdate: '1992-09-09T00:00:00.000Z'
                      customer:
                        mail: mail@mail.com
                        title: MR
                        lastName: lastName
                        firstName: firstName
                        birthdate: '1992-09-09T00:00:00.000Z'
                    isAvailable: false
        '404':
          description: If cart does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorCodeResponse'
              examples:
                Example 1:
                  value:
                    errorKey: carts:client:cartNotFound
                    errorMessage: Cart was not found
        '500':
          description: If an unexpected error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorCodeResponse'
              examples:
                Example 1:
                  value:
                    errorKey: general:internal:unexpected
                    errorMessage: An unexpected error occurred
      description: '

        Updates a cart with the provided informations. A price lookup is done everytime a cart is patched.

        Keep in mind that patching a cart with an empty payload WILL NOT reset the cart''s data, and will trigger a price lookup with the saved cart''s data.'
      security:
      - authentication:
        - admin
        - bookPartner
      parameters:
      - in: path
        name: cartId
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IUpdateCartPayload'
            example:
              passengers:
              - lastName: name
                discountCards: []
                isCustomer: true
                title: MR
                firstName: firstName
                category: adults
                age: 25
                birthdate: '1992-09-09'
              customer:
                lastName: lastName
                mail: mail@mail.com
                isSubscribedToNewsletter: false
                title: MR
                firstName: firstName
                birthdate: '1992-09-09'
      tags:
      - Booking
  /booking/v3/carts:
    post:
      operationId: CreateCart
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  cart:
                    $ref: '#/components/schemas/ISerializedCart'
                required:
                - cart
                type: object
              examples:
                Example 1:
                  value:
                    cart:
                      id: 6771146ca0b7432b
                      partnerId: null
                      partnerExternalId: null
                      paidPrice: 1420
                      rawPrice: 1320
                      totalPrice: 1420
                      isIdentityDocumentRequired: false
                      trips:
                        outboundTrip:
                          id: '1165021'
                          uuid: 1f945779-4d9d-47ae-a711-c32bbcbf7639
                          origin:
                            id: 12709
                            city: Pralognan La Vanoise
                            country: France
                            station: PRALOGNAN LA VANOISE Airelles
                          destination:
                            id: 549
                            city: Moûtiers
                            country: France
                            station: Moûtiers - Salins-les-Thermes - Brides-les-Bains
                          originOffset: '+0200'
                          destinationOffset: '+0200'
                          priceCents: 1420
                          feeCents: 0
                          paidPrice: 1420
                          departureUTC: 1663561920
                          arrivalUTC: 1663566300
                          durationMinutes: 73
                          companies:
                          - Altibus
                          segments:
                          - id: '1764084'
                            company: Altibus
                            mean: bus
                            origin:
                              city: Pralognan La Vanoise
                              country: France
                              station: PRALOGNAN LA VANOISE Airelles
                              lat: 45.3819
                              long: 6.72121
                            destination:
                              city: Moûtiers
                              country: France
                              station: Moûtiers - Salins-les-Thermes - Brides-les-Bains
                              lat: 45.4852
                              long: 6.5291
                            isBookable: true
                            priceCents: 1420
                            feeCents: 100
                            includedProviderFeeCents: 120
                            departureUTC: 1663561920
                            arrivalUTC: 1663566300
                            originOffset: '+0200'
                            destinationOffset: '+0200'
                            durationMinutes: 73
                            redirectionLink: /redirect?company=21&trip=MOG577&date=19/09/2022&env=production
                            isPresale: false
                          mean: BUS
                          co2g: 669
                      passengers:
                      - id: 1445751
                        lastName: null
                        firstName: null
                        title: null
                        isCustomer: false
                        discountCardId: null
                        category: adults
                        discountCards: []
                        age: 30
                        birthdate: null
        '400':
          description: If trip does not exist or has expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorCodeResponse'
              examples:
                Example 1:
                  value:
                    errorKey: carts:client:tripExpired
                    errorMessage: The trip does not exist or has expired
        '404':
          description: If partner is not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorCodeResponse'
              examples:
                Example 1:
                  value:
                    errorKey: partnersApi:client:partnerNotFound
                    errorMessage: Partner was not found
        '500':
          description: If an unexpected error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorCodeResponse'
              examples:
                Example 1:
                  value:
                    errorKey: general:internal:unexpected
                    errorMessage: An unexpected error occurred
      description: Creates a cart. Has to contain at least an outbound trip id and minimal passenger information for it to work.
      security:
      - authentication:
        - admin
        - bookPartner
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ICreateCartBody'
            example:
              outboundTripId: 1f945779-4d9d-47ae-a711-c32bbcbf7639
              passengers:
              - age: 30
                discountCards: []
      tags:
      - Booking
  /booking/v3/orders:
    get:
      operationId: GetOrders
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IGetOrdersResponse'
              examples:
                Example 1:
                  value:
                    orders:
                    - id: 8bc8557793fe4447
                      orderDate: '2022-09-09T15:30:02.896Z'
                      cartId: 6771146ca0b7432b
                      orderStatus: CREATED
                      paidPrice: 1180
                      rawPrice: 1180
                      totalPrice: 1880
                      trips:
                        outboundTrip:
                          id: '309496'
                          origin:
                            city: Pralognan La Vanoise
                            country: France
                            station: PRALOGNAN LA VANOISE Airelles
                          destination:
                            city: Moûtiers
                            country: France
                            station: Moûtiers - Salins-les-Thermes - Brides-les-Bains
                          priceCents: 1180
                          feeCents: 0
                          paidPrice: 1180
                          departureUTC: 1663561920
                          arrivalUTC: 1663566300
                          originOffset: '+0200'
                          destinationOffset: '+0200'
                          durationMinutes: 73
                          companies:
                          - Altibus
                          segments:
                          - id: '406308'
                            company: Altibus
                            mean: bus
                            origin:
                              city: Pralognan La Vanoise
                              country: France
                              station: PRALOGNAN LA VANOISE Airelles
                              lat: 45.3886
                              long: 6.7163
                            destination:
                              city: Moûtiers
                              country: France
                              station: Moûtiers - Salins-les-Thermes - Brides-les-Bains
                              lat: 45.4867
                              long: 6.5311
                            priceCents: 1180
                            feeCents: 100
                            includedProviderFeeCents: 120
                            departureUTC: 1663561920
                            arrivalUTC: 1663566300
                            originOffset: '+0200'
                            destinationOffset: '+0200'
                            durationMinutes: 73
                            isBookable: true
                            redirectionLink: /redirect?company=21&trip=MOG577&date=19/09/2022&env=production
                            eTicketUrl: https://api.tictactrip.eu/booking/v3/orders/8bc8557793fe4447/etickets/79967/download?filename=eticket
                            isPresale: false
                          mean: BUS
                          co2g: 669
                      passengers:
                      - id: 349410
                        title: MR
                        lastName: name
                        firstName: firstName
                        category: adults
                        discountCards: []
                        isCustomer: true
                        identityDocument: null
                        age: 30
                        birthDay: 9
                        birthMonth: 9
                        birthYear: 1992
                        discountCardId: null
                      customer:
                        mail: mail@mail.com
                        title: MR
                        lastName: name
                        firstName: firstName
                        birthDay: 9
                        birthMonth: 9
                        birthYear: 1992
                      paymentStatus: ACCEPTED
                    pagination:
                      currentPage: 1
                      itemsPerPage: 30
                      totalItems: 1
                      totalPages: 1
                      hasNextPage: false
                      hasPreviousPage: false
        '500':
          description: If an unexpected error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorCodeResponse'
              examples:
                Example 1:
                  value:
                    errorKey: general:internal:unexpected
                    errorMessage: An unexpected error occurred
      description: 'Retrieves a paginated list of all orders for the authenticated partner, ordered by most recent first.

        Each page contains up to 30 orders.'
      security:
      - authentication:
        - admin
        - bookPartner
      parameters:
      - description: Page number (1-indexed). Defaults to 1.
        in: query
        name: page
        required: false
        schema:
          default: 1
          format: double
          type: number
      - description: Number of orders per page. Defaults to 30 and is capped at 30.
        in: query
        name: itemsPerPage
        required: false
        schema:
          default: 30
          format: double
          type: number
      tags:
      - Booking
    post:
      operationId: CreateOrder
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ICreateOrderResponse'
              examples:
                Example 1:
                  value:
                    order:
                      id: 8bc8557793fe4447
                      orderDate: '2022-09-09T13:24:15.533Z'
                      cartId: 6771146ca0b7432b
                      orderStatus: CREATED
                      totalPrice: 1180
                      rawPrice: 1180
                      paidPrice: 1180
                      trips:
                        outboundTrip:
                          id: '309495'
                          origin:
                            city: Pralognan La Vanoise
                            country: France
                            station: PRALOGNAN LA VANOISE Airelles
                          destination:
                            city: Moûtiers
                            country: France
                            station: Moûtiers - Salins-les-Thermes - Brides-les-Bains
                          priceCents: 1180
                          feeCents: 0
                          paidPrice: 1180
                          departureUTC: 1663561920
                          arrivalUTC: 1663566300
                          originOffset: '+0200'
                          destinationOffset: '+0200'
                          durationMinutes: 73
                          companies:
                          - Altibus
                          segments:
                          - id: '406307'
                            company: Altibus
                            mean: bus
                            origin:
                              city: Pralognan La Vanoise
                              country: France
                              station: PRALOGNAN LA VANOISE Airelles
                              lat: 45.3886
                              long: 6.7163
                            destination:
                              city: Moûtiers
                              country: France
                              station: Moûtiers - Salins-les-Thermes - Brides-les-Bains
                              lat: 45.4867
                              long: 6.5311
                            priceCents: 1180
                            feeCents: 100
                            includedProviderFeeCents: 120
                            departureUTC: 1663561920
                            arrivalUTC: 1663566300
                            originOffset: '+0200'
                            destinationOffset: '+0200'
                            durationMinutes: 73
                            isBookable: true
                            redirectionLink: /redirect?company=21&trip=MOG577&date=19/09/2022&env=production
                            isPresale: false
                          mean: BUS
                          co2g: 669
                      passengers:
                      - id: 349409
                        title: MR
                        lastName: name
                        firstName: firstName
                        category: adults
                        discountCards: []
                        isCustomer: true
                        identityDocument: null
                        age: 30
                        birthDay: 9
                        birthMonth: 9
                        birthYear: 1992
                        discountCardId: null
                      customer:
                        mail: mail@mail.com
                        title: MR
                        lastName: name
                        firstName: firstName
                        birthDay: 9
                        birthMonth: 9
                        birthYear: 1992
                      paymentStatus: ACCEPTED
                    priceCentsDiff: 0
                    isAvailable: true
                    expiresAt: '2022-09-09T13:39:15.533Z'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorCodeResponse'
              examples:
                Example 1:
                  value:
                    errorKey: string
                    errorMessage: string
        '500':
          description: If an unexpected error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorCodeResponse'
              examples:
                Example 1:
                  value:
                    errorKey: general:internal:unexpected
                    errorMessage: An unexpected error occurred
      description: 'Creates an order. It uses the cart''s information to build the order from it.

        The cart must have been patched with customer information and at least one passenger.'
      security:
      - authentication:
        - admin
        - bookPartner
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ICreateOrderPayload'
            example:
              cartId: 6771146ca0b7432b
      tags:
      - Booking
  /booking/v3/orders/{orderId}:
    get:
      operationId: GetOrder
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  order:
                    $ref: '#/components/schemas/ISerializedOrder'
                required:
                - order
                type: object
              examples:
                Example 1:
                  value:
                    order:
                      id: 8bc8557793fe4447
                      orderDate: '2022-09-09T15:30:02.896Z'
                      cartId: 6771146ca0b7432b
                      orderStatus: CREATED
                      paidPrice: 1180
                      rawPrice: 1180
                      totalPrice: 1880
                      trips:
                        outboundTrip:
                          id: '309496'
                          origin:
                            city: Pralognan La Vanoise
                            country: France
                            station: PRALOGNAN LA VANOISE Airelles
                          destination:
                            city: Moûtiers
                            country: France
                            station: Moûtiers - Salins-les-Thermes - Brides-les-Bains
                          priceCents: 1180
                          feeCents: 0
                          paidPrice: 1180
                          departureUTC: 1663561920
                          arrivalUTC: 1663566300
                          originOffset: '+0200'
                          destinationOffset: '+0200'
                          durationMinutes: 73
                          companies:
                          - Altibus
                          segments:
                          - id: '406308'
                            company: Altibus
                            mean: bus
                            origin:
                              city: Pralognan La Vanoise
                              country: France
                              station: PRALOGNAN LA VANOISE Airelles
                              lat: 45.3886
                              long: 6.7163
                            destination:
                              city: Moûtiers
                              country: France
                              station: Moûtiers - Salins-les-Thermes - Brides-les-Bains
                              lat: 45.4867
                              long: 6.5311
                            priceCents: 1180
                            feeCents: 100
                            includedProviderFeeCents: 120
                            departureUTC: 1663561920
                            arrivalUTC: 1663566300
                            originOffset: '+0200'
                            destinationOffset: '+0200'
                            durationMinutes: 73
                            isBookable: true
                            redirectionLink: /redirect?company=21&trip=MOG577&date=19/09/2022&env=production
                            eTicketUrl: https://api.tictactrip.eu/booking/v3/orders/8bc8557793fe4447/etickets/79967/download?filename=eticket
                            isPresale: false
                          mean: BUS
                          co2g: 669
                      passengers:
                      - id: 349410
                        title: MR
                        lastName: name
                        firstName: firstName
                        category: adults
                        discountCards: []
                        isCustomer: true
                        identityDocument: null
                        age: 30
                        birthDay: 9
                        birthMonth: 9
                        birthYear: 1992
                        discountCardId: null
                      customer:
                        mail: mail@mail.com
                        title: MR
                        lastName: name
                        firstName: firstName
                        birthDay: 9
                        birthMonth: 9
                        birthYear: 1992
                      paymentStatus: ACCEPTED
        '404':
          description: If order does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorCodeResponse'
              examples:
                Example 1:
                  value:
                    errorKey: orders:client:orderNotFound
                    errorMessage: Order was not found
        '500':
          description: If an unexpected error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IErrorCodeRespo

# --- truncated at 32 KB (68 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/tictactrip/refs/heads/main/openapi/tictactrip-booking-api-openapi.yml