{"openapi":"3.1.0","info":{"title":"Basket Service","version":"0.1.0"},"paths":{"/health/live":{"get":{"tags":["health"],"summary":"Liveness Probe","description":"Liveness probe","operationId":"liveness_probe_health_live_get","responses":{"200":{"description":"Health check successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LivenessResponse"}}}},"503":{"description":"Service unavailable"}}}},"/health/ready":{"get":{"tags":["health"],"summary":"Readiness Probe","description":"Readiness probe","operationId":"readiness_probe_health_ready_get","responses":{"200":{"description":"Health check successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadinessResponse"}}}},"503":{"description":"Service unavailable"}}}},"/baskets":{"post":{"tags":["baskets"],"summary":"Create a new basket","description":"Create a new basket for a travel package with specified departure and occupancy.","operationId":"Create_a_new_basket_baskets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBasketRequest"}}},"required":true},"responses":{"201":{"description":"The created basket with initial configurations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasketSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/baskets/{basket_id}":{"delete":{"tags":["baskets"],"summary":"Delete a basket","description":"Delete a basket by its ID. This operation cannot be undone.","operationId":"Delete_a_basket_baskets__basket_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["baskets"],"summary":"Get a basket","description":"Retrieve a basket by its unique identifier with all its configurations, travellers, and promotions.","operationId":"Retrieve_a_basket_by_ID_baskets__basket_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}}],"responses":{"200":{"description":"The basket data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasketSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/baskets/{basket_id}/temporary-hold/extend":{"post":{"tags":["baskets"],"summary":"Extend temporary hold timer","description":"Extend an active temporary hold timer and return the updated basket.","operationId":"Extend_temporary_hold_timer_baskets__basket_id__temporary_hold_extend_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}}],"responses":{"200":{"description":"The basket with updated temporary hold expiry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasketSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/baskets/{basket_id}/bookings":{"post":{"tags":["bookings"],"summary":"Create a booking","description":"Convert a basket to a booking via KTAPI and Salesforce.","operationId":"Create_a_booking_baskets__basket_id__bookings_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}}],"responses":{"201":{"description":"The booking result with itinerary ID","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create A Booking Baskets  Basket Id  Bookings Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/baskets/{basket_id}/promotions":{"post":{"tags":["promotions"],"summary":"Apply a promotion","description":"Apply a promotion code to a basket by validating through KTAPI beforehand.","operationId":"Apply_a_promotion_to_a_basket_baskets__basket_id__promotions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyPromotionRequest"}}}},"responses":{"200":{"description":"The updated basket with the promotion applied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasketSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/baskets/{basket_id}/promotions/{code}":{"delete":{"tags":["promotions"],"summary":"Remove a promotion","description":"Remove a promotion from a basket by its code.","operationId":"Remove_a_promotion_from_a_basket_baskets__basket_id__promotions__code__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}},{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"The updated basket with the promotion removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasketSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/baskets/{basket_id}/travellers":{"put":{"tags":["travellers"],"summary":"Update travellers","description":"Update traveller information for a basket. All travellers must be provided and IDs must match existing travellers.","operationId":"Update_travellers_baskets__basket_id__travellers_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UpdateTravellerRequest"},"title":"Travellers"}}}},"responses":{"200":{"description":"The updated list of travellers","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TravellerSerializer"},"title":"Response Update Travellers Baskets  Basket Id  Travellers Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/baskets/{basket_id}/components":{"patch":{"tags":["components"],"summary":"Update component selections","description":"Update the selected options and add-ons for one or more components in a basket.","operationId":"Update_component_selections_baskets__basket_id__components_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UpdateComponentSelectionsRequest"},"title":"Selections"}}}},"responses":{"200":{"description":"The updated component configurations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComponentSerializer"},"title":"Response Update Component Selections Baskets  Basket Id  Components Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/baskets/{basket_id}/components/{component_id}":{"delete":{"tags":["components"],"summary":"Reset component selections","description":"Clear all option selections for a specific component, resetting it to its initial empty state.","operationId":"Reset_component_selections_baskets__basket_id__components__component_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}},{"name":"component_id","in":"path","required":true,"schema":{"type":"string","title":"Component Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/baskets/{basket_id}/prices":{"get":{"tags":["prices"],"summary":"Get basket prices","description":"Calculate and retrieve pricing for a basket with all applied promotions and selections.","operationId":"Get_basket_prices_baskets__basket_id__prices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}}],"responses":{"200":{"description":"The pricing data including all price requests and responses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasketPricingSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/baskets/{basket_id}/payment-schedules":{"get":{"tags":["payment-schedules"],"summary":"Get payment schedules","description":"Get payment schedules for a basket. If the basket already has payment schedules, those are returned; otherwise they are calculated and retrieved from KTAPI.","operationId":"Get_payment_schedules_baskets__basket_id__payment_schedules_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}},{"name":"pay_per_person","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Pay Per Person"}}],"responses":{"200":{"description":"List of payment schedule rules with due dates and amounts","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ktbasket__serializers__payment_schedule__PaymentScheduleSerializer"},"title":"Response Get Payment Schedules Baskets  Basket Id  Payment Schedules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/baskets/{basket_id}/payment-requests":{"post":{"tags":["payment-requests"],"summary":"Create payment request","description":"Create or refresh a payment request for a basket. Deposit payment schedules are linked automatically. Repeat calls update the existing incomplete request.","operationId":"Create_payment_request_baskets__basket_id__payment_requests_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCreateRequest"}}}},"responses":{"201":{"description":"The created or updated payment request with ID and callback URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequestSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["payment-requests"],"summary":"Get payment requests","description":"Retrieve all payment requests for a basket.","operationId":"Get_payment_requests_baskets__basket_id__payment_requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}}],"responses":{"200":{"description":"List of payment requests for the basket","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentRequestSerializer"},"title":"Response Get Payment Requests Baskets  Basket Id  Payment Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/baskets/{basket_id}/payment-requests/{payment_request_id}/complete":{"put":{"tags":["payment-requests"],"summary":"Update payment request status","description":"Update the status of a payment request. Typically called by payment processors via callback URL.","operationId":"Update_basket_payment_status_baskets__basket_id__payment_requests__payment_request_id__complete_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"basket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Basket Id"}},{"name":"payment_request_id","in":"path","required":true,"schema":{"type":"integer","title":"Payment Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"The updated payment request with completion response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequestSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddOnSelection":{"properties":{"travellers":{"items":{"type":"integer"},"type":"array","title":"Travellers","description":"List of traveller IDs for traveller-scoped selections"},"rooms":{"items":{"type":"integer"},"type":"array","title":"Rooms","description":"List of room IDs for room-scoped selections"},"units":{"items":{"type":"integer"},"type":"array","title":"Units","description":"List of unit IDs for unit-scoped selections"},"add_on_id":{"type":"string","title":"Add On Id","description":"Unique identifier for the add-on"}},"type":"object","required":["travellers","rooms","units","add_on_id"],"title":"AddOnSelection","description":"Schema for component selection add-on."},"AddOnSelectionSerializer":{"properties":{"unit_of_measure":{"type":"string","title":"Unit Of Measure","description":"The unit of measure for the selection"},"travellers":{"items":{"type":"integer"},"type":"array","title":"Travellers","description":"The traveller IDs for the selection"},"rooms":{"items":{"type":"integer"},"type":"array","title":"Rooms","description":"The list of 1-based room indices (1..N) for room-scoped selections"},"units":{"items":{"type":"integer"},"type":"array","title":"Units","description":"The unit IDs for the selection"},"id":{"type":"string","title":"Id","description":"The add-on ID"},"offered_add_on_id":{"type":"string","title":"Offered Add On Id","description":"The offered add-on ID"}},"type":"object","required":["unit_of_measure","travellers","rooms","units","id","offered_add_on_id"],"title":"AddOnSelectionSerializer"},"AppliedPromotionCodeSerializer":{"properties":{"promotion_id":{"type":"string","title":"Promotion Id","description":"The promotion ID"},"code":{"type":"string","title":"Code","description":"The promotion code"}},"type":"object","required":["promotion_id","code"],"title":"AppliedPromotionCodeSerializer"},"ApplyPromotionRequest":{"properties":{"code":{"type":"string","minLength":1,"title":"Code","description":"Promotion code applied to the basket"}},"type":"object","required":["code"],"title":"ApplyPromotionRequest"},"BasketPriceDataSerializer":{"properties":{"request":{"$ref":"#/components/schemas/BasketPriceRequestSerializer","description":"The pricing request data"},"response":{"$ref":"#/components/schemas/BasketPriceResponseSerializer","description":"The pricing response data"}},"type":"object","required":["request","response"],"title":"BasketPriceDataSerializer","description":"Serializer for basket price data."},"BasketPriceRequestSerializer":{"properties":{"item_option_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Option Id"},"add_on_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Add On Id"},"date_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"},"date_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"},"occupancies":{"anyOf":[{"items":{"items":{"$ref":"#/components/schemas/OccupancyPassengerSerializer"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Occupancies"},"offered_item_option_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Offered Item Option Id"},"package_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Package Id"}},"type":"object","title":"BasketPriceRequestSerializer"},"BasketPriceResponseMetaSerializer":{"properties":{"promo_sweep":{"anyOf":[{"$ref":"#/components/schemas/PromoSweepSerializer"},{"type":"null"}]}},"type":"object","title":"BasketPriceResponseMetaSerializer"},"BasketPriceResponseSerializer":{"properties":{"price_lines_by_services":{"anyOf":[{"items":{"$ref":"#/components/schemas/PriceLineSerializer"},"type":"array"},{"type":"null"}],"title":"Price Lines By Services"},"price_lines_by_units":{"anyOf":[{"items":{"items":{"$ref":"#/components/schemas/PriceLineSerializer"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Price Lines By Units"},"price_lines_by_passengers":{"anyOf":[{"items":{"items":{"items":{"$ref":"#/components/schemas/PriceLineSerializer"},"type":"array"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Price Lines By Passengers"},"sales":{"anyOf":[{"$ref":"#/components/schemas/PricingSummarySerializer"},{"type":"null"}]},"net":{"anyOf":[{"$ref":"#/components/schemas/PricingSummarySerializer"},{"type":"null"}]},"details":{"anyOf":[{"$ref":"#/components/schemas/PricingDetailsSerializer"},{"type":"null"}]},"meta":{"anyOf":[{"$ref":"#/components/schemas/BasketPriceResponseMetaSerializer"},{"type":"null"}]}},"type":"object","title":"BasketPriceResponseSerializer"},"BasketPricingSerializer":{"properties":{"data":{"items":{"$ref":"#/components/schemas/BasketPriceDataSerializer"},"type":"array","title":"Data","description":"List of price data for the basket"}},"type":"object","required":["data"],"title":"BasketPricingSerializer","description":"Serializer for basket pricing."},"BasketSerializer":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The basket ID"},"channel_id":{"type":"string","title":"Channel Id","description":"The channel that should be used for the basket","examples":["a0jAd000004wQavIAE"]},"tax_profile_id":{"type":"string","title":"Tax Profile Id","description":"The tax profile ID that should be used for the basket","examples":["a2M4J000000Y9C5UAK"]},"account_id":{"type":"string","title":"Account Id","description":"The account ID that should be used for the basket","examples":["a3M4J000000Y9C6UAK"]},"currency_code":{"type":"string","enum":["AED","AFN","ALL","AMD","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VED","VES","VND","VUV","WST","XAD","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XCG","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWG"],"maxLength":3,"minLength":3,"title":"Currency Code","description":"The currency code that should be used for the basket"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"The creation date of the basket"},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"The expiration date of the basket"},"package_id":{"type":"string","title":"Package Id","description":"The ID of the package which is added to the basket"},"package_name":{"type":"string","title":"Package Name","description":"The package name"},"package_length":{"type":"integer","title":"Package Length","description":"The length of the package which is added to the basket","examples":[7]},"service_level_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Level Id","description":"The packages's service level ID","examples":["a1o1v000002bXn8AAE"]},"contact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Id","description":"The Salesforce contact ID associated with the basket","examples":["003CONTACTID000001"]},"departure":{"$ref":"#/components/schemas/DepartureSerializer","description":"The departure information for the basket"},"occupancy":{"items":{"$ref":"#/components/schemas/OccupancySerializer"},"type":"array","title":"Occupancy","description":"List of room specs that determine which services are selected. Room index is inferred from order (1..N). Example: [{\"adults\":2,\"children\":1},{\"adults\":1,\"children\":0}]"},"configurations":{"items":{"$ref":"#/components/schemas/ComponentSerializer"},"type":"array","title":"Configurations","description":"List of component configurations in the basket"},"travellers":{"items":{"$ref":"#/components/schemas/TravellerSerializer"},"type":"array","title":"Travellers","description":"The basket travellers"},"applied_promotion_codes":{"items":{"$ref":"#/components/schemas/AppliedPromotionCodeSerializer"},"type":"array","title":"Applied Promotion Codes","description":"User-entered promotion codes applied to the basket"},"payment_requests":{"items":{"$ref":"#/components/schemas/PaymentRequestSerializer"},"type":"array","title":"Payment Requests","description":"The payment requests"},"payment_schedules":{"items":{"$ref":"#/components/schemas/ktbasket__serializers__payment_schedule__PaymentScheduleSerializer"},"type":"array","title":"Payment Schedules","description":"The payment schedule rules for the basket"},"temporary_hold":{"anyOf":[{"$ref":"#/components/schemas/TemporaryHoldSerializer"},{"type":"null"}],"description":"The basket's active inventory reservation, when supported"}},"type":"object","required":["channel_id","tax_profile_id","account_id","currency_code","created_at","expires_at","package_id","package_name","package_length","service_level_id","departure","occupancy"],"title":"BasketSerializer"},"ComponentSerializer":{"properties":{"component_id":{"type":"string","title":"Component Id","description":"The component ID","examples":["prod_1"]},"component_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Component Type","description":"The component type","examples":["Pre Stay","Post Stay"]},"date_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From","description":"The component start date.","examples":["2026-01-01"]},"date_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To","description":"The component end date.","examples":["2026-01-02"]},"component_name":{"type":"string","title":"Component Name","description":"The component name","examples":["POA-2024-26-TOUR-USD"]},"options":{"items":{"$ref":"#/components/schemas/OptionSelectionSerializer"},"type":"array","title":"Options","description":"The component options"}},"type":"object","required":["component_id","component_type","date_from","date_to","component_name","options"],"title":"ComponentSerializer"},"Contact":{"properties":{"id":{"type":"string","title":"Id","description":"The contact's Salesforce ID","examples":["aWQ1123123453214"]},"account_id":{"type":"string","title":"Account Id","description":"The contact's Salesforce account ID","examples":["a3M4J000000Y9C6UAK"]},"is_primary":{"type":"boolean","title":"Is Primary","description":"Whether the contact is the primary contact","default":false}},"type":"object","required":["id","account_id"],"title":"Contact"},"ContactSerializer":{"properties":{"salesforce_id":{"type":"string","title":"Salesforce Id","description":"The contact's Salesforce ID","examples":["aWQ1123123453214"]},"account_id":{"type":"string","title":"Account Id","description":"The contact's Salesforce account ID","examples":["a3M4J000000Y9C6UAK"]},"is_primary":{"type":"boolean","title":"Is Primary","description":"Whether the contact is the primary contact","default":false}},"type":"object","required":["salesforce_id","account_id"],"title":"ContactSerializer"},"CreateBasketRequest":{"properties":{"channel_id":{"type":"string","title":"Channel Id","description":"The channel that should be used for the basket","examples":["a0jAd000004wQavIAE"]},"tax_profile_id":{"type":"string","title":"Tax Profile Id","description":"The tax profile ID that should be used for the basket","examples":["a2M4J000000Y9C5UAK"]},"account_id":{"type":"string","title":"Account Id","description":"The account ID that should be used for the basket","examples":["a3M4J000000Y9C6UAK"]},"currency_code":{"type":"string","enum":["AED","AFN","ALL","AMD","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VED","VES","VND","VUV","WST","XAD","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XCG","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWG"],"maxLength":3,"minLength":3,"title":"Currency Code","description":"The currency code that should be used for the basket"},"package_id":{"type":"string","title":"Package Id","description":"The ID of the package that should added to the basket"},"departure_id":{"type":"string","title":"Departure Id","description":"The intended package departure id that should be used for the basket","examples":["a1U4J000002w2WwUAI"]},"occupancy":{"items":{"$ref":"#/components/schemas/Occupancy"},"type":"array","minItems":1,"title":"Occupancy","description":"List of room specs that determine which services are selected. Room index is inferred from order (1..N). Example: [{\"adults\":2,\"children\":1},{\"adults\":1,\"children\":0}]","examples":[[{"adults":2,"children":1},{"adults":1,"children":0}]]},"service_level_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Level Id","description":"The service level ID that should be used for the basket","examples":["a1r1o00000ZgzT3AAJ"]},"contact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Id","description":"The Salesforce contact ID associated with the basket. This is optional and can be used to associate a contact that sits outside the travellers.","examples":["a1r1o0123ZgzC0NTJ"]}},"type":"object","required":["channel_id","tax_profile_id","account_id","currency_code","package_id","departure_id","occupancy","service_level_id"],"title":"CreateBasketRequest"},"DepartureSerializer":{"properties":{"id":{"type":"string","title":"Id","description":"The departure ID","examples":["a1U4J000002w2WwUAI"]},"date":{"type":"string","format":"date","title":"Date","description":"The departure date"}},"type":"object","required":["id","date"],"title":"DepartureSerializer"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ItemOptionSelectionSerializer":{"properties":{"unit_of_measure":{"type":"string","title":"Unit Of Measure","description":"The unit of measure for the selection"},"travellers":{"items":{"type":"integer"},"type":"array","title":"Travellers","description":"The traveller IDs for the selection"},"rooms":{"items":{"type":"integer"},"type":"array","title":"Rooms","description":"The list of 1-based room indices (1..N) for room-scoped selections"},"units":{"items":{"type":"integer"},"type":"array","title":"Units","description":"The unit IDs for the selection"},"id":{"type":"string","title":"Id","description":"The item option ID"},"name":{"type":"string","title":"Name","description":"The item option name"},"cabin_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cabin Id","description":"The cabin ID"},"date_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From","description":"Service start date for pre/post components"},"date_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To","description":"Service end date for pre/post components"},"offered_item_option_id":{"type":"string","title":"Offered Item Option Id","description":"The offered item option ID"},"item_id":{"type":"string","title":"Item Id","description":"Item (service) ID for the parent component option"}},"type":"object","required":["unit_of_measure","travellers","rooms","units","id","name","cabin_id","date_from","date_to","offered_item_option_id","item_id"],"title":"ItemOptionSelectionSerializer"},"LivenessResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Indicates if the service is alive or not","examples":["ok"]}},"type":"object","required":["status"],"title":"LivenessResponse"},"Occupancy":{"properties":{"adults":{"type":"integer","exclusiveMinimum":0.0,"title":"Adults","description":"Number of adults (>= 1)."},"children":{"type":"integer","minimum":0.0,"title":"Children","description":"Number of children (>= 0)."}},"type":"object","required":["adults","children"],"title":"Occupancy"},"OccupancyPassengerSerializer":{"properties":{"passenger_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Passenger Id"}},"type":"object","title":"OccupancyPassengerSerializer"},"OccupancySerializer":{"properties":{"adults":{"type":"integer","title":"Adults","description":"The number of adults","examples":[1]},"children":{"type":"integer","title":"Children","description":"The number of children","examples":[0]},"travellers":{"items":{"type":"integer"},"type":"array","title":"Travellers","description":"The list of traveller IDs"}},"type":"object","required":["adults","children"],"title":"OccupancySerializer"},"OptionSelection":{"properties":{"travellers":{"items":{"type":"integer"},"type":"array","title":"Travellers","description":"List of traveller IDs for traveller-scoped selections"},"rooms":{"items":{"type":"integer"},"type":"array","title":"Rooms","description":"List of room IDs for room-scoped selections"},"units":{"items":{"type":"integer"},"type":"array","title":"Units","description":"List of unit IDs for unit-scoped selections"},"option_id":{"type":"integer","title":"Option Id","description":"Unique identifier for the option (e.g., Guest Protection Plan)"},"item_option_id":{"type":"string","minLength":1,"title":"Item Option Id","description":"Unique identifier for the item option"},"add_ons":{"items":{"$ref":"#/components/schemas/AddOnSelection"},"type":"array","title":"Add Ons","description":"Optional list of add-ons, each with its own scope"},"cabin_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cabin Id","description":"Service cabin ID for cruise components (minimal identifier only)"},"date_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From","description":"Start date of the selection. Required for pre and post stay components.","examples":["2026-01-01"]},"date_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To","description":"End date of the selection. Required for pre and post stay components.","examples":["2026-01-02"]}},"type":"object","required":["travellers","rooms","units","option_id","item_option_id","add_ons"],"title":"OptionSelection","description":"Schema for component selection."},"OptionSelectionSerializer":{"properties":{"id":{"type":"integer","title":"Id","description":"The option ID"},"item_option":{"$ref":"#/components/schemas/ItemOptionSelectionSerializer","description":"The item option for the option"},"add_ons":{"items":{"$ref":"#/components/schemas/AddOnSelectionSerializer"},"type":"array","title":"Add Ons","description":"The add-ons for the option"}},"type":"object","required":["id","item_option","add_ons"],"title":"OptionSelectionSerializer"},"PaymentCreateRequest":{"properties":{"pay_per_person":{"type":"boolean","title":"Pay Per Person","description":"Whether payment is per person or aggregate for the basket"}},"type":"object","required":["pay_per_person"],"title":"PaymentCreateRequest"},"PaymentRequestSerializer":{"properties":{"id":{"type":"integer","title":"Id","description":"Payment request identifier"},"deposit_value_amount":{"type":"string","title":"Deposit Value Amount","description":"Total deposit value amount"},"total_value_amount":{"type":"string","title":"Total Value Amount","description":"Total value amount"},"payment_schedules":{"items":{"$ref":"#/components/schemas/ktbasket__serializers__payment_request__PaymentScheduleSerializer"},"type":"array","title":"Payment Schedules"},"pay_per_person":{"type":"boolean","title":"Pay Per Person","description":"Whether to pay per person"},"amount_paid":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount Paid","description":"Amount paid on completion (null until payment is completed)"},"final_balance_due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Balance Due Date","description":"Due date of the first Final Balance payment schedule rule","examples":["2026-04-24"]},"complete_response":{"additionalProperties":true,"type":"object","title":"Complete Response","description":"Complete response from payment processor"},"callback_url":{"type":"string","title":"Callback Url","description":"Callback URL for the successful payment request to be sent to","examples":["/baskets/{basket_id}/payment-requests/{request_id}/complete"]}},"type":"object","required":["id","deposit_value_amount","total_value_amount","payment_schedules","pay_per_person","complete_response","callback_url"],"title":"PaymentRequestSerializer"},"PriceLineSerializer":{"properties":{"value":{"type":"string","title":"Value"},"entry_type":{"type":"string","title":"Entry Type"},"label":{"type":"string","title":"Label"},"applicable_to":{"type":"string","title":"Applicable To"},"conversion_rate":{"type":"string","title":"Conversion Rate"},"currency_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency Code"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","required":["value","entry_type","label","applicable_to","conversion_rate"],"title":"PriceLineSerializer"},"PricingDetailsSerializer":{"properties":{"connect_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connect Session Id"},"overridden_connect_rate_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overridden Connect Rate Reference"},"overridden_trip":{"anyOf":[{},{"type":"null"}],"title":"Overridden Trip"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Warnings"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"PricingDetailsSerializer"},"PricingSummarySerializer":{"properties":{"total":{"type":"string","title":"Total"},"estimated":{"type":"boolean","title":"Estimated"},"pricing_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Status"}},"type":"object","required":["total","estimated"],"title":"PricingSummarySerializer"},"PromoSweepEffectSerializer":{"properties":{"promotion_effect_id":{"type":"string","title":"Promotion Effect Id"},"nights":{"items":{"type":"integer"},"type":"array","title":"Nights"}},"type":"object","required":["promotion_effect_id"],"title":"PromoSweepEffectSerializer"},"PromoSweepSerializer":{"properties":{"effects":{"items":{"$ref":"#/components/schemas/PromoSweepEffectSerializer"},"type":"array","title":"Effects"}},"type":"object","title":"PromoSweepSerializer"},"ReadinessResponse":{"properties":{"ready":{"type":"boolean","title":"Ready","description":"Indicates if the service is ready or not"}},"type":"object","required":["ready"],"title":"ReadinessResponse"},"TemporaryHoldSerializer":{"properties":{"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"The expiration date of the temporary hold"}},"type":"object","required":["expires_at"],"title":"TemporaryHoldSerializer"},"TravellerSerializer":{"properties":{"id":{"type":"integer","title":"Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"The traveller's first name","examples":["John"]},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"The traveller's last name","examples":["Doe"]},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","const":""},{"type":"null"}],"title":"Email","description":"The traveller's email","examples":["john.doe@example.com"]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"The traveller's phone","examples":["+1234567890"]},"occupant_type":{"type":"string","enum":["Adult","Child"],"title":"Occupant Type","description":"Booked adult or child role from room occupancy at basket creation","examples":["Adult"]},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth","description":"The traveller's date of birth","examples":["1990-01-01"]},"contact":{"anyOf":[{"$ref":"#/components/schemas/ContactSerializer"},{"type":"null"}],"description":"The traveller's contact information"}},"type":"object","required":["id","first_name","last_name","email","phone","occupant_type","date_of_birth"],"title":"TravellerSerializer"},"UpdateComponentSelectionsRequest":{"properties":{"component_id":{"type":"string","title":"Component Id","description":"Unique identifier for the component"},"selections":{"items":{"$ref":"#/components/schemas/OptionSelection"},"type":"array","title":"Selections","description":"List of selections for the component"}},"type":"object","required":["component_id","selections"],"title":"UpdateComponentSelectionsRequest","description":"Schema for updating component options selection in a basket."},"UpdateTravellerRequest":{"properties":{"id":{"type":"integer","title":"Id","description":"The traveller's unique identifier","examples":[1]},"first_name":{"type":"string","title":"First Name","description":"The traveller's first name","examples":["John"]},"last_name":{"type":"string","title":"Last Name","description":"The traveller's last name","examples":["Doe"]},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"string","const":""}],"title":"Email","description":"The traveller's email address","examples":["john.doe@example.com"]},"phone":{"type":"string","title":"Phone","description":"The traveller's phone number","examples":["+1234567890"]},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth","description":"The traveller's date of birth","examples":["1990-01-01"]},"contact":{"anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"null"}],"description":"The traveller's salesforce contact information"}},"type":"object","required":["id","first_name","last_name","email","phone"],"title":"UpdateTravellerRequest","description":"Schema for updating traveller information."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ktbasket__serializers__payment_request__PaymentScheduleSerializer":{"properties":{"passenger_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Passenger Id","description":"Traveller ID (null for aggregate schedules)"},"payment_schedule_rule_id":{"type":"string","title":"Payment Schedule Rule Id","description":"Payment schedule ID"}},"type":"object","required":["payment_schedule_rule_id"],"title":"PaymentScheduleSerializer"},"ktbasket__serializers__payment_schedule__PaymentScheduleSerializer":{"properties":{"passenger_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Passenger Id","description":"The ID of the specific passenger (if pay_per_person is true)","examples":["1",null]},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value","description":"The base payment amount for this rule (percentage or fixed amount)","examples":["500"]},"charge_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Charge Type","description":"The type of charge (e.g., Percentage, Fixed)","examples":["Percentage"]},"type":{"type":"string","title":"Type","description":"The type of payment rule (e.g., Deposit, Final Balance)","examples":["Deposit"]},"due_date":{"type":"string","title":"Due Date","description":"The due date for this payment","examples":["2024-01-15"]},"itinerary_item_ids":{"items":{"type":"string"},"type":"array","title":"Itinerary Item Ids","description":"The itinerary item IDs this payment rule applies to","examples":[["sl-thisismything-room"]]},"payment_schedule_configuration_id":{"type":"string","title":"Payment Schedule Configuration Id","description":"The ID of the payment schedule configuration used","examples":["a0Z123456789012345"]},"payment_schedule_rule_id":{"type":"string","title":"Payment Schedule Rule Id","description":"The ID of the specific payment schedule rule","examples":["a0A123456789012345"]},"minimum_deposit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Minimum Deposit","description":"The minimum deposit for this rule, when provided","examples":[null,"20.00"]}},"type":"object","required":["passenger_id","value","charge_type","type","due_date","itinerary_item_ids","payment_schedule_configuration_id","payment_schedule_rule_id"],"title":"PaymentScheduleSerializer"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}