> This page is for Direct Executions.

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

# Client invoices

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

Invoices your customer has **issued** — what they bill the people they sell to.

The mirror of the supplier invoices, for accounts that sell: each entry carries its number and dates, the recipient, the amounts and taxes, and whether the original document is available. Together, the two sides describe the trading of a business without asking it for a spreadsheet.

**The document is a separate call.** The invoice carries `attachments` — references by `id` — and the file comes from [Download a document](https://infonite.dev/direct-executions/api-reference/direct-executions-api/fetching-the-results/attachments/direct-executions-v-1-results-attachments-download), the same endpoint every other original goes through.

Features are chosen when the execution **starts**, not here. An execution that did not ask for `client_invoices_read` answers `204`, and the only way to get the data is to run another one.

| Status | Meaning                                                                                                                             |
| :----- | :---------------------------------------------------------------------------------------------------------------------------------- |
| `200`  | The invoices.                                                                                                                       |
| `202`  | `feature_not_ready` — `client_invoices_read` is still running. **Only this family waits**: the ones that already closed answer now. |
| `204`  | The execution never asked for `client_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/direct-executions/api-reference/direct-executions-api/fetching-the-results/commercial-data/direct-executions-v-1-results-commercial-client-invoices

## Authentication

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

## Servers

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

## Request

### Path parameters

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

## Response

### 200

**200 OK**The invoices your customer **issues** — who they billed, for how much and when. Read together with the supplier invoices, it is a picture of a business’s trading rather than of its bank account. **An empty list is an answer, not a gap**: the feature ran and the source reported none.

- `list of ClientInvoiceSchema`

### 202

**202 Accepted**`feature_not_ready`: `client_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. The SAME code carries the RECORDS when this family HAS finished and the execution has not: `202` means the run is still going, and the body says which of the two you are holding — `detail` when there is nothing yet, the records when there is.

- `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 ValidationError, optional)

## Types

### ClientInvoiceSchema

- `id` (string, required) — Invoice ID for the current execution. Note: it may change between executions.
- `product` ("client_invoice", required)
- `sub_family` (enum, required)
  - Allowed values: `client_invoice:receipt`, `client_invoice:standard`, `client_invoice:proforma`, `client_invoice:credit_memo`, `client_invoice:debit_memo`, `client_invoice:electronic`, `client_invoice:retail`, `client_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 TaxDetailSchema, optional) — Tax details
- `total_tax_amount` (infonite__schemas__utils__CurrencyAmountSchema__1, optional) — Total tax amount
- `total_discount_amount` (infonite__schemas__utils__CurrencyAmountSchema__1, optional) — Total discount amount
- `total_amount` (infonite__schemas__utils__CurrencyAmountSchema__1, optional) — Total amount
- `total_net_amount` (infonite__schemas__utils__CurrencyAmountSchema__1, optional) — Total net amount
- `issuer` (EntityDto, optional) — Issuer
- `receiver` (EntityDto, optional) — Receiver
- `attachments` (list of FileAttachmentSchema, optional, default: []) — List of attached supporting documents

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (ValidationErrorCtx, optional)

### TaxDetailSchema

- `tax_type` (string, optional) — Tax type
- `tax_rate` (TaxDetailSchemaTaxRate, optional) — Tax rate
- `tax_amount` (infonite__schemas__utils__CurrencyAmountSchema__1, optional) — Tax amount

### infonite__schemas__utils__CurrencyAmountSchema__1

A monetary amount together with its currency.

- `currency` (InfoniteSchemasUtilsCurrencyAmountSchema1Currency, required) — Three-letter ISO currency code — or `***` when the source did not disclose the currency.
- `amount` (string, required) — Decimal number with 2 digits precision

### EntityDto

- `name` (string, optional) — Entity name
- `tax_id` (string, optional) — Entity Tax ID
- `address` (string, optional) — Entity address

### FileAttachmentSchema

A document attached to a result — an official report, a receipt, an invoice... The entry describes the file; its bytes are downloaded with `id`, through the attachments endpoint of the API that returned the result.

- `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`, `attachment:person-certified-photo`
- `id` (string, required) — Attachment identifier — what the attachments endpoint of the API that returned the result takes to download the file.
- `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.

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

### TaxDetailSchemaTaxRate

Tax rate

- `decimals` (integer, optional, default: 2)

### InfoniteSchemasUtilsCurrencyAmountSchema1Currency

Three-letter ISO currency code — or `***` when the source did not disclose the currency.

- string
- "***"

## Examples

### One issued invoice

**Response**

```json
[
  {
    "id": "6aa3d8c7f1b2a3d4e5f6071b",
    "product": "client_invoice",
    "sub_family": "client_invoice:standard",
    "fetch_date": "2026-09-12T10:17:44+00:00",
    "identifier": "2026/114",
    "issue_date": "2026-08-28T00:00:00+00:00",
    "due_date": "2026-09-27T00:00:00+00:00",
    "tax_details": [
      {}
    ],
    "total_tax_amount": {
      "currency": "EUR",
      "amount": "210.00"
    },
    "total_amount": {
      "currency": "EUR",
      "amount": "1210.00"
    },
    "total_net_amount": {
      "currency": "EUR",
      "amount": "1000.00"
    },
    "issuer": {
      "name": "DEMO CORP SL"
    },
    "receiver": {
      "name": "CLIENTE EJEMPLO SL"
    }
  }
]
```

**SDK Code**

```python One issued invoice
import requests

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

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

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

print(response.json())
```

```javascript One issued invoice
const url = 'https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/client-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 issued invoice
package main

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

func main() {

	url := "https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/client-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 issued invoice
require 'uri'
require 'net/http'

url = URI("https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/commercial/v1/client-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 issued 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/client-invoices")
  .header("X-APP-SECRET", "<apiKey>")
  .asString();
```

```php One issued 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/client-invoices', [
  'headers' => [
    'X-APP-SECRET' => '<apiKey>',
  ],
]);

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

```csharp One issued invoice
using RestSharp;

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

```swift One issued 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/client-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/client-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/client-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/client-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/client-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/client-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/client-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/client-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/client-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()
```