Supplier invoices

View as Markdown
Invoices your customer has **received** — what they are billed for. This is the utility and supplier side of the platform: electricity, water, gas, telecoms and any billing portal an engine can read. Each invoice carries its number and dates, the issuer, the amounts and taxes, the consumption or concepts billed, and whether the original document is available. <Tip> **The document is a separate call.** Each invoice carries `attachments` — references to the files the provider issued, by `id` — and you download each one with [Download a document](api:GET/executions/results/{execution_id}/attachments/v1/{attachment_id}). An invoice with an empty `attachments` had no document to keep. </Tip> <Note title="Requires the `supplier_invoices_read` feature"> Features are chosen when the execution **starts**, not here. An execution that did not ask for `supplier_invoices_read` answers `204`, and the only way to get the data is to run another one. How far back the billing history goes is set in that feature's configuration and bounded by what the provider publishes. </Note> | Status | Meaning | | :--- | :--- | | `200` | The invoices. | | `202` | `feature_not_ready` — `supplier_invoices_read` is still running. **Only this family waits**: the ones that already closed answer now. | | `204` | The execution never asked for `supplier_invoices_read`. No body. | | `404` | No execution with that id for your application, or it has been deleted. | <Note> **Server to server only.** This call is authorised with your application secret: it belongs in your backend, never in a browser, a mobile app or anything your customer can read. </Note>

Authentication

X-APP-SECRETstring
Application Secret

Path parameters

execution_idstringRequiredformat: "object-id"
The execution, as the acceptance response returned it.

Response

**200 OK**<br>The invoices your customer **receives** — what they are billed, by whom, for which period and with what taxes. The PDF behind each one is downloaded separately. **An empty list is an answer, not a gap**: the feature ran and the source reported none.
idstringformat: "object-id"

Invoice ID for the current execution. Note: it may change between executions.

product"supplier_invoice"
sub_familyenum
fetch_datestringformat: "datetime"
Date this product was fetched
identifierstringOptional
Invoice number
contractstringOptional
Contract if any
issue_datestringOptionalformat: "datetime"
Issue date
due_datestringOptionalformat: "datetime"
Due date
tax_detailslist of objectsOptional
Tax details
total_tax_amountobjectOptional
Total tax amount
total_discount_amountobjectOptional
Total discount amount
total_amountobjectOptional
Total amount
total_net_amountobjectOptional
Total net amount
issuerobjectOptional
Issuer
receiverobjectOptional
Receiver
attachmentslist of objectsOptionalDefaults to []
List of attached supporting documents

Errors

404
Not Found Error
422
Unprocessable Entity Error