For AI agents: markdown of this page — /docs-content-en/workday/work-reports/disapprove.md documentation index — /llms.txt

Disapprove a work report

POST /v1/workday/work-reports/:id/disapprove

Gives an employee's work report a negative mark in place of a positive or neutral one.

Requires the timeman scope. Bitrix24 checks the credential owner’s permissions. READONLY keys can read reports and cannot write them.

Parameters

Parameter Type Required Default Description
Parameterid (path) Typeinteger Requiredyes Default— DescriptionReport ID. List: GET /v1/workday/work-reports

No request body is needed. An empty object {} is accepted, and any field in the body returns 400 INVALID_PARAMS.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/workday/work-reports/167/disapprove" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/workday/work-reports/167/disapprove" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/workday/work-reports/167/disapprove', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})
const { data } = await res.json()

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/workday/work-reports/167/disapprove', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const { data } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue when the request succeeds
Fielddata Typeboolean Descriptiontrue — the mark is set

Response example

JSON
{
  "success": true,
  "data": true
}

Error response example

422 — no report with this id exists:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Report not found or cannot be changed"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS Descriptionid is not a positive integer, the request body is not a JSON object, or the body contains a field
HTTP422 CodeBITRIX_ERROR DescriptionNo report with this id exists, the credential owner lacks Bitrix24 permission to mark this employee's reports, or Bitrix24 refused the operation
HTTP409 CodeTIMEMAN_MODULE_NOT_ENABLED DescriptionTime Management is not available on this portal
HTTP502 CodeBITRIX_UNAVAILABLE DescriptionBitrix24 is unavailable
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header was not passed
HTTP401 CodeTOKEN_MISSING DescriptionAn app key was sent without a session token in Authorization: Bearer
HTTP401 CodeINVALID_SESSION DescriptionThe session token is invalid or has expired
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is READONLY and cannot mark reports
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the timeman scope
HTTP429 CodeRATE_LIMITED DescriptionThe general request limit was exceeded

The full list of common API errors — Errors.

Known specifics

  • What changes in the report. mark becomes "B" and approve becomes "Y". approve is the report confirmation: it is "Y" for both positive and negative marks, and mark holds the mark itself. The changes are visible in GET /v1/workday/work-reports/:id.
  • Marking your own report also requires permission. An employee without permission to mark reports gets 422 BITRIX_ERROR for their own report too.
  • A report that has not been submitted can be marked too. It stays unsubmitted, and a submitted report stays submitted: active does not change.
  • Calling again does not return an error. The mark stays negative, and the response is true again.

See also