Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/PDNMX/s1_backend/llms.txt

Use this file to discover all available pages before exploring further.

A provider (or supplier) is a government institution that independently hosts asset declaration data in a PDN-compatible REST API. S1 Backend connects to one or more providers defined in endpoints.json. Each provider has a unique supplier_id that callers use when targeting a specific provider in search and summary requests.

Provider Fields

GET /v1/providers returns an array of provider objects. Each object exposes the following fields — note that internal credentials (username, password, client_id, client_secret, token_url, url) are stripped and never returned to callers.
supplier_id
string
required
A short, unique identifier for the provider. Used by callers to target a specific provider in POST /v1/search and to filter results in POST /v1/summary.Example: "EDOMEX"
supplier_name
string
required
The full official institutional name of the provider.Example: "Secretaría Ejecutiva del Sistema Estatal Anticorrupción del Estado México"
levels
array of strings
required
One or more government levels that the provider belongs to. Used to filter providers in POST /v1/summary via the nivel_gobierno field.Valid values: "federal", "estatal", "municipal"Example: ["estatal"]
status
any
Provider status field passed through directly from endpoints.json. Its shape depends on what was configured for each provider — it is not interpreted or transformed by S1 Backend.

Government Levels

Every provider tags itself with one or more levels values to indicate which tier of Mexican government it represents:
ValueScope
"federal"Federal government institutions
"estatal"State-level (entidad federativa) institutions
"municipal"Municipal or borough-level institutions
When calling POST /v1/summary, you can pass a nivel_gobierno string to restrict the fan-out to only providers whose levels array includes that value. If nivel_gobierno is omitted, S1 Backend queries all configured providers.
// POST /v1/summary — restrict to state-level providers only
{
  "nivel_gobierno": "estatal",
  "nombres": "Juan"
}

Using supplier_id in Requests

The supplier_id is the primary key callers use to address a specific provider.

In POST /v1/search

supplier_id is required in the request body. S1 Backend looks up the matching endpoint in endpoints.json and queries only that provider.
// POST /v1/search
{
  "supplier_id": "EDOMEX",
  "page": 1,
  "pageSize": 10,
  "query": {
    "nombres": "Juan",
    "primerApellido": "García"
  }
}
If supplier_id is missing entirely, the gateway returns HTTP 500:
{ "error": "Debe proporcionar un proveedor de información" }
If supplier_id is present but does not match any configured provider, the gateway also returns HTTP 500:
{ "error": "Proveedor de información no disponible" }

In POST /v1/summary

supplier_id is optional here. Pass it inside an institucion object to restrict the summary fan-out to a single provider:
// POST /v1/summary — restrict to one provider
{
  "institucion": {
    "supplier_id": "EDOMEX",
    "nombre": "Secretaría Ejecutiva del Sistema Estatal Anticorrupción del Estado México"
  }
}
When institucion is provided, the nombre value is also forwarded to the provider as the institucionDependencia query filter. The typical client flow is to fetch the provider list first, pick a supplier_id, and then use it in a search request.
// Step 1 — GET /v1/providers response (example)
[
  {
    "supplier_id": "EDOMEX",
    "supplier_name": "Secretaría Ejecutiva del Sistema Estatal Anticorrupción del Estado México",
    "levels": ["estatal"],
    "status": null
  }
]
// Step 2 — POST /v1/search using the supplier_id from step 1
{
  "supplier_id": "EDOMEX",
  "page": 1,
  "pageSize": 10
}
The list of available providers depends entirely on the contents of endpoints.json on the server — there are no hardcoded providers in the source code. If endpoints.json is empty or missing, GET /v1/providers returns an empty array and all summary/search requests will have no providers to query.

Build docs developers (and LLMs) love