API Documentation

Overview

Beta Version

Rentlio v1 api is currently in beta version, and some backward compatibility can be broken. New endpoints will be added weekly. For any bug reports or requests please send email to developers@rentl.io

The Rentlio API is organized around REST. It has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. JSON is returned by all API responses, including errors. Also JSON is used in request body instead of form data. We don’t use sandbox version where you can test your integrations. Instead, you can use a demo property and its reservations to be sure no harm is done on real data.

Currently active API version is v1 and can be accessed at https://api.rentl.io/v1/. API is accessible only via HTTPS.

Limits

To ensure clients good behaviour, API has some limitation on its usage. The limits shouldn’t cause any development issues. If you hit them, it means you are doing something wrong.

Request Size

Maximum request size you can send to api.rentl.io is 1MB. Larger requests will be rejected. This limit is global for all endpoints. Some of the endpoints can have their specific limits and this will be listed in specific endpoint documentation.

Request Rate

You can call a maximum of 10 requests in 1 second for a single API Key or IP address. This limit is global for all endpoints. Some of the endpoints can have their specific limits and this will be listed in specific endpoint documentation.

Authentication

Authenticate your account when using the API by including your secret API key in the request. You can manage your API keys in your account settings. Your API keys carry many privileges, so be sure to keep them private! Do not share your secret API keys in publicly accessible areas such GitHub, client-side code, and so forth. You can use your API keys in 2 ways:

As query param

$ curl https://api.rentl.io/v1/{api path}?apikey=<some_key>

As request header

$ curl https://api.rentl.io/v1/{api path} -H 'apikey: <some_key>'

Users

User in Rentlio is a person that is authenticated and authorized to perform actions within Rentlio system. Below are endpoints responsible for handling users in Rentlio.

Get My Data

This endpoint will return data for user that is associated with provided ApiKey.

GET/users/me

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 12654,
  "email": "desk@sunshine.inn",
  "firstName": "Steve",
  "lastName": "Schultz",
  "address": "Wiseman Street",
  "postalCode": "37929",
  "city": "Knoxville",
  "phone": "865-286-6425",
  "timezone": "America/New_York",
  "createdAt": 1422622202,
  "modifiedAt": 1484731923
}
Schema
{
  "type": "object",
  "properties": {
    "id": "integer",
    "email": "string",
    "firstName": "string",
    "lastName": "string",
    "address": "string",
    "postalCode": "string",
    "city": "string",
    "phone": "string",
    "timezone": "string",
    "createdAt": "integer - UTC unix timestamp",
    "modifiedAt": "integer - UTC unix timestamp"
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}

Properties

Properties in Rentlio represent main grouping of your rental units. For example, a property can be a Hotel, Hostel, Camp, etc, or a single Apartment. Most of Rentl.io api endpoints will require you to pass propertiesID param. Below are endpoints for working with properties.

List All Properties

GET/properties?name={name}&page={page}&order_by={order_by}&order_direction={order_direction}

URI Parameters
HideShow
name
string (optional) 

Name of property to filter by

page
string (optional) 

Results page number

order_direction
string (optional) Default: ASC

Choices: ASC DESC

Results ordering

order_by
string (optional) Default: id

Choices: id createdAt modifiedAt

Column to order by

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 95,
      "name": "Sunshine Inn",
      "address": "Novi Varoš 41",
      "postalCode": "51315",
      "city": "Mrkopalj",
      "country": "Croatia (Hrvatska)",
      "phone": "001982726",
      "mobilePhone": "097222111",
      "fax": "001982726",
      "email": "info@sunshine.inn",
      "webPage": "sunshine.inn",
      "createdAt": 1422949977,
      "modifiedAt": 1479202103
    },
    {
      "id": 234,
      "name": "43rd Street Apartment",
      "address": "43rd street",
      "postalCode": "10036",
      "city": "NY",
      "country": "US",
      "phone": "-",
      "mobilePhone": "-",
      "fax": "-",
      "email": "my-cozy-apartment@mail.com",
      "webPage": "-",
      "createdAt": 1453890625,
      "modifiedAt": 1456133987
    }
  ],
  "perPage": 30,
  "total": 2
}
Schema
{
  "type": "object",
  "properties": {
    "total": "integer - total number of items",
    "perPage": "integer - how many items is returned in single page"
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": "string",
          "name": "string",
          "address": "string",
          "postalCode": "string",
          "city": "string",
          "country": "Croatia (Hrvatska)",
          "phone": "string",
          "mobilePhone": "string",
          "fax": "string",
          "email": "string",
          "webPage": "string",
          "createdAt": "integer - UTC unix timestamp",
          "modifiedAt": "integer - UTC unix timestamp"
        }
      }
    }
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}

Unit Types

Unit Types in Rentl.io represent group of rental units with same characteristics. For example, a Double Room, Apartment or Single Room. Each Unit Type belongs to only one Property. Unit Type can have multiple Units. Also rates, availability and promotions are related to unit types in the same manner as on booking.com or expedia.ie for example.

List All Unit Types

GET/properties/{id}/unit-types?page={page}&order_by={order_by}&order_direction={order_direction}

URI Parameters
HideShow
id
int (required) 

Id for property unit types are listed for

page
string (optional) 

Results page number

order_direction
string (optional) Default: ASC

Choices: ASC DESC

Results ordering

order_by
string (optional) Default: id

Choices: id createdAt modifiedAt

Column to order by

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 40,
      "name": "Standard Double Room",
      "createdAt": 1422949988,
      "modifiedAt": 1429735776
    },
    {
      "id": 41,
      "name": "Suite with Balcony",
      "createdAt": 1422949993,
      "modifiedAt": 1433487789
    }
  ],
  "perPage": 30,
  "total": 2
}
Schema
{
  "type": "object",
  "properties": {
    "total": "integer - total number of items",
    "perPage": "integer - how many items is returned in single page"
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": "string",
          "name": "string",
          "createdAt": "integer - UTC unix timestamp",
          "modifiedAt": "integer - UTC unix timestamp"
        }
      }
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Property ID param missing"
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}

List Unit Type Availability

This endpoint will list availability for specified unit type. Results can be filtered by date range.

GET/unit-types/{id}/availibility?page=&order_by={order_by}&order_direction={order_direction}&dateFrom={dateFrom}&dateTo={dateTo}

URI Parameters
HideShow
id
int (required) 

Id for unit type we are listing availability for

dateFrom
string (optional) 

Starting date for filtering availability in YYYY-mm-dd format. For this filter to work, both From and To parameters must be specified. If invalid, filter is ignored.

dateTo
string (optional) 

Ending date for filtering availability in YYYY-mm-dd format. For this filter to work, both From and To parameters must be specified. If invalid, filter is ignored.

order_direction
string (optional) Default: ASC

Choices: ASC DESC

Results ordering

order_by
string (optional) Default: timestamp

Choices: timestamp

Column to order by

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "date": "2015-06-05",
      "availability": 2
    },
    {
      "date": "2015-06-06",
      "availability": 5
    },
    {
      "date": "2015-06-07",
      "availability": 0
    },
    {
      "date": "2015-06-08",
      "availability": 1
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "total": "integer - total number of items",
    "perPage": "integer - how many items is returned in single page",
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": "string - ISO date",
          "availability": "integer"
        }
      }
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "UnitType ID param missing"
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}

List Unit Type Rates

This endpoint will list rates for specified unit type. Currently only standard rate is listed. Results can be filtered by date range.

GET/unit-types/{id}/rates?page=&order_by={order_by}&order_direction={order_direction}&dateFrom={dateFrom}&dateTo={dateTo}

URI Parameters
HideShow
id
int (required) 

Id for unit type we are listing rates for

dateFrom
string (optional) 

Starting date for filtering rates in YYYY-mm-dd format. For this filter to work, both From and To parameters must be specified. If invalid, filter is ignored.

dateTo
string (optional) 

Ending date for filtering rates in YYYY-mm-dd format. For this filter to work, both From and To parameters must be specified. If invalid, filter is ignored.

order_direction
string (optional) Default: ASC

Choices: ASC DESC

Results ordering

order_by
string (optional) Default: timestamp

Choices: timestamp

Column to order by

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "date": "2015-06-05",
      "price": 120
    },
    {
      "date": "2015-06-06",
      "price": 120
    },
    {
      "date": "2015-06-07",
      "price": 110
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "total": "integer - total number of items",
    "perPage": "integer - how many items is returned in single page",
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": "string - ISO date",
          "price": "float"
        }
      }
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "UnitType ID param missing"
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}

Update Availability and Rates for Unit Type

This endpoint will update availability, rates and min stay restriction for unit type for a specific dates. If there are no values already inside rentl.io, new values will be crated.

If this unit type is connected to OTA channels, update will send values to those channels.

Limitations:
Only today and future values can be updated.
We allow 365 updates per api call.
Updates can be made maximum of 3 years in advance.

POST/unit-types/{id}/availrates

URI Parameters
HideShow
id
int (required) 

Id for unit type we are updating values for

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Body
{
  "days": [
    {
      "date": "2017-08-10",
      "minStay": 5,
      "price":75,
    },
    {
      "date": "2017-08-11",
      "minStay": 5
    },
    {
      "date": "2017-08-25",
      "availability": 3,
      "price":120,
    },
    {
      "date": "2017-08-26",
      "availability": 5
    },
    {
      "date": "2017-11-01",
      "availability": 0
    },
    {
      "date": "2017-11-02",
      "price": 0
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "days": {
      "type": "array, required - minimum 1, max 365 updates",
      "items": {
        "type": "object",
        "properties": {
          "date": "string, required - ISO format of a day that is updated. Please read limitations on dates that can be updated.",
          "availability": "integer, optional - how many units inside this unit type is available for rent.",
          "price": "float, optional - on what rate is your unit type rented",
          "minStay": "integer, optional - a Minimum length of stay restriction limits availability by specifying a number of nights that must be booked for stays, including the restriction date in any part of the stay date range."
        }
      }
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Updated days": 6
}
Schema
{
  "type": "object",
  "properties": {
    "Updated Days": "integer - total number of updated days"
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "errors": {
    "days": "Validation error on field:days, type:slice for rules:avail-updates()"
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "UnitType ID param missing"
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Error updating values."
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Error updating values to OTA Channels."
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}

Units

List All Units

GET/properties/{id}/units?page={page}&order_by={order_by}&order_direction={order_direction}

URI Parameters
HideShow
id
int (required) 

Id for property units are listed for

page
string (optional) 

Results page number

order_direction
string (optional) Default: ASC

Choices: ASC DESC

Results ordering

order_by
string (optional) Default: id

Choices: id createdAt modifiedAt

Column to order by

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 199,
      "propertiesId": 95,
      "unitTypesId": 40,
      "name": "Room 45",
      "color": "e34c42",
      "createdAt": 1422950002,
      "modifiedAt": 0
    },
    {
      "id": 200,
      "propertiesId": 95,
      "unitTypesId": 40,
      "name": "Room 46",
      "color": "ffba00",
      "createdAt": 1422950010,
      "modifiedAt": 1422960010
    }
  ],
  "perPage": 30,
  "total": 2
}
Schema
{
  "type": "object",
  "properties": {
    "total": "integer - total number of items",
    "perPage": "integer - how many items is returned in single page"
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": "string",
          "propertiesId": "integer",
          "unitTypesId": "integer",
          "name": "string",
          "color": "string",
          "createdAt": "integer - UTC unix timestamp",
          "modifiedAt": "integer - UTC unix timestamp"
        }
      }
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Property ID param missing"
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}

Reservations

Reservation or a Booking is a period in which one or more guests are staying in your unit. Reservation has one major guest called Reservation Holder and additional guests. Besides guests, Reservation has other important attributes. Below are endpoints responsible for handling reservations.

List All Reservations Today for a Unit

This endpoint will list current reservation in specified unit, that has checkedIn status to true and checkOut status to false.

GET/units/{unitId}/reservations/today?page={page}&order_by={order_by}&order_direction={order_direction}

URI Parameters
HideShow
unitId
int (required) 

Id for unit reservations are listed for

page
string (optional) 

Results page number

order_direction
string (optional) Default: ASC

Choices: ASC DESC

Results ordering

order_by
string (optional) Default: id

Choices: id createdAt modifiedAt

Column to order by

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 10128,
      "arrivalDate": 1480032000,
      "departureDate": 1480723200,
      "createdAt": 1480084148,
      "modifiedAt": 0,
      "holder": {
        "id": 14014,
        "name": "Robert Smith"
      }
    }
  ],
  "perPage": 30,
  "total": 1
}
Schema
{
  "type": "object",
  "properties": {
    "total": "integer - total number of items",
    "perPage": "integer - how many items is returned in single page"
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": "string",
          "arrivalDate": "integer - UTC unix timestamp",
          "departureDate": "integer - UTC unix timestamp"
          "createdAt": "integer - UTC unix timestamp",
          "modifiedAt": "integer - UTC unix timestamp"
          "holder" : {
            "type" : "object",
            "properties": {
              "id" : "integer - reservation holder ID",
              "name": "string - reservation holder full name"
            }
          }
        }
      }
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Unit ID param missing"
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}

List All Reservations

This endpoint will list all available reservations for specified filters. If no filters are specified all user reservations will be listed starting from largest reservation ID.

GET/reservations?perPage={perPage}&page={page}&order_by={order_by}&order_direction={order_direction}&status={status}&unitsId={unitsId}&propertiesId={propertiesId}&bookedAtFrom={bookedAtFrom}&bookedAtTo={bookedAtTo}&canceledAtFrom={canceledAtFrom}&canceledAtTo={canceledAtTo}&createdAtFrom={createdAtFrom}&createdAtTo={createdAtTo}&modifiedAtFrom={modifiedAtFrom}&modifiedAtTo={modifiedAtTo}

URI Parameters
HideShow
status
int (optional) 

Enables filtering by reservation status.

unitsId
string (optional) 

Comma separated list of unit IDs. Enables filtering by units. Single unit ID can also be used.

propertiesId
string (optional) 

Comma separated list of property IDs. Enables filtering by properties. Single property ID can also be used.

bookedAtFrom
string (optional) 

Starting date for bookedAt filter in YYYY-mm-dd format. For this filter to work, both From and To parameters must be specified. If invalid, filter is ignored.

bookedAtTo
string (optional) 

Ending date for bookedAt filter in YYYY-mm-dd format. For this filter to work, both From and To parameters must be specified. If invalid, filter is ignored.

canceledAtFrom
string (optional) 

Starting date for canceledAt filter in YYYY-mm-dd format. For this filter to work, both From and To parameters must be specified. If invalid, filter is ignored.

canceledAtTo
string (optional) 

Ending date for canceledAt filter in YYYY-mm-dd format. For this filter to work, both From and To parameters must be specified. If invalid, filter is ignored.

createdAtFrom
string (optional) 

Starting date for createdAt filter in YYYY-mm-dd format. For this filter to work, both From and To parameters must be specified. If invalid, filter is ignored. In manually created reservations createdAt and bookedAt are equal.

createdAtTo
string (optional) 

Ending date for createdAt filter in YYYY-mm-dd format. For this filter to work, both From and To parameters must be specified. If invalid, filter is ignored. In manually created reservations createdAt and bookedAt are equal.

modifiedAtFrom
string (optional) 

Starting date for modifiedAt filter in YYYY-mm-dd format. For this filter to work, both From and To parameters must be specified. If invalid, filter is ignored.

modifiedAtTo
string (optional) 

Ending date for modifiedAt filter in YYYY-mm-dd format. For this filter to work, both From and To parameters must be specified. If invalid, filter is ignored.

perPage
string (optional) 

Number of items per page. Default is 30. Maximum number can be 100.

page
string (optional) 

Results page number.

order_direction
string (optional) Default: ASC

Choices: ASC DESC

Results ordering

order_by
string (optional) Default: id

Choices: id createdAt modifiedAt bookedAt arrivalDate departureDate

Column to order by

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 423978438,
      "unitsId": 124453,
      "propertiesId": 31875,
      "arrivalDate": 1444262400,
      "departureDate": 1445040000,
      "unitName": "Room 46",
      "totalNights": 9,
      "note": "Airport transfer",
      "status": 7,
      "rateNames": "Standard rate",
      "origin": 2,
      "adults": 3,
      "childrenAbove12": 1,
      "childrenUnder12": 0,
      "salesChannelName": "",
      "otaChannelName": "booking.com",
      "guestId": 14014,
      "guestName": "Robert Smith",
      "guestEmail": "r.smith@emailme.com",
      "guestContactNumber": "",
      "guestCountryName": "United States",
      "pricePerNight": 10,
      "totalPrice": 90,
      "accommodationCost": 90,
      "totalCost": 101.7,
      "discountPercentage": 0,
      "discountNominal": 0,
      "currencyId": 1,
      "depositNominal": 0,
      "tentativeValidUntil": 0,
      "channelCommissionNominal": 0,
      "channelCommissionPercentage": 0,
      "totalServicesPrice": 0,
      "totalReservationPrice": 101.7,
      "vatRate": 13,
      "vatAmount": 11.7,
      "vatIncluded": "N",
      "createdAt": 1433847394,
      "bookedAt": 1433846354,
      "canceledAt": 1445002837,
      "modifiedAt": 1445002837
    }
  ],
  "perPage": 30,
  "total": 1
}
Schema
{
  "type": "object",
  "properties": {
    "total": "integer - total number of items",
    "perPage": "integer - how many items is returned in single page"
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": "integer - unique reservation ID",
          "unitsId": "integer - unique unit ID for reserved unit",
          "propertiesId": "integer - unique property ID for reserved property",
          "arrivalDate": "integer - UTC unix timestamp",
          "departureDate": "integer - UTC unix timestamp",
          "unitName": "string - name of reserved unit",
          "totalNights": "integer - Total number of reserved nights",
          "note": "string - Free text note on reservation. When reservation is from OTA this field holds guest note",
          "status": "integer - Reservation status. Please check reservation statuses enum for possible values",
          "rateNames": "string - Comma separated list of rate names from OTA",
          "origin": "integer - 1 => manually entered, 2 => from OTA channels",
          "adults": "integer - number of adults",
          "childrenAbove12": "integer - number of children above 12 years old",
          "childrenUnder12": "integer - number of children under 12 years old",
          "salesChannelName": "string - name of sales channel this reservation is booked at. This is only for manual channels specified at rentlio UI",
          "otaChannelName": "string - name of OTA sales channel this reservation is booked at. This field will be set for reservation retrieved from OTA channels when using channel manager.",
          "guestId": "integer - unique id for guest that made reservation",
          "guestName": "string - full name of guest that made reservation",
          "guestEmail": "string - email of guest that made reservation",
          "guestContactNumber": "string - contact number of guest that made reservation",
          "guestCountryName": "string - country name of guest that made reservation",
          "pricePerNight": "float - price for single night",
          "totalPrice": "float - (pricePerNight * totalNights)",
          "accommodationCost": "float - (totalPrice - discountNominal)",
          "totalCost": "float - (accommodationCost + vatAmount)",
          "discountPercentage": "float - percent of discount applied",
          "discountNominal": "float - total nominal amount of discount applied",
          "currencyId": "integer - unique currency ID. Check currency enum endpoint for possible values",
          "depositNominal": "float - amount of deposit provided",
          "tentativeValidUntil": "integer - UNIX Timestamp. When this option is expired. Will be set when reservation status is OPTION",
          "channelCommissionNominal": "float - nominal value for channel commission",
          "channelCommissionPercentage": "float - percentage value for channel commission",
          "totalServicesPrice": "float - total amount for all services attached to reservation",
          "totalReservationPrice": "float - (totalCost + totalServicesPrice). Final reservation price",
          "vatRate": "float - VAT rate (percentage) applied for this reservation",
          "vatAmount": "float - VAT amount for this reservation",
          "vatIncluded": "string - Can be Y or N. If VAT is not included it is added to totalCost. If vat is included it is calculated from totalCost",
          "bookedAt": "integer - UTC unix timestamp. Specifies when was this reservation booked. If this is manual reservation, bookedAt is same as createdAt.",
          "canceledAt": "integer - UTC unix timestamp. Specifies when was this reservation canceled. This field will be available only if reservation status is CANCELED.",
          "createdAt": "integer - UTC unix timestamp",
          "modifiedAt": "integer - UTC unix timestamp"
        }
      }
    }
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}

Services

Services in Rentlio represent something that you can offer to your guests besides accommodation. For example parking, rent a bike, meals… Services are defined per property and can then be added to reservations and/or invoices. Below are endpoints responsible for handling services.

List All Services For Property

This endpoint will list all services for specified property

GET/properties/{id}/services?page={page}&order_by={order_by}&order_direction={order_direction}

URI Parameters
HideShow
id
int (required) 

Id for property services are listed for

page
string (optional) 

Results page number

order_direction
string (optional) Default: ASC

Choices: ASC DESC

Results ordering

order_by
string (optional) Default: id

Choices: id createdAt

Column to order by

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 3,
      "name": "Bike",
      "price": 50,
      "priceSecondary": 0,
      "tax": 23,
      "paymentType": {
        "id": 3,
        "name": "Per Adult"
      },
      "vatIncluded": "N",
      "createdAt": 1427206131
    },
    {
      "id": 5,
      "name": "WiFi",
      "price": 2.5,
      "priceSecondary": 0,
      "tax": 13,
      "paymentType": {
        "id": 1,
        "name": "Per Night"
      },
      "vatIncluded": "N",
      "createdAt": 1428647541
    },
    {
      "id": 6,
      "name": "Kayak",
      "price": 15,
      "priceSecondary": 0,
      "tax": 0,
      "paymentType": {
        "id": 1,
        "name": "Per Night"
      },
      "vatIncluded": "N",
      "createdAt": 1428907978
    },
    {
      "id": 7,
      "name": "Breakfast",
      "price": 10,
      "priceSecondary": 0,
      "tax": 0,
      "paymentType": {
        "id": 1,
        "name": "Per Night"
      },
      "vatIncluded": "Y",
      "createdAt": 1429735791
    }
  ],
  "perPage": 30,
  "total": 4
}
Schema
{
  "type": "object",
  "properties": {
    "total": "integer - total number of items",
    "perPage": "integer - how many items is returned in single page"
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": "integer",
          "name": "string",
          "price": "float",
          "priceSecondary": "float",
          "tax": "float",
          "vatIncluded": "string (enum[Y,N])",
          "createdAt": "integer - UTC unix timestamp",
          "paymentType" : {
            "type": "object",
            "properties": {
              "id": "integer",
              "name": "string"
            }
          }
        }
      }
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Property ID param missing"
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}

Invoices

An invoice is a document that specifies the amount and cost of products or services that have been provided by a host. Invoice consist of some general data, invoice items and invoice taxes. Below are endpoints responsible for handling Invoices.

Create Invoice Item for Reservation

This endpoint will add invoice item to first existing draft invoice. If there is no draft invoice for this reservation new one will be created.

When adding invoice items to invoices the default option is vatIncluded = N. This means that Rentlio will add all taxes to the amount you send us.

There are two scenarios: if you’re sending NET amounts for invoice items specify that vatIncluded = N. In this case, when you send an invoice item called “coffee” with value 10 and 25% tax we will display it as 10 + 25% = 12.50.

If you’re sending GROSS amounts for invoice items please specify that vatIncluded = Y. In this case the total amount will remain unchanged, but we will deduct taxes on invoices to display correct NET rates on invoices + taxes.

POST/reservations/{id}/invoices/items

URI Parameters
HideShow
id
int (required) 

Id for reservation draft invoice is handling

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Body
{
  "description": "Coca cola 0.5L",
  "discountPercent": 10,
  "price": 9.88,
  "vatIncluded": "N",
  "quantity": 1,
  "taxes": [
    {
      "label": "PDV",
      "rate": 25
    },
    {
      "label": "PNP",
      "rate": 3
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "description": "string, required - Invoice item description",
    "price": "float, required - invoice item single unit price",
    "vatIncluded": "string (Y,N), optional - Default value is N. When Y tax is subtracted from price",
    "quantity": "float, required - number of invoice items",
    "discountPercent": "float [0-100] - invoice item discount",
    "taxes": {
      "type": "array, optional - maximum 2 taxes can be sent",
      "items": {
        "type": "object",
        "properties": {
          "label": "string, required - tax label. Important when using fiscalisation. PP and PNP labels will be fiscalised as consumption tax, all other labels will be fiscalised as Vat",
          "rate": "float, required - number larger then 0 and lower or equal then 100"
        }
      }
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": 1,
  "description": "Coca cola 0.5L",
  "price": 10,
  "quantity": 3,
  "discountPercentage": 10,
  "totalPrice": 29.7,
  "taxes": [
    {
      "label": "PDV",
      "rate": 25
    },
    {
      "label": "PNP",
      "rate": 3
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "id": "int - Invoice item unique identifier",
    "description": "string - Invoice item description",
    "price": "float- invoice item single unit price",
    "quantity": "int - number of invoice items",
    "discountPercentage": "float - invoice item discount",
    "totalPrice": "float  - invoice item total after discount and Vat",
    "taxes": {
      "type": "array - invoice item taxes",
      "items": {
        "type": "object",
        "properties": {
          "label": "string",
          "rate": "float"
        }
      }
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "errors": {
    "quantity": "Validation error on field:quantity, type:int for rules:required()"
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "This property doesn't have exchange rate defined!"
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Reservation ID param missing"
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}

Enums

Enums are list of objects used inside other resources, for example reservations statuses. Enum values will be used in other endpoints as values for some fields and that field values will be validated by enum members.

List All Services Payment Types

This endpoint will list all payment types available for use within service

GET/enums/services/payment-types

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": 0,
    "name": "None"
  },
  {
    "id": 1,
    "name": "Per Night"
  },
  {
    "id": 2,
    "name": "Per Person"
  },
  {
    "id": 3,
    "name": "Per Adult"
  },
  {
    "id": 4,
    "name": "Per Child Under 12"
  },
  {
    "id": 5,
    "name": "Per Child Above 12"
  },
  {
    "id": 6,
    "name": "Per Child Per Night"
  },
  {
    "id": 7,
    "name": "Fixed"
  },
  {
    "id": 8,
    "name": "Percentage"
  },
  {
    "id": 9,
    "name": "Not Applicable"
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": "integer",
      "name": "string",
    }
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}

List All Reservation Statuses

These are all statuses reservation can be in.

GET/enums/reservations/statuses

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "name": "Confirmed"
  },
  {
    "id": 2,
    "name": "Waiting for Approval"
  },
  {
    "id": 3,
    "name": "Refused"
  },
  {
    "id": 4,
    "name": "Accepted"
  },
  {
    "id": 5,
    "name": "Cancelled"
  },
  {
    "id": 6,
    "name": "Deleted with penalty"
  },
  {
    "id": 7,
    "name": "Option"
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": "integer",
      "name": "string",
    }
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}

List All Currencies

Rentlio supports many currencies. For complete list (118 items), call this endpoint.

GET/enums/currencies

Request
HideShow
Headers
Content-Type: application/json
ApiKey: 32eb16dc070a41d5c5b58d9d3d725be3
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "symbol": "€",
    "name": "Euro"
  },
  {
    "id": 2,
    "symbol": "$",
    "name": "US Dollar"
  },
  {
    "id": 3,
    "symbol": "kn",
    "name": "Croatian Kuna"
  },
  {
    "id": 4,
    "symbol": "د.إ.‏",
    "name": "United Arab Emirates Dirham"
  },
  {
    "id": 5,
    "symbol": "؋",
    "name": "Afghan Afghani"
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": "integer",
      "symbol": "string",
      "name": "string",
    }
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Invalid authentication credentials"
}