Rental Company Integration
For us to integrate with a rental company they need to provide 2 services.
This service is optional.
If you want to do all processing on your end you can skip this service.
What we expect back from the service is a unique identifier for the rental agreement.
Then we would use that when registering the payment.
If no agreement is found we would skip the payment register step.
We expect the service to response in a restfull way.
GET https://baseUrl/lookup-vehicle?plate=test123&startOn=2022-09-13T10:48:25
Expected response statuses
Success: 200 Invalid input: 400 Vehicle not found: 404 Rental agreement not found: 404
Success Response
{
"rentalId": "7f559daf-ac48-4952-9764-5db69cbadbad"
}
Failure Response
{
"message": "No rental agreement found"
}
This service would provide use with a way to register a payment in your system.
We send all information about the payment.
And if you provided a vehicle lookup service we will also include the rentalId.
POST https://baseUrl/lookup-vehicle
{
"payment": {
"amount": 1000,
"currency": "ISK"
},
"vehicle": {
"plate": "test123",
"rentalId": "7f559daf-ac48-4952-9764-5db69cbadbad",
"startOn": "2022-09-13T10:48:25"
},
"location": {
"name": "test location"
}
}
Expected response statuses
Success: 200 Invalid input: 400 Vehicle not found: 404 Rental agreement not found: 404 Failed to process or save payment: 500
Success Response
{
"transaction": "7853cc4c-9c32-48c4-9e97-cd9b1d6d0129"
}
Failure Response
{
"message": "Duplicate transaction"
}