TheDocumentation 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.
endpoints.json file at the project root is the provider registry for S1 Backend. It must be a JSON array of endpoint configuration objects, where each object represents one government data supplier and contains all connection details, OAuth 2.0 credentials, and metadata needed to query that provider. At startup the file is loaded once and its contents drive every call to /v1/providers, /v1/summary, and /v1/search.
Example Configuration Object
Fields
Unique string identifier for this provider. Used as the lookup key when a
client sends
supplier_id in a POST /v1/search request body, and returned
as-is in every API response that includes provider metadata. Should be a
concise, human-readable slug (e.g. "EDOMEX", "CJF").Full official name of the government institution. Included verbatim in every
response enriched by
fetchData so that consumers can display a human-readable
label without a separate lookup.PDN system identifier. For S1 Backend this value is always
1 (Sistema 1 —
declaraciones patrimoniales y de intereses). Reserved for future use if the
gateway is extended to proxy other PDN systems.API protocol type of the provider endpoint. Currently only
"REST" is
supported. The value is surfaced as endpoint_type in search responses so
clients can adapt their parsing logic if additional types are added later.One or more government-level tags that describe the jurisdictional scope of
this provider. Accepted values are
"federal", "estatal", and
"municipal". The POST /v1/summary endpoint filters the provider list by
this field when nivel_gobierno is supplied in the request body.The provider’s data-search API URL. S1 Backend sends
POST requests to this
URL with a Bearer token in the Authorization header and the paginated
query options in the request body.URL for fetching the list of entities/institutions from this provider. Used
by
fetchEntities in rest_data.js. If the provider does not expose an
entities endpoint, this field can be omitted or left as an empty string.OAuth 2.0 token endpoint that issues access tokens via the
password grant
type. S1 Backend posts the encoded credentials here before every data fetch
and uses the returned access_token as a Bearer token on the subsequent
request to url.OAuth 2.0 resource owner username, sent as
username in the token request
body (password grant).OAuth 2.0 resource owner password, sent as
password in the token request
body (password grant).OAuth 2.0 client identifier. Sent both as the HTTP Basic Auth username in the
token request and as
client_id in the request body.OAuth 2.0 client secret. Sent both as the HTTP Basic Auth password in the
token request and as
client_secret in the request body.Security Note
Loading Behaviour
The file is loaded synchronously at server startup viarequire('../endpoints') in routes/v1.js. Node.js caches the require result, so any changes made to endpoints.json after the process starts will not be picked up until the server is restarted.