Imports

Bring books in from any previous system by file.

List imports

GET /imports

Sends Vortex-Entity.

Imports, newest first, up to 100. Requires imports:write.

Answers

  • 200 object. The imports.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what

Start an import

POST /imports

Sends Vortex-Entity and Idempotency-Key.

Uploads books from any previous system as CSV: chart of accounts, customers, vendors, a trial balance, or open invoices and bills. Columns are found by their common names, and rows are matched to the entity's chart. SYNC tries the import against the ledger in a transaction it rolls back, and reports the result as tie-out checks; nothing touches the live books until the import is promoted. Items, transaction detail and Excel files answer 422 for now. Requires imports:write.

Body

FieldTypeAbout
file requiredstring
kind requiredstring

One of: chart_of_accounts, customers, vendors, items, trial_balance, open_invoices, open_bills, transactions.

cutover_datestring (date)
period_endstring (date)

For a trial balance, the date it is as of.

Answers

  • 202 Import. The import, being mapped.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what

Get an import

GET /imports/{import_id}

Sends Vortex-Entity.

Parameters

NameInTypeAbout
import_id requiredpathstring

Answers

  • 200 Import. The import, its mapping questions and tie-out.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what

Answer an import's questions

POST /imports/{import_id}/answers

Sends Vortex-Entity and Idempotency-Key.

Maps rows to an existing account, or to a new account of a type, and re-runs the checks.

Parameters

NameInTypeAbout
import_id requiredpathstring

Body

FieldTypeAbout
answers requiredlist of object

Answers

  • 200 Import. The import.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what

Accept a failed tie-out check

POST /imports/{import_id}/sign-off

Sends Vortex-Entity and Idempotency-Key.

Records a person accepting a difference. Only existing-activity and aging checks can be accepted, and a sign-off lapses if the check's figures change.

Parameters

NameInTypeAbout
import_id requiredpathstring

Body

FieldTypeAbout
check requiredstring

Answers

  • 200 Import. The import.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what

Re-run an import's checks

POST /imports/{import_id}/recheck

Sends Vortex-Entity and Idempotency-Key.

Runs the checks again against the books as they are now.

Parameters

NameInTypeAbout
import_id requiredpathstring

Answers

  • 200 Import. The import.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what

Cancel an import

POST /imports/{import_id}/cancel

Sends Vortex-Entity and Idempotency-Key.

Parameters

NameInTypeAbout
import_id requiredpathstring

Answers

  • 200 Import. The canceled import.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what

Undo a promoted trial balance

POST /imports/{import_id}/reverse

Sends Vortex-Entity and Idempotency-Key.

Posts the opposite of the opening entry on its own date, so a corrected file can be imported. The original entry and any accounts the import added stay. Rejected with 409 documents_depend_on_opening once open invoices or bills were imported against it. Requires imports:write.

Parameters

NameInTypeAbout
import_id requiredpathstring

Body

FieldTypeAbout
reason requiredstring

Up to 500 characters.

Answers

  • 200 Import. The undone import.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what

Promote an import to the live books

POST /imports/{import_id}/promote

Sends Vortex-Entity and Idempotency-Key.

Moves a tied-out import into the live books. Rejected with 422 tie_out_failed unless every tie-out check passed or was signed off. Requires imports:write.

Parameters

NameInTypeAbout
import_id requiredpathstring

Answers

  • 200 Import. The promoted import.
  • 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
  • 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what