{"openapi":"3.1.0","info":{"title":"Xedos Transport Partner Booking API","version":"1.0.0","summary":"Search, seat maps, seat blocks, confirmations and cancellations for authorised travel partners.","description":"For aggregators and travel partners that sell an operator's bus seats. Partners are onboarded after an agreement with the operator; until then an operator can issue sandbox keys that only reach sandbox connections.\n\nEvery seat you sell comes from the same live inventory as the operator's own website and counters, so a seat is never sold twice. A booking is two steps: block seats (POST /holds), then confirm the block (POST /holds/{blockKey}/confirm) after your customer has paid you.\n\nAuthentication: `Authorization: Bearer <api key>` plus an HMAC-SHA256 request signature (X-Tms-Key-Id, X-Tms-Timestamp, X-Tms-Nonce, X-Tms-Signature). See the Partner API Guide for examples.\n\nSignature: `hex(HMAC-SHA256(secret, timestamp + \".\" + nonce + \".\" + METHOD + \".\" + path + \".\" + sha256hex(body)))` where `path` starts at `/transport/partner/v1` and includes the query string, `secret` is the base64-decoded signing secret issued with the key, and `body` is the exact request bytes (empty for GET). Timestamps must be within 300 seconds; each nonce is accepted once per key."},"servers":[{"url":"{apiBase}/transport/partner/v1","variables":{"apiBase":{"default":"https://xedos.co.in/api","description":"API base URL given to you at onboarding."}}}],"tags":[{"name":"Inventory"},{"name":"Booking"},{"name":"Policy"}],"paths":{"/availability":{"get":{"summary":"Search services sold through your channel","tags":["Inventory"],"operationId":"getAvailability","description":"Only departures with seats allocated to your channel and an active channel fare are returned. `seatsAvailable` is the smaller of the live seat inventory and your channel's remaining allocation.\n\nRequired scope: `inventory:read`.","parameters":[{"$ref":"#/components/parameters/OrganisationId"},{"$ref":"#/components/parameters/KeyId"},{"$ref":"#/components/parameters/Timestamp"},{"$ref":"#/components/parameters/Nonce"},{"$ref":"#/components/parameters/Signature"},{"$ref":"#/components/parameters/ChannelId"},{"name":"from","in":"query","required":true,"schema":{"type":"string","description":"Origin city/locality id (see the mapping sheet shared at onboarding)."}},{"name":"to","in":"query","required":true,"schema":{"type":"string","description":"Destination city/locality id."}},{"name":"date","in":"query","required":true,"schema":{"type":"string","description":"Travel date, YYYY-MM-DD.","format":"date"}},{"name":"passengers","in":"query","required":false,"schema":{"type":"integer","description":"1–10","minimum":1,"maximum":10}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Availability"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"429":{"$ref":"#/components/responses/Error429"}},"security":[{"PartnerKey":[]}],"x-required-scope":"inventory:read"}},"/services/{serviceId}/seat-layout":{"get":{"summary":"Seat map for a departure","tags":["Inventory"],"operationId":"getSeatLayout","description":"Every seat of the layout is returned for drawing; `available` is true only for seats your channel may sell now for the chosen boarding and dropping stops.\n\nRequired scope: `inventory:read`.","parameters":[{"$ref":"#/components/parameters/OrganisationId"},{"$ref":"#/components/parameters/KeyId"},{"$ref":"#/components/parameters/Timestamp"},{"$ref":"#/components/parameters/Nonce"},{"$ref":"#/components/parameters/Signature"},{"$ref":"#/components/parameters/ChannelId"},{"name":"serviceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"originStopId","in":"query","required":false,"schema":{"type":"string","description":"Boarding stop; defaults to the first stop."}},{"name":"destinationStopId","in":"query","required":false,"schema":{"type":"string","description":"Dropping stop; defaults to the last stop."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeatLayout"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"}},"security":[{"PartnerKey":[]}],"x-required-scope":"inventory:read"}},"/services/{serviceId}/boarding-points":{"get":{"summary":"Boarding and dropping points","tags":["Inventory"],"operationId":"getBoardingPoints","parameters":[{"$ref":"#/components/parameters/OrganisationId"},{"$ref":"#/components/parameters/KeyId"},{"$ref":"#/components/parameters/Timestamp"},{"$ref":"#/components/parameters/Nonce"},{"$ref":"#/components/parameters/Signature"},{"$ref":"#/components/parameters/ChannelId"},{"name":"serviceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardingPoints"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"}},"description":"Required scope: `inventory:read`.","security":[{"PartnerKey":[]}],"x-required-scope":"inventory:read"}},"/quotes":{"post":{"summary":"Price exact seats","tags":["Booking"],"operationId":"createQuote","parameters":[{"$ref":"#/components/parameters/OrganisationId"},{"$ref":"#/components/parameters/KeyId"},{"$ref":"#/components/parameters/Timestamp"},{"$ref":"#/components/parameters/Nonce"},{"$ref":"#/components/parameters/Signature"},{"$ref":"#/components/parameters/ChannelId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"description":"Returns the binding channel price for the seats, valid for about 15 minutes.\n\nRequired scope: `booking:write`.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"}},"security":[{"PartnerKey":[]}],"x-required-scope":"booking:write"}},"/holds":{"post":{"summary":"Block seats","tags":["Booking"],"operationId":"createHold","parameters":[{"$ref":"#/components/parameters/OrganisationId"},{"$ref":"#/components/parameters/KeyId"},{"$ref":"#/components/parameters/Timestamp"},{"$ref":"#/components/parameters/Nonce"},{"$ref":"#/components/parameters/Signature"},{"$ref":"#/components/parameters/ChannelId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoldRequest"}}}},"description":"Reserves the quoted seats for about 9 minutes and returns an opaque `blockKey`. Confirm before `expiresAt` or release the block.\n\nRequired scope: `booking:write`.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Block"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"}},"security":[{"PartnerKey":[]}],"x-required-scope":"booking:write"}},"/holds/{blockKey}/confirm":{"post":{"summary":"Confirm a block (issue tickets)","tags":["Booking"],"operationId":"confirmHold","parameters":[{"$ref":"#/components/parameters/OrganisationId"},{"$ref":"#/components/parameters/KeyId"},{"$ref":"#/components/parameters/Timestamp"},{"$ref":"#/components/parameters/Nonce"},{"$ref":"#/components/parameters/Signature"},{"$ref":"#/components/parameters/ChannelId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"blockKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"passengers":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/PassengerDetails"},"description":"Optional, when not sent with the block. A block that already has passenger details keeps them; different ones are refused (TMS_PARTNER_PASSENGERS_ALREADY_SET)."}}}}}},"description":"Your confirmation converts the blocked seats into a booking and returns the PNR and ticket numbers. Repeating a confirmation for a confirmed booking returns the same booking.\n\nRequired scope: `booking:write`.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"}},"security":[{"PartnerKey":[]}],"x-required-scope":"booking:write"}},"/holds/{blockKey}/release":{"post":{"summary":"Release a block","tags":["Booking"],"operationId":"releaseHold","parameters":[{"$ref":"#/components/parameters/OrganisationId"},{"$ref":"#/components/parameters/KeyId"},{"$ref":"#/components/parameters/Timestamp"},{"$ref":"#/components/parameters/Nonce"},{"$ref":"#/components/parameters/Signature"},{"$ref":"#/components/parameters/ChannelId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"blockKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"}},"description":"Required scope: `booking:write`.","security":[{"PartnerKey":[]}],"x-required-scope":"booking:write"}},"/bookings/{ref}":{"get":{"summary":"Booking status","tags":["Booking"],"operationId":"getBooking","parameters":[{"$ref":"#/components/parameters/OrganisationId"},{"$ref":"#/components/parameters/KeyId"},{"$ref":"#/components/parameters/Timestamp"},{"$ref":"#/components/parameters/Nonce"},{"$ref":"#/components/parameters/Signature"},{"$ref":"#/components/parameters/ChannelId"},{"name":"ref","in":"path","required":true,"schema":{"type":"string","description":"Your partner booking reference."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"}},"description":"Required scope: `booking:write`.","security":[{"PartnerKey":[]}],"x-required-scope":"booking:write"}},"/bookings/{ref}/cancellation-preview":{"get":{"summary":"Refund if cancelled now","tags":["Booking"],"operationId":"previewCancellation","parameters":[{"$ref":"#/components/parameters/OrganisationId"},{"$ref":"#/components/parameters/KeyId"},{"$ref":"#/components/parameters/Timestamp"},{"$ref":"#/components/parameters/Nonce"},{"$ref":"#/components/parameters/Signature"},{"$ref":"#/components/parameters/ChannelId"},{"name":"ref","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancellationPreview"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"}},"description":"Required scope: `booking:write`.","security":[{"PartnerKey":[]}],"x-required-scope":"booking:write"}},"/bookings/{ref}/cancel":{"post":{"summary":"Cancel a confirmed booking","tags":["Booking"],"operationId":"cancelBooking","parameters":[{"$ref":"#/components/parameters/OrganisationId"},{"$ref":"#/components/parameters/KeyId"},{"$ref":"#/components/parameters/Timestamp"},{"$ref":"#/components/parameters/Nonce"},{"$ref":"#/components/parameters/Signature"},{"$ref":"#/components/parameters/ChannelId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"ref","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","description":"Optional free-text reason (not stored with passenger data)."}}}}}},"description":"Cancels every ticket under the operator's active cancellation policy and returns the refund amount. The seats return to your channel's allocation.\n\nRequired scope: `booking:write`.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Booking"},{"type":"object","properties":{"refund":{"$ref":"#/components/schemas/CancellationPreview"}}}]}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"}},"security":[{"PartnerKey":[]}],"x-required-scope":"booking:write"}},"/cancellation-policy":{"get":{"summary":"Active cancellation policies","tags":["Policy"],"operationId":"getCancellationPolicy","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancellationPolicies"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"429":{"$ref":"#/components/responses/Error429"}},"description":"Required scope: `inventory:read`.","security":[{"PartnerKey":[]}],"x-required-scope":"inventory:read","parameters":[{"$ref":"#/components/parameters/OrganisationId"},{"$ref":"#/components/parameters/KeyId"},{"$ref":"#/components/parameters/Timestamp"},{"$ref":"#/components/parameters/Nonce"},{"$ref":"#/components/parameters/Signature"},{"$ref":"#/components/parameters/ChannelId"}]}}},"components":{"securitySchemes":{"PartnerKey":{"type":"http","scheme":"bearer","description":"API key issued by the operator (shown once). Every request must ALSO carry the four X-Tms signing headers."}},"parameters":{"OrganisationId":{"name":"X-Organisation-Id","in":"header","required":true,"schema":{"type":"string","description":"The operator identifier given at onboarding."}},"KeyId":{"name":"X-Tms-Key-Id","in":"header","required":true,"schema":{"type":"string","description":"Id of the API key the signing secret belongs to."}},"Timestamp":{"name":"X-Tms-Timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds. Must be within 300 seconds of server time.","pattern":"^\\d{9,11}$"}},"Nonce":{"name":"X-Tms-Nonce","in":"header","required":true,"schema":{"type":"string","description":"Unique per request (16–128 of A–Z a–z 0–9 _ -). Reuse is refused.","pattern":"^[A-Za-z0-9_-]{16,128}$"}},"Signature":{"name":"X-Tms-Signature","in":"header","required":true,"schema":{"type":"string","description":"Lower-case hex HMAC-SHA256 of the signing string.","pattern":"^[a-f0-9]{64}$"}},"ChannelId":{"name":"X-Tms-Channel-Id","in":"header","required":false,"schema":{"type":"string","description":"Only needed when your application is connected to more than one channel."}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","description":"Recommended on every POST: retrying with the same key never books twice (16–200 printable characters)."}}},"responses":{"Error400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error401":{"description":"Authentication or signature failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error409":{"description":"Refused in the current state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable error code.","enum":["TMS_PARTNER_TENANT_REQUIRED","TMS_PARTNER_KEY_REQUIRED","TMS_PARTNER_KEY_INVALID","TMS_PARTNER_KEY_ID_MISMATCH","TMS_PARTNER_SIGNATURE_REQUIRED","TMS_PARTNER_SIGNATURE_INVALID","TMS_PARTNER_SIGNATURE_EXPIRED","TMS_PARTNER_NONCE_REPLAYED","TMS_PARTNER_APP_SCOPE_DENIED","TMS_PARTNER_APP_NOT_APPROVED","TMS_PARTNER_IP_DENIED","TMS_PARTNER_RATE_LIMITED","TMS_PARTNER_CHANNEL_NOT_BOUND","TMS_PARTNER_CHANNEL_AMBIGUOUS","TMS_PARTNER_KEY_ENVIRONMENT_MISMATCH","TMS_PARTNER_REQUEST_INVALID","TMS_PARTNER_SERVICE_NOT_DISTRIBUTED","TMS_PARTNER_SEAT_NOT_AVAILABLE","TMS_PARTNER_MIXED_CLASS_NOT_SUPPORTED","TMS_PARTNER_QUOTE_NOT_FOUND","TMS_PARTNER_BLOCK_NOT_FOUND","TMS_PARTNER_BOOKING_NOT_FOUND","TMS_PARTNER_BOOKING_NOT_CANCELLABLE","TMS_PARTNER_PASSENGERS_INVALID","TMS_PARTNER_PASSENGERS_ALREADY_SET","TMS_CHANNEL_STOP_SELL_ACTIVE","TMS_CHANNEL_ALLOCATION_REQUIRED","TMS_CHANNEL_ALLOCATION_AMBIGUOUS","TMS_CHANNEL_ALLOCATION_NOT_ACTIVE","TMS_CHANNEL_SELL_WINDOW_CLOSED","TMS_CHANNEL_QUOTA_EXCEEDED","TMS_CHANNEL_SUBMISSION_EXISTS","TMS_PASSENGER_SEAT_LEG_CONTENTION","TMS_CHANNEL_CANONICAL_QUOTE_REQUIRED","TMS_CHANNEL_EFFECTIVE_RATE_REQUIRED","TMS_CHANNEL_BOOKING_REQUEST_INVALID","TMS_CHANNEL_HOLD_REQUIRED","TMS_CHANNEL_HOLD_NOT_LIVE","TMS_CHANNEL_PROVIDER_BOOKING_BINDING_MISMATCH","TMS_CHANNEL_SUBMISSION_OUTCOME_PENDING","TMS_CHANNEL_SUBMISSION_NOT_HELD","TMS_CHANNEL_ADAPTER_NOT_BOOKABLE","TMS_CHANNEL_NOT_ACTIVE","TMS_CHANNEL_CANCELLATION_PENDING","TMS_OPENDATA_VERSION_CONFLICT","TMS_OPENDATA_PERSISTENCE_UNAVAILABLE","TMS_OPENDATA_SECRET_AUTHORITY_REQUIRED"]},"message":{"type":"string","description":"Plain-language explanation."},"retryable":{"type":"boolean"}},"required":["code","message","retryable"]}},"required":["error"]},"Availability":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"date":{"type":"string","format":"date"},"environment":{"type":"string","enum":["SANDBOX","LIVE"]},"fareNote":{"type":"string"},"services":{"type":"array","items":{"$ref":"#/components/schemas/Service"}}}},"Service":{"type":"object","properties":{"serviceId":{"type":"string"},"serviceCode":{"type":"string"},"departureAt":{"type":"string","format":"date-time"},"arrivalAt":{"type":"string","format":"date-time"},"durationMinutes":{"type":"integer"},"originStopId":{"type":"string"},"destinationStopId":{"type":"string"},"vehicleClass":{"type":"string"},"amenities":{"type":"array","items":{"type":"string"}},"seatsAvailable":{"type":"integer"},"classes":{"type":"array","items":{"type":"object","properties":{"classCode":{"type":["string","null"]},"seatsAvailable":{"type":"integer"},"allocationMode":{"type":"string","enum":["HARD_BLOCK","SOFT_QUOTA","FREE_SELL"]}}}},"fareFromMinor":{"type":"string","description":"Indicative lowest channel fare. Integer minor units (paise) as a string.","pattern":"^-?\\d{1,18}$"},"currency":{"type":"string"},"boardingPointCount":{"type":"integer"},"cancellationPolicyId":{"type":["string","null"]}}},"SeatLayout":{"type":"object","properties":{"serviceId":{"type":"string"},"originStopId":{"type":"string"},"destinationStopId":{"type":"string"},"layoutCode":{"type":"string"},"deckCount":{"type":"integer"},"seatsAvailable":{"type":"integer"},"classes":{"type":"array","items":{"type":"object","properties":{"classCode":{"type":["string","null"]},"seatsAvailable":{"type":"integer"},"allocationMode":{"type":"string"}}}},"seats":{"type":"array","items":{"$ref":"#/components/schemas/Seat"}}}},"Seat":{"type":"object","properties":{"seatCode":{"type":"string"},"deck":{"type":"integer"},"row":{"type":"integer"},"column":{"type":"integer"},"rowSpan":{"type":"integer"},"columnSpan":{"type":"integer"},"seatType":{"type":"string","enum":["SEATER","SLEEPER"]},"berth":{"type":["string","null"],"enum":["LOWER","UPPER",null]},"classCode":{"type":["string","null"]},"ladiesOnly":{"type":"boolean"},"window":{"type":"boolean"},"aisle":{"type":"boolean"},"available":{"type":"boolean"}}},"BoardingPoint":{"type":"object","properties":{"stopId":{"type":"string"},"stopCode":{"type":"string"},"name":{"type":"string"},"locality":{"type":["string","null"]},"scheduledAt":{"type":"string","format":"date-time"}}},"BoardingPoints":{"type":"object","properties":{"serviceId":{"type":"string"},"boardingPoints":{"type":"array","items":{"$ref":"#/components/schemas/BoardingPoint"}},"droppingPoints":{"type":"array","items":{"$ref":"#/components/schemas/BoardingPoint"}}}},"QuoteRequest":{"type":"object","properties":{"serviceId":{"type":"string"},"originStopId":{"type":"string"},"destinationStopId":{"type":"string"},"seatCodes":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":10},"fareClassCode":{"type":"string","description":"Fare class code shared at onboarding (for example GENERAL)."},"passengerGender":{"type":"string","description":"Only for restricted fare classes.","enum":["FEMALE","MALE","OTHER","UNDISCLOSED"]},"passengerAge":{"type":"integer","description":"Only for restricted fare classes."}},"required":["serviceId","originStopId","destinationStopId","seatCodes","fareClassCode"]},"Quote":{"type":"object","properties":{"quoteId":{"type":"string"},"serviceId":{"type":"string"},"originStopId":{"type":"string"},"destinationStopId":{"type":"string"},"seatCodes":{"type":"array","items":{"type":"string"}},"classCode":{"type":"string"},"quantity":{"type":"integer"},"currency":{"type":"string"},"totalMinor":{"type":"string","description":"Total including taxes. Integer minor units (paise) as a string.","pattern":"^-?\\d{1,18}$"},"taxMinor":{"type":"string","description":"Tax included in the total. Integer minor units (paise) as a string.","pattern":"^-?\\d{1,18}$"},"expiresAt":{"type":"string","format":"date-time"}}},"HoldRequest":{"type":"object","properties":{"quoteId":{"type":"string"},"partnerBookingRef":{"type":"string","description":"Your own unique booking reference.","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,95}$"},"passengers":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/PassengerDetails"},"description":"Optional traveller details, at most one per quoted seat. Shown on the operator's passenger manifest."}},"required":["quoteId","partnerBookingRef"]},"PassengerDetails":{"type":"object","properties":{"seatCode":{"type":"string","description":"One of the quoted seats."},"name":{"type":"string","description":"Traveller name as on their ID: letters, spaces, dots, apostrophes and hyphens, up to 80.","maxLength":80},"age":{"type":"integer","description":"Optional, 0–120.","minimum":0,"maximum":120},"gender":{"type":"string","description":"Optional.","enum":["FEMALE","MALE","OTHER","UNDISCLOSED"]}},"required":["seatCode","name"]},"Block":{"type":"object","properties":{"blockKey":{"type":"string","description":"Opaque; use it to confirm or release."},"partnerBookingRef":{"type":"string"},"state":{"type":"string","enum":["HELD"]},"expiresAt":{"type":"string","format":"date-time"},"serviceId":{"type":"string"},"seatCodes":{"type":"array","items":{"type":"string"}},"quantity":{"type":"integer"},"totalMinor":{"type":"string","description":"Total. Integer minor units (paise) as a string.","pattern":"^-?\\d{1,18}$"},"currency":{"type":"string"},"passengerCount":{"type":"integer","description":"How many seats have traveller details."}}},"Booking":{"type":"object","properties":{"partnerBookingRef":{"type":"string"},"blockKey":{"type":["string","null"]},"state":{"type":"string","enum":["HELD","CONFIRMING","CONFIRMED","CANCELLED","RELEASED","EXPIRED","FAILED"]},"environment":{"type":"string","enum":["SANDBOX","LIVE"]},"serviceId":{"type":["string","null"]},"originStopId":{"type":["string","null"]},"destinationStopId":{"type":["string","null"]},"quantity":{"type":"integer"},"holdExpiresAt":{"type":["string","null"],"format":"date-time"},"pnr":{"type":["string","null"]},"tickets":{"type":"array","items":{"type":"object","properties":{"ticketNumber":{"type":"string"},"seatCode":{"type":["string","null"]},"state":{"type":"string"},"passenger":{"type":["object","null"],"properties":{"name":{"type":"string"},"age":{"type":["integer","null"]},"gender":{"type":["string","null"]}}}}}},"totalMinor":{"type":["string","null"]},"currency":{"type":["string","null"]}}},"CancellationPreview":{"type":"object","properties":{"partnerBookingRef":{"type":"string"},"currency":{"type":["string","null"]},"paidMinor":{"type":"string","description":"Paid. Integer minor units (paise) as a string.","pattern":"^-?\\d{1,18}$"},"refundMinor":{"type":"string","description":"Refund due. Integer minor units (paise) as a string.","pattern":"^-?\\d{1,18}$"},"cancellationChargeMinor":{"type":"string","description":"Charge retained. Integer minor units (paise) as a string.","pattern":"^-?\\d{1,18}$"},"tickets":{"type":"array","items":{"type":"object","properties":{"ticketNumber":{"type":"string"},"seatCode":{"type":["string","null"]},"paidMinor":{"type":"integer"},"refundMinor":{"type":"integer"},"hoursBeforeDeparture":{"type":"number"}}}}}},"CancellationPolicies":{"type":"object","properties":{"policies":{"type":"array","items":{"type":"object","properties":{"policyId":{"type":"string"},"policyCode":{"type":"string"},"name":{"type":"string"},"effectiveFrom":{"type":"string"},"slabs":{"type":"array","items":{"type":"object","properties":{"hoursBeforeDepartureMin":{"type":"number"},"hoursBeforeDepartureMax":{"type":["number","null"]},"refundPercent":{"type":"number"},"flatFeeMinor":{"type":"integer"},"refundTaxes":{"type":"boolean"},"refundFees":{"type":"boolean"}}}}}}}}}}},"x-webhook-events":{"booking.confirmed":"tms.channel.partner-booking-confirmed.v1","booking.cancelled":"tms.channel.partner-booking-cancelled.v1","inventory.stop_sell":"tms.channel.stop-sell-applied.v1","inventory.stop_sell_lifted":"tms.channel.stop-sell-lifted.v1","fare.changed":"tms.channel-rate-plan.activated.v1","schedule.changed":"tms.timetable.change-notice-raised.v1"}}