Hosts

  1. List Hosts
  2. Get a single Host
  3. Create a new Host
  4. Update a Host

Parameters

Name Type Read/Write Description
id Integer Read Host’s id.
firstname String Read Host’s first name.
lastname String Read Host’s last name.
email String Read Host’s email.
created_at Time Read Host’s create time.
updated_at Time Read Host’s update time.
forget_me_at Time Read Host’s forget time.
processing_restricted_at Time Read Host’s processing restriction time.
Name Type Read/Write Description
id Integer Read Host’s id.
user_id Integer Read/Write Host’s user id.
source_id Integer Read/Write Host’s source id.
firstname String Read/Write Host’s first name.
lastname String Read/Write Host’s last name.
email String Read/Write Host’s email.
created_at Time Read Host’s create time.
updated_at Time Read Host’s update time.
forget_me_at Time Read Host’s forget time.
processing_restricted_at Time Read Host’s processing restriction time.

List Hosts

GET /hosts

Response

{
  "links": {
    "hosts.account": "https://www.bookingsync.com/api/v3/accounts/{hosts.account}",
    "hosts.participants": "https://www.bookingsync.com/api/v3/inbox/participants/{hosts.participants}",
    "hosts.source": "https://www.bookingsync.com/api/v3/sources/{hosts.source}",
    "hosts.user": "https://www.bookingsync.com/api/v3/users/{hosts.user}"
  },
  "hosts": [
    {
      "id": 2,
      "email": "host1@example.com",
      "firstname": "Jan",
      "lastname": "Kowalski",
      "created_at": "2018-12-26T19:51:24Z",
      "updated_at": "2018-12-26T19:51:24Z",
      "forget_me_at": null,
      "processing_restricted_at": null,
      "links": {
        "account": 1,
        "participants": [

        ],
        "source": null,
        "user": null
      }
    }
  ],
  "meta": {
  }
}

Get a single Host

Returns a single host identified by ID.

GET /hosts/:host_id

Response

{
  "links": {
    "hosts.account": "https://www.bookingsync.com/api/v3/accounts/{hosts.account}",
    "hosts.participants": "https://www.bookingsync.com/api/v3/inbox/participants/{hosts.participants}",
    "hosts.source": "https://www.bookingsync.com/api/v3/sources/{hosts.source}",
    "hosts.user": "https://www.bookingsync.com/api/v3/users/{hosts.user}"
  },
  "hosts": [
    {
      "id": 2,
      "email": "host1@example.com",
      "firstname": "Jan",
      "lastname": "Kowalski",
      "created_at": "2018-12-26T19:51:24Z",
      "updated_at": "2018-12-26T19:51:24Z",
      "forget_me_at": null,
      "processing_restricted_at": null,
      "links": {
        "account": 1,
        "participants": [

        ],
        "source": null,
        "user": null
      }
    }
  ],
  "meta": {
  }
}

Create a new Host

Creates an host.

POST /hosts

Example JSON request

{
  "hosts": [
    {
      "email": "host1@example.com",
      "firstname": "Jan",
      "lastname": "Kowalski",
      "user_id": 2
    }
  ]
}

Response

{
  "links": {
    "hosts.account": "http://test.host/api/v3/accounts/{hosts.account}",
    "hosts.participants": "http://test.host/api/v3/inbox/participants/{hosts.participants}",
    "hosts.source": "http://test.host/api/v3/sources/{hosts.source}",
    "hosts.user": "http://test.host/api/v3/users/{hosts.user}"
  },
  "hosts": [
    {
      "id": 2,
      "email": "host1@example.com",
      "firstname": "Jan",
      "lastname": "Kowalski",
      "created_at": "2018-12-26T20:03:54Z",
      "updated_at": "2018-12-26T20:03:54Z",
      "forget_me_at": null,
      "processing_restricted_at": null,
      "links": {
        "account": 1,
        "participants": [

        ],
        "source": null,
        "user": 2
      }
    }
  ],
  "meta": {
  }
}

Update a Host

Returns an updated host identified by ID.

PUT /hosts/:host_id

Example JSON request

{
  "hosts": [
    {
      "email": "host1@example.com",
      "firstname": "Jan",
      "lastname": "Kowalski",
      "user_id": 2
    }
  ]
}

Response

{
  "links": {
    "hosts.account": "http://test.host/api/v3/accounts/{hosts.account}",
    "hosts.participants": "http://test.host/api/v3/inbox/participants/{hosts.participants}",
    "hosts.source": "http://test.host/api/v3/sources/{hosts.source}",
    "hosts.user": "http://test.host/api/v3/users/{hosts.user}"
  },
  "hosts": [
    {
      "id": 2,
      "email": "host1@example.com",
      "firstname": "Jan",
      "lastname": "Kowalski",
      "created_at": "2018-12-26T20:03:54Z",
      "updated_at": "2018-12-26T20:03:54Z",
      "forget_me_at": null,
      "processing_restricted_at": null,
      "links": {
        "account": 1,
        "participants": [

        ],
        "source": null,
        "user": 2
      }
    }
  ],
  "meta": {
  }
}