This resource represents Inbox Participants that can send Inbox Messages for a given Inbox Conversation.
Name | Type | Read/Write | Description |
---|---|---|---|
conversation | Integer | Read | Conversation’s ID to which Participant belongs to |
account | Integer | Read | Account’s ID to which Participant is related to |
member_id | Integer | Read | ID of the resource that created the Participant (Client or Host - this is a polymorphic association) |
member_type | String | Read | Type of the resource that created the Participant (Client or Host - this is a polymorphic association) |
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 | Constraints |
---|---|---|---|---|
conversation | Integer | Read | Conversation’s ID to which Participant belongs to | |
account | Integer | Read | Account’s ID to which Participant is related to | |
member_id | Integer | Read | ID of the resource that created the Participant (Client or Host - this is a polymorphic association) | |
member_type | String | Read | Type of the resource that created the Participant (Client or Host - this is a polymorphic association) | |
id | Integer | Read | Participant’s id. | |
member_id | Integer | Write (create-only) | Participant’s Member id. | Required |
member_type | Integer | Write (create-only) | Participant’s member type (Client or Host ). |
Required, must be Client or Host. |
conversation_id | Integer | Write (create-only) | Participant’s Conversation id. | Required |
read | Boolean | Write | An attribute for marking last message as read by Participant (and will assign read_at timestamp) |
Must be in the past |
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. |
GET /inbox/participants
{
"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": {
}
}
Returns a single participant identified by ID.
GET /inbox/participants/:participant_id
{
"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": {
}
}
Creates a Participant.
POST /inbox/participants
{
"participants": [
{
"conversation_id": 3,
"member_id": 5,
"member_type": "Host",
"read": "true",
"last_message_sent_at": "2018-12-15T10:42:17Z"
}
]
}
{
"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": {
}
}
Returns an updated participant identified by ID.
PUT /inbox/participants/:participant_id
Only :read
attribute is allowed.
{
"participants": [
{
"read": "true"
}
]
}
{
"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": {
}
}