CompanyInvoiceDelivery
Export invoices
Produces a spreadsheet with the invoices of this company and returns the file in the response.
- Selection: the invoices named in invoice_ids, or, when that is absent, the ones matching filters. A request with neither is rejected with 400 EXPORT_SELECTION_REQUIRED.
- Format: SUMMARY writes one row per invoice with aggregated totals, ITEMS one row per invoice line. To get both, send formats: [SUMMARY, ITEMS]: a single file with one sheet per format, rather than two requests.
- Disbursements sheet: when any exported invoice has SUPLIDO lines, the workbook gets one more sheet at the end, named Suplidos, with one row per source invoice. Columns: «Número factura», «Fecha expedición», «Cliente», «NIF cliente», «Factura origen», «NIF emisor origen» and «Importe factura origen». The amount is the total_to_pay of the source invoice; for a manual disbursement with no linked invoices it is the line total. When the source invoice is not visible to you, the row carries only its number, when known, and the issuer NIF and the amount are empty. The sheet is added whatever formats you send, and it is not a format: you cannot request it or opt out of it.
- Values: the status, payment method, tax type and line type columns carry the same values the API returns (ISSUED, BANK_TRANSFER, IVA, SUPLIDO…). A proforma past its validity is exported as ACTIVE, not EXPIRED.
- Custom fields: the SUMMARY and ITEMS sheets get one extra column per custom field key carried by at least one exported invoice, after the fixed columns and ordered by key, so the position of the fixed columns never changes. The header is the label saved on the invoices; when the same key was saved under different labels (the field was renamed between invoices), the label of the most recently created of them is used. A cell is empty when its invoice does not carry that field, and every line of an invoice repeats the invoice's values in ITEMS. The Suplidos sheet has no custom field columns. With no custom fields on any exported invoice the workbook is the same as without them.
- Limit: up to 50000 invoices per export. Going over it is rejected with 422 EXPORT_LIMIT_EXCEEDED — narrow the date range or split the selection. The export is never silently truncated.
post/v1/companies/{company_id}/invoices/exports
Request
- Base URL: https://app.beel.es/api
- URL: https://app.beel.es/api/v1/companies/{company_id}/invoices/exports
- Auth: HTTP bearer
Request body
Example request
{
"formats": [
"SUMMARY",
"ITEMS"
],
"invoice_ids": [
"550e8400-e29b-41d4-a716-446655440000"
],
"filters": {
"customer_id": "550e8400-e29b-41d4-a716-446655440000",
"custom_fields": {
"store": "Gran Vía 12"
}
}
}Response
Export generated successfully
Changes
No recorded changes to this operation across all 1 revision of this API.