capi (0.1.0)
Download OpenAPI specification:Download
Chat Init
Инициализация диалога.
Request Body schema: application/json
| uuid required | string <uuid> (Uuid) Идентификатор ассистента. |
| cuid | string <uuid> (Cuid) Идентификатор чата. |
| context | object (Context) Default: {} Контекст. |
Responses
Request samples
- Payload
Content type
application/json
{- "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
- "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
- "context": { }
}Response samples
- 200
- 400
- 422
- 500
Content type
application/json
{- "id": "0",
- "result": {
- "name": "",
- "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
- "events": { }
}
}Chat Event
Обработка Event (событие).
Request Body schema: application/json
| cuid required | string <uuid> (Cuid) Идентификатор чата. |
| euid required | string <uuid> (Euid) Идентификатор события. |
| context | object (Context) Default: {} Контекст. |
Responses
Request samples
- Payload
Content type
application/json
{- "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
- "euid": "0673ce4f-9d34-4b4e-b140-06ae5f587171",
- "context": { }
}Response samples
- 200
- 400
- 422
- 500
Content type
application/json
{- "id": "0",
- "result": {
- "id": "",
- "reqid": "",
- "text": { },
- "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
- "rubric": "string",
- "animation": {
- "type": "string"
}, - "navigation": "string",
- "token": "string",
- "context": { },
- "showExpSys": "string"
}
}Chat Request
Обработка Request (реплика).
Request Body schema: application/json
| cuid required | string <uuid> (Cuid) Идентификатор чата. |
| text required | string (Text) Реплика пользователя. |
| context | object (Context) Default: {} Контекст. |
Responses
Request samples
- Payload
Content type
application/json
{- "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
- "text": "string",
- "context": { }
}Response samples
- 200
- 400
- 422
- 500
Content type
application/json
{- "id": "0",
- "result": {
- "id": "",
- "reqid": "",
- "text": { },
- "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
- "rubric": "string",
- "animation": {
- "type": "string"
}, - "navigation": "string",
- "token": "string",
- "context": { },
- "showExpSys": "string"
}
}Webhook
Получение сообщения от SAPI.
Request Body schema: application/json
| type | string (Type) Проверка вебхука. |
| cuid | string <uuid> (Cuid) Идентификатор чата. |
| reqid | string <uuid> (Reqid) Идентификатор запроса. |
| message | any (Message) Default: [] Ответ ассистента. |
| infosrvid | string (Infosrvid) Идентификатор сообщения. |
| context | object (Context) Default: {} Контекст. |
| commands | object (Commands) Default: {} Команды. |
Responses
Request samples
- Payload
Content type
application/json
{- "type": "string",
- "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
- "reqid": "69e4e573-ff59-479c-9c48-1f5a5ee16a15",
- "message": [ ],
- "infosrvid": "string",
- "context": { },
- "commands": { }
}Response samples
- 200
- 400
- 422
- 500
Content type
application/json
{- "id": "0",
- "result": { }
}Response Rate
Передать оценку ответа бота в SAPI
Request Body schema: application/json
| cuid required | string <uuid> (Cuid) UUID чата/диалога |
required | object (RateContext) |
Responses
Request samples
- Payload
Content type
application/json
{- "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
- "context": {
- "rate_type": "rate",
- "rate_id": "3bec1d92-6fca-4949-9664-244f71111c20",
- "rating": "string"
}
}Response samples
- 200
- 400
- 422
- 500
Content type
application/json
{- "id": "0",
- "result": {
- "id": "",
- "reqid": ""
}
}Set Response Rate
Передать оценку ответа бота в SAPI
Request Body schema: application/json
| cuid required | string <uuid> (Cuid) UUID чата/диалога |
required | object (RateContext) |
Responses
Request samples
- Payload
Content type
application/json
{- "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
- "context": {
- "rate_type": "rate",
- "rate_id": "3bec1d92-6fca-4949-9664-244f71111c20",
- "rating": "string"
}
}Response samples
- 200
- 400
- 422
- 500
Content type
application/json
{- "id": "0",
- "result": {
- "id": "",
- "reqid": ""
}
}Sync Request
Request Body schema: application/json
| cuid required | string <uuid> (Cuid) Chat/Dialog UUID |
Responses
Request samples
- Payload
Content type
application/json
{- "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564"
}Response samples
- 200
- 400
- 422
- 500
Content type
application/json
{- "answers": [
- {
- "id": "0",
- "result": {
- "id": "",
- "reqid": "",
- "text": { },
- "cuid": "2e4ad9fd-436b-41d3-82fb-2bdab56a4564",
- "rubric": "string",
- "animation": {
- "type": "string"
}, - "navigation": "string",
- "token": "string",
- "context": { },
- "showExpSys": "string"
}
}
]
}