Create document

Create an accounting document, typically from a custom ERP integration.

classification and reconciliationStatus are assigned by the server from glEntries and reconciliation state.
Re-posting the same provenance.vendorId with identical payload returns the existing document; a conflicting payload returns 409.

Body Params

Create a new accounting document.

string
required

The Atlar general ledger entity id that this document is associated with.

string
enum
required

The type of document.

Allowed:
amount
object
required

The amount of the document.

remainingAmount
object

Unpaid or unapplied portion; required for SOURCE documents. Zero remaining excludes the document from automatic matching.
See Document.remainingAmount for full semantics.

date
required

The document date (e.g. a due date for an invoice or a transaction date for a payment).

date

The date the document was issued in the originating external system (e.g. the invoice issue date).
Not necessarily the same as when the document was created (see vendorCreated). Optional on create.

string
required
length between 1 and 255

The description of the document.

string
length between 1 and 255

Primary business reference for matching (e.g. invoice or payment number).

references
object
required

Additional keyed references for matching and search (e.g. memo, check number).

counterparty
object

Customer, vendor, or employee on the document.

boolean
required

Whether the document is voided in the accounting system.

string

Match ID when mirroring ERP state. Only valid with reconciliationStatus RECONCILED; otherwise leave unset.

string

Outgoing document ID when this ERP row was created from an Atlar reconciliation push. Writable on create; read-only on the stored document once set.

glEntries
array of objects
required
length between 1 and 1000

Ledger lines for the document. Determines classification (SOURCE vs INSTRUCTION) from whether any line posts to a BANK GL account.

glEntries*
string
required

Stable identifier of this line in the ERP; used to upsert lines on patch.

string
required

Atlar GL account ID this line posts to; must exist and belong to the document GL entity.

string
length between 32 and 64

Optional vendor bank account this entry affects. Only set for entries
posting against a bank GL account.

glClassificationIds
array of objects
length ≤ 20

GL classifications applied to this entry. At most one per classification type.

glClassificationIds
amount
object
required
string
enum
required

DEBIT or CREDIT for this line amount.

Allowed:
appliedDocuments
array of objects
length ≤ 200

Links to other documents this entry applies to or is applied by (e.g. payment applied to invoice).
Use targetDocumentExternalId when the target is not yet stored in Atlar.

appliedDocuments
provenance
object
required

Source identity in your ERP. vendorId must be stable and unique per organization for idempotent create and external-ID lookup.

date-time
required

When the document was created in the originating external system.

string

The URL to the document in the originating external system, to help navigate to the document in the originating external system.
This differs from the provenance URL, which is the endpoint URL from where it was fetched from.

currencyExchange
object

Rate from the GL entity base currency to the document instruction currency.
Required when amount.baseAmount and amount.instructedAmount use different currencies.

Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json