uninvoice (1.0)

Download OpenAPI specification:

License: Apache-2.0

Handle invoices and accounting in an easy and intuitive way

Company

Your company's configuration.

Retrieve the authenticated user's company configuration

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
{
  • "address": {
    },
  • "correctiveInvoiceReferenceFormat": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "currencyCode": "string",
  • "customPlaceholders": [
    ],
  • "email": "string",
  • "firstCorrectiveInvoiceYearlyNumber": 0,
  • "firstInvoiceYearlyNumber": 0,
  • "fiscalId": "string",
  • "footerInvoiceTypst": "string",
  • "friendlyName": "string",
  • "id": "string",
  • "invoiceReferenceFormat": "string",
  • "isSettled": true,
  • "name": "string",
  • "phone": "string",
  • "postInvoiceTypst": "string",
  • "proformaReferenceFormat": "string",
  • "type": "string",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "viesVatId": "string"
}

Update company configuration including contact info, address, and invoice settings

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
required
object (Address)

Company postal address.

correctiveInvoiceReferenceFormat
required
string

Format for the frozen reference of corrective invoices; must use {year} and {number} (e.g. R-INV-{year}-{number}).

currencyCode
string or null

ISO 4217 default currency for the company.

Array of objects (CustomPlaceholder)

Custom placeholder definitions available to the templates.

email
required
string

Primary contact email.

firstCorrectiveInvoiceYearlyNumber
required
integer <int64>

Starting sequence number for the first corrective invoice of each year.

firstInvoiceYearlyNumber
required
integer <int64>

Starting sequence number for the first invoice of each year.

footerInvoiceTypst
string or null

Typst snippet rendered in the invoice footer.

invoiceReferenceFormat
required
string

Format for the frozen reference of regular invoices; must use {year} and {number} (e.g. INV-{year}-{number}).

phone
required
string

Primary contact phone.

postInvoiceTypst
string or null

Typst snippet appended after the invoice body.

proformaReferenceFormat
required
string

Format for the frozen reference of proformas; must use {year} and {number} (e.g. PRO-{year}-{number}).

Responses

Request samples

Content type
application/json
{
  • "address": {
    },
  • "correctiveInvoiceReferenceFormat": "string",
  • "currencyCode": "string",
  • "customPlaceholders": [
    ],
  • "email": "string",
  • "firstCorrectiveInvoiceYearlyNumber": 0,
  • "firstInvoiceYearlyNumber": 0,
  • "footerInvoiceTypst": "string",
  • "invoiceReferenceFormat": "string",
  • "phone": "string",
  • "postInvoiceTypst": "string",
  • "proformaReferenceFormat": "string"
}

Response samples

Content type
application/json
{
  • "address": {
    },
  • "correctiveInvoiceReferenceFormat": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "currencyCode": "string",
  • "customPlaceholders": [
    ],
  • "email": "string",
  • "firstCorrectiveInvoiceYearlyNumber": 0,
  • "firstInvoiceYearlyNumber": 0,
  • "fiscalId": "string",
  • "footerInvoiceTypst": "string",
  • "friendlyName": "string",
  • "id": "string",
  • "invoiceReferenceFormat": "string",
  • "isSettled": true,
  • "name": "string",
  • "phone": "string",
  • "postInvoiceTypst": "string",
  • "proformaReferenceFormat": "string",
  • "type": "string",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "viesVatId": "string"
}

Complete company registration for the current user

Requires authentication and agreement to the ToS/Privacy Policy, but not company settlement.

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
required
object (Address)

Legally-complete postal address.

email
required
string

Primary contact email.

fiscal_id
required
string

Company tax identifier (NIF/VAT/etc.).

name
required
string

Company display name.

phone
required
string

Primary contact phone.

type
string or null

Company kind (country-prefixed).

Responses

Request samples

Content type
application/json
{
  • "address": {
    },
  • "email": "string",
  • "fiscal_id": "string",
  • "name": "string",
  • "phone": "string",
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "email": "string",
  • "fiscal_id": "string",
  • "id": "string",
  • "is_settled": true,
  • "name": "string",
  • "phone": "string"
}

Company Users

Members of your company.

List who may access the active company

Includes memberships whose access is currently withdrawn or lapsed: they are the company's to restore, so they stay on the list.

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Admit someone to the active company

Membership is roleless: everyone admitted gets full access. Re-admitting an address whose access was withdrawn restores that membership, keeping the date it was first granted.

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
email
required
string

Email of the user to admit to the active company.

expiresAt
string or null <date-time>

RFC 3339 timestamp when access should end; absent means never.

kind
required
string (CompanyUserKind)
Enum: "oauth" "password" "invited"

Which credential they sign in with. password creates the account and mails it a generated password; oauth writes the membership and waits for their first sign-in. invited is not accepted: it is what an oauth member looks like before that sign-in.

language
string or null

Language tag (e.g. en_US, es_ES) the account's emails are written in; defaults to the acting user's.

name
string or null

Display name for a newly created password account; defaults to the address's local part.

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "expiresAt": "2019-08-24T14:15:22Z",
  • "kind": "oauth",
  • "language": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "email": "string",
  • "expiresAt": "2019-08-24T14:15:22Z",
  • "kind": "oauth",
  • "memberSince": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "status": "active"
}

Set when a member's access ends

path Parameters
user_email
required
string

Email of the member

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
expiresAt
string or null <date-time>

RFC 3339 timestamp when access should end; null means never.

Responses

Request samples

Content type
application/json
{
  • "expiresAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "email": "string",
  • "expiresAt": "2019-08-24T14:15:22Z",
  • "kind": "oauth",
  • "memberSince": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "status": "active"
}

Withdraw a member's access to the active company

Reversible, and scoped to this company: an address that other companies also admitted keeps their books. Nothing is deleted, so the membership stays listed and can be reactivated with its original date.

path Parameters
user_email
required
string

Email of the member

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Response samples

Content type
application/json
{
  • "email": "string",
  • "expiresAt": "2019-08-24T14:15:22Z",
  • "kind": "oauth",
  • "memberSince": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "status": "active"
}

Give a withdrawn member their access back

path Parameters
user_email
required
string

Email of the member

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Response samples

Content type
application/json
{
  • "email": "string",
  • "expiresAt": "2019-08-24T14:15:22Z",
  • "kind": "oauth",
  • "memberSince": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "status": "active"
}

Replace a password member's password and mail them the new one

The current password cannot be re-sent: only its hash is stored. Rotating is what a lost credential gets, and the member may equally do it themselves through the forgot-password form.

path Parameters
user_email
required
string

Email of the member

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Entities

Clients and suppliers you invoice or are invoiced by.

Delete several entities at once

Takes an ids body (DELETE with a payload). Ids that don't resolve for this company, and entities already deleted, are skipped; the response reports how many were actually deleted.

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
ids
required
Array of strings

Document ids the action applies to.

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "affected": 0
}

List all entities for the current company

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an entity for the current company

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
required
object (ThirdPartyAddress)

Postal address; its country is mandatory.

currency_code
string or null

ISO 4217 currency code; defaults to the company currency when omitted.

fiscal_id
string or null

Tax identifier (NIF/VAT number/etc.).

name
required
string

Display name of the entity.

object (EntityTemplate)

Per-recipient Typst template overrides and custom placeholders.

type
required
string

Country the entity is incorporated in, followed by - and its legal form: ES:SL, DE:GmbH, US:Inc. The country prefix is what decides how documents to and from this entity are taxed and declared, so it is mandatory and is not derived from the postal address.

null or EntityVerifactu (object)
vies_vat_id
string or null

VIES-registered intra-EU VAT number.

Responses

Request samples

Content type
application/json
{
  • "address": {
    },
  • "currency_code": "string",
  • "fiscal_id": "string",
  • "name": "string",
  • "template": {
    },
  • "type": "string",
  • "verifactu": { },
  • "vies_vat_id": "string"
}

Response samples

Content type
application/json
{
  • "address": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "currency_code": "string",
  • "fiscal_id": "string",
  • "id": "string",
  • "metadata": "string",
  • "name": "string",
  • "template": {
    },
  • "type": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "verifactu": {
    },
  • "vies_vat_id": "string"
}

Delete an entity

The entity stops being listed and can no longer be picked for a new document; invoices and expenses already issued to it are untouched, since they carry their own snapshot of its data.

path Parameters
id
required
string

Entity ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Get an entity by id

path Parameters
id
required
string

Entity ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
{
  • "address": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "currency_code": "string",
  • "fiscal_id": "string",
  • "id": "string",
  • "metadata": "string",
  • "name": "string",
  • "template": {
    },
  • "type": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "verifactu": {
    },
  • "vies_vat_id": "string"
}

Update an existing entity

path Parameters
id
required
string

Entity ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
required
object (ThirdPartyAddress)

Postal address; its country is mandatory.

currency_code
string or null

ISO 4217 currency code; defaults to the company currency when omitted.

fiscal_id
string or null

Tax identifier (NIF/VAT number/etc.).

name
required
string

Display name of the entity.

object (EntityTemplate)

Per-recipient Typst template overrides and custom placeholders.

type
required
string

Entity type/country-prefixed kind (drives legal placement).

null or EntityVerifactu (object)
vies_vat_id
string or null

VIES-registered intra-EU VAT number.

Responses

Request samples

Content type
application/json
{
  • "address": {
    },
  • "currency_code": "string",
  • "fiscal_id": "string",
  • "name": "string",
  • "template": {
    },
  • "type": "string",
  • "verifactu": { },
  • "vies_vat_id": "string"
}

Response samples

Content type
application/json
{
  • "address": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "currency_code": "string",
  • "fiscal_id": "string",
  • "id": "string",
  • "metadata": "string",
  • "name": "string",
  • "template": {
    },
  • "type": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "verifactu": {
    },
  • "vies_vat_id": "string"
}

List the expenses received from a given supplier entity

path Parameters
id
required
string

Entity ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List the invoices emitted to a given recipient entity

path Parameters
id
required
string

Entity ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Invoices

Create, issue, correct, and download invoices.

List the company's invoices

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a draft invoice

Creates an ordinary invoice. To correct an existing invoice, use POST /v1/invoices/{id}/corrections (or the full-reversal shortcut POST /v1/invoices/{id}/correct).

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
bank_account_ids
Array of strings

Ids of the company's bank accounts to show on the invoice as payment instructions. Each is snapshotted onto the invoice at creation; unknown ids are ignored.

currency_code
string or null

ISO 4217 currency the invoice amounts are expressed in. When omitted (or empty) it falls back to the recipient entity's configured currency.

Array of objects (CustomPlaceholderValue)

Per-recipient template placeholder values for this invoice.

Array of objects (ExchangeRateEntry)

Manually-supplied exchange rates for the currency pairs the effective template uses. A pair supplied here is frozen as-is and is not fetched from the provider at issue time.

required
Array of objects (InvoiceLineRequest)

The invoice line items.

recipient_id
required
string

Recipient entity the invoice is billed to.

null or SupplyType (string)

Responses

Request samples

Content type
application/json
{
  • "bank_account_ids": [
    ],
  • "currency_code": "string",
  • "custom_placeholder_values": [
    ],
  • "exchange_rates": [
    ],
  • "lines": [
    ],
  • "recipient_id": "string",
  • "supply_type": { }
}

Response samples

Content type
application/json
{
  • "currency_code": "string",
  • "custom_placeholder_values": [
    ],
  • "id": "string",
  • "invoice_number": 0,
  • "invoice_year": 0,
  • "issued_at": "2019-08-24T14:15:22Z",
  • "lines": [
    ],
  • "order_number": 0,
  • "order_year": 0,
  • "origin": "native",
  • "recipient_id": "string",
  • "reference": "string",
  • "supply_type": "services",
  • "total": 0
}

Download several invoice PDFs as a single ZIP

Selects the ids given in ?ids=a,b,c; ids that don't resolve for this company are dropped from the archive. Drafts bundle their watermarked preview, exactly as the single-invoice download does.

query Parameters
ids
required
string

Comma-separated document ids to bundle, e.g. ids=abc,def.

header Parameters
Authorization
required
string

Bearer session token

Responses

Import an already-existing invoice

Records an invoice that was created (and, where applicable, already reported) elsewhere. It is stored issued with its original reference and date, so it counts towards reports and totals. The reference must be unique within the company.

Spain-incorporated companies: an imported invoice is never submitted to VeriFactu; it is treated as already reported at its origin.

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
bank_account_ids
Array of strings

Ids of the company's bank accounts to show on the invoice as payment instructions. Unknown ids are ignored.

currency_code
string or null

ISO 4217 currency. When omitted (or empty) it falls back to the company default, then the recipient entity's configured currency.

Array of objects (CustomPlaceholderValue)

Per-recipient template placeholder values for this invoice.

Array of objects (ExchangeRateEntry)

Frozen exchange rates for any currency pair the effective template uses.

invoice_date
required
string <date-time>

The original issue date; its year places the invoice in reports.

required
Array of objects (InvoiceLineRequest)

The invoice line items, exactly as on the original document (amounts are used verbatim; no VAT is recomputed). Include tax lines explicitly.

recipient_id
required
string

Recipient entity the invoice was billed to.

reference
required
string

The original document identifier (any format, e.g. A/2024/99). Mandatory and unique within the company.

null or SupplyType (string)

Responses

Request samples

Content type
application/json
{
  • "bank_account_ids": [
    ],
  • "currency_code": "string",
  • "custom_placeholder_values": [
    ],
  • "exchange_rates": [
    ],
  • "invoice_date": "2019-08-24T14:15:22Z",
  • "lines": [
    ],
  • "recipient_id": "string",
  • "reference": "string",
  • "supply_type": { }
}

Response samples

Content type
application/json
{
  • "currency_code": "string",
  • "custom_placeholder_values": [
    ],
  • "id": "string",
  • "invoice_number": 0,
  • "invoice_year": 0,
  • "issued_at": "2019-08-24T14:15:22Z",
  • "lines": [
    ],
  • "order_number": 0,
  • "order_year": 0,
  • "origin": "native",
  • "recipient_id": "string",
  • "reference": "string",
  • "supply_type": "services",
  • "total": 0
}

Fetch the dynamic invoice-form context for a recipient

Returns the effective custom-placeholder definitions and the exchange-rate pairs the recipient's template needs, which drive the adaptive invoice-creation form.

query Parameters
recipient_id
required
string

Recipient entity ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
{
  • "custom_placeholders": [
    ],
  • "required_exchange_rates": [
    ]
}

Fetch a single invoice by ID

path Parameters
id
required
string

Invoice ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
{
  • "corrected_invoice_id": "string",
  • "currency_code": "string",
  • "custom_placeholder_values": [
    ],
  • "id": "string",
  • "invoice_number": 0,
  • "invoice_year": 0,
  • "issued_at": "2019-08-24T14:15:22Z",
  • "lines": [
    ],
  • "order_number": 0,
  • "order_year": 0,
  • "origin": "native",
  • "recipient_id": "string",
  • "reference": "string",
  • "supply_type": "services",
  • "total": 0,
  • "verifactu": { }
}

Create a corrective invoice that fully reverses an issued invoice

Convenience wrapper over POST /v1/invoices/{id}/corrections for the most common correction: it copies every line of the source invoice with negated amounts (a complete reversal). The source invoice must be issued and not cancelled. Takes no body.

When you need a partial correction, or corrective lines that differ from the original, use POST /v1/invoices/{id}/corrections.

path Parameters
id
required
string

Invoice ID to correct

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Response samples

Content type
application/json
{
  • "corrected_invoice_id": "string",
  • "currency_code": "string",
  • "custom_placeholder_values": [
    ],
  • "id": "string",
  • "invoice_number": 0,
  • "invoice_year": 0,
  • "issued_at": "2019-08-24T14:15:22Z",
  • "lines": [
    ],
  • "order_number": 0,
  • "order_year": 0,
  • "origin": "native",
  • "recipient_id": "string",
  • "reference": "string",
  • "supply_type": "services",
  • "total": 0,
  • "verifactu": { }
}

Create a corrective invoice for an existing invoice

The new invoice corrects the invoice named in the path, which must be finalized (issued) and not cancelled. Its recipient and currency are inherited from the corrected invoice and cannot be changed. Supply type, lines, custom placeholder values and exchange rates default to the corrected invoice's but may be overridden in the body; an empty lines list copies the corrected invoice's lines with negated amounts (a full reversal).

path Parameters
id
required
string

Invoice ID being corrected

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
Array of objects (CustomPlaceholderValue)

Override the custom placeholder values. When empty, the corrected invoice's are kept.

Array of objects (ExchangeRateEntry)

Override the frozen exchange rates. When empty, the corrected invoice's are kept.

Array of objects (InvoiceLineRequest)

The corrective lines. Leave empty to copy the corrected invoice's lines with negated amounts (a full reversal).

null or SupplyType (string)
null or InvoiceVerifactu (object)

Responses

Request samples

Content type
application/json
{
  • "custom_placeholder_values": [
    ],
  • "exchange_rates": [
    ],
  • "lines": [
    ],
  • "supply_type": { },
  • "verifactu": { }
}

Response samples

Content type
application/json
{
  • "corrected_invoice_id": "string",
  • "currency_code": "string",
  • "custom_placeholder_values": [
    ],
  • "id": "string",
  • "invoice_number": 0,
  • "invoice_year": 0,
  • "issued_at": "2019-08-24T14:15:22Z",
  • "lines": [
    ],
  • "order_number": 0,
  • "order_year": 0,
  • "origin": "native",
  • "recipient_id": "string",
  • "reference": "string",
  • "supply_type": "services",
  • "total": 0,
  • "verifactu": { }
}

Issue (finalize) a draft invoice

Assigns the fiscal invoice number and freezes the document; any missing exchange rates are fetched at this point.

path Parameters
id
required
string

Invoice ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Response samples

Content type
application/json
{
  • "corrected_invoice_id": "string",
  • "currency_code": "string",
  • "custom_placeholder_values": [
    ],
  • "id": "string",
  • "invoice_number": 0,
  • "invoice_year": 0,
  • "issued_at": "2019-08-24T14:15:22Z",
  • "lines": [
    ],
  • "order_number": 0,
  • "order_year": 0,
  • "origin": "native",
  • "recipient_id": "string",
  • "reference": "string",
  • "supply_type": "services",
  • "total": 0,
  • "verifactu": { }
}

Download an invoice PDF

path Parameters
id
required
string

Invoice ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Compute tax lines for a set of invoice lines

Returns the input lines augmented with the tax lines derived from the recipient's applicable tax rules.

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
required
Array of objects (InvoiceLineRequest)

The goods/services lines to compute taxes for.

recipient_id
required
string

Recipient entity whose tax rules drive the computed tax lines.

Responses

Request samples

Content type
application/json
{
  • "lines": [
    ],
  • "recipient_id": "string"
}

Response samples

Content type
application/json
{
  • "lines": [
    ]
}

Proformas

Non-fiscal quotes; promote them into invoices.

Delete several proformas at once

Takes an ids body (DELETE with a payload). Unknown ids, and proformas that were already promoted (and so can't be deleted), are skipped; the response reports how many were actually deleted.

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
ids
required
Array of strings

Document ids the action applies to.

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "affected": 0
}

List the company's proformas

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a proforma invoice

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
bank_account_ids
Array of strings

Ids of the company's bank accounts to show on the invoice as payment instructions. Each is snapshotted onto the invoice at creation; unknown ids are ignored.

currency_code
string or null

ISO 4217 currency the invoice amounts are expressed in. When omitted (or empty) it falls back to the recipient entity's configured currency.

Array of objects (CustomPlaceholderValue)

Per-recipient template placeholder values for this invoice.

Array of objects (ExchangeRateEntry)

Manually-supplied exchange rates for the currency pairs the effective template uses. A pair supplied here is frozen as-is and is not fetched from the provider at issue time.

required
Array of objects (InvoiceLineRequest)

The invoice line items.

recipient_id
required
string

Recipient entity the invoice is billed to.

null or SupplyType (string)

Responses

Request samples

Content type
application/json
{
  • "bank_account_ids": [
    ],
  • "currency_code": "string",
  • "custom_placeholder_values": [
    ],
  • "exchange_rates": [
    ],
  • "lines": [
    ],
  • "recipient_id": "string",
  • "supply_type": { }
}

Response samples

Content type
application/json
{
  • "currency_code": "string",
  • "custom_placeholder_values": [
    ],
  • "id": "string",
  • "invoice_number": 0,
  • "invoice_year": 0,
  • "issued_at": "2019-08-24T14:15:22Z",
  • "lines": [
    ],
  • "order_number": 0,
  • "order_year": 0,
  • "origin": "native",
  • "recipient_id": "string",
  • "reference": "string",
  • "supply_type": "services",
  • "total": 0
}

Download several proforma PDFs as a single ZIP

Selects the ids given in ?ids=a,b,c; ids that don't resolve for this company are dropped from the archive.

query Parameters
ids
required
string

Comma-separated document ids to bundle, e.g. ids=abc,def.

header Parameters
Authorization
required
string

Bearer session token

Responses

Promote several proformas at once

Runs the same issue flow as the single-proforma promotion for each id. Unknown ids, and proformas that were already promoted, are skipped; the response reports how many were promoted. A real failure (e.g. the VeriFactu authorization gate) aborts the batch and is surfaced, leaving the proformas promoted so far promoted.

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
ids
required
Array of strings

Document ids the action applies to.

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "affected": 0
}

Delete a proforma

path Parameters
id
required
string

Proforma ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Fetch a single proforma by ID

path Parameters
id
required
string

Proforma ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
{
  • "currency_code": "string",
  • "custom_placeholder_values": [
    ],
  • "id": "string",
  • "invoice_number": 0,
  • "invoice_year": 0,
  • "issued_at": "2019-08-24T14:15:22Z",
  • "lines": [
    ],
  • "order_number": 0,
  • "order_year": 0,
  • "origin": "native",
  • "recipient_id": "string",
  • "reference": "string",
  • "supply_type": "services",
  • "total": 0
}

Download a proforma PDF

path Parameters
id
required
string

Proforma invoice ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Promote a proforma to a draft invoice

Converts the proforma into an ordinary draft invoice, which can then be issued.

path Parameters
id
required
string

Proforma invoice ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Response samples

Content type
application/json
{
  • "currency_code": "string",
  • "custom_placeholder_values": [
    ],
  • "id": "string",
  • "invoice_number": 0,
  • "invoice_year": 0,
  • "issued_at": "2019-08-24T14:15:22Z",
  • "lines": [
    ],
  • "order_number": 0,
  • "order_year": 0,
  • "origin": "native",
  • "recipient_id": "string",
  • "reference": "string",
  • "supply_type": "services",
  • "total": 0
}

Expenses

Bills received from suppliers, with receipts.

Delete several expenses at once

Takes an ids body (DELETE with a payload). Ids that don't resolve for this company are skipped; the response reports how many were deleted.

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
ids
required
Array of strings

Document ids the action applies to.

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "affected": 0
}

List expenses for the current company

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an expense for the current company

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
category
string or null

Free-form accounting category for the expense.

currency_code
string or null

ISO 4217 currency code of the expense.

description
string or null

Free-form description of the expense.

exchange_rate
integer or null <int64>

Frozen FX rate used to convert the expense to the company currency.

expense_date
string or null <date-time>

Date of the expense (RFC 3339).

invoice_reference
required
string

The supplier invoice's reference/number (required, non-empty, unique per company+supplier).

required
Array of objects (ExpenseLineRequest)

Line items making up the expense.

supplier_id
required
string

Supplier entity id (the counterparty the bill was received from).

Responses

Request samples

Content type
application/json
{
  • "category": "string",
  • "currency_code": "string",
  • "description": "string",
  • "exchange_rate": 0,
  • "expense_date": "2019-08-24T14:15:22Z",
  • "invoice_reference": "string",
  • "lines": [
    ],
  • "supplier_id": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "currency_code": "string",
  • "description": "string",
  • "exchange_rate": 0,
  • "expense_date": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "invoice_reference": "string",
  • "lines": [
    ],
  • "receipt": { },
  • "supplier_fiscal_id": "string",
  • "supplier_id": "string",
  • "supplier_name": "string",
  • "total": 0,
  • "updated_at": "2019-08-24T14:15:22Z"
}

Delete an expense

path Parameters
id
required
string

Expense ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Get an expense by id

path Parameters
id
required
string

Expense ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
{
  • "category": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "currency_code": "string",
  • "description": "string",
  • "exchange_rate": 0,
  • "expense_date": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "invoice_reference": "string",
  • "lines": [
    ],
  • "receipt": { },
  • "supplier_fiscal_id": "string",
  • "supplier_id": "string",
  • "supplier_name": "string",
  • "total": 0,
  • "updated_at": "2019-08-24T14:15:22Z"
}

Confirm a completed receipt upload and attach it to the expense

path Parameters
id
required
string

Expense ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
content_type
required
string

MIME content type of the uploaded receipt.

filename
required
string

Original filename of the uploaded receipt.

object_key
required
string

Storage key of the uploaded receipt object.

size
required
integer <int64>

Size of the uploaded receipt file in bytes.

Responses

Request samples

Content type
application/json
{
  • "content_type": "string",
  • "filename": "string",
  • "object_key": "string",
  • "size": 0
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "currency_code": "string",
  • "description": "string",
  • "exchange_rate": 0,
  • "expense_date": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "invoice_reference": "string",
  • "lines": [
    ],
  • "receipt": { },
  • "supplier_fiscal_id": "string",
  • "supplier_id": "string",
  • "supplier_name": "string",
  • "total": 0,
  • "updated_at": "2019-08-24T14:15:22Z"
}

Get a presigned URL to download an expense receipt

Returns a short-lived presigned URL; the browser GETs the receipt bytes directly from object storage, never through the backend.

path Parameters
id
required
string

Expense ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
{
  • "expires_at": "2019-08-24T14:15:22Z",
  • "filename": "string",
  • "url": "string"
}

Get a presigned URL to upload an expense receipt

Returns a short-lived presigned URL; the browser PUTs the receipt bytes directly to object storage, never through the backend.

path Parameters
id
required
string

Expense ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
content_type
required
string

MIME content type of the receipt to upload.

filename
required
string

Original filename of the receipt to upload.

Responses

Request samples

Content type
application/json
{
  • "content_type": "string",
  • "filename": "string"
}

Response samples

Content type
application/json
{
  • "expires_at": "2019-08-24T14:15:22Z",
  • "object_key": "string",
  • "url": "string"
}

Bank Accounts

Your company's bank accounts and balance snapshots.

Delete several bank accounts at once

Takes an ids body (DELETE with a payload). Ids that don't resolve for this company are skipped; the response reports how many were deleted.

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
ids
required
Array of strings

Document ids the action applies to.

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "affected": 0
}

List the current company's bank accounts (with balances)

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a bank account for the current company

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
bank_name
string or null

Institution name.

bic
string or null

Bank Identifier Code / SWIFT.

currency_code
string or null

ISO 4217 currency code. Defaults to EUR when omitted.

iban
string or null

International Bank Account Number.

is_main
boolean or null

Make this the company's default account. The first account is always made the default regardless of this flag.

name
required
string

User-facing label for the account.

Responses

Request samples

Content type
application/json
{
  • "bank_name": "string",
  • "bic": "string",
  • "currency_code": "string",
  • "iban": "string",
  • "is_main": true,
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "balance_as_of": "2019-08-24T14:15:22Z",
  • "bank_name": "string",
  • "bic": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "currency_code": "string",
  • "current_balance_minor": 0,
  • "iban": "string",
  • "id": "string",
  • "is_main": true,
  • "name": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Delete a bank account

path Parameters
id
required
string

Bank account ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Get a bank account with its balance-snapshot history

path Parameters
id
required
string

Bank account ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
{
  • "account": {
    },
  • "snapshots": [
    ]
}

Update a bank account

path Parameters
id
required
string

Bank account ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
bank_name
string or null

Institution name.

bic
string or null

Bank Identifier Code / SWIFT.

currency_code
required
string

ISO 4217 currency code of the account.

iban
string or null

International Bank Account Number.

name
required
string

User-facing label for the account.

Responses

Request samples

Content type
application/json
{
  • "bank_name": "string",
  • "bic": "string",
  • "currency_code": "string",
  • "iban": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "balance_as_of": "2019-08-24T14:15:22Z",
  • "bank_name": "string",
  • "bic": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "currency_code": "string",
  • "current_balance_minor": 0,
  • "iban": "string",
  • "id": "string",
  • "is_main": true,
  • "name": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Make a bank account the company's default

Clears the previous default and marks this account as the one pre-selected wherever an account is picked (e.g. invoice payment details).

path Parameters
id
required
string

Bank account ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Response samples

Content type
application/json
{
  • "balance_as_of": "2019-08-24T14:15:22Z",
  • "bank_name": "string",
  • "bic": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "currency_code": "string",
  • "current_balance_minor": 0,
  • "iban": "string",
  • "id": "string",
  • "is_main": true,
  • "name": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

List a bank account's balance snapshots (newest first)

path Parameters
id
required
string

Bank account ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Record a balance snapshot for a bank account

path Parameters
id
required
string

Bank account ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
as_of_date
string or null <date-time>

Date the balance was observed (RFC 3339). Defaults to now when omitted.

balance_minor
required
integer <int64>

The balance in the account's currency (minor units, signed).

note
string or null

Optional note (e.g. "opening balance").

Responses

Request samples

Content type
application/json
{
  • "as_of_date": "2019-08-24T14:15:22Z",
  • "balance_minor": 0,
  • "note": "string"
}

Response samples

Content type
application/json
{
  • "as_of_date": "2019-08-24T14:15:22Z",
  • "balance_minor": 0,
  • "bank_account_id": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "note": "string"
}

Delete a bank account's balance snapshot

path Parameters
id
required
string

Bank account ID

snapshot_id
required
string

Balance snapshot ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Reports

Background-generated PDF business reports.

Delete several reports for the current company

Takes an ids body (DELETE with a payload). Ids that don't resolve for this company are ignored; the response reports how many were actually deleted.

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
ids
required
Array of strings

Document ids the action applies to.

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "affected": 0
}

List reports for the current company

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Request a report for the current company

Returns one [ReportView] per requested locale (one report is generated per locale); a single-locale request yields a one-element list.

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
locales
Array of strings or null

Locale(s) to render the report in (en, es, es_ES, …). One report is generated per locale. Numbers are formatted per region, so the same language in two regions (es_ES vs es_MX) can render differently. Omitted/empty renders a single report in the requesting user's language.

period_end
required
string <date-time>

End of the reporting window (RFC 3339, exclusive).

period_start
required
string <date-time>

Start of the reporting window (RFC 3339, inclusive).

report_type
required
string (ReportType)
Enum: "business_overview" "vat_summary" "profit_loss" "client_revenue" "expense_supplier"

Which report to generate.

Responses

Request samples

Content type
application/json
{
  • "locales": [
    ],
  • "period_end": "2019-08-24T14:15:22Z",
  • "period_start": "2019-08-24T14:15:22Z",
  • "report_type": "business_overview"
}

Response samples

Content type
application/json
[
  • {
    }
]

Download several report PDFs as a single ZIP

Selects the ids given in ?ids=a,b,c; ids that aren't ready (still pending, failed, unknown, or another company's) are dropped from the archive.

query Parameters
ids
required
string

Comma-separated document ids to bundle, e.g. ids=abc,def.

header Parameters
Authorization
required
string

Bearer session token

Responses

Delete a report for the current company

path Parameters
id
required
string

Report ID

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Get a single report's status

path Parameters
id
required
string

Report ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
{
  • "completed_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "error": "string",
  • "filename": "string",
  • "id": "string",
  • "locale": "string",
  • "period_end": "2019-08-24T14:15:22Z",
  • "period_start": "2019-08-24T14:15:22Z",
  • "report_type": "string",
  • "requested_by": "string",
  • "requested_by_name": "string",
  • "status": "string"
}

Download a report PDF

path Parameters
id
required
string

Report ID

header Parameters
Authorization
required
string

Bearer session token

Responses

AI Audit

Review and approve/reject AI-requested mutations.

List captured AI actions for the company

Optionally filtered by status (pending, approved, rejected, failed).

query Parameters
status
string

Filter by status: pending, approved, rejected, failed

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Approve several pending AI-requested actions at once

Approve several pending AI-requested actions: each original request is replayed and executed. Human-only: the caller must present a valid X-Human-Proof (the API token's human_proof secret); an API-token caller without it is refused with 403.

header Parameters
Authorization
required
string

Bearer session token driving the request

X-Human-Proof
string or null

The API token's human_proof secret (returned once when the token was minted); present it to prove a human is driving this review.

Request Body schema: application/json
required
ids
required
Array of strings

Document ids the action applies to.

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "affected": 0
}

Reject several pending AI-requested actions at once

Reject several pending AI-requested actions: nothing is executed and each entry is marked rejected. Human-only: the caller must present a valid X-Human-Proof (the API token's human_proof secret); an API-token caller without it is refused with 403.

header Parameters
Authorization
required
string

Bearer session token driving the request

X-Human-Proof
string or null

The API token's human_proof secret (returned once when the token was minted); present it to prove a human is driving this review.

Request Body schema: application/json
required
ids
required
Array of strings

Document ids the action applies to.

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
{
  • "affected": 0
}

Get a single captured AI action by id

path Parameters
id
required
string

AI Audit entry ID

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
{
  • "action": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "errorMessage": "string",
  • "httpMethod": "string",
  • "httpPath": "string",
  • "id": "string",
  • "requestBody": "string",
  • "resourceId": "string",
  • "reviewedAt": "2019-08-24T14:15:22Z",
  • "reviewedBy": "string",
  • "source": "string",
  • "status": "string"
}

approve-ai-audit-entry

Approve a pending AI-requested action: the original request is replayed and executed. Human-only: the caller must present a valid X-Human-Proof (the API token's human_proof secret); an API-token caller without it is refused with 403.

path Parameters
id
required
string

AI Audit entry ID

header Parameters
Authorization
required
string

Bearer session token driving the request

X-Human-Proof
string or null

The API token's human_proof secret (returned once when the token was minted); present it to prove a human is driving this review.

Responses

Response samples

Content type
application/json
{
  • "action": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "errorMessage": "string",
  • "httpMethod": "string",
  • "httpPath": "string",
  • "id": "string",
  • "requestBody": "string",
  • "resourceId": "string",
  • "reviewedAt": "2019-08-24T14:15:22Z",
  • "reviewedBy": "string",
  • "source": "string",
  • "status": "string"
}

reject-ai-audit-entry

Reject a pending AI-requested action: nothing is executed and the entry is marked rejected. Human-only: the caller must present a valid X-Human-Proof (the API token's human_proof secret); an API-token caller without it is refused with 403.

path Parameters
id
required
string

AI Audit entry ID

header Parameters
Authorization
required
string

Bearer session token driving the request

X-Human-Proof
string or null

The API token's human_proof secret (returned once when the token was minted); present it to prove a human is driving this review.

Responses

Response samples

Content type
application/json
{
  • "action": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "errorMessage": "string",
  • "httpMethod": "string",
  • "httpPath": "string",
  • "id": "string",
  • "requestBody": "string",
  • "resourceId": "string",
  • "reviewedAt": "2019-08-24T14:15:22Z",
  • "reviewedBy": "string",
  • "source": "string",
  • "status": "string"
}

VeriFactu

Spanish AEAT authorization (Veri*Factu) status.

Return the current VeriFactu authorization status for the acting company

Always responds 200: the request authenticated and succeeded, so "no power granted yet" is a valid state, not an error. When no authorization row exists, the body carries status: "not_granted" (a first-class status alongside pending/active/revoked), never a 404 (which would read as "this endpoint does not exist") or a 403 (which would imply the caller isn't allowed here; it is).

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
{
  • "company_id": "string",
  • "fiscal_id": "string",
  • "granted_at": "2019-08-24T14:15:22Z",
  • "last_aeat_check": "2019-08-24T14:15:22Z",
  • "status": "NotGranted"
}

Confirm the AEAT power of attorney granted by the acting company

Records the company's claim that it granted the power and returns with status pending: the claim alone does not lift the issuance gate. Only the daily reconciliation against the AEAT promotes the authorization to active. Idempotent: re-confirming restarts the verification.

This endpoint does not contact the AEAT itself: the verification is a scheduled, auditable activity, so confirming here returns immediately and the status changes once the next reconciliation runs.

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Responses

Response samples

Content type
application/json
{
  • "company_id": "string",
  • "fiscal_id": "string",
  • "granted_at": "2019-08-24T14:15:22Z",
  • "last_aeat_check": "2019-08-24T14:15:22Z",
  • "status": "NotGranted"
}

User

Your user profile, and the ways you can sign in to it.

Update the signed-in user's own profile

header Parameters
Authorization
required
string

Bearer session token

X-Human-Proof
string

AI Audit gate. Present the token's human_proof secret (returned once when the token was minted) to execute this mutation immediately as a human-driven action. Without it (or with an invalid value) the request is NOT executed: it is recorded in the AI Audit backlog and returns 202 pending_approval for a human to approve.

Request Body schema: application/json
required
language
required
string

Preferred UI language; empty clears the preference.

Responses

Request samples

Content type
application/json
{
  • "language": "string"
}

Response samples

Content type
application/json
{
  • "accessibleCompanies": [
    ],
  • "company": {
    },
  • "currentDpaId": "string",
  • "currentPrivacyPolicyId": "string",
  • "currentTosId": "string",
  • "dpaAgreed": true,
  • "email": "string",
  • "id": "string",
  • "language": "string",
  • "name": "string",
  • "privacyPolicyAgreed": true,
  • "profileImageUrl": "string",
  • "tosAgreed": true
}

Dashboard

Aggregate dashboard data.

Get aggregate figures for the active company's dashboard

header Parameters
Authorization
required
string

Bearer session token

Responses

Response samples

Content type
application/json
{
  • "customer_stats": {
    },
  • "expenses_this_month": [
    ],
  • "expenses_total": [
    ],
  • "invoice_counts": {
    },
  • "monthly_revenue": [
    ],
  • "points_balance_minor": 0,
  • "points_currency": "string",
  • "primary_currency": "string",
  • "revenue_this_month": [
    ],
  • "revenue_total": [
    ],
  • "subscription_tier": "string",
  • "top_customers": [
    ]
}