NAV navbar
logo

Developer Documentation

version v1
baseUri https://api.4suites.nl/v1
demoUri https://demo.api.4suites.nl/v1
protocols HTTPS
mediaType application/json

Getting Started

This is a getting started guide for the access to the future with 4Suites.

About

For more info please visit www.4suiteshq.com

Accessing the API

The 4Suites API can be accessed over HTTPS with base URL at https://api.4suites.nl/v1.

HTTPS Every request to the API must use HTTPS. When the API is accessed over HTTP, a 302 redirect will be returned with the correct HTTPS url.

Authentication and Authorization

4Suites supports OAuth 2.0 for authenticating all API requests by default.
After success authentication, the access token can be used for the API requests. It should be sent as a HTTP Header Authorization: Bearer {access_token}.

Request options

Limiting Fields

For retrieving collection of large resources, it is sometimes useful to limit the attributes returned by the API. For example, if we wanted to get only the id and email fields of the Users, we could specify that in the request:

GET https://{api-url}/v1/users?fields=id,email

Filtering with operators

Beside of getting one specific resource based on record ID, we can apply some more query parameters in order to get the collection based on specific search requirements. Actually any entity attribute can be used as a query parameter that will count for final request filtering. We can use them as exactly match or with special operators that prefix attribute value:

FilterDescriptionExample
attribute=valueFilter by exactly match for attribute value.company-name=4suites
attribute=not:valueIs not equal.role=not:admin
attribute=lt:valueIs lower than.age=lt:18
attribute=lte:valueIs lower than or equal.age=lte:20
attribute=gt:valueIs greater than.year=gt:2017
attribute=gte:valueIs greater than or equal.year=gte:2017
attribute=in:valueIs one of the array values.room-type=in:single,double
attribute=notin:valueIs not one of the array values.room-type=notin:single,double
attribute=q:valuePartially match search query for this attribute only.company-name=q:4s

An common search parameter can be used for searching through resources based on searchable attributes. The q parameter is also allowed as an alias for this.

Sideloading Associations

For reducing the number of requests, it is sometimes useful to sideload associations. For example, if we wanted to sideload the contact person of Company, we could specify that in the request:

GET https://{api-url}/v1/companies/1?include=contact

Pagination

Resources collections are paginated, meaning the response will include only a subset of resources and links to other pages. The JSON response will contain links object with a list for shortcut direct links that can be used for quick navigation through collection list.

Link nameDescription
selfLink to current page.
firstLink to very first page of collection.
prevLink to preview page.
nextLink to next page.
lastLink to last page of collection.

Pagination links are based on values for offset and limit parameters. However and page parameter can also be provided, in this case the offset will be ignored.

Pagination parameters can be also sent using Range HTTP Header with items as unit name. For example: Range: items 25-50 - will return items from 25 to 50, which means offset=25, limit=25.

Locales

Data provided by 4Suites API can be translated and returned in multiple languages. To request a specific locale you can send request with a Content-Language HTTP Header or using lang query parameter which has highier priority over HTTP Header.

Example: Content-Language: en as HTTP Header. ?lang=en as query parameter.

At the moment available locales are:

CodeName
enEnglish
nlDutch

By default en:English locale will be used.

To request translatable fields in multiple locales at once, the translatable query parameter can be sent without a value. To get only specific translations, translatable parameter can have a value of comma joined list of locales that must be returned. Example:

QueryDescription
?translationsWill return all translatable fields in available locales.
?translations=en,nlWill return only translations for English and Dutch languages.

The field name will have locale code prepended to name with dash. For Example: description_nl.

Reponse object

Typical response object for API resource collection looks like following:

{
    "status": 200,
    "code": "200:OK",
    "message": "OK",
    "description": "",
    "meta": {
        "apiVersion": "v1",
        "language": "en",
        "pagination": {
            "currentPage": 1,
            "limit": 15,
            "from": 1,
            "to": 2,
            "lastPage": 1,
            "total": 2,
            "links": {
                "self": "https://{api-url}/v1/companies?page=1",
                "first": "https://{api-url}/v1/companies?page=1",
                "prev": null,
                "next": null,
                "last": null
            }
        }
    },
    "data": [{
      "id": 1,
      "email": "user@4suites.nl",
      "profile": {
        "firstname": "Marco",
        "middlename": "van",
        "lastname": "Basten"
      },
      "address": {
        "address1": "Address1",
        "address2": "Address2",
        "house": 10,
        "postcode": "NL12345"
      }
    }]
}

API Response for collection item:

{
    "status": 200,
    "code": "200:OK",
    "message": "OK",
    "description": "",
    "meta": {
        "apiVersion": "v1",
        "language": "en",
    },
    "data": {
      "id": 1,
      "email": "user@4suites.nl",
      "profile": {
        "firstname": "Marco",
        "middlename": "van",
        "lastname": "Basten"
      },
      "address": {
        "address1": "Address1",
        "address2": "Address2",
        "house": 10,
        "postcode": "NL12345"
      }
    }
}

Note: On creating or updating resource items, the newly created/updated item data will be returned as well as success status.

Types

User


Properties

TYPE DEFINITION

{
  "name": "User",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "id"
    },
    "email": {
      "type": "string",
      "name": "email",
      "displayName": "email",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "email"
    },
    "password": {
      "type": "string",
      "name": "password",
      "displayName": "password",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "password"
    },
    "fullname": {
      "type": "string",
      "name": "fullname",
      "displayName": "fullname",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "fullname"
    },
    "firstname": {
      "type": "string",
      "name": "firstname",
      "displayName": "firstname",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "firstname"
    },
    "middlename": {
      "type": "string",
      "name": "middlename",
      "displayName": "middlename",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "middlename"
    },
    "lastname": {
      "type": "string",
      "name": "lastname",
      "displayName": "lastname",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "lastname"
    },
    "gender": {
      "type": "integer",
      "name": "gender",
      "displayName": "gender",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "gender"
    },
    "phone": {
      "type": "array",
      "items": {
        "type": "any"
      },
      "name": "phone",
      "displayName": "phone",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "phone"
    },
    "country_id": {
      "type": "integer",
      "name": "country_id",
      "displayName": "country_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "country_id"
    },
    "default_locale": {
      "type": "string",
      "name": "default_locale",
      "displayName": "default_locale",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "default_locale"
    },
    "status": {
      "type": "integer",
      "name": "status",
      "displayName": "status",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "status"
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "created_at"
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "updated_at"
    },
    "deleted_at": {
      "type": "datetime",
      "name": "deleted_at",
      "displayName": "deleted_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "deleted_at"
    }
  }
}

Company


Properties

TYPE DEFINITION

{
  "name": "Company",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "id"
    },
    "name": {
      "type": "string",
      "name": "name",
      "displayName": "name",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "name"
    },
    "contact_id": {
      "type": "integer",
      "name": "contact_id",
      "displayName": "contact_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "contact_id"
    },
    "status": {
      "type": "integer",
      "name": "status",
      "displayName": "status",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "status"
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "created_at"
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "updated_at"
    }
  }
}

Country


Properties

TYPE DEFINITION

{
  "name": "Country",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "name": {
      "type": "string",
      "name": "name",
      "displayName": "name",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "code": {
      "type": "string",
      "name": "code",
      "displayName": "code",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    }
  }
}

Address


Properties

TYPE DEFINITION

{
  "name": "Address",
  "type": "object",
  "properties": {
    "owner_type": {
      "type": "string",
      "name": "owner_type",
      "displayName": "owner_type",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "owner_id": {
      "type": "integer",
      "name": "owner_id",
      "displayName": "owner_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "label": {
      "type": "string",
      "name": "label",
      "displayName": "label",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "description": {
      "type": "string",
      "name": "description",
      "displayName": "description",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "address1": {
      "type": "string",
      "name": "address1",
      "displayName": "address1",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "address2": {
      "type": "string",
      "name": "address2",
      "displayName": "address2",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "country_id": {
      "type": "integer",
      "name": "country_id",
      "displayName": "country_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "city": {
      "type": "string",
      "name": "city",
      "displayName": "city",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "postcode": {
      "type": "string",
      "name": "postcode",
      "displayName": "postcode",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "latitude": {
      "type": "string",
      "name": "latitude",
      "displayName": "latitude",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "longitude": {
      "type": "string",
      "name": "longitude",
      "displayName": "longitude",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    }
  }
}

Location


Properties

TYPE DEFINITION

{
  "name": "Location",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "id"
    },
    "company_id": {
      "type": "integer",
      "name": "company_id",
      "displayName": "company_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "company_id"
    },
    "category_id": {
      "type": "integer",
      "name": "category_id",
      "displayName": "category_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "category_id"
    },
    "name": {
      "type": "string",
      "name": "name",
      "displayName": "name",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "name"
    },
    "image": {
      "type": "string",
      "name": "image",
      "displayName": "image",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "image"
    },
    "images": {
      "type": "string",
      "name": "images",
      "displayName": "images",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "images"
    },
    "address": {
      "type": "string",
      "name": "address",
      "displayName": "address",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "address"
    },
    "has_chat": {
      "type": "boolean",
      "name": "has_chat",
      "displayName": "has_chat",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "has_chat"
    },
    "has_clean_room": {
      "type": "boolean",
      "name": "has_clean_room",
      "displayName": "has_clean_room",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "has_clean_room"
    },
    "has_reservations": {
      "type": "boolean",
      "name": "has_reservations",
      "displayName": "has_reservations",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "has_reservations"
    },
    "has_room_services": {
      "type": "boolean",
      "name": "has_room_services",
      "displayName": "has_room_services",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "has_room_services"
    },
    "has_info": {
      "type": "boolean",
      "name": "has_info",
      "displayName": "has_info",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "has_info"
    },
    "has_general_doors": {
      "type": "boolean",
      "name": "has_general_doors",
      "displayName": "has_general_doors",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "has_general_doors"
    },
    "can_delete_reservations": {
      "type": "boolean",
      "name": "can_delete_reservations",
      "displayName": "can_delete_reservations",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "can_delete_reservations"
    },
    "is_public": {
      "type": "boolean",
      "name": "is_public",
      "displayName": "is_public",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "is_public"
    },
    "status": {
      "type": "integer",
      "name": "status",
      "displayName": "status",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "status"
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "created_at"
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "updated_at"
    },
    "deleted_at": {
      "type": "datetime",
      "name": "deleted_at",
      "displayName": "deleted_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "deleted_at"
    }
  }
}

LocationCategory


Properties

TYPE DEFINITION

{
  "name": "LocationCategory",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "id"
    },
    "parent_id": {
      "type": "integer",
      "name": "parent_id",
      "displayName": "parent_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "parent_id"
    },
    "company_id": {
      "type": "integer",
      "name": "company_id",
      "displayName": "company_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "company_id"
    },
    "name": {
      "type": "string",
      "name": "name",
      "displayName": "name",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "name"
    },
    "description": {
      "type": "string",
      "name": "description",
      "displayName": "description",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "description"
    },
    "status": {
      "type": "integer",
      "name": "status",
      "displayName": "status",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "status"
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "created_at"
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "updated_at"
    }
  }
}

Room


Properties

TYPE DEFINITION

{
  "name": "Room",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "id"
    },
    "location_id": {
      "type": "integer",
      "name": "location_id",
      "displayName": "location_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "location_id"
    },
    "type_id": {
      "type": "integer",
      "name": "type_id",
      "displayName": "type_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "type_id"
    },
    "title": {
      "type": "string",
      "name": "title",
      "displayName": "title",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "title"
    },
    "description": {
      "type": "string",
      "name": "description",
      "displayName": "description",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "description"
    },
    "image": {
      "type": "string",
      "name": "image",
      "displayName": "image",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "image"
    },
    "max_persons": {
      "type": "integer",
      "name": "max_persons",
      "displayName": "max_persons",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "max_persons"
    },
    "is_public": {
      "type": "boolean",
      "name": "is_public",
      "displayName": "is_public",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "is_public"
    },
    "status": {
      "type": "integer",
      "name": "status",
      "displayName": "status",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "status"
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "created_at"
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "updated_at"
    },
    "deleted_at": {
      "type": "datetime",
      "name": "deleted_at",
      "displayName": "deleted_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "deleted_at"
    }
  }
}

RoomCategory


Properties

TYPE DEFINITION

{
  "name": "RoomCategory",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "id"
    },
    "company_id": {
      "type": "integer",
      "name": "company_id",
      "displayName": "company_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "company_id"
    },
    "location_id": {
      "type": "integer",
      "name": "location_id",
      "displayName": "location_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "location_id"
    },
    "name": {
      "type": "string",
      "name": "name",
      "displayName": "name",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "name"
    },
    "active": {
      "type": "boolean",
      "name": "active",
      "displayName": "active",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "active"
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "created_at"
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "updated_at"
    },
    "deleted_at": {
      "type": "datetime",
      "name": "deleted_at",
      "displayName": "deleted_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "deleted_at"
    }
  }
}

RoomDirectAccess


Properties

TYPE DEFINITION

{
  "name": "RoomDirectAccess",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "room_id": {
      "type": "integer",
      "name": "room_id",
      "displayName": "room_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "key": {
      "type": "string",
      "name": "key",
      "displayName": "key",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "start_time": {
      "type": "datetime",
      "name": "start_time",
      "displayName": "start_time",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "end_time": {
      "type": "datetime",
      "name": "end_time",
      "displayName": "end_time",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "used_count": {
      "type": "integer",
      "name": "used_count",
      "displayName": "used_count",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    }
  }
}

RoomUnattendedAccess


Properties

TYPE DEFINITION

{
  "name": "RoomUnattendedAccess",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "room_id": {
      "type": "integer",
      "name": "room_id",
      "displayName": "room_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "key": {
      "type": "string",
      "name": "key",
      "displayName": "key",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "expire_at": {
      "type": "datetime",
      "name": "expire_at",
      "displayName": "expire_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "use_count": {
      "type": "integer",
      "name": "use_count",
      "displayName": "use_count",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "used_count": {
      "type": "integer",
      "name": "used_count",
      "displayName": "used_count",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    }
  }
}

RoomPrivateUser


Properties

TYPE DEFINITION

{
  "name": "RoomPrivateUser",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "room_id": {
      "type": "integer",
      "name": "room_id",
      "displayName": "room_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "user_id": {
      "type": "integer",
      "name": "user_id",
      "displayName": "user_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    }
  }
}

Door


Properties

TYPE DEFINITION

{
  "name": "Door",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "id"
    },
    "location_id": {
      "type": "integer",
      "name": "location_id",
      "displayName": "location_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "location_id"
    },
    "room_id": {
      "type": "integer",
      "name": "room_id",
      "displayName": "room_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "room_id"
    },
    "title": {
      "type": "string",
      "name": "title",
      "displayName": "title",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "title"
    },
    "description": {
      "type": "string",
      "name": "description",
      "displayName": "description",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "description"
    },
    "image": {
      "type": "string",
      "name": "image",
      "displayName": "image",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "image"
    },
    "defaul_access_rule": {
      "type": "integer",
      "name": "defaul_access_rule",
      "displayName": "defaul_access_rule",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "defaul_access_rule"
    },
    "status": {
      "type": "integer",
      "name": "status",
      "displayName": "status",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "status"
    },
    "is_main": {
      "type": "boolean",
      "name": "is_main",
      "displayName": "is_main",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "is_main"
    },
    "is_hidden": {
      "type": "boolean",
      "name": "is_hidden",
      "displayName": "is_hidden",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "is_hidden"
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "created_at"
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "updated_at"
    },
    "deleted_at": {
      "type": "datetime",
      "name": "deleted_at",
      "displayName": "deleted_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "deleted_at"
    }
  }
}

Keycard


Properties

TYPE DEFINITION

{
  "name": "Keycard",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "user_id": {
      "type": "integer",
      "name": "user_id",
      "displayName": "user_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "company_id": {
      "type": "integer",
      "name": "company_id",
      "displayName": "company_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "key_code": {
      "type": "string",
      "name": "key_code",
      "displayName": "key_code",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "active": {
      "type": "boolean",
      "name": "active",
      "displayName": "active",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    }
  }
}

Booking


Properties

TYPE DEFINITION

{
  "name": "Booking",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "id"
    },
    "user_id": {
      "type": "integer",
      "name": "user_id",
      "displayName": "user_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "user_id"
    },
    "location_id": {
      "type": "integer",
      "name": "location_id",
      "displayName": "location_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "location_id"
    },
    "room_id": {
      "type": "integer",
      "name": "room_id",
      "displayName": "room_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "room_id"
    },
    "occupancy": {
      "type": "integer",
      "name": "occupancy",
      "displayName": "occupancy",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "occupancy"
    },
    "start_at": {
      "type": "datetime",
      "name": "start_at",
      "displayName": "start_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "start_at"
    },
    "end_at": {
      "type": "datetime",
      "name": "end_at",
      "displayName": "end_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "end_at"
    },
    "price": {
      "type": "number",
      "name": "price",
      "displayName": "price",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "price"
    },
    "notes": {
      "type": "string",
      "name": "notes",
      "displayName": "notes",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "notes"
    },
    "status": {
      "type": "integer",
      "name": "status",
      "displayName": "status",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "status"
    },
    "cancelled_at": {
      "type": "datetime",
      "name": "cancelled_at",
      "displayName": "cancelled_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "cancelled_at"
    },
    "completed_at": {
      "type": "datetime",
      "name": "completed_at",
      "displayName": "completed_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "completed_at"
    },
    "cancel_allowed": {
      "type": "boolean",
      "name": "cancel_allowed",
      "displayName": "cancel_allowed",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "cancel_allowed"
    },
    "cancel_before": {
      "type": "integer",
      "name": "cancel_before",
      "displayName": "cancel_before",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "cancel_before"
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "created_at"
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "updated_at"
    }
  }
}

BookingPolicy


Properties

TYPE DEFINITION

{
  "name": "BookingPolicy",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "company_id": {
      "type": "integer",
      "name": "company_id",
      "displayName": "company_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "location_id": {
      "type": "integer",
      "name": "location_id",
      "displayName": "location_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "title": {
      "type": "string",
      "name": "title",
      "displayName": "title",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "type": {
      "type": "integer",
      "name": "type",
      "displayName": "type",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "start_at": {
      "type": "datetime",
      "name": "start_at",
      "displayName": "start_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "end_at": {
      "type": "datetime",
      "name": "end_at",
      "displayName": "end_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "unit": {
      "type": "integer",
      "name": "unit",
      "displayName": "unit",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "value": {
      "type": "integer",
      "name": "value",
      "displayName": "value",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "min_value": {
      "type": "integer",
      "name": "min_value",
      "displayName": "min_value",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "max_value": {
      "type": "integer",
      "name": "max_value",
      "displayName": "max_value",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "price": {
      "type": "number",
      "name": "price",
      "displayName": "price",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "cancel_allowed": {
      "type": "boolean",
      "name": "cancel_allowed",
      "displayName": "cancel_allowed",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "cancel_before": {
      "type": "integer",
      "name": "cancel_before",
      "displayName": "cancel_before",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    }
  }
}

Checkin


Properties

TYPE DEFINITION

{
  "name": "Checkin",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "id"
    },
    "location_id": {
      "type": "integer",
      "name": "location_id",
      "displayName": "location_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "location_id"
    },
    "email": {
      "type": "string",
      "name": "email",
      "displayName": "email",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "email"
    },
    "booking_code": {
      "type": "string",
      "name": "booking_code",
      "displayName": "booking_code",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "booking_code"
    },
    "date": {
      "type": "date-only",
      "name": "date",
      "displayName": "date",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "date"
    },
    "reserved": {
      "type": "boolean",
      "name": "reserved",
      "displayName": "reserved",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "reserved"
    },
    "created_at": {
      "type": "datetime-only",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "created_at"
    },
    "updated_at": {
      "type": "datetime-only",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "updated_at"
    }
  }
}

ACLPermission


Properties

TYPE DEFINITION

{
  "name": "ACLPermission",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "name": {
      "type": "string",
      "name": "name",
      "displayName": "name",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    }
  }
}

AccessRule


Properties

TYPE DEFINITION

{
  "name": "AccessRule",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "id"
    },
    "title": {
      "type": "string",
      "name": "title",
      "displayName": "title",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "title"
    },
    "company_id": {
      "type": "integer",
      "name": "company_id",
      "displayName": "company_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "company_id"
    },
    "location_id": {
      "type": "integer",
      "name": "location_id",
      "displayName": "location_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "location_id"
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "created_at"
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "updated_at"
    }
  }
}

AccessLog


Properties

TYPE DEFINITION

{
  "name": "AccessLog",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "id"
    },
    "user_id": {
      "type": "integer",
      "name": "user_id",
      "displayName": "user_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "user_id"
    },
    "room_id": {
      "type": "integer",
      "name": "room_id",
      "displayName": "room_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "room_id"
    },
    "door_id": {
      "type": "integer",
      "name": "door_id",
      "displayName": "door_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "door_id"
    },
    "method": {
      "type": "string",
      "name": "method",
      "displayName": "method",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "method"
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "created_at"
    }
  }
}

AccessExceptionRule


Properties

TYPE DEFINITION

{
  "name": "AccessExceptionRule",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "id"
    },
    "title": {
      "type": "string",
      "name": "title",
      "displayName": "title",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "title"
    },
    "company_id": {
      "type": "integer",
      "name": "company_id",
      "displayName": "company_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "company_id"
    },
    "location_id": {
      "type": "integer",
      "name": "location_id",
      "displayName": "location_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "location_id"
    },
    "date": {
      "type": "date-only",
      "name": "date",
      "displayName": "date",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "date"
    },
    "start_at": {
      "type": "time-only",
      "name": "start_at",
      "displayName": "start_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "start_at"
    },
    "end_at": {
      "type": "time-only",
      "name": "end_at",
      "displayName": "end_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "end_at"
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "created_at"
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "updated_at"
    }
  }
}

Log


Properties

TYPE DEFINITION

{
  "name": "Log",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "user_id": {
      "type": "integer",
      "name": "user_id",
      "displayName": "user_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "type": {
      "type": "string",
      "name": "type",
      "displayName": "type",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "data": {
      "type": "string",
      "name": "data",
      "displayName": "data",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    }
  }
}

EmailTemplate


Properties

TYPE DEFINITION

{
  "name": "EmailTemplate",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "id"
    },
    "company_id": {
      "type": "integer",
      "name": "company_id",
      "displayName": "company_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "company_id"
    },
    "name": {
      "type": "string",
      "name": "name",
      "displayName": "name",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "name"
    },
    "title": {
      "type": "string",
      "name": "title",
      "displayName": "title",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "title"
    },
    "body": [
      "string",
      "body",
      "body",
      "TYPE_EXPRESSION",
      true,
      "body"
    ],
    "placeholders": {
      "type": "string",
      "name": "placeholders",
      "displayName": "placeholders",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "placeholders"
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "created_at"
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "updated_at"
    }
  }
}

Language


Properties

TYPE DEFINITION

{
  "name": "Language",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "name": "id",
      "displayName": "id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "code": {
      "type": "string",
      "name": "code",
      "displayName": "code",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "name": {
      "type": "string",
      "name": "name",
      "displayName": "name",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "available": {
      "type": "boolean",
      "name": "available",
      "displayName": "available",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "created_at": {
      "type": "datetime",
      "name": "created_at",
      "displayName": "created_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "updated_at": {
      "type": "datetime",
      "name": "updated_at",
      "displayName": "updated_at",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    }
  }
}

Authentication

Authenticate using user credentials (email / password).


Login post

POST: /auth/login (secured)


Possible Responses

201


Login post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/auth/login" \
	-H "Authorization: Bearer string" \
	-d @request_body

Use refresh token to get a new short-lived access token.


Refresh Access Token post

POST: /auth/refresh (secured)


Possible Responses

201


Refresh Access Token post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/auth/refresh" \
	-H "Authorization: Bearer string" \
	-d @request_body

User registration.


Registration post

POST: /auth/register (secured)


Registration post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/auth/register" \
	-H "Authorization: Bearer string" \
	-d @request_body

Initiate password recovery process by an password reset link sent to user email.


Password recovery post

POST: /auth/password-recovery (secured)


Password recovery post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/auth/password-recovery" \
	-H "Authorization: Bearer string" \
	-d @request_body

Reset user password after requested recovery process.


Password reset post

POST: /auth/password-reset (secured)


Password reset post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/auth/password-reset" \
	-H "Authorization: Bearer string" \
	-d @request_body

ACL

System roles


ACL Roles post

POST: /acl/roles (secured)

Create a new role.


Possible Responses

200


ACL Roles post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/acl/roles" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The roles has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

ACL Roles get

GET: /acl/roles (secured)

Get a list of roles


Possible Responses

200


ACL Roles get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/acl/roles" \
	-H "Authorization: Bearer string"

Collection of available permissions.


Role Permissions. post

POST: /acl/roles/{roleId}/permissions (secured)

Give permission to role


URI Parameters

roleId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Role Permissions. post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/acl/roles/{roleId}/permissions" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The permissions has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Role Permissions. delete

DELETE: /acl/roles/{roleId}/permissions (secured)

Revoke permission from role


URI Parameters

roleId

PropertyValue
requiredtrue
typestring

Role Permissions. delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/acl/roles/{roleId}/permissions" \
	-H "Authorization: Bearer string"

Role Permissions. get

GET: /acl/roles/{roleId}/permissions (secured)

Get a list of permissions


URI Parameters

roleId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Role Permissions. get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/acl/roles/{roleId}/permissions" \
	-H "Authorization: Bearer string"

ACL permissions used for backend actions authorization.


ACL Permissions. post

POST: /acl/permissions (secured)

Create a new permission.


Possible Responses

200


ACL Permissions. post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/acl/permissions" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The permissions has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

ACL Permissions. get

GET: /acl/permissions (secured)

Get a list of permissions


Possible Responses

200


ACL Permissions. get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/acl/permissions" \
	-H "Authorization: Bearer string"

Companies

Collection of created companies.
Resources that can be included: `company`, `totals`, `favorited`.


Companies post

POST: /companies (secured)

Create a new company.


Possible Responses

200


Companies post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/companies" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "status": 201,
  "code": "201:CREATED",
  "message": "Company created",
  "description": "",
  "meta": {
    "apiVersion": "v1",
    "language": "en"
  },
  "data": {
    "id": 1,
    "contact_id": 1,
    "name": "4Suites",
    "status": 0,
    "created_at": "2017-07-12 06:21:41",
    "updated_at": "2017-07-12 06:21:41"
  }
Type
object

Companies get

GET: /companies (secured)

Get a list of companies


Possible Responses

200


Companies get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/companies" \
	-H "Authorization: Bearer string"

Entity representing a company


/{companyId} put

PUT: /companies/{companyId} (secured)

Update the company with id = {companyId}


URI Parameters

companyId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{companyId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/companies/{companyId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{companyId} delete

DELETE: /companies/{companyId} (secured)

Delete the company with id = {companyId}


URI Parameters

companyId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{companyId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/companies/{companyId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "company deleted." }
Type
object

Collection of available addresses.


Company addresses post

POST: /companies/{companyId}/addresses (secured)

Create a new address.


URI Parameters

companyId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Company addresses post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/companies/{companyId}/addresses" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The addresses has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Company addresses get

GET: /companies/{companyId}/addresses (secured)

Get a list of addresses


URI Parameters

companyId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Company addresses get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/companies/{companyId}/addresses" \
	-H "Authorization: Bearer string"

Collection of available locations.


Company locations post

POST: /companies/{companyId}/locations (secured)

Create a new location.


URI Parameters

companyId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Company locations post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/companies/{companyId}/locations" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The locations has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Company locations get

GET: /companies/{companyId}/locations (secured)

Get a list of locations


URI Parameters

companyId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Company locations get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/companies/{companyId}/locations" \
	-H "Authorization: Bearer string"

Collection of available users.


Company users post

POST: /companies/{companyId}/users (secured)

Create a new user.


URI Parameters

companyId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Company users post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/companies/{companyId}/users" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The users has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Company users get

GET: /companies/{companyId}/users (secured)

Get a list of users


URI Parameters

companyId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Company users get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/companies/{companyId}/users" \
	-H "Authorization: Bearer string"

Locations Categories

Collection of available locations categories.
Resources that can be included: `company`.


Locations Categories post

POST: /locations-categories (secured)

Create a new locations-category.


Possible Responses

200


Locations Categories post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/locations-categories" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The locations-categories has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Locations Categories get

GET: /locations-categories (secured)

Get a list of locations-categories


Possible Responses

200


Locations Categories get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/locations-categories" \
	-H "Authorization: Bearer string"

Entity representing a locations-category


/{categoryId} put

PUT: /locations-categories/{categoryId} (secured)

Update the locations-category with id = {locations-categoryId}


URI Parameters

categoryId

PropertyValue
requiredtrue
typestring

locations-categoryId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{categoryId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/locations-categories/{categoryId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{categoryId} delete

DELETE: /locations-categories/{categoryId} (secured)

Delete the locations-category with id = {locations-categoryId}


URI Parameters

categoryId

PropertyValue
requiredtrue
typestring

locations-categoryId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{categoryId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/locations-categories/{categoryId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "locations-category deleted." }
Type
object

Locations

Collection of created locations.
Resources that can be included: `company`, `company.contact`, `category`, `contact`, `address`, `address.country`, `settings`, `distance`, `favorited`, `images`, `images_urls`.


Locations get

GET: /locations (secured)

List of available locations


Possible Responses

200


Locations get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/locations" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{
  "id": 1,
  "company_id": 1,
  "category_id": 1,
  "name": "4Suites Office",
  "image": "image.jpg",
  "invoice_logo": "4suites.jpg",
  "invoice_btw": "5",
  "has_chat": true,
  "has_clean_room": true,
  "has_reservations": true,
  "has_room_services": false,
  "has_info": true,
  "has_general_doors": true,
  "can_delete_reservations": true,
  "is_public": false,
  "status": 1,
  "created_at": "2017-01-01 00:00:00",
  "updated_at": "2017-01-01 00:00:00",
  "deleted_at": "2017-01-01 00:00:00"
}
Type
object

Locations post

POST: /locations (secured)

Create a new location.


Possible Responses

200


Locations post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/locations" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The locations has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Entity representing a location


/{locationId} put

PUT: /locations/{locationId} (secured)

Update the location with id = {locationId}


URI Parameters

locationId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{locationId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/locations/{locationId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{locationId} delete

DELETE: /locations/{locationId} (secured)

Delete the location with id = {locationId}


URI Parameters

locationId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{locationId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/locations/{locationId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "location deleted." }
Type
object

Get available location images.


Location images get

GET: /locations/{locationId}/images (secured)

Get a list of images


URI Parameters

locationId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Location images get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/locations/{locationId}/images" \
	-H "Authorization: Bearer string"

Location images post

POST: /locations/{locationId}/images (secured)

Create a new image.


URI Parameters

locationId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Location images post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/locations/{locationId}/images" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The images has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Room categories

Collection of available rooms categories.
Resources that can be included: `company`, `location`.


Room categories post

POST: /room-categories (secured)

Create a new room-category.


Possible Responses

200


Room categories post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/room-categories" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The room-categories has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Room categories get

GET: /room-categories (secured)

Get a list of room-categories


Possible Responses

200


Room categories get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/room-categories" \
	-H "Authorization: Bearer string"

Entity representing a room-category


/{roomCategoryId} put

PUT: /room-categories/{roomCategoryId} (secured)

Update the room-category with id = {room-categoryId}


URI Parameters

roomCategoryId

PropertyValue
requiredtrue
typestring

room-categoryId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{roomCategoryId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/room-categories/{roomCategoryId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{roomCategoryId} delete

DELETE: /room-categories/{roomCategoryId} (secured)

Delete the room-category with id = {room-categoryId}


URI Parameters

roomCategoryId

PropertyValue
requiredtrue
typestring

room-categoryId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{roomCategoryId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/room-categories/{roomCategoryId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "room-category deleted." }
Type
object

Rooms

Collection of created rooms.
Resources that can be included: `company`, `location`, `favorited`, `images`, `images_urls`.


Rooms get

GET: /rooms (secured)

List of location rooms


Possible Responses

200


Rooms get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/rooms" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{
  "id": 1,
  "location_id": 1,
  "category_id": null,
  "default_access_rule": null,
  "capacity": 1,
  "title": "VIP room",
  "description": "Luxury room for special guests.",
  "pms_uuid": null,
  "is_public": true,
  "key_sharing_allowed": false,
  "key_sharing_limit": null,
  "ignore_booking_policies": false,
  "status": 1,
  "created_at": "2018-01-01 00:00:00",
  "updated_at": "2018-01-01 00:00:00"
}
Type
object

Rooms post

POST: /rooms (secured)

Create a new room.


Possible Responses

200


Rooms post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/rooms" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The rooms has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Entity representing a room


/{roomId} put

PUT: /rooms/{roomId} (secured)

Update the room with id = {roomId}


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{roomId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/rooms/{roomId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{roomId} delete

DELETE: /rooms/{roomId} (secured)

Delete the room with id = {roomId}


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{roomId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/rooms/{roomId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "room deleted." }
Type
object

Default access rule


/default-access-rule get

GET: /rooms/{roomId}/default-access-rule (secured)

Get default access rule


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/default-access-rule get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/rooms/{roomId}/default-access-rule" \
	-H "Authorization: Bearer string"

/default-access-rule post

POST: /rooms/{roomId}/default-access-rule (secured)

Set default access rule


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/default-access-rule post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/rooms/{roomId}/default-access-rule" \
	-H "Authorization: Bearer string" \
	-d @request_body

/default-access-rule delete

DELETE: /rooms/{roomId}/default-access-rule (secured)

Clear default access rule


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/default-access-rule delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/rooms/{roomId}/default-access-rule" \
	-H "Authorization: Bearer string"

Room private users


/private-users get

GET: /rooms/{roomId}/private-users (secured)

Get room private users


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/private-users get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/rooms/{roomId}/private-users" \
	-H "Authorization: Bearer string"

/private-users post

POST: /rooms/{roomId}/private-users (secured)

Give a user private access to room


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/private-users post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/rooms/{roomId}/private-users" \
	-H "Authorization: Bearer string" \
	-d @request_body

/private-users delete

DELETE: /rooms/{roomId}/private-users (secured)

Remove private access from user for this room


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/private-users delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/rooms/{roomId}/private-users" \
	-H "Authorization: Bearer string"

Room Access Rules


/access-rules get

GET: /rooms/{roomId}/access-rules (secured)

Get room access rules


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/access-rules get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/rooms/{roomId}/access-rules" \
	-H "Authorization: Bearer string"

/access-rules post

POST: /rooms/{roomId}/access-rules (secured)

Add new access rule to room


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/access-rules post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/rooms/{roomId}/access-rules" \
	-H "Authorization: Bearer string" \
	-d @request_body

/access-rules delete

DELETE: /rooms/{roomId}/access-rules (secured)

Remove access rule from room


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/access-rules delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/rooms/{roomId}/access-rules" \
	-H "Authorization: Bearer string"

Room Access Exceptions Rules


/access-exceptions-rules get

GET: /rooms/{roomId}/access-exceptions-rules (secured)

Get room access exceptions rules


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/access-exceptions-rules get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/rooms/{roomId}/access-exceptions-rules" \
	-H "Authorization: Bearer string"

/access-exceptions-rules post

POST: /rooms/{roomId}/access-exceptions-rules (secured)

Add new access exceptions rule to room


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/access-exceptions-rules post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/rooms/{roomId}/access-exceptions-rules" \
	-H "Authorization: Bearer string" \
	-d @request_body

/access-exceptions-rules delete

DELETE: /rooms/{roomId}/access-exceptions-rules (secured)

Remove access exceptions rule from room


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/access-exceptions-rules delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/rooms/{roomId}/access-exceptions-rules" \
	-H "Authorization: Bearer string"

Room Booking Policies


/booking-policies get

GET: /rooms/{roomId}/booking-policies (secured)

Get room booking policies


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/booking-policies get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/rooms/{roomId}/booking-policies" \
	-H "Authorization: Bearer string"

/booking-policies post

POST: /rooms/{roomId}/booking-policies (secured)

Attach new booking policy to room.


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/booking-policies post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/rooms/{roomId}/booking-policies" \
	-H "Authorization: Bearer string" \
	-d @request_body

/booking-policies delete

DELETE: /rooms/{roomId}/booking-policies (secured)

Remove booking policy from room.


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/booking-policies delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/rooms/{roomId}/booking-policies" \
	-H "Authorization: Bearer string"


/booking-policies/sync post

POST: /rooms/{roomId}/booking-policies/sync (secured)

Sync multiple booking policies for room.


URI Parameters

roomId

PropertyValue
requiredtrue
typestring

/booking-policies/sync post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/rooms/{roomId}/booking-policies/sync" \
	-H "Authorization: Bearer string" \
	-d @request_body

Doors

Resources that can be included: `room`, `location`, `location.settings`.
Additional query filters that can be used:
* `company_id` - doors only of specific company. * `booking_id` - doors of specific booking that is active. * `is_general` - non-room doors. * `is_not_general` - room doors only.


Doors get

GET: /doors (secured)

Get list of all doors


Possible Responses

200


Doors get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/doors" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{
  "id": 1,
  "uuid": "a25a986e-45dc-4af7-a11e-dbbd51fb02cf",
  "qr_code_id": null,
  "location_id": 1,
  "default_access_rule": null,
  "room_id": 1,
  "title": "Room 007",
  "description": null,
  "is_main": false,
  "is_general": false,
  "is_hidden": false,
  "geofencing_enabled": false,
  "key_sharing_allowed": true,
  "key_sharing_limit": 10,
  "created_at": "2018-01-01 00:00:00",
  "updated_at": "2018-01-01 00:00:00"
}
Type
object

Doors post

POST: /doors (secured)

Create a new door.


Possible Responses

200


Doors post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/doors" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The doors has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object


/accessible get

GET: /doors/accessible (secured)

Doors that are accessible as result of all available things like bookings, access rules, shared keys...


Possible Responses

200


/accessible get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/doors/accessible" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{
  "id": 1,
  "uuid": "a25a986e-45dc-4af7-a11e-dbbd51fb02cf",
  "qr_code_id": null,
  "location_id": 1,
  "default_access_rule": null,
  "room_id": 1,
  "title": "Room 007",
  "description": null,
  "is_main": false,
  "is_general": false,
  "is_hidden": false,
  "geofencing_enabled": false,
  "key_sharing_allowed": true,
  "key_sharing_limit": 10,
  "created_at": "2018-01-01 00:00:00",
  "updated_at": "2018-01-01 00:00:00"
}
Type
object

Entity representing a door


Door put

PUT: /doors/{doorId} (secured)

Update the door with id = {doorId}


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


Door put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/doors/{doorId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

Door delete

DELETE: /doors/{doorId} (secured)

Delete the door with id = {doorId}


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


Door delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/doors/{doorId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "door deleted." }
Type
object

Open the door.


/open post

POST: /doors/{doorId}/open (secured)


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/open post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/doors/{doorId}/open" \
	-H "Authorization: Bearer string" \
	-d @request_body

Default access rule


/default-access-rule get

GET: /doors/{doorId}/default-access-rule (secured)

Get default access rule


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/default-access-rule get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/doors/{doorId}/default-access-rule" \
	-H "Authorization: Bearer string"

/default-access-rule post

POST: /doors/{doorId}/default-access-rule (secured)

Set default access rule


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/default-access-rule post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/doors/{doorId}/default-access-rule" \
	-H "Authorization: Bearer string" \
	-d @request_body

/default-access-rule delete

DELETE: /doors/{doorId}/default-access-rule (secured)

Clear default access rule


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/default-access-rule delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/doors/{doorId}/default-access-rule" \
	-H "Authorization: Bearer string"

Room private users


/private-users get

GET: /doors/{doorId}/private-users (secured)

Get room private users


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/private-users get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/doors/{doorId}/private-users" \
	-H "Authorization: Bearer string"

/private-users post

POST: /doors/{doorId}/private-users (secured)

Give a user private access to room


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/private-users post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/doors/{doorId}/private-users" \
	-H "Authorization: Bearer string" \
	-d @request_body

/private-users delete

DELETE: /doors/{doorId}/private-users (secured)

Remove private access from user for this room


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/private-users delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/doors/{doorId}/private-users" \
	-H "Authorization: Bearer string"

Room Access Rules


/access-rules get

GET: /doors/{doorId}/access-rules (secured)

Get room access rules


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/access-rules get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/doors/{doorId}/access-rules" \
	-H "Authorization: Bearer string"

/access-rules post

POST: /doors/{doorId}/access-rules (secured)

Add new access rule to room


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/access-rules post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/doors/{doorId}/access-rules" \
	-H "Authorization: Bearer string" \
	-d @request_body

/access-rules delete

DELETE: /doors/{doorId}/access-rules (secured)

Remove access rule from room


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/access-rules delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/doors/{doorId}/access-rules" \
	-H "Authorization: Bearer string"

Room Access Exceptions Rules


/access-exceptions-rules get

GET: /doors/{doorId}/access-exceptions-rules (secured)

Get room access exceptions rules


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/access-exceptions-rules get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/doors/{doorId}/access-exceptions-rules" \
	-H "Authorization: Bearer string"

/access-exceptions-rules post

POST: /doors/{doorId}/access-exceptions-rules (secured)

Add new access exceptions rule to room


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/access-exceptions-rules post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/doors/{doorId}/access-exceptions-rules" \
	-H "Authorization: Bearer string" \
	-d @request_body

/access-exceptions-rules delete

DELETE: /doors/{doorId}/access-exceptions-rules (secured)

Remove access exceptions rule from room


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/access-exceptions-rules delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/doors/{doorId}/access-exceptions-rules" \
	-H "Authorization: Bearer string"


/favorite post

POST: /doors/{doorId}/favorite (secured)

Add the door to the favorites.


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/favorite post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/doors/{doorId}/favorite" \
	-H "Authorization: Bearer string" \
	-d @request_body

/favorite delete

DELETE: /doors/{doorId}/favorite (secured)

Remove door from the favorites.


URI Parameters

doorId

PropertyValue
requiredtrue
typestring

/favorite delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/doors/{doorId}/favorite" \
	-H "Authorization: Bearer string"

Users

Collection of users.
Resources that can be included: `profile`, `address`.


Users post

POST: /users (secured)

Create a new user.


Possible Responses

200, 201


Users post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/users" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The users has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

RESPONSE BODY

{
  "id": 1,
  "username": "admin",
  "password": "hash",
  "email": "admin@4suites.nl",
  "fullname": "Firstname Middlename Lastname",
  "firstname": "Firstname",
  "middlename": "Middlename",
  "lastname": "Lastname",
  "gender": 1,
  "phone": "3738989989",
  "country_id": 25,
  "default_locale": "en",
  "status": 1,
  "created_at": "2017-01-01 00:00:00",
  "updated_at": "2017-01-01 00:00:00",
  "deleted_at": "2017-01-01 00:00:00"
}
Type
object

Users get

GET: /users (secured)

Get a list of users


Possible Responses

200


Users get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/users" \
	-H "Authorization: Bearer string"

Entity representing a user


/{userId} put

PUT: /users/{userId} (secured)

Update the user with id = {userId}


URI Parameters

userId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{userId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/users/{userId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{userId} delete

DELETE: /users/{userId} (secured)

Delete the user with id = {userId}


URI Parameters

userId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{userId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/users/{userId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "user deleted." }
Type
object

Collection of available settings.


User settings get

GET: /users/{userId}/settings (secured)

Get a list of settings


URI Parameters

userId

PropertyValue
requiredtrue
typestring

Possible Responses

200


User settings get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/users/{userId}/settings" \
	-H "Authorization: Bearer string"

User settings post

POST: /users/{userId}/settings (secured)

Create a new setting.


URI Parameters

userId

PropertyValue
requiredtrue
typestring

Possible Responses

200


User settings post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/users/{userId}/settings" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The settings has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Collection of available devices.


User devices get

GET: /users/{userId}/devices (secured)

Get a list of devices


URI Parameters

userId

PropertyValue
requiredtrue
typestring

Possible Responses

200


User devices get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/users/{userId}/devices" \
	-H "Authorization: Bearer string"

User devices post

POST: /users/{userId}/devices (secured)

Create a new device.


URI Parameters

userId

PropertyValue
requiredtrue
typestring

Possible Responses

200


User devices post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/users/{userId}/devices" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The devices has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Get access logs of the user.


Access logs get

GET: /users/{userId}/access-logs (secured)

Get a list of access-logs


URI Parameters

userId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Access logs get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/users/{userId}/access-logs" \
	-H "Authorization: Bearer string"

Access logs post

POST: /users/{userId}/access-logs (secured)

Create a new access-log.


URI Parameters

userId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Access logs post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/users/{userId}/access-logs" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The access-logs has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

User keycards that he can use to open doors.


Keycards get

GET: /users/{userId}/keycards (secured)

Get a list of keycards


URI Parameters

userId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Keycards get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/users/{userId}/keycards" \
	-H "Authorization: Bearer string"

Keycards post

POST: /users/{userId}/keycards (secured)

Create a new keycard.


URI Parameters

userId

PropertyValue
requiredtrue
typestring

Possible Responses

200


Keycards post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/users/{userId}/keycards" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The keycards has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

User assigned companies.


/companies post

POST: /users/{userId}/companies (secured)

Assign a company to the user.


URI Parameters

userId

PropertyValue
requiredtrue
typestring

Possible Responses

201


/companies post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/users/{userId}/companies" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "code": 201,
  "error": null,
  "code_message": "created",
  "message": "Created"
}
Type
object

/companies delete

DELETE: /users/{userId}/companies (secured)

Unassign a company from the user.


URI Parameters

userId

PropertyValue
requiredtrue
typestring

Possible Responses

202


/companies delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/users/{userId}/companies" \
	-H "Authorization: Bearer string"

Access Rules

Collection of available access rules.
Resources that can be included: `days`, `company`, `location`.


Access Rules post

POST: /access-rules (secured)

Create a new access-rule.


Possible Responses

200


Access Rules post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/access-rules" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The access-rules has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Access Rules get

GET: /access-rules (secured)

Get a list of access-rules


Possible Responses

200


Access Rules get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/access-rules" \
	-H "Authorization: Bearer string"

Entity representing a access-rule


/{ruleId} put

PUT: /access-rules/{ruleId} (secured)

Update the access-rule with id = {access-ruleId}


URI Parameters

ruleId

PropertyValue
requiredtrue
typestring

access-ruleId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{ruleId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/access-rules/{ruleId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{ruleId} delete

DELETE: /access-rules/{ruleId} (secured)

Delete the access-rule with id = {access-ruleId}


URI Parameters

ruleId

PropertyValue
requiredtrue
typestring

access-ruleId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{ruleId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/access-rules/{ruleId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "access-rule deleted." }
Type
object

Access Exceptions Rules

Collection of available access exceptions rules.
Resources that can be included: `company`, `location`.


Access Exceptions Rules post

POST: /access-exceptions-rules (secured)

Create a new access-exceptions-rule.


Possible Responses

200


Access Exceptions Rules post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/access-exceptions-rules" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The access-exceptions-rules has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Access Exceptions Rules get

GET: /access-exceptions-rules (secured)

Get a list of access-exceptions-rules


Possible Responses

200


Access Exceptions Rules get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/access-exceptions-rules" \
	-H "Authorization: Bearer string"

Entity representing a access-exceptions-rule


/{ruleId} put

PUT: /access-exceptions-rules/{ruleId} (secured)

Update the access-exceptions-rule with id = {access-exceptions-ruleId}


URI Parameters

ruleId

PropertyValue
requiredtrue
typestring

access-exceptions-ruleId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{ruleId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/access-exceptions-rules/{ruleId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{ruleId} delete

DELETE: /access-exceptions-rules/{ruleId} (secured)

Delete the access-exceptions-rule with id = {access-exceptions-ruleId}


URI Parameters

ruleId

PropertyValue
requiredtrue
typestring

access-exceptions-ruleId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{ruleId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/access-exceptions-rules/{ruleId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "access-exceptions-rule deleted." }
Type
object

Access Logs

Collection of available doors access logs.
Resources that can be included: `user`, `room`, `door`.


Access Logs get

GET: /access-logs (secured)

Get list of registered access logs


Possible Responses

200


Access Logs get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/access-logs" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{
  "id": 1,
  "user_id": 1,
  "room_id": 1,
  "door_id": 1,
  "method": "app",
  "created_at": "2018-01-01 00:00:00"
}
Type
object

Entity representing a access-log


/{ruleId} put

PUT: /access-logs/{ruleId} (secured)

Update the access-log with id = {access-logId}


URI Parameters

ruleId

PropertyValue
requiredtrue
typestring

access-logId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{ruleId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/access-logs/{ruleId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{ruleId} delete

DELETE: /access-logs/{ruleId} (secured)

Delete the access-log with id = {access-logId}


URI Parameters

ruleId

PropertyValue
requiredtrue
typestring

access-logId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{ruleId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/access-logs/{ruleId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "access-log deleted." }
Type
object

Checkins

Collection of created check-in requests
Resources that can be included: `user`, `location`.


Checkins post

POST: /checkins (secured)

Create a new checkin.


Possible Responses

200


Checkins post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/checkins" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "status": 201,
  "code": "201:CREATED",
  "message": "Check-in request created",
  "description": "",
  "meta": {
    "apiVersion": "v1",
    "language": "en"
  },
  "data": {
    "id": 1,
    "location_id": 1,
    "email": "admin@4suites.nl",
    "booking_code": "b00k1ngC0de",
    "date": "2017-01-01",
    "reserved": false,
    "created_at": "2017-10-05 09:41:31",
    "updated_at": "2017-10-05 09:41:35"
  }
Type
object

Checkins get

GET: /checkins (secured)

Get a list of checkins


Possible Responses

200


Checkins get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/checkins" \
	-H "Authorization: Bearer string"

Entity representing a checkin


/{checkinId} put

PUT: /checkins/{checkinId} (secured)

Update the checkin with id = {checkinId}


URI Parameters

checkinId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{checkinId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/checkins/{checkinId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{checkinId} delete

DELETE: /checkins/{checkinId} (secured)

Delete the checkin with id = {checkinId}


URI Parameters

checkinId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{checkinId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/checkins/{checkinId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "checkin deleted." }
Type
object

Bookings

Resources that can be included: `user`, `room`, `room.category`, `room.doors`, `location`, `location.company`, `location.address`, `location.address.country`, `location.settings`.

Available filters that can be used as query string parameters: * `type` - on of the filters (available, unavailable, cancelled, current, future, past). * `available` - reservations that were approved and not completed or cancelled. * `unavailable` - reservations that are pending, completed or cancelled. * `cancelled` - cancelled reservations. * `current` - reservations that are active at the current time. * `future` - available reservations that not yet started. * `past` - expired reservations.


Bookings post

POST: /bookings (secured)

Create a new booking.


Possible Responses

200


Bookings post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/bookings" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "status": 201,
  "code": "201:CREATED",
  "message": "Booking created",
  "description": "",
  "meta": {
    "apiVersion": "v1",
    "language": "en"
  },
  "data": {
    "id": 1,
    "user_id": 1,
    "location_id": 1,
    "room_id": 1,
    "occupancy": 1,
    "start_at": "2017-09-10 09:00:00",
    "end_at": "2017-09-25 13:00:00",
    "price": "150.00",
    "notes": "Please prepare some flowers at arrival.",
    "status": 1,
    "cancelled_at": null,
    "completed_at": null,
    "cancel_allowed": true,
    "cancel_before": null,
    "created_at": "2017-09-18 15:09:10",
    "updated_at": "2017-09-18 15:09:10"
  }
Type
object

Bookings get

GET: /bookings (secured)

Get a list of bookings


Possible Responses

200


Bookings get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/bookings" \
	-H "Authorization: Bearer string"

Entity representing a booking


/{bookingId} put

PUT: /bookings/{bookingId} (secured)

Update the booking with id = {bookingId}


URI Parameters

bookingId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{bookingId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/bookings/{bookingId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{bookingId} delete

DELETE: /bookings/{bookingId} (secured)

Delete the booking with id = {bookingId}


URI Parameters

bookingId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{bookingId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/bookings/{bookingId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "booking deleted." }
Type
object


/{bookingId}/approve post

POST: /bookings/{bookingId}/approve (secured)

Approving booking.


URI Parameters

bookingId

PropertyValue
requiredtrue
typestring

/{bookingId}/approve post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/bookings/{bookingId}/approve" \
	-H "Authorization: Bearer string" \
	-d @request_body


/{bookingId}/unapprove post

POST: /bookings/{bookingId}/unapprove (secured)

Unapproving booking.


URI Parameters

bookingId

PropertyValue
requiredtrue
typestring

/{bookingId}/unapprove post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/bookings/{bookingId}/unapprove" \
	-H "Authorization: Bearer string" \
	-d @request_body


/{bookingId}/cancel post

POST: /bookings/{bookingId}/cancel (secured)

Cancel booking.


URI Parameters

bookingId

PropertyValue
requiredtrue
typestring

/{bookingId}/cancel post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/bookings/{bookingId}/cancel" \
	-H "Authorization: Bearer string" \
	-d @request_body


/{bookingId}/enable post

POST: /bookings/{bookingId}/enable (secured)

Re-enable booking if it was cancelled.


URI Parameters

bookingId

PropertyValue
requiredtrue
typestring

/{bookingId}/enable post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/bookings/{bookingId}/enable" \
	-H "Authorization: Bearer string" \
	-d @request_body


/{bookingId}/complete post

POST: /bookings/{bookingId}/complete (secured)

Complete an active booking before it's end datetime.


URI Parameters

bookingId

PropertyValue
requiredtrue
typestring

/{bookingId}/complete post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/bookings/{bookingId}/complete" \
	-H "Authorization: Bearer string" \
	-d @request_body


/{bookingId}/uncomplete post

POST: /bookings/{bookingId}/uncomplete (secured)

Re-open earlier completed booking.


URI Parameters

bookingId

PropertyValue
requiredtrue
typestring

/{bookingId}/uncomplete post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/bookings/{bookingId}/uncomplete" \
	-H "Authorization: Bearer string" \
	-d @request_body


/accept/{token} post

POST: /bookings/accept/{token} (secured)

Accept and confirm a reservation that was created by a company that current user is not yet assigned to. Once accepted, the reservation will be marked respectively and user will be assigned to company that created this reservation for him.


URI Parameters

token

PropertyValue
requiredtrue
typestring

/accept/{token} post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/bookings/accept/{token}" \
	-H "Authorization: Bearer string" \
	-d @request_body


/deny/{token} post

POST: /bookings/deny/{token} (secured)

Deny a reservation created by a company.


URI Parameters

token

PropertyValue
requiredtrue
typestring

/deny/{token} post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/bookings/deny/{token}" \
	-H "Authorization: Bearer string" \
	-d @request_body

Bookings Policies

Collection of available bookings policies.
Resources that can be included: `company`, `location`.


Bookings Policies post

POST: /bookings-policies (secured)

Create a new bookings-policy.


Possible Responses

200


Bookings Policies post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/bookings-policies" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "status": 201,
  "code": "201:CREATED",
  "message": "Booking created",
  "description": "",
  "meta": {
    "apiVersion": "v1",
    "language": "en"
  },
  "data": {
    "id": 1,
    "user_id": 1,
    "location_id": 1,
    "room_id": 1,
    "occupancy": 1,
    "start_at": "2017-09-10 09:00:00",
    "end_at": "2017-09-25 13:00:00",
    "price": "150.00",
    "notes": "Please prepare some flowers at arrival.",
    "status": 1,
    "cancelled_at": null,
    "completed_at": null,
    "cancel_allowed": true,
    "cancel_before": null,
    "created_at": "2017-09-18 15:09:10",
    "updated_at": "2017-09-18 15:09:10"
  }
Type
object

Bookings Policies get

GET: /bookings-policies (secured)

Get a list of bookings-policies


Possible Responses

200


Bookings Policies get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/bookings-policies" \
	-H "Authorization: Bearer string"

Entity representing a bookings-policy


/{bookingId} put

PUT: /bookings-policies/{bookingId} (secured)

Update the bookings-policy with id = {bookings-policyId}


URI Parameters

bookingId

PropertyValue
requiredtrue
typestring

bookings-policyId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{bookingId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/bookings-policies/{bookingId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{bookingId} delete

DELETE: /bookings-policies/{bookingId} (secured)

Delete the bookings-policy with id = {bookings-policyId}


URI Parameters

bookingId

PropertyValue
requiredtrue
typestring

bookings-policyId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{bookingId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/bookings-policies/{bookingId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "bookings-policy deleted." }
Type
object

Shared Keys

Collection of created shared keys.
Resources that can be included: `user`, `users`, `door`.


Shared Keys post

POST: /shared-keys (secured)

Create a new shared-key.


Possible Responses

200


Shared Keys post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/shared-keys" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The shared-keys has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Shared Keys get

GET: /shared-keys (secured)

Get a list of shared-keys


Possible Responses

200


Shared Keys get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/shared-keys" \
	-H "Authorization: Bearer string"

Entity representing a shared-key


/{sharedKeyId} put

PUT: /shared-keys/{sharedKeyId} (secured)

Update the shared-key with id = {shared-keyId}


URI Parameters

sharedKeyId

PropertyValue
requiredtrue
typestring

shared-keyId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{sharedKeyId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/shared-keys/{sharedKeyId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{sharedKeyId} delete

DELETE: /shared-keys/{sharedKeyId} (secured)

Delete the shared-key with id = {shared-keyId}


URI Parameters

sharedKeyId

PropertyValue
requiredtrue
typestring

shared-keyId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{sharedKeyId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/shared-keys/{sharedKeyId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "shared-key deleted." }
Type
object

Countries


Countries get

GET: /countries (secured)

Get a list of available countries.


Possible Responses

200


Countries get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/countries" \
	-H "Authorization: Bearer string"

Emails templates

Collection of available emails.


Emails templates post

POST: /emails (secured)

Create a new email.


Possible Responses

200


Emails templates post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/emails" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The emails has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

Emails templates get

GET: /emails (secured)

Get a list of emails


Possible Responses

200


Emails templates get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/emails" \
	-H "Authorization: Bearer string"

Entity representing a email


/{emailTemplateId} put

PUT: /emails/{emailTemplateId} (secured)

Update the email with id = {emailId}


URI Parameters

emailTemplateId

PropertyValue
requiredtrue
typestring

emailId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{emailTemplateId} put

CURL EXAMPLE

curl -X PUT "https://{api-url}/{version}/emails/{emailTemplateId}" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

[object Object]
Type
object

/{emailTemplateId} delete

DELETE: /emails/{emailTemplateId} (secured)

Delete the email with id = {emailId}


URI Parameters

emailTemplateId

PropertyValue
requiredtrue
typestring

emailId

PropertyValue
requiredtrue
typestring

Possible Responses

200, 404


/{emailTemplateId} delete

CURL EXAMPLE

curl -X DELETE "https://{api-url}/{version}/emails/{emailTemplateId}" \
	-H "Authorization: Bearer string"

RESPONSE BODY

{ "error": null, "message": "email deleted." }
Type
object

QR Codes

Collection of available QR codes.
Resources that can be included: `user` - user that created this code, `users` - users who scanned it.


QR Codes post

POST: /qr-codes (secured)

Create a new qr-code.


Possible Responses

200


QR Codes post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/qr-codes" \
	-H "Authorization: Bearer string" \
	-d @request_body

RESPONSE BODY

{
  "error": null,
  "message": "The qr-codes has been created.",
  "data": {
      "id": 1 # ID of the newly create item
      # ... other item data
  }
}
Type
object

QR Codes get

GET: /qr-codes (secured)

Get a list of qr-codes


Possible Responses

200


QR Codes get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/qr-codes" \
	-H "Authorization: Bearer string"


/scan post

POST: /qr-codes/scan (secured)

Scan an QR code


/scan post

CURL EXAMPLE

curl -X POST "https://{api-url}/{version}/qr-codes/scan" \
	-H "Authorization: Bearer string" \
	-d @request_body


/{code}/users get

GET: /qr-codes/{code}/users (secured)

Get users who scanned this QR code.


URI Parameters

code

PropertyValue
requiredtrue
typestring

/{code}/users get

CURL EXAMPLE

curl -X GET "https://{api-url}/{version}/qr-codes/{code}/users" \
	-H "Authorization: Bearer string"