Inbox Participants

  1. List Participants
  2. Get a single Participant
  3. Create a new Participant
  4. Update a Participant

Parameters

Name Type Read/Write Description
id Integer Read Participant’s id.
created_at Time Read Participant’s create time.
updated_at Time Read Participant’s update time.
last_message_sent_at Time Read Participant’s last sent message time.
read_at Time Read Time when Participant read last message.
Name Type Read/Write Description
id Integer Read Participant’s id.
member_id Integer Read/Write Participant’s Member id.
conversation_id Integer Read/Write Participant’s Conversation id.
read Boolean Write Is related to Participant’s read_at attribute.
member_type Integer Read/Write Participant’s member type (Client or Host).
created_at Time Read Participant’s create time.
updated_at Time Read Participant’s update time.
last_message_sent_at Time Read Participant’s last sent message time.
read_at Time Read/Write Time when Participant read last message.

List Participants

GET /inbox/participants

Response

{
  "links": {
    "participants.client": "https://www.bookingsync.com/api/v3/clients/{participants.member.id}",
    "participants.conversation": "https://www.bookingsync.com/api/v3/inbox/conversations/{participants.conversation}",
    "participants.host": "https://www.bookingsync.com/api/v3/hosts/{participants.member.id}"
  },
  "participants": [
    {
      "id": 10,
      "created_at": "2018-12-21T10:42:17Z",
      "updated_at": "2018-12-21T10:42:17Z",
      "last_message_sent_at": "2018-12-15T10:42:17Z",
      "read_at": null,
      "links": {
        "conversation": 3,
        "member": {
          "id": 5,
          "type": "Host"
        }
      }
    }
  ],
  "meta": {
  }
}

Get a single Participant

Returns a single participant identified by ID.

GET /inbox/participants/:participant_id

Response

{
  "links": {
    "participants.client": "https://www.bookingsync.com/api/v3/clients/{participants.member.id}",
    "participants.conversation": "https://www.bookingsync.com/api/v3/inbox/conversations/{participants.conversation}",
    "participants.host": "https://www.bookingsync.com/api/v3/hosts/{participants.member.id}"
  },
  "participants": [
    {
      "id": 10,
      "created_at": "2018-12-21T10:42:17Z",
      "updated_at": "2018-12-21T10:42:17Z",
      "last_message_sent_at": "2018-12-15T10:42:17Z",
      "read_at": null,
      "links": {
        "conversation": 3,
        "member": {
          "id": 5,
          "type": "Host"
        }
      }
    }
  ],
  "meta": {
  }
}

Create a new Participant

Creates a Participant.

POST /inbox/participants

Example JSON request

{
  "participants": [
    {
      "conversation_id": 3,
      "member_id": 5,
      "member_type": "Host",
      "read": "true",
      "last_message_sent_at": "2018-12-15T10:42:17Z"
    }
  ]
}

Response

{
  "links": {
    "participants.client": "https://www.bookingsync.com/api/v3/clients/{participants.member.id}",
    "participants.conversation": "https://www.bookingsync.com/api/v3/inbox/conversations/{participants.conversation}",
    "participants.host": "https://www.bookingsync.com/api/v3/hosts/{participants.member.id}"
  },
  "participants": [
    {
      "id": 10,
      "created_at": "2018-12-21T10:42:17Z",
      "updated_at": "2018-12-21T10:42:17Z",
      "last_message_sent_at": "2018-12-15T10:42:17Z",
      "read_at": "2018-12-21T10:42:17Z",
      "links": {
        "conversation": 3,
        "member": {
          "id": 5,
          "type": "Host"
        }
      }
    }
  ],
  "meta": {
  }
}

Update a Participant

Returns an updated participant identified by ID.

PUT /inbox/participants/:participant_id

Restrictions on updatable parameters

Only :read attribute is allowed.

Example JSON request

{
  "participants": [
    {
      "read": "true"
    }
  ]
}

Response

{
  "links": {
    "participants.client": "https://www.bookingsync.com/api/v3/clients/{participants.member.id}",
    "participants.conversation": "https://www.bookingsync.com/api/v3/inbox/conversations/{participants.conversation}",
    "participants.host": "https://www.bookingsync.com/api/v3/hosts/{participants.member.id}"
  },
  "participants": [
    {
      "id": 10,
      "created_at": "2018-12-21T10:42:17Z",
      "updated_at": "2018-12-21T10:42:17Z",
      "last_message_sent_at": "2018-12-15T10:42:17Z",
      "read_at": "2018-12-21T10:42:17Z",
      "links": {
        "conversation": 3,
        "member": {
          "id": 5,
          "type": "Host"
        }
      }
    }
  ],
  "meta": {
  }
}