{"openapi":"3.0.0","info":{"title":"Agile Solutions Rental Booking API callback specification","description":"Rental Booking Integration Callback API to be provided by integration partners","version":"0.1.0","contact":{"name":"Agile Solutions Mobility AS","url":"https://www.agilesolutions.no/"}},"servers":[{"url":"http://localhost:8080/"}],"paths":{"/oauth2/v2.0/token":{"post":{"tags":["AuthEndpoint"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["client_id","client_secret","scope","grant_type"],"properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"scope":{"type":"string"},"grant_type":{"type":"string"}}}}}},"responses":{"default":{"description":"The response to a successful request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agile.Integration.TokenHolder"}}}},"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"}}}}}}},"/customer-api/v2/contacts/query":{"post":{"tags":["CustomerContactCollectionEndpoint"],"parameters":[{"name":"MaxItemCount","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"IsCaseSensitive","in":"query","schema":{"type":"boolean"}},{"name":"PartialMatching","in":"query","schema":{"type":"boolean"}},{"name":"Ocp-Apim-Subscription-Key","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Continuation-Token","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agile.Integration.CustomerQueryRequest"}}}},"responses":{"default":{"description":"The response to a successful request.","headers":{"X-Continuation-Token":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agile.Integration.CustomerQueryResponse"}}}},"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"}}}}}}},"/rental-callback-api/v1/invoices/{invoiceId}":{"post":{"tags":["InvoicingEndpoint"],"parameters":[{"name":"invoiceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"bookingId","in":"query","required":true,"schema":{"type":"string"}},{"name":"externalReference","in":"query","required":true,"schema":{"type":"string"}},{"name":"customerExtId","in":"query","required":true,"schema":{"type":"string"}},{"name":"Ocp-Apim-Subscription-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"responses":{"default":{"description":"The response to a successful request."},"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"}}}}}}},"/rental-callback-api/v1/bookings/{bookingId}":{"put":{"tags":["RentalStatusChangeEndpoint"],"parameters":[{"name":"bookingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Ocp-Apim-Subscription-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."},"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.Credentials":{"type":"object","required":["client_id","client_secret","scope","grant_type"],"properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"scope":{"type":"string"},"grant_type":{"type":"string"}}},"Agile.Integration.Customer":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"communicationBulkEmail":{"type":"boolean"},"communicationCsi":{"type":"boolean"},"communicationEmail":{"type":"boolean"},"communicationFax":{"type":"boolean"},"communicationMail":{"type":"boolean"},"communicationPhone":{"type":"boolean"},"communicationSMS":{"type":"boolean"},"communicationMarketingMaterials":{"type":"boolean"},"gender":{"type":"string"},"maritialStatus":{"type":"string"},"dateOfBirth":{"type":"string","format":"date-time"},"industry":{"type":"string"},"ownership":{"type":"string"},"comment":{"type":"string"},"corporateForm":{"type":"string"},"countryCode":{"type":"string"},"customerType":{"type":"string"},"email":{"type":"string"},"id":{"type":"string"},"extWebCustomerId":{"type":"string"},"mosaicCode":{"type":"string"},"tiresHotel":{"type":"boolean"},"organizationName":{"type":"string"},"organizationNo":{"type":"string"},"phoneMobile":{"type":"string"},"phoneWork":{"type":"string"},"phonePrivate":{"type":"string"},"fax":{"type":"string"},"webSite":{"type":"string"},"status":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"zipCode":{"type":"string"}}},"Agile.Integration.CustomerQueryRequest":{"type":"object","properties":{"phoneMobile":{"type":"string"},"phonePrivate":{"type":"string"},"phoneWork":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"address1":{"type":"string"},"zipCode":{"type":"string"},"city":{"type":"string"},"organizationNo":{"type":"string"},"organizationName":{"type":"string"},"email":{"type":"string"}}},"Agile.Integration.CustomerQueryResponse":{"type":"object","required":["customers","itemCount"],"properties":{"customers":{"type":"array","items":{"$ref":"#/components/schemas/Agile.Integration.Customer"},"uniqueItems":true},"itemCount":{"type":"integer","format":"int32"}}},"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.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.TokenHolder":{"type":"object","required":["token_type","expires_in","access_token"],"properties":{"token_type":{"type":"string"},"expires_in":{"type":"integer","format":"int32"},"access_token":{"type":"string"}}}}}}