Download OpenAPI specification:
Handle invoices and accounting in an easy and intuitive way
| Authorization required | string Bearer session token |
{- "address": {
- "city": "string",
- "country": "string",
- "lines": [
- "string"
], - "state": "string",
- "zipcode": "string"
}, - "correctiveInvoiceReferenceFormat": "string",
- "correctiveSimplifiedInvoiceReferenceFormat": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "currencyCode": "string",
- "customPlaceholders": [
- {
- "default": "string",
- "key": "string",
- "label": "string",
- "required": true
}
], - "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",
- "simplifiedInvoiceReferenceFormat": "string",
- "type": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "viesVatId": "string"
}| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
required | object (Address) Company postal address. |
| correctiveInvoiceReferenceFormat required | string Format for the frozen reference of corrective invoices; must use
|
| correctiveSimplifiedInvoiceReferenceFormat required | string Format for the frozen reference of corrective simplified invoices; must
use |
| 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 |
| 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 |
| simplifiedInvoiceReferenceFormat required | string Format for the frozen reference of simplified invoices; must use
|
{- "address": {
- "city": "string",
- "country": "string",
- "lines": [
- "string"
], - "state": "string",
- "zipcode": "string"
}, - "correctiveInvoiceReferenceFormat": "string",
- "correctiveSimplifiedInvoiceReferenceFormat": "string",
- "currencyCode": "string",
- "customPlaceholders": [
- {
- "default": "string",
- "key": "string",
- "label": "string",
- "required": true
}
], - "email": "string",
- "firstCorrectiveInvoiceYearlyNumber": 0,
- "firstInvoiceYearlyNumber": 0,
- "footerInvoiceTypst": "string",
- "invoiceReferenceFormat": "string",
- "phone": "string",
- "postInvoiceTypst": "string",
- "proformaReferenceFormat": "string",
- "simplifiedInvoiceReferenceFormat": "string"
}{- "address": {
- "city": "string",
- "country": "string",
- "lines": [
- "string"
], - "state": "string",
- "zipcode": "string"
}, - "correctiveInvoiceReferenceFormat": "string",
- "correctiveSimplifiedInvoiceReferenceFormat": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "currencyCode": "string",
- "customPlaceholders": [
- {
- "default": "string",
- "key": "string",
- "label": "string",
- "required": true
}
], - "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",
- "simplifiedInvoiceReferenceFormat": "string",
- "type": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "viesVatId": "string"
}Requires authentication and agreement to the ToS/Privacy Policy, but not company settlement.
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
required | object (Address) Legally-complete postal address. |
| email required | string Primary contact email. |
| fiscal_id required | string Company tax identifier (NIF/VAT/etc.). |
| foral_tax_regime | boolean or null Whether the company files its taxes in the Basque Country (País Vasco)
or Navarre (Navarra), whose regimes are not supported yet. Required for
a company established in Spain and refused for any other; |
| name required | string Company display name. |
| phone required | string Primary contact phone. |
| type required | string ISO code of the country the company pays its taxes in, then |
{- "address": {
- "city": "string",
- "country": "string",
- "lines": [
- "string"
], - "state": "string",
- "zipcode": "string"
}, - "email": "string",
- "fiscal_id": "string",
- "foral_tax_regime": true,
- "name": "string",
- "phone": "string",
- "type": "string"
}{- "email": "string",
- "fiscal_id": "string",
- "id": "string",
- "is_settled": true,
- "name": "string",
- "phone": "string"
}Includes memberships whose access is currently withdrawn or lapsed: they are the company's to restore, so they stay on the list.
| Authorization required | string Bearer session token |
[- {
- "email": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "kind": { },
- "memberSince": "2019-08-24T14:15:22Z",
- "name": "string",
- "status": "active"
}
]Takes an email address and nothing about how its holder signs in. No account
is created and no email is sent: the person signs in to the app (creating
their account first if they have none) and accepts the invitation there.
They are pending, with no access, until they do. Membership is roleless:
once accepted it is full access. Re-admitting an address whose access was
withdrawn restores that membership, keeping the date it was first granted.
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| email required | string Email of the person to invite to the active company. |
| expiresAt | string or null <date-time> RFC 3339 timestamp when access should end; absent means never. |
{- "email": "string",
- "expiresAt": "2019-08-24T14:15:22Z"
}{- "email": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "kind": { },
- "memberSince": "2019-08-24T14:15:22Z",
- "name": "string",
- "status": "active"
}| user_email required | string Email of the member |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| expiresAt | string or null <date-time> RFC 3339 timestamp when access should end; |
{- "expiresAt": "2019-08-24T14:15:22Z"
}{- "email": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "kind": { },
- "memberSince": "2019-08-24T14:15:22Z",
- "name": "string",
- "status": "active"
}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.
| user_email required | string Email of the member |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
{- "email": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "kind": { },
- "memberSince": "2019-08-24T14:15:22Z",
- "name": "string",
- "status": "active"
}| user_email required | string Email of the member |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
{- "email": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "kind": { },
- "memberSince": "2019-08-24T14:15:22Z",
- "name": "string",
- "status": "active"
}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.
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| ids required | Array of strings Document ids the action applies to. |
{- "ids": [
- "string"
]
}{- "affected": 0
}| Authorization required | string Bearer session token |
[- {
- "address": {
- "city": "string",
- "country": "string",
- "lines": [
- "string"
], - "state": "string",
- "zipcode": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "currency_code": "string",
- "fiscal_id": "string",
- "id": "string",
- "metadata": "string",
- "name": "string",
- "template": {
- "custom_placeholders": [
- {
- "default": "string",
- "key": "string",
- "label": "string",
- "required": true
}
], - "footer_invoice_typst": "string",
- "post_invoice_typst": "string"
}, - "type": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "verifactu": {
- "under_recargo_equivalencia": true
}, - "vies_vat_id": "string"
}
]| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
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 |
null or EntityVerifactu (object) | |
| vies_vat_id | string or null VIES-registered intra-EU VAT number. |
{- "address": {
- "city": "string",
- "country": "string",
- "lines": [
- "string"
], - "state": "string",
- "zipcode": "string"
}, - "currency_code": "string",
- "fiscal_id": "string",
- "name": "string",
- "template": {
- "custom_placeholders": [
- {
- "default": "string",
- "key": "string",
- "label": "string",
- "required": true
}
], - "footer_invoice_typst": "string",
- "post_invoice_typst": "string"
}, - "type": "string",
- "verifactu": { },
- "vies_vat_id": "string"
}{- "address": {
- "city": "string",
- "country": "string",
- "lines": [
- "string"
], - "state": "string",
- "zipcode": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "currency_code": "string",
- "fiscal_id": "string",
- "id": "string",
- "metadata": "string",
- "name": "string",
- "template": {
- "custom_placeholders": [
- {
- "default": "string",
- "key": "string",
- "label": "string",
- "required": true
}
], - "footer_invoice_typst": "string",
- "post_invoice_typst": "string"
}, - "type": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "verifactu": {
- "under_recargo_equivalencia": true
}, - "vies_vat_id": "string"
}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.
| id required | string Entity ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| id required | string Entity ID |
| Authorization required | string Bearer session token |
{- "address": {
- "city": "string",
- "country": "string",
- "lines": [
- "string"
], - "state": "string",
- "zipcode": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "currency_code": "string",
- "fiscal_id": "string",
- "id": "string",
- "metadata": "string",
- "name": "string",
- "template": {
- "custom_placeholders": [
- {
- "default": "string",
- "key": "string",
- "label": "string",
- "required": true
}
], - "footer_invoice_typst": "string",
- "post_invoice_typst": "string"
}, - "type": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "verifactu": {
- "under_recargo_equivalencia": true
}, - "vies_vat_id": "string"
}| id required | string Entity ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
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 |
null or EntityVerifactu (object) | |
| vies_vat_id | string or null VIES-registered intra-EU VAT number. Refused on a private individual. |
{- "address": {
- "city": "string",
- "country": "string",
- "lines": [
- "string"
], - "state": "string",
- "zipcode": "string"
}, - "currency_code": "string",
- "fiscal_id": "string",
- "name": "string",
- "template": {
- "custom_placeholders": [
- {
- "default": "string",
- "key": "string",
- "label": "string",
- "required": true
}
], - "footer_invoice_typst": "string",
- "post_invoice_typst": "string"
}, - "type": "string",
- "verifactu": { },
- "vies_vat_id": "string"
}{- "address": {
- "city": "string",
- "country": "string",
- "lines": [
- "string"
], - "state": "string",
- "zipcode": "string"
}, - "created_at": "2019-08-24T14:15:22Z",
- "currency_code": "string",
- "fiscal_id": "string",
- "id": "string",
- "metadata": "string",
- "name": "string",
- "template": {
- "custom_placeholders": [
- {
- "default": "string",
- "key": "string",
- "label": "string",
- "required": true
}
], - "footer_invoice_typst": "string",
- "post_invoice_typst": "string"
}, - "type": "string",
- "updated_at": "2019-08-24T14:15:22Z",
- "verifactu": {
- "under_recargo_equivalencia": true
}, - "vies_vat_id": "string"
}| id required | string Entity ID |
| Authorization required | string Bearer session token |
[- {
- "category": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency_code": "string",
- "expense_date": "2019-08-24T14:15:22Z",
- "has_receipt": true,
- "id": "string",
- "invoice_reference": "string",
- "line_count": 0,
- "supplier_id": "string",
- "supplier_name": "string",
- "total": 0
}
]| id required | string Entity ID |
| Authorization required | string Bearer session token |
[- {
- "corrected_invoice_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency_code": "string",
- "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "line_count": 0,
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "recipient_name": "string",
- "reference": "string",
- "total": 0,
- "verifactu_records": [
- {
- "action_required": { },
- "answered_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "csv": "string",
- "error_code": 0,
- "error_description": "string",
- "record_type": "alta",
- "repairable": true,
- "state": "pending"
}
]
}
]| Authorization required | string Bearer session token |
[- {
- "corrected_invoice_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency_code": "string",
- "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "line_count": 0,
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "recipient_name": "string",
- "reference": "string",
- "total": 0,
- "verifactu_records": [
- {
- "action_required": { },
- "answered_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "csv": "string",
- "error_code": 0,
- "error_description": "string",
- "record_type": "alta",
- "repairable": true,
- "state": "pending"
}
]
}
]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).
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| 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. |
| locale | string or null Language to render the document in ( |
| recipient_id required | string Recipient entity the invoice is billed to. |
null or SupplyType (string) |
{- "bank_account_ids": [
- "string"
], - "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "exchange_rates": [
- {
- "from": "string",
- "rate": "string",
- "to": "string"
}
], - "lines": [
- {
- "concept": "string",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string"
}
], - "locale": "string",
- "recipient_id": "string",
- "supply_type": { }
}{- "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "lines": [
- {
- "concept": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "invoice_id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "locale": "string",
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "reference": "string",
- "supply_type": "services",
- "total": 0
}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.
| ids required | string Comma-separated document ids to bundle, e.g. |
| Authorization required | string Bearer session token |
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.
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| 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> The original issue date, a calendar date ( |
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. |
| locale | string or null The language the original document was written in ( |
| recipient_id required | string Recipient entity the invoice was billed to. |
| reference required | string The original document identifier (any format, e.g. |
null or SupplyType (string) |
{- "bank_account_ids": [
- "string"
], - "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "exchange_rates": [
- {
- "from": "string",
- "rate": "string",
- "to": "string"
}
], - "invoice_date": "2019-08-24",
- "lines": [
- {
- "concept": "string",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string"
}
], - "locale": "string",
- "recipient_id": "string",
- "reference": "string",
- "supply_type": { }
}{- "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "lines": [
- {
- "concept": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "invoice_id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "locale": "string",
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "reference": "string",
- "supply_type": "services",
- "total": 0
}Returns the effective custom-placeholder definitions and the exchange-rate pairs the recipient's template needs, which drive the adaptive invoice-creation form.
| recipient_id required | string Recipient entity ID |
| Authorization required | string Bearer session token |
{- "custom_placeholders": [
- {
- "default": "string",
- "key": "string",
- "label": "string",
- "required": true
}
], - "required_exchange_rates": [
- {
- "from": "string",
- "to": "string"
}
]
}Deletes a draft that has not been issued. A draft has no number and no VeriFactu record, so nothing is consumed. An issued invoice cannot be deleted.
| id required | string Draft invoice ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| id required | string Invoice ID |
| Authorization required | string Bearer session token |
{- "bank_account_ids": [
- "string"
], - "corrected_invoice_id": "string",
- "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "exchange_rates": [
- {
- "from": "string",
- "rate": "string",
- "to": "string"
}
], - "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "lines": [
- {
- "concept": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "invoice_id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "locale": "string",
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "reference": "string",
- "supply_type": "services",
- "total": 0,
- "verifactu": { },
- "verifactu_records": [
- {
- "action_required": { },
- "answered_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "csv": "string",
- "error_code": 0,
- "error_description": "string",
- "record_type": "alta",
- "repairable": true,
- "state": "pending"
}
]
}Replaces the draft in full with the request body, which takes the same fields as creating an invoice. The draft is validated and its lines are resolved exactly as at creation, and the issuer and recipient details, language, exchange rates and bank accounts are captured again as they are now. A draft can be edited until it is issued; an issued invoice cannot be edited and is changed by a corrective invoice instead. A corrective draft keeps the recipient, currency and language of the invoice it corrects.
| id required | string Draft invoice ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| 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. |
| locale | string or null Language to render the document in ( |
| recipient_id required | string Recipient entity the invoice is billed to. |
null or SupplyType (string) |
{- "bank_account_ids": [
- "string"
], - "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "exchange_rates": [
- {
- "from": "string",
- "rate": "string",
- "to": "string"
}
], - "lines": [
- {
- "concept": "string",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string"
}
], - "locale": "string",
- "recipient_id": "string",
- "supply_type": { }
}{- "bank_account_ids": [
- "string"
], - "corrected_invoice_id": "string",
- "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "exchange_rates": [
- {
- "from": "string",
- "rate": "string",
- "to": "string"
}
], - "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "lines": [
- {
- "concept": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "invoice_id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "locale": "string",
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "reference": "string",
- "supply_type": "services",
- "total": 0,
- "verifactu": { },
- "verifactu_records": [
- {
- "action_required": { },
- "answered_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "csv": "string",
- "error_code": 0,
- "error_description": "string",
- "record_type": "alta",
- "repairable": true,
- "state": "pending"
}
]
}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.
| id required | string Invoice ID to correct |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
{- "corrected_invoice_id": "string",
- "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "lines": [
- {
- "concept": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "invoice_id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "locale": "string",
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "reference": "string",
- "supply_type": "services",
- "total": 0,
- "verifactu": { }
}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).
| id required | string Invoice ID being corrected |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
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) |
{- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "exchange_rates": [
- {
- "from": "string",
- "rate": "string",
- "to": "string"
}
], - "lines": [
- {
- "concept": "string",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string"
}
], - "supply_type": { },
- "verifactu": { }
}{- "corrected_invoice_id": "string",
- "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "lines": [
- {
- "concept": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "invoice_id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "locale": "string",
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "reference": "string",
- "supply_type": "services",
- "total": 0,
- "verifactu": { }
}Assigns the fiscal invoice number and freezes the document; any missing exchange rates are fetched at this point.
| id required | string Invoice ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
{- "bank_account_ids": [
- "string"
], - "corrected_invoice_id": "string",
- "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "exchange_rates": [
- {
- "from": "string",
- "rate": "string",
- "to": "string"
}
], - "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "lines": [
- {
- "concept": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "invoice_id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "locale": "string",
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "reference": "string",
- "supply_type": "services",
- "total": 0,
- "verifactu": { },
- "verifactu_records": [
- {
- "action_required": { },
- "answered_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "csv": "string",
- "error_code": 0,
- "error_description": "string",
- "record_type": "alta",
- "repairable": true,
- "state": "pending"
}
]
}When the AEAT rejected the invoice's last VeriFactu record, or accepted its
registration with errors, this appends the record that answer prescribes and
sends it: a rejected registration or cancellation is resent with
RechazoPrevio, a registration accepted with errors is corrected with a
subsanación. The new record is generated from the issued invoice, which does
not change, and the earlier record stays in the chain as it was.
This is a technical resend of the record, not a tax correction of the
invoice. Use it once the cause the AEAT reported is fixed; a record carrying
repairable: true is the one it resends. Answers 409 when there is
nothing to resend: the last record was accepted, is still on its way, or is
unresolved (uninvoice.app settles those).
| id required | string Invoice ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
{- "bank_account_ids": [
- "string"
], - "corrected_invoice_id": "string",
- "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "exchange_rates": [
- {
- "from": "string",
- "rate": "string",
- "to": "string"
}
], - "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "lines": [
- {
- "concept": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "invoice_id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "locale": "string",
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "reference": "string",
- "supply_type": "services",
- "total": 0,
- "verifactu": { },
- "verifactu_records": [
- {
- "action_required": { },
- "answered_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "csv": "string",
- "error_code": 0,
- "error_description": "string",
- "record_type": "alta",
- "repairable": true,
- "state": "pending"
}
]
}Returns the lines as they would be stored: each goods or services line
with its rate and VAT, and one vat line per rate, and the total the
document would be stored with. On a new invoice, lines that state no rate
take the default for the operation; on an import they carry no VAT. Filling
in a Spanish autónomo's invoice to a Spanish business also adds the IRPF
withholding (see mode).
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
required | Array of objects (InvoiceLineRequest) The lines as they would be sent to create the invoice. |
| locale | string or null The language the invoice would be created in ( |
| mode | string (TaxPrefillMode) Enum: "autofill" "resolve"
|
| origin | string (InvoiceOrigin) Enum: "native" "imported" How the lines would be stored. |
| recipient_id required | string Recipient entity whose tax rules decide the default rate. |
null or SupplyType (string) |
{- "lines": [
- {
- "concept": "string",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string"
}
], - "locale": "string",
- "mode": "autofill",
- "origin": "native",
- "recipient_id": "string",
- "supply_type": { }
}{- "lines": [
- {
- "concept": "string",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string"
}
], - "total": 0
}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.
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| ids required | Array of strings Document ids the action applies to. |
{- "ids": [
- "string"
]
}{- "affected": 0
}| Authorization required | string Bearer session token |
[- {
- "corrected_invoice_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency_code": "string",
- "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "line_count": 0,
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "recipient_name": "string",
- "reference": "string",
- "total": 0,
- "verifactu_records": [
- {
- "action_required": { },
- "answered_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "csv": "string",
- "error_code": 0,
- "error_description": "string",
- "record_type": "alta",
- "repairable": true,
- "state": "pending"
}
]
}
]| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| 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. |
| locale | string or null Language to render the document in ( |
| recipient_id required | string Recipient entity the invoice is billed to. |
null or SupplyType (string) |
{- "bank_account_ids": [
- "string"
], - "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "exchange_rates": [
- {
- "from": "string",
- "rate": "string",
- "to": "string"
}
], - "lines": [
- {
- "concept": "string",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string"
}
], - "locale": "string",
- "recipient_id": "string",
- "supply_type": { }
}{- "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "lines": [
- {
- "concept": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "invoice_id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "locale": "string",
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "reference": "string",
- "supply_type": "services",
- "total": 0
}Selects the ids given in ?ids=a,b,c; ids that don't resolve for this
company are dropped from the archive.
| ids required | string Comma-separated document ids to bundle, e.g. |
| Authorization required | string Bearer session token |
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.
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| ids required | Array of strings Document ids the action applies to. |
{- "ids": [
- "string"
]
}{- "affected": 0
}| id required | string Proforma ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| id required | string Proforma ID |
| Authorization required | string Bearer session token |
{- "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "lines": [
- {
- "concept": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "invoice_id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "locale": "string",
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "reference": "string",
- "supply_type": "services",
- "total": 0
}Converts the proforma into an ordinary draft invoice, which can then be issued.
| id required | string Proforma invoice ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
{- "currency_code": "string",
- "custom_placeholder_values": [
- {
- "key": "string",
- "value": "string"
}
], - "id": "string",
- "invoice_number": 0,
- "invoice_year": 0,
- "issued_at": "2019-08-24T14:15:22Z",
- "lines": [
- {
- "concept": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deleted_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "invoice_id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_rate": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "locale": "string",
- "order_number": 0,
- "order_year": 0,
- "origin": "native",
- "recipient_id": "string",
- "reference": "string",
- "supply_type": "services",
- "total": 0
}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.
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| ids required | Array of strings Document ids the action applies to. |
{- "ids": [
- "string"
]
}{- "affected": 0
}| Authorization required | string Bearer session token |
[- {
- "category": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency_code": "string",
- "expense_date": "2019-08-24T14:15:22Z",
- "has_receipt": true,
- "id": "string",
- "invoice_reference": "string",
- "line_count": 0,
- "supplier_id": "string",
- "supplier_name": "string",
- "total": 0
}
]| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| 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). |
{- "category": "string",
- "currency_code": "string",
- "description": "string",
- "exchange_rate": 0,
- "expense_date": "2019-08-24T14:15:22Z",
- "invoice_reference": "string",
- "lines": [
- {
- "concept": "string",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deductible": true,
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string"
}
], - "supplier_id": "string"
}{- "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": [
- {
- "concept": "string",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deductible": true,
- "expense_id": "string",
- "id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string"
}
], - "receipt": { },
- "supplier_fiscal_id": "string",
- "supplier_id": "string",
- "supplier_name": "string",
- "total": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}| id required | string Expense ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| id required | string Expense ID |
| Authorization required | string Bearer session token |
{- "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": [
- {
- "concept": "string",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deductible": true,
- "expense_id": "string",
- "id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string"
}
], - "receipt": { },
- "supplier_fiscal_id": "string",
- "supplier_id": "string",
- "supplier_name": "string",
- "total": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}The stored object is checked, not the client's description of it: its size must be within the limit and its content a PDF, PNG, JPEG or WebP file matching its declared type. The checked bytes are then copied to the receipt the expense keeps, which no upload URL can overwrite.
| id required | string Expense ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| filename required | string Original filename of the uploaded receipt. |
| object_key required | string Storage key of the uploaded receipt object. |
{- "filename": "string",
- "object_key": "string"
}{- "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": [
- {
- "concept": "string",
- "date_end": "2019-08-24T14:15:22Z",
- "date_start": "2019-08-24T14:15:22Z",
- "deductible": true,
- "expense_id": "string",
- "id": "string",
- "quantity": 0,
- "quantity_unit": "string",
- "subtotal": 0,
- "tax_amount": 0,
- "tax_type": { },
- "unit_price": 0,
- "unit_unit": "string"
}
], - "receipt": { },
- "supplier_fiscal_id": "string",
- "supplier_id": "string",
- "supplier_name": "string",
- "total": 0,
- "updated_at": "2019-08-24T14:15:22Z"
}Returns a short-lived presigned URL; the browser GETs the receipt bytes directly from object storage, never through the backend.
| id required | string Expense ID |
| Authorization required | string Bearer session token |
{- "expires_at": "2019-08-24T14:15:22Z",
- "filename": "string",
- "url": "string"
}Returns a short-lived presigned URL; the browser PUTs the receipt bytes directly to object storage, never through the backend. The URL accepts only the declared type and size, and writes a staging object that becomes the receipt only once confirmed.
| id required | string Expense ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| content_type required | string MIME type of the receipt to upload: |
| size required | integer <int64> Size of the receipt to upload in bytes, at most 20 MiB. The upload must be exactly this long. |
{- "content_type": "string",
- "size": 0
}{- "expires_at": "2019-08-24T14:15:22Z",
- "object_key": "string",
- "url": "string"
}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.
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| ids required | Array of strings Document ids the action applies to. |
{- "ids": [
- "string"
]
}{- "affected": 0
}| Authorization required | string Bearer session token |
[- {
- "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",
- "intermediary_bic": "string",
- "is_main": true,
- "name": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}
]| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| 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. |
| intermediary_bic | string or null BIC/SWIFT of the correspondent/intermediary bank some cross-border wires
must be routed through — a separate bank from the account's own, not an
alternative to |
| 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. |
{- "bank_name": "string",
- "bic": "string",
- "currency_code": "string",
- "iban": "string",
- "intermediary_bic": "string",
- "is_main": true,
- "name": "string"
}{- "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",
- "intermediary_bic": "string",
- "is_main": true,
- "name": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}| id required | string Bank account ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| id required | string Bank account ID |
| Authorization required | string Bearer session token |
{- "account": {
- "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",
- "intermediary_bic": "string",
- "is_main": true,
- "name": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "snapshots": [
- {
- "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"
}
]
}| id required | string Bank account ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| 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. |
| intermediary_bic | string or null BIC/SWIFT of the correspondent/intermediary bank some cross-border wires
must be routed through — a separate bank from the account's own, not an
alternative to |
| name required | string User-facing label for the account. |
{- "bank_name": "string",
- "bic": "string",
- "currency_code": "string",
- "iban": "string",
- "intermediary_bic": "string",
- "name": "string"
}{- "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",
- "intermediary_bic": "string",
- "is_main": true,
- "name": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}Clears the previous default and marks this account as the one pre-selected wherever an account is picked (e.g. invoice payment details).
| id required | string Bank account ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
{- "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",
- "intermediary_bic": "string",
- "is_main": true,
- "name": "string",
- "updated_at": "2019-08-24T14:15:22Z"
}| id required | string Bank account ID |
| Authorization required | string Bearer session token |
[- {
- "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"
}
]| id required | string Bank account ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| 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"). |
{- "as_of_date": "2019-08-24T14:15:22Z",
- "balance_minor": 0,
- "note": "string"
}{- "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"
}| id required | string Bank account ID |
| snapshot_id required | string Balance snapshot ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
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.
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| ids required | Array of strings Document ids the action applies to. |
{- "ids": [
- "string"
]
}{- "affected": 0
}| Authorization required | string Bearer session token |
[- {
- "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",
- "projection_months": 0,
- "report_type": "string",
- "requested_by": "string",
- "requested_by_name": "string",
- "status": "string"
}
]Returns one [ReportView] per requested locale (one report is generated per
locale); a single-locale request yields a one-element list.
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| locales | Array of strings or null Locale(s) to render the report in ( |
| 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). |
| projection_months | integer or null <int32> >= 0 For |
| report_type required | string (ReportType) Enum: "business_overview" "vat_summary" "profit_loss" "client_revenue" "expense_supplier" "cash_flow_projection" Which report to generate. |
{- "locales": [
- "string"
], - "period_end": "2019-08-24T14:15:22Z",
- "period_start": "2019-08-24T14:15:22Z",
- "projection_months": 0,
- "report_type": "business_overview"
}[- {
- "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",
- "projection_months": 0,
- "report_type": "string",
- "requested_by": "string",
- "requested_by_name": "string",
- "status": "string"
}
]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.
| ids required | string Comma-separated document ids to bundle, e.g. |
| Authorization required | string Bearer session token |
| id required | string Report ID |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| id required | string Report ID |
| Authorization required | string Bearer session token |
{- "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",
- "projection_months": 0,
- "report_type": "string",
- "requested_by": "string",
- "requested_by_name": "string",
- "status": "string"
}Optionally filtered by status.
| status | string (AuditStatus) Enum: "pending" "executing" "approved" "rejected" "failed" Filter by status |
| Authorization required | string Bearer session token |
[- {
- "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": "pending"
}
]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.
| Authorization required | string Bearer session token driving the request |
| X-Human-Proof | string or null The API token's |
| ids required | Array of strings Document ids the action applies to. |
{- "ids": [
- "string"
]
}{- "affected": 0
}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.
| Authorization required | string Bearer session token driving the request |
| X-Human-Proof | string or null The API token's |
| ids required | Array of strings Document ids the action applies to. |
{- "ids": [
- "string"
]
}{- "affected": 0
}| id required | string AI Audit entry ID |
| Authorization required | string Bearer session token |
{- "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": "pending"
}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.
| id required | string AI Audit entry ID |
| Authorization required | string Bearer session token driving the request |
| X-Human-Proof | string or null The API token's |
{- "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": "pending"
}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.
| id required | string AI Audit entry ID |
| Authorization required | string Bearer session token driving the request |
| X-Human-Proof | string or null The API token's |
{- "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": "pending"
}While transmission is interrupted, and until every record the interruption
affected has been answered, notice is true and the app shows a notice
with pendingRecords (Order HAC/1177/2024 art. 16.4). Records sent after
an interruption are flagged to the AEAT as affected by it. A company
outside VeriFactu, or one with nothing pending, answers normal.
| Authorization required | string Bearer session token |
{- "interruptedSince": "2019-08-24T14:15:22Z",
- "notice": true,
- "pendingRecords": 0,
- "state": "normal"
}The profile belongs to the account, not to a company, so this requires a
signed-in session: an API token is refused with 403.
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
| language required | string Preferred UI language; empty clears the preference. |
{- "language": "string"
}{- "accessibleCompanies": [
- {
- "fiscalId": "string",
- "id": "string",
- "isSettled": true,
- "name": "string"
}
], - "company": {
- "address": { },
- "email": "string",
- "fiscalId": "string",
- "id": "string",
- "isSettled": true,
- "name": "string",
- "phone": "string",
- "type": "string",
- "verifactuAuthorizationPending": true
}, - "currentDpaId": "string",
- "currentPrivacyPolicyId": "string",
- "currentTosId": "string",
- "dpaAgreed": true,
- "email": "string",
- "id": "string",
- "language": "string",
- "name": "string",
- "pendingInvitations": [
- {
- "companyId": "string",
- "fiscalId": "string",
- "invitedAt": "2019-08-24T14:15:22Z",
- "name": "string"
}
], - "privacyPolicyAgreed": true,
- "profileImageUrl": "string",
- "tosAgreed": true
}| Authorization required | string Bearer session token |
{- "customer_stats": {
- "new_this_month": 0,
- "total": 0
}, - "expenses_this_month": [
- {
- "amount_minor": 0,
- "currency": "string"
}
], - "expenses_total": [
- {
- "amount_minor": 0,
- "currency": "string"
}
], - "invoice_counts": {
- "corrective": 0,
- "draft": 0,
- "issued": 0,
- "proforma": 0
}, - "monthly_revenue": [
- {
- "amount_minor": 0,
- "month": "string"
}
], - "points_balance_minor": 0,
- "points_currency": "string",
- "primary_currency": "string",
- "revenue_this_month": [
- {
- "amount_minor": 0,
- "currency": "string"
}
], - "revenue_total": [
- {
- "amount_minor": 0,
- "currency": "string"
}
], - "subscription_tier": "string",
- "top_customers": [
- {
- "amount_minor": 0,
- "invoice_count": 0,
- "name": "string"
}
]
}Turns the invitation into a membership with full access to the company.
Switch the session into it afterwards with PUT /v1/sessions/current/company.
Requires a signed-in session: an API token is refused with 403.
| company_id required | string Company that sent the invitation |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |
Removes the invitation. The company may send another. Requires a signed-in
session: an API token is refused with 403.
| company_id required | string Company that sent the invitation |
| Authorization required | string Bearer session token |
| X-Human-Proof | string AI Audit gate. Present the token's |