Agent Chat Room
Author: Rohit Agnihotri
18 views
POST
Agent Chat Room
{{URL}}/api/room/fetchRoomByUserAgent
HEADERS
Accept
application/json
None
Content-Type
application/json
None
Authorization
{{Authorization}}
None
client
{{client}}
None
language
1
None
currency
USD
None
BODY raw
{
"sub_domain":"192.168.101.88",
"agent_db":"salesdemo",
"agent_id":"133",
"type":"agent-to-user",
"client_id":5
}
Example Request
- Agent Chat Room
Example Response
{- roomData: [
- {
- _id: "641d731dee3408c461095a2b"
- status: true
- type: "agent_to_user"
- room_id: "52788594"
- room_name: "OrderNo-52788594-orderId-10-oderVendor-7-agentId-141"
- order_vendor_id: "9"
- order_id: "10"
- agent_db: "ace"
- vendor_id: "7"
- sub_domain: "192.168.101.88"
- vendor_user_id: "141"
- order_user_id: "1"
- agent_id: "141"
- db_name: "ace"
- client_id: "1"
- created_date: "2023-03-24T09:53:33.984Z"
- updated_date: "2023-03-24T10:33:42.474Z"
- __v: 0
- user_Data: [
- {
- _id: "641d7321ee3408c461095a2c"
- status: true
- room_id: "641d731dee3408c461095a2b"
- user_type: "agent"
- user_id: "141"
- email: ""
- username: "goutav"
- phone_num: "+0000000000"
- display_image: "{{{S3Url}}/assets/client_003c58a1/agents641d3fe370610.jpg/a4QNnpqOimv3AnsEeD34HQ28zguSLmEJoTMBZWic.jpg"
- room_name: "OrderNo-52788594-orderId-10-oderVendor-7-agentId-141"
- vendor_id: "7"
- vendor_user_id: "141"
- order_user_id: "1"
- order_vendor_id: "9"
- auth_user_id: "141"
- created_date: "2023-03-24T09:53:37.467Z"
- updated_date: "2023-03-24T09:53:37.467Z"
- __v: 0
} - {
- _id: "641d735fee3408c461095a2e"
- status: true
- room_id: "641d731dee3408c461095a2b"
- user_type: "admin"
- user_id: "1"
- email: "admin@example.com"
- username: "John Doe"
- phone_num: "+null 0000000000"
- display_image: "{{ImageUrl}}/insecure/fit/500/500/ce/0/plain/{{S3Url}}/default/default_image.png@webp"
- sub_domain: "{{SubUrl}}"
- room_name: "OrderNo-52788594-orderId-10-oderVendor-7-agentId-141"
- vendor_id: "7"
- vendor_user_id: "141"
- order_user_id: "1"
- order_vendor_id: "9"
- auth_user_id: "1"
- created_date: "2023-03-24T09:54:39.439Z"
- updated_date: "2023-03-24T09:54:39.439Z"
- __v: 0
}
] - chat_Data: [
- {
- _id: "641d7c86ee3408c461095a38"
- display_image: "{{{S3Url}}/assets/client_003c58a1/agents641d3fe370610.jpg/a4QNnpqOimv3AnsEeD34HQ28zguSLmEJoTMBZWic.jpg"
- phone_num: "+0000000000"
- message: "dfdfdfd"
- user_type: "agent"
- to_message: "to_user"
- from_message: "from_agent"
- email: ""
- username: "goutav"
- chat_type: "agent_to_user"
- room_name: "OrderNo-52788594-orderId-10-oderVendor-7-agentId-141"
- vendor_id: "7"
- vendor_user_id: "141"
- order_user_id: "1"
- order_vendor_id: "9"
- auth_user_id: "141"
- room: "641d731dee3408c461095a2b"
- to_id: "7"
- from_id: "1"
- from_user_id: "141"
- created_date: "2023-03-24T10:33:42.471Z"
- __v: 0
}
]
} - {
- _id: "641d6efbee3408c461095a26"
- status: true
- type: "agent_to_user"
- room_id: "82321693"
- room_name: "OrderNo-82321693-orderId-7-oderVendor-3-agentId-141"
- order_vendor_id: "5"
- order_id: "7"
- agent_db: "ace"
- vendor_id: "3"
- sub_domain: "192.168.101.88"
- vendor_user_id: "141"
- order_user_id: "1"
- agent_id: "141"
- db_name: "ace"
- client_id: "1"
- created_date: "2023-03-24T09:35:55.668Z"
- updated_date: "2023-03-24T09:49:17.486Z"
- __v: 0
- user_Data: [
- {
- _id: "641d6f50ee3408c461095a27"
- status: true
- room_id: "641d6efbee3408c461095a26"
- user_type: "agent"
- user_id: "141"
- email: ""
- username: "goutav"
- phone_num: "+0000000000"
- display_image: "{{{S3Url}}/assets/client_003c58a1/agents641d3fe370610.jpg/a4QNnpqOimv3AnsEeD34HQ28zguSLmEJoTMBZWic.jpg"
- room_name: "OrderNo-82321693-orderId-7-oderVendor-3-agentId-141"
- vendor_id: "3"
- vendor_user_id: "141"
- order_user_id: "1"
- order_vendor_id: "5"
- auth_user_id: "141"
- created_date: "2023-03-24T09:37:20.227Z"
- updated_date: "2023-03-24T09:37:20.227Z"
- __v: 0
}
] - chat_Data: [
- {
- _id: "641d721dee3408c461095a2a"
- display_image: "{{{S3Url}}/assets/client_003c58a1/agents641d3fe370610.jpg/a4QNnpqOimv3AnsEeD34HQ28zguSLmEJoTMBZWic.jpg"
- phone_num: "+0000000000"
- message: "ddddd"
- user_type: "agent"
- to_message: "to_user"
- from_message: "from_agent"
- email: ""
- username: "goutav"
- chat_type: "agent_to_user"
- room_name: "OrderNo-82321693-orderId-7-oderVendor-3-agentId-141"
- vendor_id: "3"
- vendor_user_id: "141"
- order_user_id: "1"
- order_vendor_id: "5"
- auth_user_id: "141"
- room: "641d6efbee3408c461095a26"
- to_id: "3"
- from_id: "1"
- from_user_id: "141"
- created_date: "2023-03-24T09:49:17.484Z"
- __v: 0
}
]
}
] - status: true
- statusCode: 200
}
Still stuck? How can we help?
How can we help?
A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.