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

# Public pensions

GET https://clients.infonite.tech/api/executions/results/{execution_id}/public/v1/pensions

The public pensions the administration pays your customer.

One entry per pension — retirement, incapacity, widowhood — with its amounts and its dates. Field by field in [Public Pensions](/guides/data-models/public-pensions).

**An empty list is a meaningful answer**, and the commonest one: it means the administration pays this person no pension today. It is not a failure, and it is not the same as the feature not having run.

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

These are public entitlements. A private pension plan is a bank product and comes from [Pension plans](api:GET/executions/results/\{execution_id}/financial/v1/investments/pensions).

| Status | Meaning                                                                                                                        |
| :----- | :----------------------------------------------------------------------------------------------------------------------------- |
| `200`  | The pensions, possibly an empty list.                                                                                          |
| `202`  | `feature_not_ready` — `public_pensions` is still running. **Only this family waits**: the ones that already closed answer now. |
| `204`  | The execution never asked for `public_pensions`. 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/public-administration/direct-executions-v-1-results-public-pensions

## 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**Pensions paid by the state: what kind, how much, since when, and under which régime. A private pension plan is a bank product and lives in its own endpoint. **An empty list is an answer, not a gap**: the feature ran and the source reported none.

- `list of object`
  - `product` ("social_security", required)
  - `sub_family` ("social_security:spain_public_pension", required)
  - `fetch_date` (string, required) — Date this product was fetched
  - `product_name` (string, required) — Product name
  - `start_date` (date, required) — Pension start date, when applicable
  - `amounts` (object, required) — Amounts of the pension, when active
    - `base` (object, required) — Base pension 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
    - `revaluation` (object, required) — Revaluation 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` (object, required) — Total pension amount: the gross amount, before any deduction
      - `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
    - `net_amount` (object, required) — Net amount of the pension, after all deductions
      - `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
  - `product_alias` (string, optional) — Product alias
  - `regime` (string, optional) — Pension regime

### 202

**202 Accepted**`feature_not_ready`: `public_pensions` 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

### Three pensions paid to one person

**Response**

```json
[
  {
    "product": "social_security",
    "sub_family": "social_security:spain_public_pension",
    "fetch_date": "2026-09-12T01:26:47+00:00",
    "product_name": "Pensión de Jubilación",
    "start_date": "2024-08-14",
    "amounts": {
      "base": {
        "currency": "EUR",
        "amount": "2506.23"
      },
      "revaluation": {
        "currency": "EUR",
        "amount": "15.00"
      },
      "total": {
        "currency": "EUR",
        "amount": "2521.23"
      },
      "net_amount": {
        "currency": "EUR",
        "amount": "2067.41"
      }
    },
    "product_alias": "Tu pensión de jubilación"
  },
  {
    "product": "social_security",
    "sub_family": "social_security:spain_public_pension",
    "fetch_date": "2026-09-12T01:26:47+00:00",
    "product_name": "Pensión de viudedad",
    "start_date": "2025-05-07",
    "amounts": {
      "base": {
        "currency": "EUR",
        "amount": "586.56"
      },
      "revaluation": {
        "currency": "EUR",
        "amount": "16.00"
      },
      "total": {
        "currency": "EUR",
        "amount": "602.56"
      },
      "net_amount": {
        "currency": "EUR",
        "amount": "578.46"
      }
    },
    "product_alias": "Tu pensión de viudedad"
  },
  {
    "product": "social_security",
    "sub_family": "social_security:spain_public_pension",
    "fetch_date": "2026-09-12T01:26:47+00:00",
    "product_name": "Pension de Incapacidad",
    "start_date": "2021-06-07",
    "amounts": {
      "base": {
        "currency": "EUR",
        "amount": "582.00"
      },
      "revaluation": {
        "currency": "EUR",
        "amount": "21.00"
      },
      "total": {
        "currency": "EUR",
        "amount": "603.00"
      },
      "net_amount": {
        "currency": "EUR",
        "amount": "560.79"
      }
    },
    "product_alias": "Tu pension de incapacidad"
  }
]
```

**SDK Code**

```python Three pensions paid to one person
import requests

url = "https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/public/v1/pensions"

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

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

print(response.json())
```

```javascript Three pensions paid to one person
const url = 'https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/public/v1/pensions';
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 Three pensions paid to one person
package main

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

func main() {

	url := "https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/public/v1/pensions"

	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 Three pensions paid to one person
require 'uri'
require 'net/http'

url = URI("https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/public/v1/pensions")

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 Three pensions paid to one person
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/public/v1/pensions")
  .header("X-APP-SECRET", "<apiKey>")
  .asString();
```

```php Three pensions paid to one person
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Three pensions paid to one person
using RestSharp;

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

```swift Three pensions paid to one person
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://clients.infonite.tech/api/executions/results/6aa3d8b418d1c5dc9a8e3d36/public/v1/pensions")! 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/public/v1/pensions"

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/public/v1/pensions';
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/public/v1/pensions"

	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/public/v1/pensions")

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/public/v1/pensions")
  .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/public/v1/pensions', [
  '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/public/v1/pensions");
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/public/v1/pensions")! 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()
```