Add

[POST] .../v1/docaccountmovement/add

Creates account transfer document. Use this method to create an account transfer document before it is posted with DocAccountMovement/Perform. The request requires the account movement add permission and the finance account movement tariff option; date, firm_id, account_sender_id, account_receiver_id, amount_sended and amount_received are required, description is limited to 300 characters and attached_user_id defaults to the current request user when omitted or 0. When additional fields are sent, the additional fields tariff option must be enabled and required custom fields for DocAccountMovement are validated; if overdraft is not allowed by ACCOUNTS_ALLOW_OVERDRAFT, the sender account balance must cover amount_sended for the firm and date. Business errors such as missing body, invalid IDs or amounts, denied access, disabled tariff option, unavailable additional fields, insufficient sender balance, invalid custom fields, database failures or action log failures are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
account_receiver_id Int64 Required Required receiver account ID.
account_sender_id Int64 Required Required sender account ID.
amount_received Decimal Required Required received amount. Must be greater than 0 and supports up to 3 decimal places.
amount_sended Decimal Required Required sent amount. Must be greater than 0 and supports up to 3 decimal places.
attached_user_id Int64 Optional ID of the user responsible for the transfer. If omitted or 0, the current request user is used.
date Int64 Required Required transfer document date as Unix time in seconds.
description String Optional Optional document note. Maximum length is 300 characters.
fields Array of FieldValueAdd Optional Optional custom field values. Required custom fields for account movement documents must be supplied when configured.
firm_id Int64 Required Required company ID used for the account balance check and document ownership.

Request Example

{
  "date": 1714550400,
  "firm_id": 2,
  "account_sender_id": 7,
  "account_receiver_id": 9,
  "amount_sended": 100000.000,
  "amount_received": 100000.000,
  "description": "Cash deposit to bank account"
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Insert Created record result.

Response Example

{
  "ok": true,
  "result": {
    "new_id": 31
  }
}