Forward Chat To Department(Tag)

API will forward chat to department.

Resource URL

https://Server Node Environment/index.php

Example : https://api.yourdomain.com/index.php

Resource Information

Parameters Values
Resource Format JSON
Method POST
Requires authentication? Yes

Request

GET Params

Parameters Mandatory Description
[Request parameters]
d REQUIRED api - Controller directory name
c REQUIRED chat - Controller name
m REQUIRED forward_to_departments - Controller method name
token REQUIRED Application Access Token
user_id REQUIRED Agent ID

POST Params

Parameters Mandatory Description
[Request parameters]
csid REQUIRED Chat Session ID
department_id REQUIRED Department(Tag) ID
device_id REQUIRED Device ID to send push notification. It will be long string like: dozGN2D-CRs:APA91bFG34cyrSE6_j11z662rhosjtW5fsXXoWTPAxaywEol7bOXGC6IYmBvvTZaucio55LMmkIkEAyrOAry0qEi3C8aT5hAenMCJvbg0c6KK08h3OwILh1PeGxeFJ06ck5OGmTN4YPj

Response


{
    "result": "success",
    "language_version": 20171221061942,
    "message": "Chat forwarded successfully."
}

Messages returned

HTTP STATUS CODE Description MESSAGE BODY
200 Successfully Return Return Json data.
200 Error Return {"result":"failed","error":"There are no agents in this department."}
200 Authorization Error {"result":"failed","error":"Invalid access token or Token has been expired."}
400 Request is malformed {"error": "invalid_request", "error_description": "description"}
403 Forbidden Directory access is forbidden.
404 Resource Not found The page you requested was not found.