Accounts

  1. List accounts
  2. Get a single account

Parameters

Group Subgroup Name Type Read/Write Description
    id Integer Read Account’s id.
    address1 String Read Company’s address
    address2 String Read Extension of company’s address.
    business_name String Read Account’s business name.
    city String Read City in which company is located.
    country_code String Read Code of a country in which caompany is based in.
    default_locale String Read Account’s default locale. List of all available locales is described in enums section.
    email String Read Account’s email.
    selected_locales Array Read Array of all locales selected for this Account. List of all available locales is described in enums section.
    state String Read State in which company is located.
    status String Read Account’s status, list of statuses described in enums section.
    website String   Company’s website
    zip String Read Zip code.
    created_at Time Read Account’s create time.
    updated_at Time Read Account’s update time.
phones     Object Read Set of company’s phone numbers.
    phone String Read Company’s phone number.
    mobile String Read Company’s mobile phone number.
    fax String Read Company’s fax number.
prefrences     Object Read Set of account’s preferences.
  bookings   Object Read Set of booking’s preferences.
    default_arrival_time Integer Read Default checkin hour.
    default_departure_time Integer Read Default checkout hour.
    default_communication_locale String Read Default language locale for communication with customer. List of all available locales is described in enums section.

List accounts

List all authorized accounts.

Limitations

Only the Client Credentials Flow currently allow you to retrieve multiple accounts at ones. Using an other authorization flow, this endpoint will only return a single authorized account.

GET /accounts

Response

{
  "accounts": [
    {
      "id": 7,
      "address1": "19 Les Robles",
      "address2": "",
      "business_name": "Business Name",
      "city": "Nevache",
      "country_code": "FR",
      "default_locale": "en",
      "email": "email@example.com",
      "phones": {
        "phone": "",
        "mobile": "1234567890",
        "fax": ""
      },
      "preferences": {
        "bookings": {
          "default_arrival_time": 16,
          "default_departure_time": 10,
          "default_communication_locale": "en"
        }
      },
      "selected_locales": [
        "en",
        "fr"
      ],
      "state": "Hautes-Alpes",
      "status": "trial",
      "website": "http://www.superawesomevillas.com",
      "zip": "05100",
      "created_at": "2017-11-09T09:08:16Z",
      "updated_at": "2017-11-09T09:08:16Z"
    }
  ],
  "meta": {
  }
}

Get a single account

Returns a single authorized account identified by ID.

GET /accounts/:account_id

Response

{
  "accounts": [
    {
      "id": 7,
      "address1": "19 Les Robles",
      "address2": "",
      "business_name": "Business Name",
      "city": "Nevache",
      "country_code": "FR",
      "default_locale": "en",
      "email": "email@example.com",
      "phones": {
        "phone": "",
        "mobile": "1234567890",
        "fax": ""
      },
      "preferences": {
        "bookings": {
          "default_arrival_time": 16,
          "default_departure_time": 10,
          "default_communication_locale": "en"
        }
      },
      "selected_locales": [
        "en",
        "fr"
      ],
      "state": "Hautes-Alpes",
      "status": "trial",
      "website": "http://www.superawesomevillas.com",
      "zip": "05100",
      "created_at": "2017-11-09T09:08:16Z",
      "updated_at": "2017-11-09T09:08:16Z"
    }
  ],
  "meta": {
  }
}