Callbot API taskCallback - nxtele/nxcloud-doc-en GitHub Wiki
callbot-api
v1.0.0
Base URLs:
- Production Environment: https://nxbot.nxcloud.com
aibot External API v3.0/Callback
Authentication Method
To authenticate, please refer to the documentation https://github.com/nxtele/http-api-document/wiki/Callbot-API-authorization
POST Task Callback (aibot->customer)
POST /api/v3/taskCallback
Body Request Parameters
{
"callbackType": 1,
"userTaskID": "string",
"taskID": "string",
"sceneID": "string",
"taskStatus": 1,
"createTs": 0,
"taskStat": {
"answerOrderCount": 0,
"finishOrderCount": 0,
"totalOrderCount": 0,
"finishRate": 0,
"totalAnswerCall": 0,
"totalCall": 0,
"answerRate": 0
}
}
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| requestID | header | string | Yes | Unique request ID |
| uuid | header | string | Yes | UUID provided by the callee |
| createTs | header | string | Yes | Request timestamp (in seconds) |
| sign | header | string | Yes | Signature(Signature algorithm can be found in the backend -> Developer section) |
| body | body | object | No | |
| » callbackType | body | integer | Yes | Callback type |
| » userTaskID | body | string | Yes | Caller's task ID |
| » taskID | body | string | Yes | Callee's task ID |
| » sceneID | body | string | Yes | Script template ID |
| » taskStatus | body | integer | Yes | Task status |
| » createTs | body | integer | Yes | Task creation timestamp |
| » taskStat | body | object | Yes | |
| »» answerOrderCount | body | integer | Yes | Answered order count |
| »» finishOrderCount | body | integer | Yes | Completed order count |
| »» totalOrderCount | body | integer | Yes | Total order count |
| »» finishRate | body | number(float) | Yes | Task completion rate, Rounded to 2 decimal places, calculated as finishOrderCount/totalOrderCount |
| »» totalAnswerCall | body | integer | Yes | Total answered call count |
| »» totalCall | body | integer | Yes | Total call count |
| »» answerRate | body | number(float) | Yes | Rounded to 2 decimal places, calculated as totalAnswerCall/totalCall |
Enumerated Values
| Attribute | Value | |
|---|---|---|
| » callbackType | 1 | Task callback |
| » callbackType | 2 | Order callback |
| » callbackType | 3 | Call callback |
| taskStatus | 1 | Task pending |
| taskStatus | 2 | Task in progress |
| taskStatus | 3 | Task completed |
| taskStatus | 4 | Task finished (failed) |
| taskStatus | 5 | Task paused |
Response Example
200 Response
{
"retCode": 0,
"retMsg": "string",
"responseID": "string"
}
Response Result
| Status Code | Status Code Meaning | Description | Data Model |
|---|---|---|---|
| 200 | OK | Success | Inline |
Response Data Structure
Status Code 200
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
| » retCode | integer | true | none | Response code, 0 for success, others for failure |
| » retMsg | string | true | none | Response message |
| » responseID | string | true | none | Random unique ID used for request tracking, needed to provide the responseID for troubleshooting |