ACD API

The ACD API allows to integrate ACD functionality to your project. It has following URLs:

Querying an agent’s ready status:

A Method to query the current status of an agent. Uses the HTTP-POST method.

POST https://api.tenios.com/acd/agent-state/retrieve

Request Parameter:

access_key String The api access key. It can be found in the menu item General Settings, section API in the customer portal.
email String The Agent email (Cloud PBX->USER DETAILS).

Response Parameter:

state String The current ready status of the agent. Can be READY or NOT_READY haben.

Example of a successful request:

Request:

{
   "access_key": "XXXXX-XXXX-XXXXXX",
   "email": "test@test.com"
}

API Response:

HTTP Status Code: 200 (OK)

{
   "email": "test@test.com",
   "state": "NOT_READY"
}

Change the status of an agent:

A method to change the status of an agent. Uses the HTTP-POST method.

POST https://api.tenios.com/acd/agent-state/change

 

Request Parameter:

access_key String The api access key. It can be found in the menu item General Settings, section API in the customer portal.
email String The Agent email (Cloud PBX->USER DETAILS).
state String The current ready status of the agent. Can be READY or NOT_READY haben.

access_key String The api access key. It can be found in the menu item General Settings, section API in the customer portal.
email String The Agent email (Cloud PBX->USER DETAILS).
state String The current ready status of the agent. Can be READY or NOT_READY haben.
nrr String Optional Acronym of a pre-configured Not-Ready Reason (NRR).

Response Parameter:

success boolean Is true if the ready state was successfully set, otherwise false.

Example of a successful request:

Request:

{
   "access_key": "XXXXX-XXXX-XXXXXX",
   "email": "agent@test.com",
   "state": "READY",
   "nrr": "COF"
}

API Response:

HTTP Status Code: 200 (OK)

{
   "success": true
}

 

Examples of invalid requests:

BAD_CREDENTIALS
This code is returned if an invalid access_key was provided.

Request:

{
   "access_key": "XXXXX-XXXX-XXXXXX",
   "page": 1,
   "page_size": 10
}

API Response:

HTTP Status Code: 400 (Bad Request)

{
   "error_code": "BAD_CREDENTIALS",
   "error_message": "Bad credentials",
   "fields": []
}
FIELD_IS_REQUIRED
This error is returned if a mandatory parameter is not provided in the request .

Request:

{
   "access_key": "XXXXX-XXXX-XXXXXX",
   "page": 1
}

API Response:

HTTP Status Code: 400 (Bad Request)

{
   "error_code": "FIELD_IS_REQUIRED",
   "error_message": "Parameter 'page_size' is required",
   "fields": [
      "page_size"
   ]
}
INVALID_JSON
This error is returned if the provided JSON contains errors or is invalid in general.

Request:

{
   "access_key": "XXXXX-XXXX-XXXXXX",
   "unknown_parameter": "unknown"
}

API Response:

HTTP Status Code: 400 (Bad Request)

{
   "error_code": "INVALID_JSON",
   "error_message": "An invalid JSON object was provided in the request body.",
   "fields": [
      "unknown_parameter"
   ]
}
AGENT_NOT_FOUND
This error code will be returned if an unknown email was specified in the request.

Request:

{
   "access_key": "XXXXX-XXXX-XXXXXX",
   "email": "unknownemail@test.com"
}

API Response:

HTTP Status Code: 400 (Bad Request)

{
   "error_code": "AGENT_NOT_FOUND",
   "error_message": "Agent not found.",
   "fields": []
}
AGENT_STATE_INVALID_EMAIL
This error code will be returned if an invalid email (invalid syntax) was specified in the request.

Request:

{
   "access_key": "XXXXX-XXXX-XXXXXX",
   "email": "invalidemail@@test.com"
}

API Response:

HTTP Status Code: 400 (Bad Request)

{
   "error_code": "AGENT_STATE_INVALID_EMAIL",
   "error_message": "Invalid email. You can use only valid email of agent which belongs to your account.",
   "fields": [
      "email"
   ]
}
AGENT_NOT_READY_REASON_NOT_FOUND
This error code will be returned if an invalid nrr is specified in the request.

Request:

{
   "access_key": "XXXXX-XXXX-XXXXXX",
   "email": "agent@test.com",
   "state": "READY",
   "nrr": "COF"
}

 

API Response:

HTTP Status Code: 400 (Bad Request)

{
   "error_code": "AGENT_NOT_READY_REASON_NOT_FOUND",
   "error_message": "Agent not ready reason not found.",
   "fields": [
      "nrr"
   ]
}

 

TOP