openapi: 3.2.0
info:
version: 4.15.0
title: Trip Ninja API Documentation Pre Booking API
description: "
\n | IE01 | Need minimum 2 destinations |
\n | IE02 | Duplicate city in list |
\n | IE09 | Can't run any queries for flight dates in the past |
\n | IE10 | Incorrect city_type, expected one of ['C', 'A'] |
\n | IE16 | Please provide a PCC |
\n | IE17 | Invalid carrier |
\n | IE19 | Incorrect region, expected one of 'emea', 'apac', 'americas', 'edge' |
\n | IE20 | Incorrect provider, expected one of '1V','1G','1P','1A' |
\n | IE21 | Wrong currency |
\n | IE22 | Not a valid cabin option. expected one of 'E' , 'PE', 'SE', 'BC','FC', 'PFC' |
\n | IE23 | Not a valid alliance. Expected one of *A, *S, *O |
\n | IE24 | Travellers Type does not meet expected criteria. Should be a list having between 0 and 10 values |
\n | IE26 | Exclude_carriers, alliance and permitted_carriers are mutually exclusive - please choose one |
\n | IE27 | Num_results should be an integer between 50 and 5000 |
\n | IE28 | Refundable parameter must be boolean value true or false |
\n | IE29 | Invalid Traveller type |
\n | IE30 | Incorrect value for single_pnr, must be boolean |
\n | IE31 | LCC token not associated with user |
\n | IE32 | Incorrect value for include_itineraries, must be boolean |
\n | IE33 | Stops must be one of 'any', 'direct', '1', '2' |
\n | IE34 | Incorrect value for no_overnight_layovers, must be boolean |
\n | IE36 | Invalid LCC name |
\n\n"
x-logo:
url: https://s3.amazonaws.com/tn-api-docs/trip_ninja_logo.png
altText: Trip Ninja logo
href: https://www.tripninja.io/
servers:
- url: https://preprodapi.tripninja.io
description: Pre-Production server
tags:
- name: Pre Booking
paths:
/pre-booking/:
post:
summary: Price Confirmation Report
description: When performing an availability or price confirmation request - when a user has selected their flights or is arriving on the site from metasearch - please send a request to the following endpoint. This provides valuable data to our revenue management system in determining markups for trips.
operationId: PriceConfirmationReport
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PriceConfirmationReportRequest'
responses:
200:
description: Success
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: success
400:
description: Invalid Input
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: States whether request to book was successful.
example: Not booked
tags:
- Pre Booking
components:
schemas:
PriceConfirmationReportRequest:
title: Request
type: object
required: trip_id segment_ids
properties:
trip_id:
type: string
description: Trip ID returned in search response
example: 6be6e72c60102bd489ac46434d4ac6c11e047ee8
segment_ids:
$ref: '#/components/schemas/segment_ids'
is_retry:
type: boolean
description: Optional parameter that allows pre-booking for trips that have expired from our cache.
default: false
example: false
segment_ids:
type: Array of strings and/or Array of arrays
description: "Array of segment_id's for the booked segments - These will be strings for one-ways, arrays of strings for open-jaws and joined strings for VI flights.\n\nFor the booking of oneway virtually interlined tickets there will be two segment_id's. For example segment_id_0_1 and segment_id_0_2. \nWhen being booked the segment_id's should be joined together by two underscores **segment_id_0_1__segment_id_0_2** and the resulting string should be sent in the position of the original search.\n\ne.g. `18fd1992fd90e6e2cf44d49308a1482b2ecd7f67__59e15240be759a023c950e66379dca775fd8aaf1`\n\nThis is the example structure but should be generalized for all combinations as Trip Ninja's technology handles more than just 3-segment trips.\n1) structure: [0, 1]\n - `segment_ids: [\"segment_id_0\", \"segment_id_1\"]`\n2) structure: [(0, 1)]\n - `segment_ids: [[\"segment_id_0\", \"segment_id_1\"]]`\n3) VI structure: [0, 1.1, 1.2]\n - `segment_ids: [[\"segment_id_0\", \"segment_id_1_1__segment_id_1_2\"]]`\n4) structure: [0, 1, 2]\n - `segment_ids: [\"segment_id_0\", \"segment_id_1\", \"segment_id_2\"]`\n5) structure: [(0, 1), 2]\n - `segment_ids: [[\"segment_id_0\", \"segment_id_1\"], \"segment_id_2\"]`\n6) structure: [(0, 2), 1]\n - `segment_ids: [[\"segment_id_0\", \"segment_id_2\"], \"segment_id_1\"]`\n7) structure: [0, (1, 2)]\n - `segment_ids: [\"segment_id_0\", [\"segment_id_1\", \"segment_id_2\"]]`\n8) structure: [0.1, 0.2, (1, 2), 3.1. 3.2]\n - `segment_ids: [\"segment_id_0_1__segment_id_0_2\", [\"segment_id_1\", \"segment_id_2\"]], \"segment_id_3_1__segment_id_3_2]\"`\n"
example:
- 18fd1992fd90e6e2cf44d49308a1482b2ecd7f67
- 59e15240be759a023c950e66379dca775fd8aaf1