Start an auditfile upload
Starts an upload of an XML Auditfile Financieel (XAF 3.2 or 4.0) for the administration and returns a presigned URL. PUT the file's bytes to upload.url (no Authorization header, valid for an hour), then call complete.
An administration has one source: when Exact Online feeds it this answers 409 source_conflict. Connecting Exact later replaces the auditfile source.
Other LedgerSuite products call this with their own client_credentials token with scope askledger:auditfile, for administrations that include them. An AskLedger admin of the administration (company group owner or admin, or AskLedger role admin) can call it signed in to AskLedger, or with an OAuth token that has ledger:write (Pro and Enterprise). API keys cannot upload.
bearerAuthorizationBearer <token>A company group API key (al_live_…, created at /dashboard/api), an OAuth access token from the same authorization flow MCP clients use, or (other LedgerSuite products, /administrations routes only) a LedgerSuite client_credentials token.
administrationId*stringLedgerSuite administration id; its linked ledger is used
application/json- body
fileName*stringName of the file, shown in the source status
1 <= length <= 500Created: upload the file to upload.url
application/json- response
auditfile*upload*curl -X POST "https://example.com/administrations/string/auditfiles" \ -H "Content-Type: application/json" \ -d '{ "fileName": "string" }'{ "auditfile": { "id": "string", "administrationId": "string", "fileName": "string", "status": "awaiting_upload", "sizeBytes": -9007199254740991, "version": "string", "fiscalYear": "string", "periodStart": "string", "periodEnd": "string", "companyName": "string", "kvkNumber": "string", "software": "string", "error": { "code": "file_missing", "message": "string" }, "issues": [ { "code": "string", "severity": "error", "message": "string", "line": -9007199254740991, "column": -9007199254740991 } ], "counts": { "property1": 0, "property2": 0 }, "createdAt": "string", "completedAt": "string", "processedAt": "string" }, "upload": { "method": "PUT", "url": "string", "expiresAt": "string" }}