{"openapi":"3.0.0","info":{"title":"Agile Solutions Rental Booking API specification","description":"Rental Booking Integration API provided by Agile Solutions Mobility AS","version":"0.1.0","contact":{"name":"Agile Solutions Mobility AS","url":"https://www.agilesolutions.no/"}},"servers":[{"url":"http://localhost:8080/"}],"paths":{"/available-vehicles":{"get":{"tags":["CarGroupAvailabilityEndpoint"],"parameters":[{"name":"dealerNumber","in":"query","required":true,"schema":{"type":"string"}},{"name":"rateCode","in":"query","required":true,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string"}},{"name":"X-API-KEY","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"The response to a successful request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agile.Integration.AvailableVehiclesResponse"}}}},"4XX":{"description":"The response to an invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Poco.RemotingNG.Error"}}}},"5XX":{"description":"The response to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Poco.RemotingNG.Error"}}}}}}},"/webportal-iframe/{type}":{"get":{"tags":["IFrameUrlEndpoint"],"parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"bookingId","in":"query","schema":{"type":"string"}},{"name":"X-API-KEY","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"The response to a successful request.","content":{"text/plain":{"schema":{"type":"string","format":"binary"}}}},"4XX":{"description":"The response to an invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Poco.RemotingNG.Error"}}}},"5XX":{"description":"The response to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Poco.RemotingNG.Error"}}}}}}},"/bookings":{"post":{"tags":["RentalBookingEndpoint"],"parameters":[{"name":"X-API-KEY","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agile.Integration.RentalBooking"}}}},"responses":{"default":{"description":"The response to a successful request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agile.Integration.RentalBooking"}}}},"4XX":{"description":"The response to an invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Poco.RemotingNG.Error"}}}},"5XX":{"description":"The response to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Poco.RemotingNG.Error"}}}}}}},"/quotes/query":{"post":{"tags":["RentalQuoteEndpoint"],"parameters":[{"name":"X-API-KEY","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agile.Integration.PriceQuoteRequest"}}}},"responses":{"default":{"description":"The response to a successful request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agile.Integration.PriceQuoteResponse"}}}},"4XX":{"description":"The response to an invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Poco.RemotingNG.Error"}}}},"5XX":{"description":"The response to a failed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Poco.RemotingNG.Error"}}}}}}}},"components":{"schemas":{"Poco.RemotingNG.Error":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"},"code":{"type":"integer","format":"int32"}}},"Agile.Integration.AvailableVehiclesResponse":{"type":"object","required":["dealerNumber","rateCode","vehiclegroupAvailabilityQuotes"],"properties":{"dealerNumber":{"type":"string"},"rateCode":{"type":"string"},"vehiclegroupAvailabilityQuotes":{"type":"array","items":{"$ref":"#/components/schemas/Agile.Integration.VehicleGroupAvailabilityQuote"},"uniqueItems":true}}},"Agile.Integration.CarGroupAvailabilityPrice":{"description":"one of\n - Minute\n - Hour\n - Day\n - Week\n - Month\n - Year","type":"object","required":["timeUnit","timeUnitCount","price"],"properties":{"timeUnit":{"type":"string","description":"how many time units"},"timeUnitCount":{"type":"integer","format":"int32"},"price":{"$ref":"#/components/schemas/Agile.Integration.Price"}}},"Agile.Integration.DriverInfo":{"type":"object","required":["firstName","phoneMobile"],"properties":{"licenceNumber":{"type":"string"},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"zipCode":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"countryCode":{"type":"string","nullable":true},"phoneMobile":{"type":"string"},"email":{"type":"string","nullable":true}}},"Agile.Integration.ExtCustomer":{"type":"object","required":["id","extId"],"properties":{"id":{"type":"string","nullable":true},"extId":{"type":"string"},"timestamp":{"type":"string","nullable":true},"customerType":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"zipCode":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"countryCode":{"type":"string","nullable":true},"phonePrivate":{"type":"string","nullable":true},"phoneWork":{"type":"string","nullable":true},"phoneMobile":{"type":"string","nullable":true},"fax":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"comment":{"type":"string","nullable":true},"communicationMail":{"type":"string","nullable":true},"communicationPhone":{"type":"string","nullable":true},"communicationEmail":{"type":"string","nullable":true},"communicationSMS":{"type":"string","nullable":true},"corporateForm":{"type":"string","nullable":true},"dateOfBirth":{"type":"string","nullable":true},"isValidated":{"type":"boolean","nullable":true},"mosaicCode":{"type":"string","nullable":true},"organizationName":{"type":"string","nullable":true},"organizationNo":{"type":"string","nullable":true},"ownership":{"type":"string","nullable":true},"serviceAgreement":{"type":"string","nullable":true},"status":{"type":"boolean","nullable":true},"extWebCustomerId":{"type":"string","nullable":true}}},"Agile.Integration.Price":{"type":"object","required":["value","currency"],"properties":{"value":{"type":"number","format":"double"},"currency":{"type":"string"}}},"Agile.Integration.PriceQuote":{"type":"object","required":["vehicleGroupId","quote"],"properties":{"vehicleGroupId":{"type":"string"},"quote":{"$ref":"#/components/schemas/Agile.Integration.Price"}}},"Agile.Integration.PriceQuoteRequest":{"type":"object","required":["rateCode","vehicleGroupIds","timeSpan","dealerNumber"],"properties":{"rateCode":{"type":"string"},"vehicleGroupIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"timeSpan":{"$ref":"#/components/schemas/Agile.Integration.Timespan"},"dealerNumber":{"type":"string"}}},"Agile.Integration.PriceQuoteResponse":{"type":"object","required":["rateCode","timeSpan","dealerNumber","PriceQuotes"],"properties":{"rateCode":{"type":"string"},"timeSpan":{"$ref":"#/components/schemas/Agile.Integration.Timespan"},"dealerNumber":{"type":"string"},"PriceQuotes":{"type":"array","items":{"$ref":"#/components/schemas/Agile.Integration.PriceQuote"},"uniqueItems":true}}},"Agile.Integration.RentalBooking":{"type":"object","required":["externalReference","rentalInfo","customer","customerPMP","driver"],"properties":{"externalReference":{"type":"string"},"bookingId":{"type":"string"},"bookingStatus":{"type":"string"},"rentalInfo":{"$ref":"#/components/schemas/Agile.Integration.RentalInfo"},"customer":{"$ref":"#/components/schemas/Agile.Integration.ExtCustomer"},"customerPMP":{"type":"string"},"thirdParty":{"$ref":"#/components/schemas/Agile.Integration.ExtCustomer"},"additionalReferences":{"type":"array","items":{"$ref":"#/components/schemas/Agile.Integration.TitledReference"},"uniqueItems":true},"driver":{"$ref":"#/components/schemas/Agile.Integration.DriverInfo"},"vehicleFamily":{"type":"string"},"comments":{"type":"string"}}},"Agile.Integration.RentalInfo":{"type":"object","required":["rateCode","vehicleGroupId","timeSpan","dealerNumber"],"properties":{"rateCode":{"type":"string"},"vehicleGroupId":{"type":"string"},"timeSpan":{"$ref":"#/components/schemas/Agile.Integration.Timespan"},"dealerNumber":{"type":"string"}}},"Agile.Integration.Timespan":{"type":"object","required":["start","end"],"properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}}},"Agile.Integration.TitledReference":{"type":"object","required":["referenceType","reference"],"properties":{"referenceType":{"type":"string"},"reference":{"type":"string"},"titleEn":{"type":"string"},"titleNo":{"type":"string"}}},"Agile.Integration.VehicleGroupAvailabilityQuote":{"type":"object","required":["vehicleGroupId","availability","oneDayPrice"],"properties":{"vehicleGroupId":{"type":"string"},"exampleModel":{"type":"string"},"availability":{"type":"array","items":{"$ref":"#/components/schemas/Agile.Integration.Timespan"},"uniqueItems":true},"oneDayPrice":{"$ref":"#/components/schemas/Agile.Integration.CarGroupAvailabilityPrice"}}}}}}