read
finance

Start an export of one entity's books: each file the Books screens download, from the XAF auditfile to the auditor's CSV

Changed on

Answers 202 with the export job (id, status queued, status_url); the file is produced after the response. xaf-4.0 and xaf-3.2 are the Dutch auditfile of one fiscal year (fiscal_year_id, or year = the calendar year the fiscal year starts in); csv-zip is every finance table of the entity with a manifest of row counts and SHA-256 checksums, and takes no year. jaarwerk is the year-end package for an accountant's tool (layout), annual the jaarrekening PDF (document concept or the deposit concept; prepared, never filed), report one report of the Reports screen (view, file_type, and a range of periods inside the fiscal year, else the whole year), each of one fiscal year and written in locale; audit is the auditor's CSV (kind) and takes no year. jaarwerk, annual and audit are refused with feature_off until the owner switches them on, and audit needs the audit capability on the entity; an audit file above 20000 rows is refused with audit_export_too_large, never cut short. Pass an Idempotency-Key header (or idempotency_key): a retry with the same key and the same arguments answers the same job; the same key with different arguments is refused with idempotency_conflict. An export reads the books and is never sent anywhere: the file is downloadable by this app for 7 days.

post/api/v1/finance/exports

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:read

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.

format, 'xaf-4.0' | 'xaf-3.2' | 'csv-zip' | 'jaarwerk' | 'annual' | 'report' | 'audit' required

What to produce.

fiscal_year_id, string uuid

The fiscal year of a year-bound export (GET /api/v1/finance/periods lists them).

year, integer

Instead of fiscal_year_id: the calendar year the fiscal year starts in.

idempotency_key, string

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

layout, 'rgs_csv' | 'silverfin' | 'nmbrs_reporting' | 'caseware'

jaarwerk: the tool the package is laid out for (default rgs_csv).

document, 'concept' | 'deposit'

annual: the concept jaarrekening, or the concept of the deposit version (default concept).

view, 'trial' | 'pnl' | 'balance' | 'worksheet'

report: which report.

file_type, 'pdf' | 'xlsx' | 'csv'

report: the file it is written as.

from_period_id, string uuid

report: the first period of the range (default: the fiscal year's first).

to_period_id, string uuid

report: the last period of the range; needs from_period_id.

kind, 'feed' | 'trial_balance' | 'entries'

audit: the change feed, the trial balance, or every entry with its lines.

from, string date

audit (trial_balance, entries): the first day.

to, string date

audit (trial_balance, entries): the last day.

actor, 'user' | 'app' | 'worker' | 'agent' | 'system'

audit (feed): only changes by this kind of actor.

include_reads, boolean

audit (feed): include reads and exports (default true).

locale, 'en' | 'nl'

jaarwerk, annual, report: the language of the document (default en).

Response

The job an earlier request with the same idempotency key started.

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