humanresources.hcmlink.job.update
Обновить задание HCM Link
Описание
Метод humanresources.hcmlink.job.update обновляет задание синхронизации HCM Link.
Метод работает только в контексте авторизации приложения.
Параметры
id
integer
обязательный
Идентификатор задания синхронизации.
Идентификатор приходит в поле jobId событий OnHumanResourcesHcmLinkEmployeeListRequested, OnHumanResourcesHcmLinkFieldValueRequested, OnHumanResourcesHcmLinkEmployeeListMapped, OnHumanResourcesHcmLinkPinRequested или OnHumanResourcesHcmLinkSalaryVacationRequested
fields
object
обязательный
Данные задания (подробное описание)
Параметр fields
status
string
обязательный
Новый статус задания.
Возможные значения:
IN_PROGRESS— выполняетсяDONE— выполненоCANCELED— отменено
total
integer
необязательный
Общее количество элементов в задании
sent
integer
необязательный
Количество обработанных элементов
data
object
необязательный
Дополнительные данные задания
Примеры запроса
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"id":101,"fields":{"status":"DONE","total":10,"sent":10,"data":{"batch":"2026-08-06"}},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/humanresources.hcmlink.job.update
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame } from '@bitrix24/b24jssdk'
declare const $b24: B24Frame
try {
const response = await $b24.actions.v2.call.make({
method: 'humanresources.hcmlink.job.update',
params: {
id: 101,
fields: {
status: 'DONE',
total: 10,
sent: 10,
data: {
batch: '2026-08-06',
},
},
},
requestId: Text.getUuidRfc4122()
})
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
} else {
console.info(response.getData()!.result)
}
} catch (error) {
console.error(error)
}
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
async function updateHcmLinkJob() {
try {
const $b24 = await B24Js.initializeB24Frame()
const response = await $b24.actions.v2.call.make({
method: 'humanresources.hcmlink.job.update',
params: {
id: 101,
fields: {
status: 'DONE',
total: 10,
sent: 10,
data: {
batch: '2026-08-06'
}
}
},
requestId: B24Js.Text.getUuidRfc4122()
})
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
return
}
console.info(response.getData().result)
} catch (error) {
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', updateHcmLinkJob)
</script>
try {
$response = $b24Service
->core
->call(
'humanresources.hcmlink.job.update',
[
'id' => 101,
'fields' => [
'status' => 'DONE',
'total' => 10,
'sent' => 10,
'data' => [
'batch' => '2026-08-06',
],
],
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error updating job: ' . $e->getMessage();
}
BX24.callMethod(
'humanresources.hcmlink.job.update',
{ id: 101, fields: { status: 'DONE', total: 10, sent: 10, data: { batch: '2026-08-06' } } },
function(result)
{
if (result.error())
{
console.error(result.error(), result.error_description());
}
else
{
console.dir(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'humanresources.hcmlink.job.update',
[
'id' => 101,
'fields' => [
'status' => 'DONE',
'total' => 10,
'sent' => 10,
'data' => [
'batch' => '2026-08-06',
],
],
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
// client и ctx уже созданы — см. раздел «SDK для Go»
res, err := client.Core().Call(ctx, "humanresources.hcmlink.job.update", b24.Params{
"id": 101,
"fields": b24.Params{
"status": "DONE",
"total": 10,
"sent": 10,
"data": b24.Params{
"batch": "2026-08-06",
},
},
}, b24.WithIdempotent())
if err != nil {
return fmt.Errorf("humanresources.hcmlink.job.update: %w", err)
}
var updated bool
if err := json.Unmarshal(res.Result, &updated); err != nil {
return fmt.Errorf("разбор ответа: %w", err)
}
fmt.Println(updated)
Ответ
HTTP-статус: 200
{
"result": true,
"time": {
"start": 1739860000.123,
"finish": 1739860000.456,
"duration": 0.333,
"processing": 0.111,
"date_start": "2026-08-06T19:51:02+03:00",
"date_finish": "2026-08-06T19:51:02+03:00"
}
}
Возвращаемые данные
result
boolean
Возвращает true, если задание обновлено
time
time
Информация о времени выполнения запроса
Обработка ошибок
HTTP-статус: 200
{
"result": {
"error": 0,
"error_description": "Operation failed"
}
}
| Код | Описание | Значение |
|---|---|---|
0 |
Operation failed | Задание не найдено или передан неактуальный статус |
ACCESS_DENIED |
Access denied! Access denied. | Пользователь не является администратором |
WRONG_AUTH_TYPE |
Application context required | Метод вызван не в контексте приложения |

