Import Pre Signup Invoices
Read a pre-signup invoice list, and on commit=true write it (AP-095b).
Someone signing up in September has already issued invoices this year; until the Cassetto Fiscale delega exists (AP-101) the file they have is a CSV their commercialista or their spreadsheet exported. Without that history the cash-basis estimate, the acconto and the Redditi quadro LM are all short by a year's revenue, so this is the first thing mid-year onboarding asks for.
Two modes, one path and one response shape. commit=false (the default) parses and returns: every importable row, and every row that failed with the line and column that failed it, so the user sees what will land before anything does. commit=true parses the same way and then writes, adding the store's summary — what was imported, what it collected, and the document numbers the year already held. A preview reads nothing from the database: the parser takes bytes and returns rows, so what the user is shown is reproducible from the file alone, and the only DB statements this route can make are the store's own user-scoped writes.
Failures follow the bank import's shapes, because they are the same failures: a file whose header carries no number / date / client / amount column is a 422 quoting the parser's message (which names the columns it did find, the only form of "unsupported export" a user can act on), an oversized upload a 413, and too many lines a 422 — both bounds applied before the parser walks a byte. Individual bad rows are never a failure of the file: they come back in errors for the preview to show.
200 rather than 201: a re-uploaded file legitimately writes nothing (the UNIQUE(user_id, year, number) constraint stops a number already on file, and those come back in summary.skipped), and the body is a report about a file rather than a resource at a new URL.
Carries the import limiter rather than the shared write bucket, for the reason AP-099 parked both limits here: one call is a whole year of documents, so it is bounded per file (bytes, rows) and per minute, more tightly than a single-row mutation.
Request
- Base URL: https://api.taxcompass.it (the document declares no server; this is the origin it was published from)
- URL: https://api.taxcompass.it/api/autopilot/import
- Auth: HTTP bearer
Query parameters
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.