Query Agent Interface Description

1.Interface Introduction

Query information about agents. You can query the agent information of the specified agent number, and you can also query the information of all agents under the account.

2.Interface request

  • HTTP request method:POST

  • Request url:{HOST}/v20160818/account/getCCAgentsByAcc/ACCOUNTID?sig=sig

  • When requesting, please replace {HOST} with connection data queryDomain name,ACCOUNTID is replaced with the account number, SIG is generated according to the authentication rules, please see the authentication document to see the specific generation rules.

  • Request frequency limit: 20 times / minute

  • Authentication document: Interface Authentication

3.The interface parameters are as follows:

Field Type Is necessary Remark
Exten String no Agent number, generally 8000, 8001, 8002, etc.

Request body example

{
    "Exten":"8000"
}

4.System returns

Field meaning
code Response code
message Response message
data Return data, JSON format

data:

_id Agent ID
displayName Agent Name
exten Agent Number
loginName The user name of the agent logging in to the call center is the same as the work ID
password Agent login call center password
pbx The pbx to which the agent belongs
mobile Agent-bound phone
email Agent-bound mailbox
status Agent status, enabled or disabled(enable/disable)
uversion Agent version, standard version / outbound version / monitor version(enterprise/outcall/monitor)
callerIDNum The pass-through number of the agent is called. If this field is not available, this agent is used when the call is made. You can use this field to associate agents with service numbers
role Role this agent has
parentId Agent's superior agent ID
AutoBusyTime Post-processing time
type Whether it is a monitoring agent(agent/manager)

code:

Code Meaning
200 Request succeeded
400 Request body parameter error
402 Parameter error
403 Interface access frequency reaches the upper limit or authentication fails
500 Server Error

Returns 200 examples:

{
    "code": 200,
    "message": "account get information success!",
    "data": [
        {
            "_id": "09cebc40-e694-11e5-9cab-27f6bff0482a",
            "pbx": "1.1.1.101",
            "type": "manager",
            "mobile": "18516967734",
            "email": "",
            "status": "enable",
            "uversion": "enterprise",
            "role": [
                "dddd3170-e693-11e5-9eaf-3967ec5e59d3",
                "dddd3171-e693-11e5-9eaf-3967ec5e59d3"
            ],
            "callerIDNum": "18516967734",
            "exten": "8000",
            "password": "8000",
            "displayName": "8000",
            "loginName": "8000",
            "AutoBusyTime": "0",
            "parentId": ""
        }
    ]
}

Returns 400 examples:

{
    "code": 400,
    "message": "Please check your parameters"
}

Returns 402 examples:

{
    "code": 402,
    "message": 'Accountisnull'
}

Returns 403 examples:

{
    "code": 403,
    "message": "Server is busy, max request frequency is 20/min"
}

Returns 500 examples:

{
    "code": 500,
    "message": "find account agents err"
}