Operation CategoriesПрисвоить категорию операции

Присвоить категорию операции

Требует capability assign. Обязательные поля — сразу (D3). Если approvalScope категории = assign_and_edit → запись уходит в заявку (202).

curl -X POST "https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/operations/transfer/example_string/categories" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "categoryId": "example_string",
  "values": {},
  "changeNote": "example_string"
}'
{
  "id": "cmr3f41z20001psp7phmyapw3",
  "vaultId": "example_string",
  "operationType": "deposit",
  "operationId": "example_string",
  "categoryId": "example_string",
  "category": {
    "id": "example_string",
    "key": "example_string",
    "name": "John Doe"
  },
  "values": {},
  "redactedFields": [
    "example_string"
  ],
  "version": 42,
  "status": "active",
  "createdById": "example_string",
  "updatedById": "example_string",
  "createdAt": "2026-07-02T11:25:15.134Z",
  "updatedAt": "2026-07-02T11:25:15.134Z"
}
POST
/api/v1/vaults/{code}/operations/{type}/{id}/categories
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

better-auth session token. Мобилка/сервисы. Веб использует cookie.

better-auth session token. Мобилка/сервисы. Веб использует cookie.
API Key (cookie: better-auth.session_token)
path
codestring
Required

Уникальный код Vault'а (slug)

path
typestring
Required
Options: transfer, deposit
Content-Typestring
Required

The media type of the request body

Options: application/json
valuesobject

Значения полей; обязательные (required) должны быть заполнены

changeNotestring
Max length: 500
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. better-auth session token. Мобилка/сервисы. Веб использует cookie.

path
parameterstring
Required

API Key for authentication. Provide your API key in the cookie.

Path Parameters

codestring
Required

Уникальный код Vault'а (slug)

Example:
demo_vault
typestring
Required
Allowed values:transferdeposit

Body

application/json
valuesobject

Значения полей; обязательные (required) должны быть заполнены

Responses