Skip to main content

Approvals

An approval holds a document until the people responsible for it have agreed. While an outgoing invoice waits for its approval it is in status review: it is not delivered, not filed with a tax authority and no invoiceCreate webhook fires. An incoming invoice in review cannot be edited, accepted or rejected.

Through the API you can request an approval when you create or import a document, read it, withdraw a pending approval you requested, request it again after a decline and list the approval templates. Approving and declining are not available through the API — people do that in the faktoora web app.

Approvals need the account's approvals feature. Without it every approval endpoint and every approval field answers 403 with extra.reason APPROVALS_NOT_ENABLED.


The API key acts as its login​

An API key belongs to a login of your account and acts as that login: its permissions, its approval workflow and its own approvals apply exactly as they do in the web app. The API has no approval rules of its own.

  • The login is the requester of every approval its key requests. Only that login can withdraw it through the API.
  • When the requester is itself an approver and the approval template or workflow band in use approves the creator automatically, its own approval is given at once (automatic: true on the approver entry), provided its approval limit covers the amount. When that completes the approval, the document is issued at once. Approvers named one by one in the request are never approved automatically.
  • If you do not want your integration to approve its own documents, use an API key of a login without the approve permission (approveOutgoingDocuments for invoices, approveIncomingInvoices for incoming invoices). Such a login cannot be an approver, so nothing is approved automatically in its name.
  • Naming approvers or a template for a document that a workflow approval band already governs needs the login's manage approvals permission (manageApproval).

Endpoints​

All approval endpoints require apiKeyAuth.

EndpointMethodDescription
/invoices/{faktooraId}/approvalGETRead the approval of an invoice.
/invoices/{faktooraId}/approvalDELETEWithdraw a pending approval the key's login requested.
/invoices/{faktooraId}/approvalPOSTRequest the approval again after a decline.
/import/incoming/{importId}/approvalGETRead the approval of an incoming invoice.
/import/incoming/{importId}/approvalDELETEWithdraw a pending approval the key's login requested.
/import/incoming/{importId}/approvalPOSTRequest the approval again after a decline.
/approval-templatesGETList the account's approval templates for invoices and incoming invoices.

An approval is requested with the optional approval block (and projectId) on:

EndpointWhere the fields go
POST /invoicesapproval and projectId on each element of invoices[]
POST /import/outgoingapproval (JSON string) and projectId as multipart/form-data fields next to file
POST /import/incomingapproval (JSON string) and projectId as multipart/form-data fields next to file
POST …/approval (request again)approval in the JSON body

The approval block​

FieldTypeDescription
approversarrayThe approvers by e-mail: [{ "email", "level", "mandatory" }]. level is an integer ≥ 1 (default 1); lower levels decide first. mandatory defaults to true.
templateIduuidAn approval template from GET /approval-templates instead of approvers.
deadlinedate (YYYY-MM-DD)Deadline of the approval. Only with approvers or templateId.

Send approvers or templateId (each with an optional deadline). Unknown fields are ignored.

deadline is an ISO date (2026-12-31), unlike the invoice payload dates, which use YYYYMMDD.

projectId (uuid) files the document under a project of your account (see Projects). The project's workflow decides which approval band applies. An unknown project is 404 with extra.reason PROJECT_NOT_FOUND.

Approvers by e-mail​

E-mails are matched case-insensitively. Each e-mail has to name exactly one unlocked user of your account who may approve the document type. Otherwise the request is 400 with extra.email, extra.field and extra.reason:

extra.reasonMeaning
APPROVER_UNKNOWNNo user of the account has this e-mail.
APPROVER_LOCKEDThe user is locked.
APPROVER_LACKS_PERMISSIONThe user may not approve this document type (extra.permission names the permission).
APPROVER_AMBIGUOUSMore than one user of the account has this e-mail.

Templates​

A template contributes its levels (user groups stay groups) and its deadline (today plus its deadlineOffsetDays, unless you send a deadline). None of its other rules — reminders, escalation, absence handling, self-exclusion — apply to an approval requested this way.


With and without a workflow​

Which approval a document gets depends on whether one of the account's workflow approval bands matches it (by amount, customer, invoice type and so on, configured in the web app). A band uses either fixed approvers or a pool of approvers. The rules are those of the web app:

Document matchesapproval sentResult
no bandnoneNo approval. The document is issued directly.
no bandapprovers or templateIdExactly these approvers are requested, with the deadline.
any bandapprovers or templateId, login without manageApproval403 BAND_DEVIATION_FORBIDDEN — even if they equal the band's approvers.
band with fixed approversnoneThe band's approval is requested.
band with fixed approversapprovers or templateId, login with manageApprovalThese approvers are requested under the band's rules.
band with a poolnone, and the requester's own automatic approval completes the bandThe band's approval is requested and completed at once; the document is issued.
band with a poolapprovers, login with manageApprovalAll named approvers become mandatory; no groups (POOL_DEVIATION_GROUPS_NOT_ALLOWED); at least as many people as the band needs (INSUFFICIENT_DISTINCT_APPROVERS).
band with a poolanything else409 INITIAL_APPROVER_REQUIRED: the first approver of a pool is picked by a person in faktoora. Issue the document there, or create it with draftOnly: true.
a band that cannot be enforced as configuredanyRefused with the band's reason (see Band reasons).
—approval without the approvals feature403 APPROVALS_NOT_ENABLED
—approval together with draftOnly: true400 APPROVAL_WITH_DRAFT_ONLY

A draftOnly: true invoice is never held: a draft is not issued, so there is nothing to approve. It gets its approval when a person issues it in the web app.

Where a refusal lands​

  • POST /invoices: the refused invoice is not created at all — nothing of it is stored, numbered, sent or filed. Its error is its element in extra.results; the other invoices of the batch are unaffected. The response status, code, message and extra mirror the first failed invoice (see Outgoing Invoices). Fix the cause and send only the failed invoice again.
  • Imports: a refusal that is already known when the file is uploaded is answered at intake (4xx, no import is created). A refusal that depends on the parsed document keeps the document as a draft; the import status reports it in keptAsDraft.
  • Request again: the plain error; nothing is changed.

A temporary failure while applying the workflow is not a refusal: that invoice fails with INTERNAL_SERVER_ERROR, is not created, and can be sent again.


Examples​

The examples show one invoice per request; the approval block goes on each element of invoices[]. Invoice fields are abbreviated as ….

No band, no approval​

No workflow band matches and no approval is sent: the invoice is issued as usual.

curl -X POST \
-H "X-API-KEY: your-api-token" \
-H "Content-Type: application/json" \
-d '{ "invoices": [ { "format": "zf:2", "schema": "CII", "invoiceNumber": "RE-2026-0101", … } ] }' \
https://api.faktoora.com/api/v1/invoices

Response (202 Accepted)

[
{
"faktooraId": "INV123456",
"detailsPage": "https://faktoora.com/invoice/details/a81bc81b-dead-4e5d-abff-90865d1e13b1"
}
]

GET /invoices/INV123456/status then reports "approval": null.

No band, explicit approvers​

{
"invoices": [
{
"format": "zf:2",
"schema": "CII",
"invoiceNumber": "RE-2026-0102",
"…": "…",
"approval": {
"approvers": [
{ "email": "erika.mustermann@example.com", "level": 1 },
{ "email": "max.mustermann@example.com", "level": 2 }
],
"deadline": "2026-12-31"
}
}
]
}

Response (202 Accepted) — the usual [{ "faktooraId", "detailsPage" }]. The invoice is in review until both levels have approved.

GET /invoices/{faktooraId}/approval:

{
"status": "pending",
"mode": "fixed",
"requiredApprovals": null,
"templateName": null,
"deadline": "2026-12-31",
"requestedAt": "2026-11-18T09:30:00.000Z",
"requestedBy": { "email": "api@example.com", "name": "API Integration" },
"approvers": [
{
"level": 1,
"email": "erika.mustermann@example.com",
"name": "Erika Mustermann",
"mandatory": true,
"group": null,
"decision": "pending",
"decidedAt": null,
"comment": null,
"automatic": false,
"actingFor": null
},
{
"level": 2,
"email": "max.mustermann@example.com",
"name": "Max Mustermann",
"mandatory": true,
"group": null,
"decision": "pending",
"decidedAt": null,
"comment": null,
"automatic": false,
"actingFor": null
}
]
}

No band, a template​

{
"approval": {
"templateId": "3f0c6b1e-7a52-4c1e-9d43-2b8f5e7a9c10"
}
}

The template's levels are requested; its groups stay groups (the approver entries carry the group name in group). Without a deadline the deadline is today plus the template's deadlineOffsetDays. A pool template cannot be used this way (400 POOL_TEMPLATE_NOT_SUPPORTED); an unknown template, one of another document type or of another account is 400 TEMPLATE_NOT_FOUND; a login without the permission to read approval templates gets 403 PERMISSION_REQUIRED.

A band with fixed approvers matches​

Send the invoice without approval. The band's approval is requested and the invoice is held in review:

{
"invoiceStatus": "review",
"jobStatus": "processing",
"authority": [],
"delivery": [],
"approval": { "status": "pending" }
}

A login with manageApproval may send approvers or a templateId instead; they then run under the band's rules.

A band matches and the login lacks manageApproval​

Sending approvers or a templateId is refused, even when they equal the band's own:

Response (403 Forbidden)

{
"code": "FORBIDDEN",
"statusCode": 403,
"message": "This document matches a workflow approval band, which decides its approvers; only a login with the permission MANAGE_APPROVAL may send approvers or a template for it; the document was not created",
"extra": {
"reason": "BAND_DEVIATION_FORBIDDEN",
"permission": "manageApproval",
"results": [
{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "…",
"extra": { "reason": "BAND_DEVIATION_FORBIDDEN", "permission": "manageApproval" }
}
}
]
}
}

Omit approval to get the band's approval, or use a key of a login with manageApproval.

A pool band matches​

The first approver of a pool of approvers is picked by a person in faktoora, not through the API. Without an approval that completes the band (see the next two examples) the invoice is refused and not created:

Response (409 Conflict)

{
"code": "CONFLICT",
"statusCode": 409,
"message": "This document matches an approval band with a pool of approvers, which needs a person to pick the first approver in faktoora; the document was not created",
"extra": {
"reason": "INITIAL_APPROVER_REQUIRED",
"results": [
{
"success": false,
"error": {
"code": "CONFLICT",
"message": "…",
"extra": {
"reason": "INITIAL_APPROVER_REQUIRED"
}
}
}
]
}
}

To go on, create the invoice with draftOnly: true and issue the draft in faktoora, where a person picks the first approver.

A pool band completed by the creator​

When the key's login is itself eligible in the pool and its own automatic approval already gives what the band needs, the approval is requested and completed at once, and the invoice is issued.

Response (202 Accepted) — the usual [{ "faktooraId", "detailsPage" }]. The status then reports:

{
"invoiceStatus": "created",
"jobStatus": "processing",
"authority": [],
"delivery": [],
"approval": { "status": "approved" }
}

The approvalUpdate webhook fires requested, then approved. If you do not want this, use a key of a login without the approve permission (see The API key acts as its login).

A pool band, approvers from a manager​

A login with manageApproval may name individual approvers. All of them become mandatory, groups are not allowed (400 POOL_DEVIATION_GROUPS_NOT_ALLOWED, for example with a template that names groups), and at least as many distinct people as the band needs are required:

Response (400 Bad Request)

{
"code": "BAD_REQUEST",
"statusCode": 400,
"message": "The approval band requires 2 distinct approvers; the document was not created",
"extra": {
"reason": "INSUFFICIENT_DISTINCT_APPROVERS",
"requiredApprovals": 2,
"distinct": 1,
"results": [ { "success": false, "error": { "code": "BAD_REQUEST", "message": "…", "extra": { "reason": "INSUFFICIENT_DISTINCT_APPROVERS", "requiredApprovals": 2, "distinct": 1 } } } ]
}
}

Unknown approver e-mail​

{
"approval": {
"approvers": [ { "email": "nobody@example.com" } ]
}
}

Response (400 Bad Request)

{
"code": "BAD_REQUEST",
"statusCode": 400,
"message": "No user of this account has the e-mail nobody@example.com",
"extra": {
"reason": "APPROVER_UNKNOWN",
"field": "approval.approvers[0].email",
"email": "nobody@example.com",
"results": [ { "success": false, "error": { "code": "BAD_REQUEST", "message": "…", "extra": { "reason": "APPROVER_UNKNOWN", "field": "approval.approvers[0].email", "email": "nobody@example.com" } } } ]
}
}

The same person twice on one level is 400 DUPLICATE_APPROVER.

Account without the approvals feature​

Response (403 Forbidden)

{
"code": "FORBIDDEN",
"statusCode": 403,
"message": "Approvals are not enabled for this account",
"extra": {
"reason": "APPROVALS_NOT_ENABLED",
"results": [ { "success": false, "error": { "code": "FORBIDDEN", "message": "Approvals are not enabled for this account", "extra": { "reason": "APPROVALS_NOT_ENABLED" } } } ]
}
}

The approval endpoints answer the same reason without results.

Other input refusals​

Statusextra.reasonCause
400APPROVERS_WITH_TEMPLATEBoth approvers and templateId sent.
400APPROVAL_INPUT_EMPTYNeither approvers nor templateId.
400APPROVAL_WITH_DRAFT_ONLYapproval together with draftOnly: true.
404PROJECT_NOT_FOUNDprojectId names no project of the account.

Band reasons​

When the matching band cannot be enforced as it is configured, the request is refused (409 on POST /invoices and on a request again) or the imported document is kept as a draft. extra.reason / keptAsDraft.reason names the cause:

ReasonMeaning
INITIAL_APPROVER_REQUIREDThe band uses a pool and its first approver is picked by a person in faktoora.
TEMPLATE_UNUSABLE, ZERO_ASSIGNEES, POOL_WITHOUT_GROUPSThe approval template of the matching band cannot be used.
NO_COVERING_ASSIGNEE, SELF_EXCLUSION_EMPTIED_LEVEL, PERMISSION_EMPTIED_LEVEL, POOL_NOT_VIABLENobody the band assigns can give the approval this document needs.
NO_GATE_ACTORNo active login of the account can own the approval.
BAND_DEVIATION_FORBIDDENImports only: approvers or a template were sent, the parsed document matches a band, and the login lacks manageApproval.
IMPORT_INPUT_REFUSEDImports only: the approval or projectId sent with the import could no longer be applied (for example an approver or the project was removed meanwhile).
GATE_ERRORImports only: the approval could not be requested.

Most of these need the approval setup to be fixed in the web app. New values may be added over time.


Read an approval​

curl -H "X-API-KEY: your-api-token" \
https://api.faktoora.com/api/v1/invoices/INV123456/approval

For an incoming invoice use GET /import/incoming/{importId}/approval.

FieldDescription
statuspending, approved or declined.
modefixed (approvers set level by level when requested) or pool (each approver picks the next one until requiredApprovals approved).
requiredApprovalsHow many approvals a pool needs; null for an approval requested without a template rule set.
templateNameThe template's name, or null.
deadlineYYYY-MM-DD or null.
requestedAtWhen the approval was requested.
requestedBy{ email, name } of the requesting login; null if it no longer exists.
approvers[]One entry per assignment, ordered by level: level, email, name, mandatory, group (the user group the approver was assigned through), decision (pending, approved, declined), decidedAt, comment, automatic (the requester's own automatic approval) and actingFor ({ email, name } of the person the approver delegates for, substitutes during an absence, or whose escalated assignment they took over; otherwise null). A person reached through two groups on the same level is listed once per group.

The approval is readable when the key's login created the document, is one of its approvers, or may read all documents of its kind. Anything else is 404, as is a document without an approval (extra.reason NO_APPROVAL) — also after a withdrawal, because a withdrawn approval no longer exists.


Withdraw an approval​

Withdraws a pending approval that the key's own login requested. The approval is deleted and the document is a draft again; it is issued again in the web app.

curl -X DELETE \
-H "X-API-KEY: your-api-token" \
https://api.faktoora.com/api/v1/invoices/INV123456/approval

Response (200 OK)

{ "invoiceStatus": "draft" }
Statusextra.reasonCause
403NOT_THE_REQUESTERAnother login requested the approval.
404NO_APPROVALThe document has no approval (or is not readable for the key's login).
409APPROVAL_NOT_PENDINGThe approval was already decided; extra.approvalStatus is approved or declined.

Request an approval again after a decline​

When an approval declined a document (invoiceStatus declined), you can request the approval again. This runs exactly like issuing the document again in the web app: the workflow band that matches the document decides again and requests the approval it demands. The declined approval is replaced — the approvalUpdate webhook reports withdrawn, then requested.

The body is optional and takes the same approval block as the create, under the same rules. Without a band, the named approvers are requested.

curl -X POST \
-H "X-API-KEY: your-api-token" \
-H "Content-Type: application/json" \
-d '{ "approval": { "approvers": [ { "email": "erika.mustermann@example.com" } ], "deadline": "2026-12-31" } }' \
https://api.faktoora.com/api/v1/invoices/INV123456/approval

Response (200 OK) — the new approval, in the shape of GET …/approval.

For an incoming invoice use POST /import/incoming/{importId}/approval.

A refusal changes nothing:

Statusextra.reasonCause
409DOCUMENT_NOT_DECLINEDThe document was not declined by its approval (extra.invoiceStatus names its status).
409NO_APPROVAL_BANDNo workflow band matches the document and no approvers were named.
409a band reasonThe band cannot be enforced.
400an input reasonThe approval block cannot be resolved or does not apply.
403BAND_DEVIATION_FORBIDDENApprovers or a template under a band from a login without manageApproval.
403PERMISSION_REQUIREDThe key's login may not issue the document (createInvoices for invoices; reviewIncomingInvoices and approveIncomingInvoices for incoming invoices).
Declined without an approval

DOCUMENT_NOT_DECLINED also covers a document that is declined without an approval — for example declined by the buyer after it was issued. Re-issue such a document in the web app.


List approval templates​

curl -H "X-API-KEY: your-api-token" \
https://api.faktoora.com/api/v1/approval-templates

Response (200 OK)

[
{
"id": "3f0c6b1e-7a52-4c1e-9d43-2b8f5e7a9c10",
"name": "Invoices over 10,000 EUR",
"documentType": "invoice",
"mode": "fixed",
"requiredApprovals": 1,
"deadlineOffsetDays": 7,
"levels": [
{
"level": 1,
"approvers": [
{ "email": "max.mustermann@example.com", "name": "Max Mustermann", "mandatory": true }
],
"groups": [
{ "name": "Finance", "mandatory": false }
]
}
],
"poolGroups": []
}
]

documentType is invoice or invoiceIncoming. A pool template lists the user groups it picks from in poolGroups. Listing needs the permission to read approval templates (403 PERMISSION_REQUIRED). Use a fixed template's id as approval.templateId.


Imports​

POST /import/outgoing and POST /import/incoming take approval and projectId as multipart/form-data fields. approval is the approval block as a JSON string:

curl -X POST \
-H "X-API-KEY: your-api-token" \
-F "file=@invoice.xml" \
-F 'approval={"approvers":[{"email":"erika.mustermann@example.com"}],"deadline":"2026-12-31"}' \
-F "projectId=7c1e2d3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f" \
https://api.faktoora.com/api/v1/import/incoming

The fields are resolved when the file is accepted (approvers by e-mail, a template to its levels) and applied when the import is finalized, once the document is parsed — under the same rules as a create.

  • Refused at intake (4xx, no import is created): APPROVAL_MALFORMED (not a JSON object of the approval shape), PROJECT_ID_INVALID, PROJECT_NOT_FOUND, the e-mail reasons, TEMPLATE_NOT_FOUND, APPROVALS_NOT_ENABLED, PERMISSION_REQUIRED (template), and BAND_DEVIATION_FORBIDDEN when every document of the type matches a band and the login lacks manageApproval.
  • Refused after parsing: the import still completes (overallStatus accepted), but the document is kept as a draft and the import status carries keptAsDraft with the reason. It is not issued, not delivered and no create webhook fires; the account's approval managers are notified and issue it in the web app.
{
"validationStatus": "accepted",
"visualizationStatus": "accepted",
"overallStatus": "accepted",
"keptAsDraft": {
"reason": "INITIAL_APPROVER_REQUIRED"
},
"approval": null
}

keptAsDraft reports how the import ended, not the document's current state. The approval block of the import status shows the document's current approval.

Incoming imports that land as a draft​

An incoming import can land as a draft — when the account imports incoming invoices as drafts, when the import is parked (an unknown recipient, a line without a tax rate), or when it was kept as a draft because the approval could not be requested. Then the approval sent with the import waits as a pre-set:

  • It is applied when a person confirms the draft in the web app, in the name of the login of the API key. That login is the requester and can read and withdraw the approval through the API.
  • An approval the confirming person chooses replaces the pre-set.
  • If the pre-set is refused at that point, the confirmation is refused; the error names extra.source IMPORT_PRESET.
  • The pre-set is applied once.

Status and polling​

Outgoing invoices​

GET /invoices/{faktooraId}/status carries an approval block — { "status": "pending" | "approved" | "declined" }, or null for a document without an approval — and reflects the approval in invoiceStatus and jobStatus:

invoiceStatusjobStatusMeaning
reviewprocessingWaiting for an approval in the web app. Not issued, not delivered. Keep polling or wait for the invoiceCreate webhook.
declineddoneThe approval was declined. The invoice will not be issued; stop polling. You can request the approval again.
draft (with keptAsDraft)doneKept as a draft because the approval its workflow demands could not be requested (for example an imported invoice under a pool band). Nothing more happens by itself; approval managers issue it in the web app, after which keptAsDraft disappears.
draftomittedA draft, for example after a withdrawal.
{
"invoiceStatus": "draft",
"jobStatus": "done",
"authority": [],
"delivery": [],
"keptAsDraft": { "reason": "INITIAL_APPROVER_REQUIRED" },
"approval": null
}

Once the approval is granted the invoice is issued, jobStatus follows the usual generation progress and invoiceCreate fires.

Incoming invoices​

GET /import/incoming/{importId}/invoice-status carries the same approval block next to invoiceStatus (review while the approval is pending). GET /import/incoming/{importId}/status and GET /import/outgoing/{faktooraId}/status report keptAsDraft and approval as shown under Imports.

Webhook​

Subscribe to approvalUpdate to be told when an approval is requested, approved, declined or withdrawn — see Webhooks.