# getTransparenceSanteCompanyTotals

**Identifier:** `transparencesante_getTransparenceSanteCompanyTotals`

**Provider:** [TransparenceSante](https://kirha.com/providers/transparencesante.md)

Get a company's declared links of interest in the French Transparence Santé database: totals per year and link type (benefit, agreement, remuneration), breakdown by purpose (hospitality, transport, speaker contracts, research...) and by beneficiary category. Prefer companySiren from searchTransparenceSanteCompanies; companyName is a full-text match that can include several group entities.

## Run it with the CLI

```bash
kirha tools run transparencesante_getTransparenceSanteCompanyTotals \
  --input '{}'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "transparencesante_getTransparenceSanteCompanyTotals",
  "input": {}
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "companyName": {
      "minLength": 2,
      "type": "string"
    },
    "companySiren": {
      "description": "9-digit SIREN of the declaring company",
      "pattern": "^\\d{9}$",
      "type": "string"
    },
    "year": {
      "description": "Restricts the purpose and category breakdowns; yearly totals always cover all years",
      "maximum": 2100,
      "minimum": 2012,
      "type": "integer"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "byBeneficiaryCategory": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": "number"
          },
          "category": {
            "type": "string"
          },
          "declarations": {
            "type": "number"
          }
        },
        "required": [
          "category",
          "declarations",
          "amount"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "byPurpose": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": "number"
          },
          "declarations": {
            "type": "number"
          },
          "linkType": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          }
        },
        "required": [
          "linkType",
          "purpose",
          "declarations",
          "amount"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "byYear": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": "number"
          },
          "declarations": {
            "type": "number"
          },
          "linkType": {
            "type": "string"
          },
          "year": {
            "type": "number"
          }
        },
        "required": [
          "year",
          "linkType",
          "declarations",
          "amount"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "context": {
      "type": "string"
    },
    "currency": {
      "const": "eur",
      "type": "string"
    },
    "matchedEntities": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": "number"
          },
          "companyName": {
            "type": "string"
          },
          "declarations": {
            "type": "number"
          },
          "siren": {
            "type": "string"
          }
        },
        "required": [
          "companyName",
          "declarations",
          "amount"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "sirens": {
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "matchedEntities",
    "currency",
    "byYear",
    "byPurpose",
    "byBeneficiaryCategory",
    "sirens"
  ],
  "type": "object"
}
```

## Related tools

Other TransparenceSante tools that this tool refers to, or that refer to it.

- [`searchTransparenceSanteCompanies`](https://kirha.com/providers/transparencesante/searchTransparenceSanteCompanies.md)

-----

[All TransparenceSante tools](https://kirha.com/providers/transparencesante.md) · [< Back to tools list](https://kirha.com/tools.md)