openapi: 3.0.0
info:
version: 4.15.0
title: Trip Ninja API Documentation
description: ''
servers:
- url: https://sandbox.tripninja.io
description: Sandbox server
paths:
/v3/report/book/:
post:
summary: Booking Report
description: ''
operationId: ''
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BookingReportRequest'
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
status:
type: number
description: Status code indicating request outcome.
example: 200
message:
type: string
example: success
description: A human-readable message providing more details. (e.g., "success")
'400':
description: Invalid Input
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: A human-readable error code. (e.g., "IE52")
example: IE52
message:
type: string
description: A human-readable message providing more details. (e.g., "Trip ID
not found")
example: Trip ID not found
examples:
IE45ErrorCode:
$ref: '#/components/examples/IE45ErrorCode'
IE52ErrorCode:
$ref: '#/components/examples/IE52ErrorCode'
IE55ErrorCode:
$ref: '#/components/examples/IE55ErrorCode'
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: A human-readable error code. (e.g., "IE44")
example: IE44
message:
type: string
description: A human-readable message providing more details. (e.g., "User is
not authorized")
example: User is not authorized
components:
schemas:
BookingReportRequest:
title: Booking Request
type: object
required:
- trip_id
- itinerary_id
properties:
trip_id:
type: string
description: Unique identifier from get-searches for this search. Used in all subsequent
requests related to this trip.
example: gAAAAABoElDHItHlqVNLp7dSOFaKmldHwk_d_5lBZIUhTMFJXmNnh-zpPbrPBCm-nZhqTQNeRgTt8e7X0KTOyg0cuLiB3s61xAYDoOWNMjWjM5Ln2wgSItqalRiymlk5PCcokfM3LAqp09u1i3bpWHxNTrT6yOEYk_hEwFxXwdQpkQroawW-hZUQAQM2M9763o2nWLt-LVgX0M-F2unSvWep7l9c5C8pcHxdKQ1GPdm6sxdkEgV30_9U_C-59CvVAcHWpontAcIh6kO6NSC-4_jJ4xQitlbxGyDxAd3PyuEWGBTVfdTGm8qeCEQG_XVvLDy5_uKOq9vY9i6STo-XB-kYSULYCGJ720gOFd3Ohpp1u5n20yg2I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W6Kw6aT97ZrAWdqYQOLrDSp6pj-I-7OfR3EXiQLlIsR5eCy7_2nrjTwwtaO1l99Ax5I4q-rnb97qSs52o5tdEwchNURafUsENTHzPIRcgbxSPpSW3ke5j0LjqOlWRGTjrl81v4WKTJocMUEV8v61OtLOKuGPF8N_SUx4NbHw1Bar3NYGeLl1BV2B7G8ZBHXfplXV2aqM5PgygFSVXRf7Olr0zWLp9wn5
itinerary_id:
type: string
description: Unique identifier from generate-solutions for the itinerary. Used
in all subsequent requests related to this trip.
example: cb89c9b9eb06abc00f7dab156c507ea1c0a4a7e7
customer_booking_reference_id:
type: string
description: Optional field for the client's booking reference identifier. Maximum 255 characters.
example: cust-book-1234aa94d
is_retry:
type: boolean
description: 'Indicates if this request is retrying a previously failed booking attempt. '
example: false
default: false
final_price:
type: float
description: Records the final base price of the booked itinerary, excluding markup. Useful
when price changes occur between search and booking.
example: 199.99
examples:
IE45ErrorCode:
summary: customer_booking_reference_id Validation Error
value:
status: IE45
message: '`customer_booking_reference_id` length is invalid (must be less than 255 characters)'
IE55ErrorCode:
summary: Reporting Data Validation Error
value:
status: IE55
message: One of pricing_solution_ids or itinerary_id is required.
IE52ErrorCode:
summary: Trip ID Validation Error
value:
status: IE52
message: Trip ID not found