POST
Post imported entries (client account)
Client space Accounting module For: Accountant · Permission: entry_imports.post Conditions
  • The book is the one selected for the request: the {book} segment in the organization space, or the client account’s own books in the client space.
  • The accounting module must be included in the plan of the organization.
  • The book must be set up for accounting (it must have at least one journal).
  • The import must belong to the selected book.
  • An import already posted is refused.
  • An import with errors (rejected status or error_count above zero) is refused.
  • Each entry is checked again when posted: its date must fall in an open fiscal period, the journal and accounts must still exist, and the entry must satisfy the usual posting rules. One refused entry cancels the whole batch.
What else happens
  • Posts one journal entry per entry number of the file, in the journal named on its rows, with the batch as source and no fee applied.
  • Sets the import to posted and records the identifiers of the posted entries in posted_journal_entry_ids.
Part of Import entries from a file.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

entryImport
string
required

Identifier of the entry import.

Query Parameters

response
enum<string>
default:none

Response mode. Default none; none answers 204 No Content.

Available options:
none,
resource
fields
string

Comma-separated JSON keys of the root resource (id is always rendered). Available: id, owner_type, original_name, row_count, status, error_count, posted_journal_entry_ids, created_by, created_by_type, created_at, updated_at.

include
string

Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: rows.

Response

Resource (only with response=resource).

id

Identifier of the import, a 27-character KSUID.

owner_type

Kind of book the import belongs to (the organization's own books or a client account's books).

original_name

Name of the uploaded file as uploaded, shortened if too long.

row_count
integer

Number of data rows read from the file, header excluded.

status

Import state: staged (being created), validated (no row error, ready to post), rejected (at least one row error, cannot be posted) or posted (entries written). Set by the server.

error_count
integer

Number of rows that have at least one error.

posted_journal_entry_ids
any[] | null

Identifiers of the journal entries posted from this import, in file order. Null until the import is posted.

rows
array

Rows of the file with their raw values and errors. Returned only with ?include=rows, on the show route and when the caller holds the entry_imports.retrieve permission.

created_by

Identifier of the member or agent account that uploaded the file; null when no actor could be resolved.

created_by_type

Kind of actor in created_by (member or agent account); null when no actor could be resolved.

created_at

Date and time the record was created (ISO 8601, UTC).

updated_at

Date and time the record was last changed (ISO 8601, UTC).