> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://infonite.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://infonite.dev/_mcp/server.

# Supplier invoices

GET https://clients.infonite.tech/api/executions/results/{execution_id}/commercial/v1/supplier-invoices

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.

**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.

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.

| 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.                                                               |

**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.

Reference: https://infonite.dev/api-reference/direct-executions/direct-executions-api/fetching-the-results/commercial-data/direct-executions-v-1-results-commercial-supplier-invoices

## Authentication

- `X-APP-SECRET` header (required) — Application Secret

## Servers

- `https://clients.infonite.tech/api` (Legacy Server, default)
- `https://clients.infonite.io/api` (Production Server)

## Request

### Path parameters

- `execution_id` (string, required) — The execution, as the acceptance response returned it.

## Response

### 200

**200 OK**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.

- `list of object`
  - `id` (string, required) — Invoice ID for the current execution. Note: it may change between executions.
  - `product` ("supplier_invoice", required)
  - `sub_family` (enum, required)
    - Allowed values: `supplier_invoice:receipt`, `supplier_invoice:standard`, `supplier_invoice:proforma`, `supplier_invoice:credit_memo`, `supplier_invoice:debit_memo`, `supplier_invoice:electronic`, `supplier_invoice:retail`, `supplier_invoice:commercial`
  - `fetch_date` (string, required) — Date this product was fetched
  - `identifier` (string, optional) — Invoice number
  - `contract` (string, optional) — Contract if any
  - `issue_date` (string, optional) — Issue date
  - `due_date` (string, optional) — Due date
  - `tax_details` (list of object, optional) — Tax details
    - `tax_type` (string, optional) — Tax type
    - `tax_rate` (object, optional) — Tax rate
      - `decimals` (integer, optional, default: 2)
    - `tax_amount` (object, optional) — Tax amount
      - `currency` (string or "***", required) — Three-letter ISO currency code — or `***` when the source did not disclose the currency.
      - `amount` (string, required) — Decimal number with 2 digits precision
  - `total_tax_amount` (object, optional) — Total tax amount
    - `currency` (string or "***", required) — Three-letter ISO currency code — or `***` when the source did not disclose the currency.
    - `amount` (string, required) — Decimal number with 2 digits precision
  - `total_discount_amount` (object, optional) — Total discount amount
    - `currency` (string or "***", required) — Three-letter ISO currency code — or `***` when the source did not disclose the currency.
    - `amount` (string, required) — Decimal number with 2 digits precision
  - `total_amount` (object, optional) — Total amount
    - `currency` (string or "***", required) — Three-letter ISO currency code — or `***` when the source did not disclose the currency.
    - `amount` (string, required) — Decimal number with 2 digits precision
  - `total_net_amount` (object, optional) — Total net amount
    - `currency` (string or "***", required) — Three-letter ISO currency code — or `***` when the source did not disclose the currency.
    - `amount` (string, required) — Decimal number with 2 digits precision
  - `issuer` (object, optional) — Issuer
    - `name` (string, optional) — Entity name
    - `tax_id` (string, optional) — Entity Tax ID
    - `address` (string, optional) — Entity address
  - `receiver` (object, optional) — Receiver
    - `name` (string, optional) — Entity name
    - `tax_id` (string, optional) — Entity Tax ID
    - `address` (string, optional) — Entity address
  - `attachments` (list of object, optional, default: []) — List of attached supporting documents
    - `sub_family` (enum, required) — What kind of document this is (e.g. `attachment:es-tgss-life-report`).
      - Allowed values: `attachment:attachment`, `attachment:supplier_invoice`, `attachment:client_invoice`, `attachment:es-tgss-life-report`, `attachment:es-tgss-contribution-base-report`, `attachment:es-aeat-model-100`, `attachment:es-cirbe-report`, `attachment:sepa-direct-debit-bill`
    - `id` (string, required) — Attachment identifier — use it to download the file through the execution's attachments endpoint.
    - `content_name` (string, required) — File name of the document.
    - `content_type` (string, required) — MIME type of the content.
    - `metadata` (map from string to any, required) — Extra facts about the document, as simple key-value pairs (e.g. its official verification code, its issue date).
    - `product` ("attachment", optional, default: attachment) — The product type identifier. Always `attachment`.
    - `content_hash` (string, optional) — Fingerprint of the content, to verify its integrity.

### 202

**202 Accepted**`feature_not_ready`: `supplier_invoices_read` is still running. **You do not have to wait for the whole execution** — every family answers as soon as its own feature closes, so a slow source does not hold up the ones that already finished.

- `detail` (string, required) — Error message

## Errors

### 404 Not Found Error

**404 Not Found**No execution with that id for your application, or it has been deleted.

- `detail` (string, required) — Error message

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of object, optional)
  - `loc` (list of string or integer, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any, optional)
  - `ctx` (object, optional)

## Examples

### One received invoice

**Response**

```json
[
  {
    "id": "6aa3d8c7f1b2a3d4e5f6071a",
    "product": "supplier_invoice",
    "sub_family": "supplier_invoice:electronic",
    "fetch_date": "2026-09-12T10:17:44+00:00",
    "identifier": "FE2026-0001842",
    "contract": "ES0021948871",
    "issue_date": "2026-08-31T00:00:00+00:00",
    "due_date": "2026-09-15T00:00:00+00:00",
    "tax_details": [
      {}
    ],
    "total_tax_amount": {
      "currency": "EUR",
      "amount": "13.61"
    },
    "total_amount": {
      "currency": "EUR",
      "amount": "78.42"
    },
    "total_net_amount": {
      "currency": "EUR",
      "amount": "64.81"
    },
    "issuer": {
      "name": "ENDESA ENERGIA SAU"
    },
    "receiver": {
      "name": "ELIGIO LUNA BARRAGÁN"
    }
  }
]
```

**SDK Code**

```python One received invoice
import requests

url = "https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices"

headers = {"X-APP-SECRET": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript One received invoice
const url = 'https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices';
const options = {method: 'GET', headers: {'X-APP-SECRET': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go One received invoice
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-APP-SECRET", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby One received invoice
require 'uri'
require 'net/http'

url = URI("https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-APP-SECRET"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java One received invoice
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices")
  .header("X-APP-SECRET", "<apiKey>")
  .asString();
```

```php One received invoice
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices', [
  'headers' => [
    'X-APP-SECRET' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp One received invoice
using RestSharp;

var client = new RestClient("https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices");
var request = new RestRequest(Method.GET);
request.AddHeader("X-APP-SECRET", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift One received invoice
import Foundation

let headers = ["X-APP-SECRET": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### This family has not finished

**Response**

```json
{
  "detail": "feature_not_ready"
}
```

**SDK Code**

```python This family has not finished
import requests

url = "https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices"

headers = {"X-APP-SECRET": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript This family has not finished
const url = 'https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices';
const options = {method: 'GET', headers: {'X-APP-SECRET': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go This family has not finished
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-APP-SECRET", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby This family has not finished
require 'uri'
require 'net/http'

url = URI("https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-APP-SECRET"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java This family has not finished
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices")
  .header("X-APP-SECRET", "<apiKey>")
  .asString();
```

```php This family has not finished
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices', [
  'headers' => [
    'X-APP-SECRET' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp This family has not finished
using RestSharp;

var client = new RestClient("https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices");
var request = new RestRequest(Method.GET);
request.AddHeader("X-APP-SECRET", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift This family has not finished
import Foundation

let headers = ["X-APP-SECRET": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/supplier-invoices")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```