Para agentes de IA: markdown desta página — /docs-content-en/openlines/ratings.md índice da documentação — /llms.txt
Os artigos da documentação estão disponíveis atualmente em inglês.
Ratings (CSAT)
The method ships in the
imopenlines 26.700.0update and is not yet available on all Bitrix24 accounts. If the update has not reached your Bitrix24 account yet, the API returns422 METHOD_NOT_YET_AVAILABLE— this means the method has not been released on the account yet, not that the integration is broken.
POST /v1/openlines/ratings/search
A list of sessions with a customer rating (like/dislike) over a period — for CSAT reports and feedback export. Sessions without a customer rating do not appear in the list.
Request fields (body)
| Field | Type | Req. | Description |
|---|---|---|---|
dateVoteFrom |
string | yes | Start of the rating period, ISO 8601. The dateVoteFrom..dateVoteTo period must not exceed 1 year |
dateVoteTo |
string | yes | End of the rating period, ISO 8601 |
configId |
number | no | Open Channel identifier. Source: GET /v1/openline-configs |
configIdList |
number[] | no | List of Open Channels |
operatorId |
number | no | Operator identifier. Source: GET /v1/users |
operatorIdList |
number[] | no | List of operators |
source |
string | no | Connector code |
sourceList |
string[] | no | List of connector codes |
vote |
string | no | Customer rating: like / dislike. Without the parameter, all rated sessions are returned |
hasVoteHead |
boolean | no | Whether there is a supervisor rating. Accepts true/false and Y/N |
limit |
number | no | Page size, 1..200 (default 50) |
offset |
number | no | Pagination offset (default 0) |
The dateVoteFrom/dateVoteTo period is required — this restriction protects against heavy queries over the session table. If the customer rating is disabled on an Open Channel, the method returns an empty list (no rated sessions appear on such a channel).
Examples
curl — personal key
curl -X POST "https://vibecode.bitrix24.com/v1/openlines/ratings/search" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"configId": 3,
"vote": "like",
"dateVoteFrom": "2026-06-01T00:00:00+00:00",
"dateVoteTo": "2026-06-30T23:59:59+00:00"
}'
curl — OAuth application
curl -X POST "https://vibecode.bitrix24.com/v1/openlines/ratings/search" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"configId": 3,
"vote": "like",
"dateVoteFrom": "2026-06-01T00:00:00+00:00",
"dateVoteTo": "2026-06-30T23:59:59+00:00"
}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/openlines/ratings/search', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
configId: 3,
vote: 'like',
dateVoteFrom: '2026-06-01T00:00:00+00:00',
dateVoteTo: '2026-06-30T23:59:59+00:00',
}),
})
const { data } = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/openlines/ratings/search', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
configId: 3,
vote: 'like',
dateVoteFrom: '2026-06-01T00:00:00+00:00',
dateVoteTo: '2026-06-30T23:59:59+00:00',
}),
})
const { data } = await res.json()
Response fields
The response is { "success": true, "data": { "ratings": [...], "hasNextPage": bool } }.
| Key | Description |
|---|---|
ratings[].sessionId |
Session identifier |
ratings[].configId |
Open Channel identifier |
ratings[].operatorId |
Operator identifier |
ratings[].source |
Connector code |
ratings[].vote |
Customer rating (like / dislike) |
ratings[].voteHead |
Supervisor rating, a number 1..5 (null if the user lacks permission) |
ratings[].commentHead |
Supervisor comment (null if the user lacks permission) |
ratings[].dateVote |
Date the customer left the rating |
ratings[].dateSessionClose |
Session close date |
hasNextPage |
Whether there is a next page (a field of the data envelope, not of an element) |
Response example
{
"success": true,
"data": {
"ratings": [
{
"sessionId": 1024,
"configId": 3,
"operatorId": 42,
"source": "livechat",
"vote": "like",
"voteHead": 5,
"commentHead": "Great work",
"dateVote": "2026-06-15T14:53:00+00:00",
"dateSessionClose": "2026-06-15T14:52:10+00:00"
}
],
"hasNextPage": false
}
}
Error response example
400 — the rating period is missing:
{
"success": false,
"error": { "code": "MISSING_PARAMS", "message": "Required: dateVoteFrom, dateVoteTo (ISO 8601 strings)" }
}
Errors
| HTTP | Code | When |
|---|---|---|
| 403 | B24_TARIFF_RESTRICTION |
The Bitrix24 plan does not include Open Channels statistics (report_open_lines) |
| 400 | INVALID_JSON_BODY |
The request body did not parse as JSON. The check runs before field validation, so the response says nothing about missing parameters |
| 400 | MISSING_PARAMS |
The required dateVoteFrom/dateVoteTo are missing |
| 422 | BITRIX_ERROR (error.b24Code: INVALID_FILTER) |
An invalid vote value or date format |
| 422 | BITRIX_ERROR (error.b24Code: PERIOD_TOO_LARGE) |
The period exceeds 1 year |
| 422 | BITRIX_ERROR (error.b24Code: OFFSET_TOO_LARGE) |
offset exceeds the maximum — narrow the period |
| 422 | METHOD_NOT_YET_AVAILABLE |
The imopenlines 26.700.0 update has not reached the portal yet. The response contains an error.release field set to imopenlines 26.700.0 |
Pagination without page drift
The method is paged with offset/limit. For a paged export, fix the upper bound of the period — set dateVoteTo to the moment the export starts so that new ratings do not shift the pages.
The full list of system codes — API errors.