Caren Vehicle API

Endpoints

Mandatory parameters are marked with *.

Value types:

[DateTime] values are [String] on the form yyyy-MM-dd hh:mm, for example 2001-01-10 13:30 for 10th of January 2001 13:30. When passing [DateTime] to the service the form yyyy/MM/dd is also allowed. Numbers will always be interpreted as a UTC Unix-time timestamp in seconds (the date part will be ignored).

[Price] is a float point number with two decimals.

sortColumn is Case-Sensitive.

path: /vehicleapi/user/login - POST

parameters:

returns: [String] Session key to use for other requests. If a session is not used for 30 minutes it expires and a new one needs to be created so a caching in the front end for 20 minutes is good.

path: /vehicleapi/user/logout - POST

parameters:

returns: [String] Session key to use for other requests. If a session is not used for 30 minutes it expires and a new one needs to be created so a caching in the front end for 20 minutes is good.

Location Endpoints

path: /vehicleapi/location/getpickuplist- POST

parameters:

returns: [List] of Pickup Location objects. The [List] is cached for 2 hours based on rentalId, language, sortColumn, sortDirection and showHours. You can add the parameter refresh as true to force list to be refreshed.

path: /vehicleapi/location/getdropofflist- POST

parameters: Same as for /vehicleapi/location/getpickuplist

returns: [List] of Dropoff Location objects. The [List] is cached for 2 hours based on rentalId, language, sortColumn, sortDirection and showHours. You can add the parameter refresh as true to force list to be refreshed. Note: Dropoff and pickup locations are not necessarily the same.

path: /vehicleapi/location/getitem- POST

parameters:

returns: Same attributes as in /vehicleapi/location/getpickuplist

path: /vehicleapi/location/getdates- POST

parameters:

returns: [List] of dates and time range where [Location] is closed

path: /vehicleapi/location/gettimes- POST

parameters:

returns: A [List] of time ranges for the [Location] id which states the opening hours

path: /vehicleapi/location/sharedpickuplist- POST

parameters:

returns: [List] of Shared Pickup Location objects. The [List] is cached for 2 hours based on rentalId, language, sortColumn, sortDirection and showHours. You can add the parameter refresh as true to force list to be refreshed.

path: /vehicleapi/location/shareddropofflist- POST

parameters:

returns: Same attributes as in /vehicleapi/location/sharedpickuplist

Vehicle Class and Group Endpoints

path: /vehicleapi/class/getlist- POST

parameters:

returns: [List] of [Vehicle Class] objects

example code:

[List] of all [Vehicle Class] objects sorted by name.
{
    session: "1ca20c52-f00e-e711-80ba-842b2b50d50f",
    rentalId: 13,
    skipDateCheck: true,
    sortColumn: "Name"
}

[List] of available [Vehicle Class] objects sorted by highest price. Since `showAll` is true the list also contains [Vehicle Class] objects that aren't avilable and the `available` attribute is false.
{
    session: "1ca20c52-f00e-e711-80ba-842b2b50d50f",
    rentalId: 13,
    dateFrom: "2017-07-01 12:00",
    dateTo: "2017-07-10 12:00",
    sortDirection: "desc",
    showAll: true
}

path: /vehicleapi/class/getitem- POST

parameters:

returns: Same attributes as in /vehicleapi/class/getlist

path: /vehicleapi/class/getavailableids- POST

parameters:

returns:

path: /vehicleapi/class/checkavailable- POST

parameters:

returns:

path: /vehicleapi/class/GetUnitAvailableOnDates- POST

parameters:

returns:[List] of objects

path: /vehicleapi/class/OffsetSearch- POST

Offset search is used to find if class is availible around specific date.

parameters:

returns:[List] of objects

example code:


    request:
    {
        session: "1ca20c52-f00e-e711-80ba-842b2b50d50f",
        rentalId: 13,
        classId: 483,
        dateFrom: "2019-12-12 00:00",
        LengthOfRental: 4,
        DayOffset: 2
    }

    response:
    [
        {
            "DateFrom": "2019-12-10T00:00:00",
            "DateTo": "2019-12-14T00:00:00",
            "IsAvailable": true
        },
        {
            "DateFrom": "2019-12-11T00:00:00",
            "DateTo": "2019-12-15T00:00:00",
            "IsAvailable": false
        },
        {
            "DateFrom": "2019-12-13T00:00:00",
            "DateTo": "2019-12-17T00:00:00",
            "IsAvailable": true
        },
        {
            "DateFrom": "2019-12-14T00:00:00",
            "DateTo": "2019-12-18T00:00:00",
            "IsAvailable": false
        }
    ]

path: /vehicleapi/group/list- POST

parameters:

returns: [List] of [Vehicle Group] objects. The [List] is cached for 24 hours based on rentalId, language, sortColumn and sortDirection. You can add the parameter refresh as true to force list to be refreshed.

path: /vehicleapi/group/item- POST

parameters:

returns: Same attributes as in /vehicleapi/group/list

Extras and Insurances Endpoints

path: /vehicleapi/extra/getlist- POST

parameters:

returns: [List] of [Extra] objects

path: /vehicleapi/extra/getitem- POST

parameters:

returns: Same attributes as in /vehicleapi/extra/list

path: /vehicleapi/insurance/getlist- POST

parameters:

returns: [List] of [Insurance] objects

path: /vehicleapi/insurance/getitem- POST

parameters:

returns: Same attributes as in /vehicleapi/insurance/list

Price Endpoints

path: /vehicleapi/price/getprices- POST

parameters:

returns:

example code:

{
   session: "1ca20c52-f00e-e711-80ba-842b2b50d50f",
   rentalId: 13,
   classId: 483,
   dateFrom: "2017-09-01 13:00",
   dateTo: "2017-09-05 14:30",
   pickupLocationId: 147,
   dropoffLocationId: 91,
   extras: [[90,2],[83,1],[94,1]],
   insurances: [[35],[33]]
}

Reservation Endpoints

path: /vehicleapi/reservation/getlistbyemail- POST

parameters:

returns:[List] of [Reservation] objects.

path: /vehicleapi/reservation/getitem- POST

parameters:

returns: [Reservation] object.

path: /vehicleapi/reservation/add- POST

parameters:

returns:

example code:

{
    session: "1ca20c52-f00e-e711-80ba-842b2b50d50f",
    rentalId: 13,
    language: "en-GB",
    classId: 483,
    dateFrom: "2017-09-01 13:00",
    dateTo: "2017-09-05 14:30",
    pickupLocationId: 147,
    dropoffLocationId: 91,
    dropoffLocationExtraInfo: "Apotek Hotel",
    flightNumber: "FI614",
    airline: "Icelandair",
    arrivalTime: "13:30",
    passangers: 3,
    comments: "THIS IS A TEST",
    confirmReservation: true,
    customer: {
        firstName: "John",
        lastName: "Doe",
        email: "john@doe.is",
        phone: "555-5555",
        mobile: "+354 555 6666",
        passport: "A12312098",
        address: "Home sweet home 123",
        city: "Keflavik",
        zipCode: "230",
        countryId: 93
    },
    extras: [[90,2],[83,1],[94,1]],
    insurances: [[35],[33]],
    drivers: [
            ["", "John Doe", "", "1992-05-10", true],
            ["", "Julius Gudmundsson", "9234897fsda", "1971-09-22", false],
        ]
}

path: /vehicleapi/reservation/updatecustomer- POST

parameters:

returns:

path: /vehicleapi/reservation/updategeneraldata- POST

parameters:

returns:

path: /vehicleapi/reservation/updateclass- POST

parameters:

returns:[VehicleReservationClassUpdateResponse] object

path: /vehicleapi/reservation/updatelocation- POST

parameters:

returns:[VehicleReservationLocationUpdateResponse] object

path: /vehicleapi/reservation/updateinsurance- POST

parameters:

returns:[VehicleReservationInsuranceUpdateResponse] object

path: /vehicleapi/reservation/updateextras- POST

parameters:

returns:[VehicleReservationExtrasUpdateResponse] object

path: /vehicleapi/reservation/updateterm- POST

parameters:

returns:[VehicleReservationTermUpdateResponse] object

path: /vehicleapi/reservation/updatedrivers- POST

parameters:

returns:

path: /vehicleapi/reservation/checkpricechange- POST

parameters:

returns:

path: /vehicleapi/reservation/edit- POST

parameters:

returns:

path: /vehicleapi/reservation/confirm- POST

parameters:

returns:

path: /vehicleapi/reservation/cancel- POST

parameters:

returns:

Payment Endpoints

path: /vehicleapi/payment/getterms- POST

parameters:

returns:

path: /vehicleapi/payment/getoptions- POST

parameters:

returns: [List] of [Payment Option] objects.

path: /vehicleapi/payment/getform- POST

parameters:

returns: A form used to submit to an external Payment Page.

path: /vehicleapi/payment/add- POST

parameters:

returns:

System Endpoints

path: /vehicleapi/country/list- POST

parameters:

returns: [List] of [Country] objects. The [List] is cached for 24 hours based on sortColumn and sortDirection. You can add the parameter refresh as true to force list to be refreshed.

path: /vehicleapi/transmission/list- POST

parameters:

returns: [List] of [Transmission] objects. The [List] is cached for 24 hours based on sortColumn and sortDirection. You can add the parameter refresh as true to force list to be refreshed.

path: /vehicleapi/fuel/list- POST

parameters:

returns: [List] of [Fuel] objects. The [List] is cached for 24 hours based on sortColumn and sortDirection. You can add the parameter refresh as true to force list to be refreshed.

path: /vehicleapi/drive/list- POST

parameters:

returns: [List] of [Drive] objects. The [List] is cached for 24 hours based on sortColumn and sortDirection. You can add the parameter refresh as true to force list to be refreshed.

path: /vehicleapi/rental/list- POST

parameters:

returns: [List] of [Rental] objects.

path: /vehicleapi/rental/item- POST

parameters:

returns:[Rental] object.

Reseller Endpoints

Reseller endpoints only work for webs that have meen marked as resellers.

path: /vehicleapi/price/GetResellerPrices- POST

parameters:

returns: [List] of [Vehicle Reseller Price] objects

example code:


    request:
    {
    "Session": "1ca20c52-f00e-e711-80ba-842b2b50d50f",
    "RentalId": "13",
    "DateFrom": "2019-05-04",
    "DateTo": "2020-05-04",
    "ClassIds": [1269],
    "Currency": "ISK"
    }
    response:
    [
        {
            "VehicleClassId": 1269,
            "Currency": "ISK",
            "Seasons": [
                {
                    "DateFrom": "2019-06-01T00:00:00",
                    "DateTo": "2019-08-31T00:00:00",
                    "SeasonPrices": [
                        {
                            "Price": 11000,
                            "RentalDays": 4
                        },
                        {
                            "Price": 12000,
                            "RentalDays": 1
                        }
                    ]
                },
                {
                    "DateFrom": "2019-09-01T00:00:00",
                    "DateTo": "2019-10-31T00:00:00",
                    "SeasonPrices": [
                        {
                            "Price": 9000,
                            "RentalDays": 4
                        },
                        {
                            "Price": 10000,
                            "RentalDays": 1
                        }
                    ]
                },
                {
                    "DateFrom": "2019-01-01T00:00:00",
                    "DateTo": "2019-05-31T00:00:00",
                    "SeasonPrices": [
                        {
                            "Price": 9000,
                            "RentalDays": 4
                        },
                        {
                            "Price": 10000,
                            "RentalDays": 1
                        }
                    ]
                },
                {
                    "DateFrom": "2019-11-01T00:00:00",
                    "DateTo": "2020-04-30T00:00:00",
                    "SeasonPrices": [
                        {
                            "Price": 7000,
                            "RentalDays": 4
                        },
                        {
                            "Price": 8000,
                            "RentalDays": 1
                        }
                    ]
                }
            ]
        }
    ]

Error codes

Code Message
10000 Unknown Error
10001Input parameters missing
10002Failed To Create Row
10003Item not found
10004Invalid Or Empty Property Values
10005Access is Denied
11001Database Connection Failed
11002Error Receiving Data From Database
11003Failed To Create Filter
11004Failed To Update Item
11005Failed To Create Item
11006Failed To Delete Item
11007Error In Database Query Or Parsing Object
16001Unit Already Assigned To Another Reservation
16002Unit Is Not Available
16003Rental Started But Email Not Sent
1000 Operation not supported
1001 Unknown error
1002 Required parameters missing
1003 General information
1004 General warning
1005 General error
1006 Request not correctly formatted
2000 Not authorized
2001 Invalid cardnumber
2002 Security code missing
2003 Debetcard not accepted
2004 Invalid amount
2005 Communication error
2006 Card type not accepted
2007 Internal error in payment gateway
2008 Icelandic cards cannot be charged in foreign currency
2009 Invalid expiration date
2010 Verified by VISA or secure code required
2011 Currency not accepted
2012 Card is expired
2013 SSN and contract don't match
2014 Security code has to be 3 chars
2015 No response from the server
2016 Invalid response from the gateway
2017 Price amount or currency is invalid
2018 Creditcard number is required
2019 Expire month and year are required
2020 Creditcard is expired
2021 You can't store credit card numbers
2022 Do not honor (Not accepted)
2023 Restricted card
2024 Merchant not identified
2025 Transaction not allowed to cardholder
2026 Transaction not allowed to terminal
2027 No not honor
2028 Special occasion
2029 Stolen card
2030 Form error
2031 Original transaction can not be traced
2032 Host timeout
3000 MD5 checksum doesn't match
3001 Amount doesn't match
3002 Payment not verified
4000 Only Api users can connect to the Api
4001 Failed to create session
4002 Invalid username or password
4003 Session is invalid
4004 Web doesn't exist
4005 User and web don't match
4006 Web and rental don't match
70000 You must select a vehicle
70001 You must select pick up and drop off dates
70002 Drop off date must be higher then pick up date
70003 Pick up location is required
70004 Drop off location is required
70005 Pick up and drop off locations are required
70006 Please accept our terms and conditions
70007 This vehicle has minimum {0} booking days
70008 This vehicle has maximum {0} booking days
70009 This vehicle is not available on these dates
70010 This vehicle is not rentable on these dates
70011 You can't process the same payment within 10 minutes
70012 There's a minumum of {0} days per booking
70013 There's a maximum of {0} days per booking
70014 The pick up date and time needs to be at least {0} hours in advance
70015 The location {0} is only open at these hours
70016 First name is required
70017 Last name is required
70018 E-mail address is required
70019 No payment gateway has been assigned to this rental
70020 Payment gateway and web don't match
70021 The reservation doesn't match with the web
70022 The vehicle class doesn't match with the web
70023 The reservation currency doesn't match with the payment currency
70024 Customer information is required
70025 You must select valid pick up and drop off dates
70026 The pick up date has already passed
70027 Pick up location is closed between {0} and {1}
70028 Drop off location is closed between {0} and {1}
70029 You can't edit a request
70030 Guid is required
70031 Reservation doesn't exist
70032 Email addresses are required
70033 You can't cancel a reservation that has been started
70034 Reservation is not editable
70035 Pick up location not found
70036 Drop off location not found
70037 No Customer found for this Reservation
70038 You can't refund more than the payment amount
70039 Payment amount can't be less than refunded amount
70040 You can't delete the only Folio
70041 Date From must be less than Date To
70042 Request has {0} drivers in total, but reservation has {1} extra drivers beside main driver
70043 Reservation already has that same ClassId set. Nothing to update
70044 Currency not supported. Either remove currency from request or enter valid currency
70045 Reservation term is the same. Nothing to update
70046 Length of rental needs to be between {0} and {1} days
70047 Day offset must between {0} and {1}
70048 Invalid Booking Code