propose_write
finance

Propose an entry, a classification, a reconciliation or a reversal for a person to decide. Posts nothing.

Changed on

Answers the proposal id. kind entry takes date, description and lines (each account_code, side debit|credit, amount as a decimal string; debits equal credits); classification takes bank_transaction_id and account_code; reconciliation takes bank_transaction_id and journal_entry_id; reversal takes journal_entry_id (a posted entry in an open period, not yet reversed) and optionally date (on or after it, in an open period): its lines are the entry's own, mirrored by the books, and rationale (10 to 500 characters) becomes the reversal's reason. Requires an Idempotency-Key header (or idempotency_key, 8 to 200 characters): a retry with the same key and the same proposal answers the first result with replayed: true; the same key over another proposal is refused with 409 idempotency_conflict. Answers proposal_id, applied: false, status: proposed, where (the Books screen and control that decide it) and approve_url. Refused with invalid_request and the reason for an unbalanced entry or an id of another entity, and with 409 finance_proposal_refused for a closed period, an entry already reversed or with a reversal waiting, or while the entity's owner has not switched app proposals on. Nothing is booked, matched or filed: a person accepts or dismisses it in Books.

post/api/v1/finance/proposals/create

Request

  • Base URL
    https://app.magistry.io
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://app.magistry.io/api/oauth/authorize
      Token URLhttps://app.magistry.io/api/oauth/token
      Scopesfinance:write

Headers

Idempotency-Key, string

Required, here or as idempotency_key in the body. A unique string you choose for this request; send the SAME key when retrying and the first answer is returned instead of writing twice (idempotent-replayed: true). The same key with other arguments is 409 idempotency_conflict. If the header and idempotency_key are both sent they must be equal.

Request body

object required
entity_id, string uuid required

The entity, one of those this app was granted (GET /api/v1/finance/entities lists them). In a GET query string entity is accepted too.

kind, 'entry' | 'classification' | 'reconciliation' | 'reversal' required

What is proposed.

rationale, string required

Why, in one or two sentences, for the person who decides (1 to 2000 characters; a reversal 10 to 500).

date, string date

entry: the entry date; its period must be open. reversal: optional, on or after the entry.

description, string

entry: the entry description.

lines, object[]

entry: two or more lines.

bank_transaction_id, string uuid

classification, reconciliation: the bank line.

account_code, string

classification: the account code.

journal_entry_id, string uuid

reconciliation: the journal entry to match. reversal: the journal entry to reverse.

idempotency_key, string required

Same as the Idempotency-Key header; give one of the two.

Response

Result

object required
ok, boolean required
result, unknown required

Changes

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    11 more changes in this revision