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

# Dictionaries

> How coded report fields work, how to list and cache dictionaries, and how the tables on this site are generated.

Coded fields on a report — legal form, operation state, industry, rating, currency, country, relationship type, litigation type, position, and similar — are objects with a stable `code` and a `name`:

```json theme={null}
{ "code": "TH", "name": "Thailand" }
```

Always persist the `code`. Display the `name` you received, or look the current name up from the dictionary if you prefer your own cache. Do not invent display names, and do not key your logic off the English (or Thai) label alone; labels can be clarified later, codes stay stable.

## Listing dictionaries

`GET /v1/dictionaries` returns the catalogue: identifier, title, description, whether it is populated, and the entry count. `GET /v1/dictionaries/{name}` returns the entries.

```bash cURL theme={null}
curl -s -H "Authorization: Bearer $TOKEN"   -H "Accept: application/json"   https://partners-sandbox.inra.co.th/v1/dictionaries

curl -s -H "Authorization: Bearer $TOKEN"   -H "Accept: application/json"   https://partners-sandbox.inra.co.th/v1/dictionaries/legal_form
```

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

headers = {
    "Authorization": f"Bearer {os.environ['TOKEN']}",
    "Accept": "application/json",
}
catalogue = requests.get(
    "https://partners-sandbox.inra.co.th/v1/dictionaries",
    headers=headers,
    timeout=30,
)
catalogue.raise_for_status()
legal_form = requests.get(
    "https://partners-sandbox.inra.co.th/v1/dictionaries/legal_form",
    headers=headers,
    timeout=30,
)
legal_form.raise_for_status()
```

Cache the lists in your own system and refresh them periodically. Some dictionaries are large (industry classifications, objectives, financial statement line items). Prefer the API response over copying a table out of these docs.

## Tables on this site

The pages in the Dictionaries group are **generated** from the same fixture files the API uses for `GET /v1/dictionaries`. A smaller dictionary is reprinted in full. A larger one shows a short preview and tells you to fetch the rest from the API.

The generator is `docs-site/scripts/build_docs_assets.py` in the API repository. It does not need a credential.

## Financial statement items

The `financial_item` dictionary is published and is large. Line items also follow INRA financial-statement templates (`fs_template`, including Standard, Thai Bank, Foreign Bank, and the published cash-flow templates). Custom or company-specific rows can appear alongside the fixed template rows. If a line does not match a published item, keep the code and name you were given rather than forcing it into another item.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.