{"openapi":"3.0.0","info":{"description":"The Karhoo Organisations API Gateway service is responsible for providing access to organisations, including creation/update and deletion of organisations and their configuration...","version":"${api-version}","title":"Organisations API","x-hugo-values":{"tags":["api"],"categories":["organisations"],"public":true,"weight":60}},"paths":{"/":{"get":{"tags":["Organisations"],"summary":"Retrieve organisations","description":"Returns basic information of available organisations","operationId":"organisationsList","parameters":[{"in":"query","name":"type","required":false,"description":"Organisation type to filter organisations on","schema":{"type":"string","enum":["ANY","DEMAND_PARTNER","FLEET","DEMAND_PARTNER_AND_FLEET","DISPATCH"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOrganisationsResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Organisations"],"summary":"Create a new organisation","description":"Creates a new organisation of type demand_partner/fleet/demand_partner_and_fleet","operationId":"organisationCreate","requestBody":{"$ref":"#/components/requestBodies/Organisation"},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrganisationResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized. Invalid credentials provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden. The credentials provided do not have sufficient authority for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/type/{type}":{"parameters":[{"name":"type","in":"path","required":true,"description":"The type of organisations to retrieve","example":"DEMAND_PARTNER","schema":{"type":"string"}}],"get":{"tags":["Organisations"],"summary":"Retrieve organisations by type","description":"Returns basic information of available organisations, filtered by organisation type","operationId":"organisationsListByType","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOrganisationsResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/{organisation_id}":{"get":{"tags":["Organisations"],"summary":"Get organisation by uuid","description":"Get an organisation by uuid","operationId":"organisationGet","parameters":[{"name":"organisation_id","in":"path","required":true,"description":"The ID of the organisation to retrieve","example":"123456-abc","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrganisationResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]},"put":{"tags":["Organisations"],"summary":"Update organisation details","description":"Update a organisation","operationId":"organisationUpdate","parameters":[{"name":"organisation_id","in":"path","required":true,"description":"The ID of the Organisation to update","example":"123456-abc","schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/Organisation"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrganisationResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/{organisation_id}/booking-configuration":{"put":{"tags":["Configuration"],"summary":"Update booking configuration","description":"Update Booking Configurations for an Organisation","operationId":"organisationUpdateBookingConfiguration","parameters":[{"name":"organisation_id","in":"path","required":true,"description":"The ID of the Organisation to update","example":"74dca255-2c44-41ec-a6f9-a62b53a61350","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingConfiguration"}}},"description":"request body","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingConfiguration"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/{organisation_id}/marketplace/enable-open-marketplace":{"put":{"tags":["Organisations"],"summary":"Enable open marketplace","description":"Removes all fleet partners from whitelist","operationId":"organisationEnableOpenMarketplace","parameters":[{"name":"organisation_id","in":"path","required":true,"description":"The ID of the Organisation to update","example":"74dca255-2c44-41ec-a6f9-a62b53a61350","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MarketplaceConfiguration"}}}},"400":{"description":"Invalid input","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/{organisation_id}/marketplace/fleet-partner/{fleet_id}":{"put":{"tags":["Configuration"],"summary":"Update fleet partner configuration","description":"Update a fleet Partner configuration for this Organisation","operationId":"organisationUpdateFleetPartnerConfiguration","parameters":[{"name":"organisation_id","in":"path","required":true,"description":"The ID of the Organisation to update","example":"74dca255-2c44-41ec-a6f9-a62b53a61350","schema":{"type":"string"}},{"name":"fleet_id","in":"path","required":true,"description":"The ID of the Fleet to configure for this Organisation","example":"14dca255-2c44-41ec-a6f9-c62b53a61336","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FleetPartner"}}},"description":"request body","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FleetPartner"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/{organisation_id}/fare-calculation-defaults":{"put":{"tags":["Configuration"],"summary":"Update fare calculation defaults","description":"Update default fare calculation for this Organisation","operationId":"updateDefaultFareCalculation","parameters":[{"name":"organisation_id","in":"path","required":true,"description":"The ID of the Organisation to update","example":"74dca255-2c44-41ec-a6f9-a62b53a61350","schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/FareCalculationSettings"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FareCalculationSettings"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/{organisation_id}/fare-calculation-defaults/{country_code}":{"put":{"tags":["Configuration"],"summary":"Update fare calculation country defaults","description":"Update default fare calculation by country","operationId":"updateDefaultFareCalculationByCountry","parameters":[{"name":"organisation_id","in":"path","required":true,"description":"The ID of the Organisation to update","example":"74dca255-2c44-41ec-a6f9-a62b53a61350","schema":{"type":"string"}},{"name":"country_code","in":"path","required":true,"description":"The 2 digit country ISO code","example":"GB","schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/FareCalculationSettings"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FareCalculationSettings"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/{organisation_id}/finance-configuration":{"put":{"tags":["Configuration"],"summary":"Create or Update Finance Configuration","description":"Create or Update Finance Configuration","operationId":"updateFinanceConfig","parameters":[{"name":"organisation_id","in":"path","required":true,"description":"The ID of the Organisation to update","example":"74dca255-2c44-41ec-a6f9-a62b53a61350","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceConfiguration"}}},"description":"request body","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceConfiguration"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/{organisation_id}/logo-upload":{"put":{"tags":["Organisations"],"summary":"Uploads of a logo image","description":"Uploads organisation logo image to cloud storage","operationId":"organisationLogoUpload","parameters":[{"name":"organisation_id","in":"path","required":true,"description":"The ID of the Organisation to update","example":"74dca255-2c44-41ec-a6f9-a62b53a61350","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}},"description":"request body","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}},"/{organisation_id}/service-level-agreement":{"get":{"tags":["Organisations"],"summary":"Get Service Level Agreement","description":"Get Service Level Agreement","operationId":"SLAConfigGet","parameters":[{"name":"organisation_id","in":"path","required":true,"description":"The ID of the organisation, whose SLA to retrieve","example":"123456-abc","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLAResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Service Level Agreement not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]},"put":{"tags":["Organisations"],"summary":"Create or update Service Level Agreement","description":"Creates/updates Service Level Agreement and uploads generated Terms and Conditions to cloud storage","operationId":"SLAConfigUpdate","parameters":[{"name":"organisation_id","in":"path","required":true,"description":"The ID of the Organisation to update","example":"74dca255-2c44-41ec-a6f9-a62b53a61350","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSLARequest"}}},"description":"request body","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLAResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}]}}},"servers":[{"url":"https://rest.karhoo.com/v1/organisations"}],"components":{"responses":{"400InvalidInput":{"description":"Bad Request. The request was invalid.","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"ORG1002","description":"Error number"},"message":{"type":"string","example":"Invalid request payload","description":"Details of the error"}}}}}},"401Unauthorized":{"description":"Unauthorized. The request requires user authentication (not logged in).","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"ORG1003","description":"Error number"},"message":{"type":"string","example":"Could not authenticate","description":"Details of the error"}}}}}},"403Forbidden":{"description":"Forbidden. The credentials provided do not have sufficient authority for this request. Please request access by emailing [API Support](api@karhoo.com?subject=API%20Access%20Request).","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"ORG1003","description":"Error number"},"message":{"type":"string","example":"Missing required role for this request","description":"Details of the error"}}}}}},"404NotFound":{"description":"Not found.  Organisation cannot be found.","content":{"*/*":{"schema":{"type":"object","description":"Details of the error that occurred whilst processing the request","required":["code","message"],"properties":{"code":{"type":"string","description":"Internally generated code for this error","example":"K4003"},"message":{"type":"string","description":"Details of the actual error","example":"Could not find organisation"}}}}}},"429RateLimit":{"description":"Error. Too Many Requests. Exceeded the rate limit for requests.","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"ORG02","description":"Error number"},"message":{"type":"string","example":"Rate limit exceeded","description":"Details of the error"}}}}}},"500InternalServerErr":{"description":"Internal server error. Something has gone wrong on the website's server, but the server could not be more specific on what the exact problem is.","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"ORG01","description":"Error number"},"message":{"type":"string","example":"General request error","description":"Details of the error"}}}}}},"502BadGateway":{"description":"Bad Gateway. The server, which was acting as a gateway or proxy, received an invalid response from the upstream server.","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"ORG10","description":"Error number"},"message":{"type":"string","example":"Bad Gateway error","description":"Details of the error"}}}}}}},"requestBodies":{"Organisation":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}},"description":"request body","required":true},"FareCalculationSettings":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FareCalculationSettings"}}},"description":"request body","required":true}},"securitySchemes":{"Bearer":{"description":"For accessing the API a valid JWT token must be passed in all the queries in the 'Authorization' header. A valid JWT token is generated by the auth API. The following syntax must be used in the 'Authorization' header : Bearer: xxxxxx.yyyyyyy.zzzzzz","type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"GetOrganisationResponse":{"type":"object","properties":{"basic_information":{"$ref":"#/components/schemas/BasicInformation"},"booking_configuration":{"$ref":"#/components/schemas/BookingConfiguration"},"fare_configuration":{"$ref":"#/components/schemas/FareConfiguration"},"finance_configuration":{"$ref":"#/components/schemas/FinanceConfiguration"},"marketplace_configuration":{"$ref":"#/components/schemas/MarketplaceConfiguration"},"sla_response":{"$ref":"#/components/schemas/SLAResponse"},"webhook_configuration":{"$ref":"#/components/schemas/WebhookConfiguration"}}},"ListOrganisationsResponse":{"type":"object","properties":{"organisations":{"description":"A list of organisations basic information","type":"array","items":{"$ref":"#/components/schemas/BasicInformation"}}}},"BasicInformation":{"type":"object","required":["name","type","salesforce_id"],"properties":{"id":{"type":"string","x-example":"abcd-1234"},"type":{"$ref":"#/components/schemas/OrganisationType"},"state":{"$ref":"#/components/schemas/OrganisationState"},"name":{"type":"string","x-example":"Karhoo"},"salesforce_id":{"type":"string","x-example":"50000000D8cuI"},"logo_url":{"type":"string","x-example":"https://cdn-karhoo-com-dynamic/d/images/logos/1234adfgs.png"}}},"Organisation":{"type":"object","properties":{"basic_information":{"$ref":"#/components/schemas/BasicInformation"},"booking_configuration":{"$ref":"#/components/schemas/BookingConfiguration"},"fare_configuration":{"$ref":"#/components/schemas/FareConfiguration"},"finance_configuration":{"$ref":"#/components/schemas/FinanceConfiguration"},"service_level_agreements":{"$ref":"#/components/schemas/ServiceLevelAgreements"},"webhook_configuration":{"$ref":"#/components/schemas/WebhookConfiguration"},"fleet_partners":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FleetPartner"},"example":{"1958cfe1-47fb-4346-be97-e81f412d1678":{"vat_excluded":true,"name_override":"Fleet One","explicitly_allowed":true,"blocked":false,"commission_tax_percentage":5.2,"fleet_account":"1234","fare_settings":{"commission_tax_percentage":5.7,"fare_breakdown":{"Parking":{"discount_percentage":0,"commission_percentage":0,"local_tax_percentage":7},"Net":{"discount_percentage":0,"commission_percentage":10,"local_tax_percentage":0}}}}}}}},"OrganisationType":{"type":"string","example":"FLEET","description":"The type of an Organisation. ANY is used during retrieval from the datastore.\n`ANY` - Used to retrieve all Organisations from the datastore\n`DEMAND_PARTNER` - Organisation will represent a demand partner. The default during creating when no type provided\n`FLEET` - Organisation will represent a fleet\n`DEMAND_PARTNER_AND_FLEET` - Organisation is a fleet and a demand partner at the same time\n`DISPATCH` - Organisation represents a dispatch partner\n","enum":["ANY","DEMAND_PARTNER","FLEET","DEMAND_PARTNER_AND_FLEET","DISPATCH"]},"OrganisationState":{"type":"string","description":"The state of an Organisation. Disabled state is the default state\n- DISABLED: Not active or visible anywhere\n- TESTING: Organisation is in testing\n- BETA: Only Beta and TESTING users can see\n- LIVE: Available for all Users\n","enum":["DISABLED","TESTING","BETA","LIVE"]},"FareConfiguration":{"type":"object","description":"Fare configuration settings","properties":{"default_fare_settings":{"$ref":"#/components/schemas/FareCalculationSettings"},"default_country_fare_settings":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FareCalculationSettings"},"example":{"FR":{"commission_tax_percentage":5.7,"fare_breakdown":{"Parking":{"discount_percentage":0,"commission_percentage":0,"local_tax_percentage":7},"Net":{"discount_percentage":0,"commission_percentage":10,"local_tax_percentage":0}}},"UK":{"commission_tax_percentage":5,"fare_breakdown":{"Parking":{"discount_percentage":0,"commission_percentage":0,"local_tax_percentage":4},"Net":{"discount_percentage":0,"commission_percentage":8,"local_tax_percentage":0}}}}}}},"FareCalculationSettings":{"type":"object","properties":{"commission_tax_percentage":{"type":"number","format":"double","description":"TODO"},"fare_breakdown":{"type":"object","description":"Set commission, discount and local tax overrides","additionalProperties":{"$ref":"#/components/schemas/FareComponentSettings"},"example":{"Parking":{"commission_percentage":1.5,"discount_percentage":0,"local_tax_percentage":7},"Net":{"commission_percentage":10,"discount_percentage":0,"local_tax_percentage":0}}}}},"FareComponentSettings":{"type":"object","properties":{"discount_percentage":{"type":"number","format":"double"},"commission_percentage":{"type":"number","format":"double"},"local_tax_percentage":{"type":"number","format":"double"}}},"FinanceConfiguration":{"type":"object","description":"Information required for payment flows","properties":{"tax_id":{"type":"string","description":"The Tax ID of the organisation","example":"GB999123473"},"registered_address":{"$ref":"#/components/schemas/Location"},"commission":{"type":"number","format":"double","maximum":100,"minimum":0}}},"MarketplaceConfiguration":{"type":"object","description":"Sets marketplace settings and overrides","properties":{"fleet_partners":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FleetPartner"},"example":{"1958cfe1-47fb-4346-be97-e81f412d1678":{"vat_excluded":true,"name_override":"Fleet One","explicitly_allowed":true,"blocked":false,"commission_tax_percentage":5.2,"fleet_account":"1234","fare_settings":{"commission_tax_percentage":5.7,"fare_breakdown":{"Parking":{"discount_percentage":0,"commission_percentage":0,"local_tax_percentage":7},"Net":{"discount_percentage":0,"commission_percentage":10,"local_tax_percentage":0}}}}}},"allowed_fleets":{"type":"object","description":"A Read-Only field which shows all whitelisted fleets for this organisation.","additionalProperties":{"type":"boolean"},"example":{"6958cfe1-47fb-4346-be97-e81f412d167a":true}},"blocked_fleets":{"description":"A Read-Only field which lists all blocked fleets for this organisation.","type":"object","additionalProperties":{"type":"boolean"},"example":{"1958cfe1-47fb-4346-be97-e81f412d1678":true}}}},"FleetPartner":{"type":"object","description":"These settings represent preferences set for a fleet","properties":{"name":{"description":"Fleet name","type":"string","example":"Le Cab"},"vat_excluded":{"description":"TODO","type":"boolean"},"name_override":{"description":"Override the fleet name that appears in quotes","type":"string"},"explicitly_allowed":{"type":"boolean","description":"Explicitly set this fleet as allowed. The first allowed fleet removes this partner from inheriting from the entire marketplace."},"blocked":{"type":"boolean","description":"Explicitly set this fleet as blocked. Supercedes all other marketplace settings."},"fleet_account":{"type":"string","description":"Account ID to send to Fleet Partners for this Organisation. Note - Not all Dispatch Platforms support this.","example":"TRAVEL-ACC2345"},"fare_settings":{"$ref":"#/components/schemas/FareCalculationSettings"},"enable_p2p_messaging":{"type":"boolean","description":"Enables P2P Driver-to-Passenger messaging for this fleet."}}},"BookingConfiguration":{"type":"object","description":"This configures the booking behavior of this organisation","required":["follow_link_format","send_sms_trip_updates","send_sms_follow_link","send_custom_comment_to_fleets","payment_by_invoice","default_passenger_locale","passenger_notifications","agent_notifications","quote_predictions_enabled","trusted_quote_predictions_percentage","predicted_quote_acceptable_variation","untrusted_quote_predictions_percentage","rating"],"properties":{"follow_link_format":{"type":"string"},"send_sms_trip_updates":{"type":"boolean"},"send_sms_follow_link":{"type":"boolean"},"send_custom_comment_to_fleets":{"type":"string"},"payment_by_invoice":{"type":"boolean"},"payment_captured_by":{"$ref":"#/components/schemas/PaymentCaptureType"},"default_passenger_locale":{"type":"string","example":"en-GB or en"},"passenger_notifications":{"$ref":"#/components/schemas/NotificationSettings"},"agent_notifications":{"$ref":"#/components/schemas/NotificationSettings"},"web_booker_configuration":{"type":"string","description":"This sets options to configure Karhoo's whitelabel web booker"},"quote_predictions_enabled":{"type":"boolean","description":"This sets whether quote predictions are enabled"},"trusted_quote_predictions_percentage":{"type":"integer","format":"uint32","description":"This sets trusted quote predictions percentage"},"untrusted_quote_predictions_percentage":{"type":"integer","format":"uint32","description":"This sets untrusted quote predictions percentage"},"predicted_quote_acceptable_variation":{"type":"integer","format":"uint32","description":"This sets acceptable predicted quote variation"},"rating":{"$ref":"#/components/schemas/RatingConfiguration"},"quote_price_range":{"$ref":"#/components/schemas/QuotePriceRangeConfiguration"}}},"PaymentCaptureType":{"type":"string","example":"KARHOO","description":"Determines who has captured payment for invoicing,\n`KARHOO` - Payment is captured by Karhoo pre-invoice\n`COMO` - Payment is captured by COMO\n","enum":["COMO","KARHOO"]},"NotificationSettings":{"type":"object","properties":{"email":{"$ref":"#/components/schemas/EmailNotificationSettings"},"sms":{"$ref":"#/components/schemas/SMSNotificationSettings"}}},"EmailNotificationSettings":{"type":"object","required":["send_trip_cancelled","send_trip_confirmed","send_payment_taken"],"properties":{"send_trip_cancelled":{"description":"Send a Email when trip is cancelled","type":"boolean"},"send_trip_confirmed":{"description":"Send a Email when trip is confirmed","type":"boolean"},"send_payment_taken":{"description":"Send a Email when trip is charged/invoiced","type":"boolean"},"email_address":{"description":"Only used for agent notifications","type":"string"},"from_name":{"type":"string"},"from_email":{"type":"string"},"send_payment_preauth_succeed":{"description":"Send a Email when payment preauthorization is succeed","type":"boolean"},"send_payment_preauth_failed":{"description":"Send a Email when payment preauthorization is failed","type":"boolean"}}},"SMSNotificationSettings":{"type":"object","required":["send_trip_cancelled","send_trip_confirmed","send_vehicle_dispatched","send_vehicle_arrived"],"properties":{"send_trip_confirmed":{"description":"Send a SMS when trip is cancelled","type":"boolean"},"send_trip_cancelled":{"description":"Send a SMS when trip is confirmed","type":"boolean"},"send_vehicle_dispatched":{"description":"Send a SMS when driver is enroute","type":"boolean"},"send_vehicle_arrived":{"description":"Send a SMS when driver has arrived","type":"boolean"},"sender_id":{"type":"string"},"messaging_service_id":{"type":"string","description":"In order for the messaging service id to take affect. The Infrastructure Team must first create the resource in the Twilio admin account.\n"},"send_vehicle_changed":{"description":"Send a SMS when driver has changed","type":"boolean"}}},"RatingConfiguration":{"type":"object","description":"Customizes trip rating feature.\n","required":["include_rating_in_emails"],"properties":{"include_rating_in_emails":{"description":"Indicates whether trip rating widget should be included in receipt emails.","type":"boolean"}}},"QuotePriceRangeConfiguration":{"type":"object","description":"Configuration of quote price range\n","properties":{"price_increase_percent":{"description":"Percent of increasing price which will be used as High Price.","type":"integer"},"preauth_high_price":{"description":"Whether need to pre-authenticate High Price or not.","type":"boolean"}}},"Location":{"type":"object","description":"A geographic location","required":["position","address"],"properties":{"position":{"$ref":"#/components/schemas/LatLong"},"address":{"$ref":"#/components/schemas/Address"}}},"LatLong":{"type":"object","description":"Specifies a geographic location in terms of its Latitude and Longitude. For address autocompletion this location is used as bias to produce relevant Place IDs.","required":["latitude","longitude"],"properties":{"latitude":{"type":"number","format":"double","maximum":90,"minimum":-90,"description":"The latitude in degrees. It must be in the range [-90.0, +90.0]","example":51.47},"longitude":{"format":"double","type":"number","maximum":180,"minimum":-180,"description":"The longitude in degrees. It must be in the range [-180.0, +180.0]","example":0.4543}}},"Address":{"type":"object","description":"Specifies the address of a geographic location","required":["display_address","line_1","city"],"properties":{"display_address":{"type":"string","description":"An full address for the location","example":"5 Wallis Rd, Longford, Hounslow TW6 2GA, UK"},"line_1":{"type":"string","description":"First line of the address","example":"5 \"Wallis Road\""},"line_2":{"type":"string","description":"Second line of the address","example":"TW62GA"},"building_number":{"type":"string","description":"Building number","example":"5"},"street_name":{"type":"string","description":"Street name of the address","example":"Wallis Road"},"city":{"type":"string","description":"City of the address","example":"Longford"},"postal_code":{"type":"string","description":"Postal code","example":"TW62GA"},"region":{"type":"string","description":"Region","example":"England"},"country_code":{"type":"string","description":"Country code","example":"GB"}}},"Error":{"type":"object","description":"Details of the error that occurred whilst processing the request","properties":{"code":{"type":"string","description":"Internally generated code for this error"},"message":{"type":"string","description":"Details of the actual error"}}},"UploadRequest":{"type":"object","description":"data is provided when storing a resource by content, it is base64 encoded.\nsource_url is provided when storing a resource identified by a url\n","properties":{"request_type":{"$ref":"#/components/schemas/UploadRequestType"},"data":{"type":"string"},"source_url":{"type":"string","x-example":"https://www.telegraph.co.uk/t-logo.jpg"}}},"UploadRequestType":{"type":"string","example":"FLEET_ORG_LOGOS","description":"The type of an upload request to store a resource in cloud storage.\n`FLEET_ORG_LOGOS` - Upload of a fleet logo\n","enum":["FLEET_ORG_LOGOS"]},"UploadResponse":{"type":"object","properties":{"stored":{"type":"boolean"},"destination_url":{"type":"string","x-example":"https://cdn.karhoo.com/logo.png"}}},"ServiceLevelAgreements":{"type":"object","description":"Service Level Agreement for generation of the Terms & Conditions document.\n","properties":{"service_level_agreement":{"$ref":"#/components/schemas/ServiceLevelAgreement"},"terms_and_conditions":{"$ref":"#/components/schemas/TermsAndConditions"}}},"ServiceLevelAgreement":{"type":"object","description":"Response for SLA update request.\n","properties":{"waiting_times":{"type":"array","items":{"$ref":"#/components/schemas/WaitingTimePerVehicleClass"}},"poi_waiting_times":{"type":"array","items":{"$ref":"#/components/schemas/WaitingTimePerPoi"}},"cancellation_fees":{"type":"array","items":{"$ref":"#/components/schemas/CancellationFee"}},"poi_service_level_agreements":{"type":"array","items":{"$ref":"#/components/schemas/PoiServiceLevelAgreement"}},"free_form":{"type":"string","x-example":"TODO"}}},"TermsAndConditions":{"type":"object","description":"T&C generated document and its url.\n","properties":{"document":{"type":"string","x-example":"TODO"},"url":{"type":"string","x-example":"https://www.telegraph.co.uk/t-logo.jpg"}}},"WaitingTimePerVehicleClass":{"type":"object","description":"Charges for waiting time per vehicle class.\n","properties":{"vehicle_class":{"type":"string","x-example":"Saloon"},"grace_period_minutes":{"type":"integer","format":"uint32","x-example":12},"per_minute_fee":{"type":"number","format":"double","x-example":5}}},"WaitingTimePerPoi":{"type":"object","description":"Charges for waiting time per POI.\n","properties":{"poi_details_type":{"$ref":"#/components/schemas/PoiDetailsType"},"grace_period_minutes":{"type":"integer","format":"uint32","x-example":12},"per_minute_fee":{"type":"number","format":"double","x-example":5}}},"PoiDetailsType":{"type":"string","description":"A secondary POI type for more detailed categorization\n  - UNSPECIFIED\n  - AIRPORT\n  - TRAIN_STATION\n  - METRO_STATION\n  - PORT\n  - HOTEL\n  - OTHER\n","example":"AIRPORT","enum":["UNSPECIFIED","AIRPORT","TRAIN_STATION","METRO_STATION","PORT","HOTEL","OTHER"]},"WaitingTime":{"type":"object","description":"Charges for waiting time.\n","properties":{"grace_period_minutes":{"type":"integer","format":"uint32","x-example":12},"per_minute_fee":{"type":"number","format":"double","x-example":5}}},"CancellationFee":{"type":"object","description":"Cancellation Service Level Agreement.\n","properties":{"booking_type":{"type":"string"},"trip_state":{"$ref":"#/components/schemas/TripState"},"vehicle_class":{"type":"string"},"cancellation_fee":{"type":"number","format":"double"},"grace_period_minutes":{"type":"integer","format":"uint32"}}},"PoiServiceLevelAgreement":{"type":"object","description":"POI Service Level Agreement.\n","properties":{"poi_id":{"type":"string"},"poi_name":{"type":"string"},"waiting_time":{"$ref":"#/components/schemas/WaitingTime"},"additional_fees":{"type":"array","items":{"$ref":"#/components/schemas/AdditionalFee"}}}},"AdditionalFee":{"type":"object","description":"Cancellation Service Level Agreement.\n","properties":{"fare_component":{"type":"string"},"fee":{"type":"number","format":"double"}}},"TripState":{"type":"string","example":"CONFIRMED","description":"`REQUESTED` - Ride received by the DMS, but not yet confirmed by the taxi provider\n`CONFIRMED` - Ride confirmed by the taxi provider\n`ALLOCATED` - Car was allocated\n`DRIVER_EN_ROUTE` - Car was allocated\n`APPROACHING` - Ride approaching the origin\n`ARRIVED`\n`PASSENGER_ON_BOARD`\n`COMPLETED` - Ride completed succesfully\n`CANCELLED_BY_USER`\n`CANCELLED_BY_DISPATCH`\n`CANCELLED_BY_KARHOO`\n","enum":["REQUESTED","CONFIRMED","ALLOCATED","DRIVER_EN_ROUTE","APPROACHING","ARRIVED","PASSENGER_ON_BOARD","COMPLETED","CANCELLED_BY_USER","CANCELLED_BY_DISPATCH","CANCELLED_BY_KARHOO"]},"UpdateSLARequest":{"type":"object","description":"Update SLA configuration.\n","properties":{"organisation_name":{"type":"string","x-example":"IQ Taxi"},"service_level_agreement":{"$ref":"#/components/schemas/ServiceLevelAgreement"}}},"SLAResponse":{"type":"object","description":"Update SLA configuration.\n","properties":{"service_level_agreement":{"$ref":"#/components/schemas/ServiceLevelAgreement"},"url":{"type":"string","x-example":"https://karhoo.cdn.com/tac-doc.html"}}},"WebhookConfiguration":{"type":"object","description":"Webhook configurtion\n","properties":{"shared_secret":{"type":"string","description":"The secret is used to sign requests to external organisation service"},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscription"}}}},"WebhookSubscription":{"type":"object","description":"Webhook subscription\n","properties":{"topic":{"type":"string","description":"Topic of the subscription"},"is_enabled":{"type":"boolean","description":"Disable\\enable subscription"},"uri":{"type":"string","description":"URI to external service"}}}}},"x-readme":{"explorer-enabled":true,"proxy-enabled":true}}