Dành cho AI agent: markdown của trang này — /docs-content-en/sign-b2e/update-legal-profile.md chỉ mục tài liệu — /llms.txt
Hiện tại, các bài viết trong tài liệu chỉ có bằng tiếng Anh.
Update a legal profile
Available starting with the sign 26.1300.0 module. On older self-hosted installations the method may be unavailable: the platform returns
422 METHOD_NOT_YET_AVAILABLEwitherror.release.
PATCH /v1/sign-b2e/legal-profiles/:userId
Writes the legal fields of an active employee or a user without a department in a single transaction. Requires permission to edit legal data; the response contains the codes of the changed fields without their values.
Scopes: sign.b2e, user.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParameteruserId |
Typestring | Requiredyes | DescriptionUser ID from the list of users. |
Request body fields
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterfields |
Typeobject | Requiredyes | DescriptionFields object. Bitrix24 validates unknown fields and value requirements. |
Examples
curl — personal key
curl -X PATCH 'https://vibecode.bitrix24.com/v1/sign-b2e/legal-profiles/7' \
-H 'X-Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"fields": {"UF_LEGAL_ADDRESS": "VIBE-PROBE Sample Street 10"}}'
curl — OAuth application
curl -X PATCH 'https://vibecode.bitrix24.com/v1/sign-b2e/legal-profiles/7' \
-H 'X-Api-Key: YOUR_APP_KEY' \
-H 'Authorization: Bearer USER_SESSION_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"fields": {"UF_LEGAL_ADDRESS": "VIBE-PROBE Sample Street 10"}}'
JavaScript — personal key
const response = await fetch('https://vibecode.bitrix24.com/v1/sign-b2e/legal-profiles/7', {
"method": "PATCH",
"headers": {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({"fields": {"UF_LEGAL_ADDRESS": "VIBE-PROBE Sample Street 10"}})
});
const result = await response.json();
if (!response.ok || !result.success) throw new Error(result.error?.message);
console.log(result.data);
JavaScript — OAuth application
const response = await fetch('https://vibecode.bitrix24.com/v1/sign-b2e/legal-profiles/7', {
"method": "PATCH",
"headers": {
"X-Api-Key": "YOUR_APP_KEY",
"Authorization": "Bearer USER_SESSION_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({"fields": {"UF_LEGAL_ADDRESS": "VIBE-PROBE Sample Street 10"}})
});
const result = await response.json();
if (!response.ok || !result.success) throw new Error(result.error?.message);
console.log(result.data);
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionWhether the request succeeded. |
Fielddata |
Typeobject | DescriptionOperation data. |
Fielddata.userId |
Typeinteger | DescriptionUser ID. |
Fielddata.updated |
Typearray | DescriptionCodes of the changed fields, or the provider update result. |
Fieldmeta.redacted |
Typearray | DescriptionPresent when credentials are hidden; contains the paths of the replaced values. |
Response example
Shape of a successful response; the data depends on the Bitrix24 account and the request.
{
"success": true,
"data": {
"userId": 7,
"updated": [
"UF_LEGAL_ADDRESS"
]
}
}
Error response example
403 — the key lacks a required scope:
{
"success": false,
"error": {
"code": "SCOPE_DENIED",
"message": "This endpoint requires 'sign.b2e' scope"
}
}
Errors
| HTTP | Code | Reason |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
ReasonInvalid request shape: types, required fields or an unknown query string parameter. |
| HTTP401 | CodeTOKEN_MISSING |
ReasonNo credentials for the Bitrix24 connection. |
| HTTP403 | CodeSCOPE_DENIED |
ReasonOne of the required scopes is not granted. |
| HTTP422 | CodeBITRIX_ERROR |
ReasonBitrix24 rejected the operation; the code is in error.b24Code, the text in error.message. |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
ReasonThe key is read-only. |
| HTTP422 | CodeMETHOD_NOT_YET_AVAILABLE |
ReasonThe method is not yet available on the Bitrix24 account; the release is in error.release. |
Known specifics
Bitrix24 checks user permissions, HR e-signature availability, business rules, page sizes and field contents. Values are passed through without local correction. Response text is JSON-encoded; credential-bearing links are hidden.
The operation is not retried automatically. If the outcome is unknown, check the state in the Bitrix24 account first; repeating the call can repeat the operation.
From 1 to 50 codes from the list of legal fields are accepted; the value format depends on the field's type and options. An address cannot contain the | character. Either all fields are written or none.