> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fyndera.be/llms.txt
> Use this file to discover all available pages before exploring further.

# Endpoints

> API endpoints for accessing legislation data

<Warning>These API docs are under construction and prone to change.</Warning>

# Endpoints

The Fyndera API provides endpoints for accessing legislation and regulatory documents. All endpoints require authentication via API key.

## GET /legislation

Retrieve legislation documents based on specified criteria.

### Request

<CodeGroup>
  ```bash cURL theme={null}
  # Example 1: Specific dates (rarely used - prefer date ranges)
  curl -X GET "https://api.fyndera.be/v1/legislation?publicationDate=2024-01-01&documentTopic=Income Tax&documentTopic=VAT&documentType=Legislation&documentType=Ruling&documentSource=Fisconet&documentSource=Vlabel" \
    -H "Authorization: Bearer YOUR_API_KEY"

  # Example 2: Date range (recommended approach)
  curl -X GET "https://api.fyndera.be/v1/legislation?publicationDateFrom=2024-01-01&publicationDateTo=2024-12-31&documentTopic=Income Tax&documentType=Legislation" \
    -H "Authorization: Bearer YOUR_API_KEY"

  ```

  ```python Python theme={null}
  import requests

  url = 'https://api.fyndera.be/v1/legislation'
  headers = {
      'Authorization': 'Bearer YOUR_API_KEY'
  }

  # Specific dates (rarely used - prefer date ranges)
  params = {
      'publicationDate': ['2024-01-01', '2024-01-15'],
      'documentTopic': ['Income Tax', 'VAT'],
      'documentType': ['Legislation', 'Ruling'],
      'documentSource': ['Fisconet', 'Vlabel']
  }

  response = requests.get(url, headers=headers, params=params)
  data = response.json()

  # Date range (recommended approach)
  range_params = {
      'publicationDateFrom': '2024-01-01',
      'publicationDateTo': '2024-12-31',
      'documentTopic': ['Income Tax'],
      'documentType': ['Legislation']
  }

  range_response = requests.get(url, headers=headers, params=range_params)
  range_data = range_response.json()
  ```
</CodeGroup>

### Query Parameters

All parameters are optional and can accept multiple values by repeating the parameter name in the URL.

| Parameter             | Type       | Description                      | Example Values             |
| --------------------- | ---------- | -------------------------------- | -------------------------- |
| `publicationDate`     | `string[]` | Filter by publication date(s)    | `2024-01-01`, `2024-01-15` |
| `publicationDateFrom` | `string`   | Start date for date range filter | `2024-01-01`               |
| `publicationDateTo`   | `string`   | End date for date range filter   | `2024-12-31`               |
| `documentTopic`       | `string[]` | Filter by document topic(s)      | `Income Tax`, `VAT`        |
| `documentType`        | `string[]` | Filter by document type(s)       | `Legislation`, `Ruling`    |
| `documentSource`      | `string[]` | Filter by document source(s)     | `Fisconet`, `Vlabel`       |

### Multiple Values

To pass multiple values for the same parameter, repeat the parameter name in the URL:

```
?documentTopic=VAT&documentTopic=Income_Tax&documentTopic=Customs
```

This is equivalent to passing an array: `["VAT", "Income Tax", "Customs"]`

**Note:** Multiple `publicationDate` values are rarely used as they represent "documents published on EITHER date". For most use cases, use `publicationDateFrom` and `publicationDateTo` for date ranges instead.

### Parameter Values

#### publicationDate

Date format: `YYYY-MM-DD`

* Accepts specific dates
* Multiple dates can be provided as an array
* Use `publicationDateFrom` and `publicationDateTo` for date ranges

#### publicationDateFrom & publicationDateTo

Date format: `YYYY-MM-DD`

* `publicationDateFrom`: Start date for range filter (inclusive) - documents published on or after this date
* `publicationDateTo`: End date for range filter (inclusive) - documents published on or before this date
* Both parameters are optional - you can use just one for open-ended ranges
* Cannot be used together with `publicationDate` in the same request
* **Date range behavior**: Returns documents published within the specified date range

#### documentTopic

Available topics:

* `Customs` - Customs and import/export regulations
* `Excise Duties` - Excise duties and taxes
* `Income Tax` - General income tax regulations
* `VAT` - Value Added Tax regulations
* `Succession and Registration Rights` - Succession and registration rights
* `Other` - - Other document topics

#### documentType

Available types:

* `Administrative Guideline` - Administrative guidelines and procedures
* `Court Verdict` - Court decisions and verdicts
* `International Treaty` - International treaties and agreements
* `Legislation` - Formal laws and legislation
* `Parliamentary Question` - Parliamentary questions and answers
* `Ruling` - Administrative rulings and decisions
* `Other` - Other document types

#### documentSource

Available sources:

* `Fisconet` - Fisconet database
* `Vlabel` - Vlabel database
* `CBN` - CBN database

<Note>
  Looking for other sources? Request more sources via{" "}
  <a href="mailto:api-support@fyndera.be">[api-support@fyndera.be](mailto:api-support@fyndera.be)</a>.
</Note>

### Response

<ResponseField name="documents" type="array">
  <Expandable title="document object">
    <ResponseField name="docId" type="string">
      Unique identifier for the document
    </ResponseField>

    <ResponseField name="language" type="string">
      Document language code (e.g., "nl", "fr", "en")
    </ResponseField>

    <ResponseField name="source" type="string">
      Source organization or institution
    </ResponseField>

    <ResponseField name="sourceURL" type="string">
      URL to the original document source
    </ResponseField>

    <ResponseField name="title" type="string">
      Document title
    </ResponseField>

    <ResponseField name="summary" type="string">
      Brief summary of the document content
    </ResponseField>

    <ResponseField name="keywords" type="array">
      Array of relevant keywords
    </ResponseField>

    <ResponseField name="publicationDate" type="string">
      Date when the document was published (YYYY-MM-DD format). If an existing
      document gets updated by a source, the publication date will change and
      the new version will be published under the same <code>docId</code>.
    </ResponseField>

    <ResponseField name="contents" type="string">
      Full document content in Markdown format
    </ResponseField>

    <ResponseField name="customValues" type="object">
      <Expandable title="custom values object">
        <ResponseField name="title" type="string">
          Custom title field
        </ResponseField>

        <ResponseField name="summary" type="string">
          Custom summary field
        </ResponseField>

        <ResponseField name="keywords" type="array">
          Custom keywords array
        </ResponseField>

        <ResponseField name="documentType" type="string">
          Document type classification
        </ResponseField>

        <ResponseField name="documentTopic" type="string">
          Document topic classification
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="meta" type="object">
  <Expandable title="metadata object">
    <ResponseField name="requestId" type="string">
      Unique identifier for this request
    </ResponseField>

    <ResponseField name="timestamp" type="string">
      ISO 8601 timestamp of the response
    </ResponseField>
  </Expandable>
</ResponseField>

### Example Response

```json theme={null}
{
  "documents": [
    {
      "docId": "DOC-2024-001",
      "language": "nl",
      "source": "Fisconet",
      "sourceURL": "https://www.minfin.fgov.be/myminfin-web/pages/public/fisconet/document/df0ea27b-9054-49d0-a03e-accf6c1b2e1f",
      "title": "Voorafgaande beslissing nr. 2023.0089 d.d. 21.03.2023",
      "summary": "Winstpremie voor de werknemers - Handeling buiten de werkingssfeer van de BTW.",
      "keywords": [
        "winstpremie voor de werknemers",
        "winstpremietaks op winstdeelnemingen",
        "tarief",
        "fiscale aftrekbaarheid",
        "doorfacturatie",
        "handeling buiten de werkingssfeer",
        "btw",
        "verworpen uitgave"
      ],
      "publicationDate": "2024-01-15",
      "contents": "",
      "customValues": {
        "title": "Fiscale behandeling winstpremie werknemers binnen een groep van vennootschappen.",
        "summary": "De voorafgaande beslissing 2023.0089 van 21.03.2023 betreft de fiscale behandeling van een winstpremie voor werknemers binnen een groep van vennootschappen. De winstpremie, bedoeld voor alle werknemers in België, is onderworpen aan 7% belasting, berekend op het bedrag verminderd met 13,07% solidariteitsbijdrage, en vrijgesteld van inkomstenbelasting voor werknemers. Voor de toekennende vennootschap is de premie deels een verworpen uitgave (voor eigen werknemers) en deels fiscaal aftrekbaar (voor werknemers van andere werkgevers). Het doorfactureren van de premie aan andere werkgevers is geen dienst en valt buiten de btw-werkingssfeer. Elke werkgever is verantwoordelijk voor de inhouding van de 7% belasting en de bijbehorende formaliteiten voor de eigen werknemers.",
        "keywords": [],
        "documentType": "Ruling",
        "documentTopic": ["Income Tax"]
      }
    }
  ]
}
```

### Error Responses

See [Error Codes](/api/error-codes) for detailed error information.

### Rate Limits

By default, we process a maximum of 1.000 requests per hour. If you need
different limits, contact <a href="mailto:api-support@fyndera.be">[api-support@fyndera.be](mailto:api-support@fyndera.be)</a>.

### Bulk data delivery

If you prefer data delivery outside of the API, we can provide:

* JSONL exports containing one document per line
* Delivery to your cloud bucket (S3, GCS, or Azure Blob) or shared bucket access

Include the time window, sources, and fields you need. Contact

<a href="mailto:api-support@fyndera.be">[api-support@fyndera.be](mailto:api-support@fyndera.be)</a> to arrange bulk
delivery.
