Finance transactions

Создать банковскую операцию

Changed on

Идемпотентна по паре account и bank_txn_id. Статья ОПиУ здесь запрещена; ОПиУ формируется журналами начисления.

post/api/v1/finance/transactions

Request

  • Base URL
    https://erp.akeda.ru
  • Auth
    • HTTP bearer
    • or API key in header X-Api-Key
    • or OAuth 2
      Authorization codehttps://erp.akeda.ru/oauth2/authorize
      Token URLhttps://erp.akeda.ru/oauth2/token
      Scopesakeda:delegate
    • or HTTP bearer

Headers

X-Tenant, string required

Slug выбранного кабинета; кабинет не является юрлицом

Request body

FinanceTransactionCreate required
account, string uuid required
statement, string uuid
date, string date required
direction, 'in' | 'out' required
amount, string required
currency, string
counterparty_name, string
counterparty_inn, string
counterparty_account, string
purpose, string
bank_txn_id, string

Если пуст, сервер строит детерминированный ключ из операции

cashflow_item, string uuid
contact, string uuid
order, string uuid
project, string uuid

Response

Созданная или ранее созданная операция

FinanceTransaction required
id, string uuid required
date, string date required
direction, 'in' | 'out' required
amount, string required

Positive decimal string

currency, string required
counterparty_name, string required
counterparty_inn, string required
counterparty_account, string required
purpose, string required
bank_txn_id, string required
account, string uuid required
account_name, string required
statement, string uuid nullable required
cashflow_item, string uuid nullable required
cashflow_item_name, string nullable required
cashflow_section, string nullable required
pnl_item, string uuid nullable required
pnl_item_name, string nullable required
contact, string uuid nullable required
contact_name, string nullable required
unallocated, boolean required
unallocated_reasons, string[] required
required_dimensions, string[]

Ключи обязательных разрезов (cfo, project, department), которых не хватит проведению строки: её проводка дохода или расхода требует обязательный разрез (ERP-2841). Пусто — разрез не нужен или уже стоит

for_contact, string uuid nullable

«За кого»: контрагент из папки «Сотрудники» или «Собственники», чей расчёт гасит платёж. Пусто — как контрагент: платили самому человеку

for_contact_name, string nullable
contact_employee, string uuid nullable

Сотрудник, связанный с контрагентом. У зарплаты пустое «За кого» при нём означает самого получателя

order, string uuid nullable required
order_number, string nullable required
project, string uuid nullable required
project_name, string nullable required
responsible, string uuid nullable

Инициатор: кто завёл или согласовал платёж. В проводки не идёт; чей расчёт гасится, задаёт for_contact

responsible_name, string nullable
order_total, string nullable required
order_paid_percent, integer required
match_state, string required
reconciliation_state, string required
reconciliation_needs, string[] required
classification_explanation, string required
suggested_order, object nullable required
suggested_cashflow_item, object nullable required
suggested_pnl_item, object nullable required
created_at, string date-time required
updated_at, string date-time required

Changes

    • info

      added the optional property required_dimensions to the response with the status

    • info

      added the required property unallocated to the response with the status

    • info

      added the required property unallocated_reasons to the response with the status