Finance accounts

Завести начальный долг контрагента документом

Changed on

Долг на счёте 60.01 (наш долг поставщику) или 62.01 (долг покупателя) на дату старта учёта. Сервер собирает корректировку сам — нога долга по контрагенту, встречная нога 80 «Капитал» и движение расчётов — и проводит её. Валютный долг пересчитывается по курсу дня остатков из курсов кабинета, исходная сумма и валюта сохраняются; нет курса — 422, один к одному долг не заводится. Срок оплаты необязателен: без него долг «без срока» и в просрочку не идёт. Отказ проведения не оставляет черновика.

post/api/v1/finance/opening-debts

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

FinanceOpeningDebtRequest required
date, string date required

Дата остатков — дата старта учёта

business_id, string uuid required
company_id, string uuid nullable
contact_id, string uuid required
account_code, '60.01' | '62.01' required

Счёт долга: 60.01 — наш долг поставщику, 62.01 — долг покупателя

direction, 'debit' | 'credit' required

Сторона ноги книги. Кредит на 62.01 — отрицательная дебиторка, не аванс

amount, string required

Сумма в валюте долга, больше нуля

currency, string

Валюта долга (ISO 4217); пусто — валюта учёта кабинета

due_date, string date

Срок оплаты; пусто — «без срока»

batch, string

Общий признак одного ввода остатков (entity_refs.opening_batch)

source, 'manual' | 'onec'

Откуда строка: введена вручную или загружена из 1С

Response

Начальный долг проведён

CoreDocument required
id, string uuid required
type_id, string uuid required
type_key, string required
type_name, string required
number, string required
date, string date required
status, 'draft' | 'posted' | 'cancelled' required
basis_type, string uuid nullable required
basis_id, string uuid nullable required
basis_number, string required
entity_refs, object required
payload, object required
comment, string required
is_marked_deleted, boolean required
created_by, integer nullable required
created_by_name, string required
created_at, string date-time required
updated_at, string date-time required
posted_at, string required
cancelled_at, string required
custom, object

Значения своих полей кабинета (графы вида core.document.<ключ вида>). Отдаёт карточка документа; списки поле не несут

Changes

    • info

      added the optional property field to the response with the status

    • info

      added the optional property field to the response with the status

    • info

      added the optional property field to the response with the status

    7 more changes in this revision