Accounts

  1. Overview
  2. List accounts
  3. Get a single account

Overview

This resource represents the available Accounts.

When using Client Credentials Flow, you can get the list of all Accounts installed for your application. When using Authorization Flow, you will only get a single account that represents a Resource Owner for a given token.

Combining Client Credentials Flow and updated_since flow allows you also to get the list of accounts that have been canceled, suspended or uninstalled your application.

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 company 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 Read Company’s website
    zip String Read Zip code.
    demo Boolean Read Account’s demo status. If the value is true, you probably don’t want to treat as a real production Account.
    test Boolean Read Account’s test status. If the value is true, you probably don’t want to treat as a real production Account.
    inbox_email Boolean Read Account’s email address within Inbox context (requires inbox_read scope).
    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.
preferences     Object Read Set of account’s preferences.
  bookings   Object Read Set of booking’s preferences.
    default_arrival_time Integer Read Default checkin hour.
    default_arrival_end_time Integer Read Default arrival end time.
    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.
  privacy_policy   Object Read Account’s privacy policy, list of locales 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": "2023-12-11T08:26:26Z",
      "updated_at": "2023-12-11T08:26:26Z"
    }
  ],
  "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": "2023-12-11T08:26:26Z",
      "updated_at": "2023-12-11T08:26:26Z"
    }
  ],
  "meta": {
  }
}