Home > API Center > API interface guide

Quick Start - Management Side

Call Center

It supports functions such as group call transfer to agents, proportional outbound calling, and automatic calling, achieving a two-way improvement in call efficiency and customer experience.

Management Side Docking Process

Pre-preparation

Obtain the values of API Key, API Secret, and appId.

You need to log on to the client to obtain the bitmap, as shown in the following figure.

Sign signature rule

Use Api Key + Api Secret + Timestamp to generate a MD5-32-bit string (case-insensitive) as the signature.

Example:

API Key: bDqJFiq9

API Secret: 7bz1lzh9

Current system Timestamp (seconds): 1630468800

MD5(bDqJFiq97bz1lzh91630468800): 05d7a50893e22a5c4bb3216ae3396c7c

API docking process

01Add Agent Group

"Add Agent Group" under voice application.

curl --location --request POST 'https://api.laaffic.com/v3/cc/seatGroup/addGroup' 
--header 'Content-Type: application/json;charset=UTF-8' 
--header 'Sign: a090b2d5fafa44c3cb46418fc47b35ee' 
--header 'Timestamp: 1766149876' 
--header 'Api-Key: SQLHdsQFe0Gk8ckwJZqcwxfaYRm0Qu0o' 
--data-raw '{
    "groupName":"test-1",
    "appId":"HsiT9A6d"
}'

02Create Agents in Batches

"Create Agents in Batches" under the agent group

curl --location --request POST 'https://api.laaffic.com/v3/cc/seat/addSeatList' 
--header 'Content-Type: application/json;charset=UTF-8' 
--header 'Sign: 9f897c6bb4ca9b1ff43c70f17c5c79c8' 
--header 'Timestamp: 1766157823' 
--header 'Api-Key: SQLHdsQFe0Gk8ckwJZqcwxfUYRc0Qu0o' 
--data-raw '{
    "voiceGroupId":5005421,
    "size":2,
    "displayNum":"1234",
    "ccode":"91"
}'

03Upload Callee Number Excel

Convert the phone number file to base64 encoding and then "Upload Callee Number Excel" using the API.

curl --location --request POST 'https://api.laaffic.com/v3/cc/preview/upload' 
--header 'Content-Type: application/json;charset=UTF-8' 
--header 'Sign: 79112c4cc45d3e41d6e3a9bb2358ef38' 
--header 'Timestamp: 1766044959' 
--header 'Api-Key: SQLHdsQFe0Gk8ckwJZqcwxfUYtm0Qu0o' 
--data-raw '{
    "fileName":"Template_voice_numFiles_cn.xls",
    "file":"base64-encoded file content"
}'

04Create Task (number deduplication)

You can choose between automatic calling or group calling to agent transfer; go to Create Task.

curl --location --request POST 'https://api.laaffic.com/v3/cc/preview/submitTask' 
--header 'Content-Type: application/json;charset=UTF-8' 
--header 'Sign: a090b2d5fafa44c3cb46418fc47b35ee' 
--header 'Timestamp: 1766149876' 
--header 'Api-Key: SQLHdsQFe0Gk8ckwJZqcxxfUYRm0Qu0o' 
--data-raw '	{
    "filePath": "/mnt/cc/upload/execl/202509121719054_Jenny_.xls",
    "voiceGroupId": [
        5000531
    ],
    "appId": "HsiT9A6d",
    "calloutRate": 1,
    "type": 1,
    "fileName": "Template_voice_numFiles_cn.xls",
    "remark":"group call to agent"
}'

Status Report Push

1. "Example of proactively pushing call logs"

When the user configures an http push address on the account setting-voice application management page, the platform will actively push the voice and status report of the http-api to the user to configure the address

You can log in to the client settings, the specific location is shown in the figure.

2. "Example of proactive push notification for agent ringing event"

When the agent's phone rings, a push notification will be sent to the user's configured address. This ringing event should be a time-sensitive push notification; it is recommended that the user respond with an HTTP CODE 200 response immediately upon receiving our request, and that business logic be processed asynchronously.

Note: If our push fails, we will retry immediately, up to a maximum of 3 times.

You can log in to the client settings, the specific location is shown in the figure.

Quick Check of Common Error Codes

The following are several common error code causes and handling methods, which can be seen globally.Global Status Code

Status Reason Description
-1 Authentication error Check the parameter values of API Key, API Secret, and appId.
-18 Port program unusual Check whether the request body is in json format.

Telegram
WhatsApp
Chat with us!
Need help?
Click here and start chatting with us!