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.

POST /v1/search accepts a query object and an optional sort object in the request body. Before forwarding the request to the provider, the gateway runs two middleware functions — createQuery and createOrder — that map the flat input fields supplied by the client into the nested structure that provider APIs expect. This page documents every field those functions recognise.

Query Fields

Query fields are passed inside the query key of the request body. Any field whose value is null, undefined, an empty string "", or the string "0" is silently ignored and will not be forwarded to the provider.

Top-Level Fields

id
string
Record identifier. Targets a specific declaration record when known.
nombres
string
Given names of the public servant. Partial matches may be supported depending on the provider’s search implementation.
primerApellido
string
First (paternal) surname of the public servant.
segundoApellido
string
Second (maternal) surname of the public servant.
escolaridadNivel
string
Highest education level attained by the public servant (e.g. "licenciatura", "maestría", "doctorado").

Employment Fields (datosEmpleoCargoComision)

The following fields are grouped under datosEmpleoCargoComision in the query forwarded to the provider. Supply them as flat keys on the query object — the gateway nests them automatically.

Real-Estate and Income Range Fields

Range fields are expressed as a pair of Min / Max suffixed keys. Both are optional; you may supply only one bound. Values are coerced to Number by the gateway.

bienesInmuebles Range Fields

The following range fields, together with formaAdquisicion, are nested under bienesInmuebles in the forwarded query.

Net Income Range

totalIngresosNetosMin
number
Minimum net income (ingresos netos totales) in Mexican pesos. Mapped to a top-level totalIngresosNetos.min field in the forwarded query.
totalIngresosNetosMax
number
Maximum net income in Mexican pesos. Mapped to totalIngresosNetos.max in the forwarded query.

Sort Fields

Pass sorting preferences in the sort object of the request body. Each key is a sortable field name and the value controls direction:
ValueDirection
1Ascending
-1Descending
If sort is absent, empty, or null, no sort instruction is forwarded to the provider.

Top-Level Sortable Fields

FieldDescription
nombresGiven names
primerApellidoPaternal surname
segundoApellidoMaternal surname
escolaridadNivelEducation level
totalIngresosNetosTotal net income

datosEmpleoCargoComision Sortable Fields

These are passed as flat keys on the sort object; the gateway nests them under datosEmpleoCargoComision automatically.
FieldDescription
nombreEntePublicoPublic entity name
entidadFederativaFederal state
municipioAlcaldiaMunicipality / borough
empleoCargoComisionJob title / position
nivelEmpleoCargoComisionEmployment level
nivelOrdenGobiernoGovernment order level

bienesInmuebles Sortable Fields

These are passed as flat keys on the sort object; the gateway nests them under bienesInmuebles automatically.
FieldDescription
superficieConstruccionBuilding area
superficieTerrenoLand area
formaAdquisicionAcquisition method
valorAdquisicionAcquisition value

Complete Example Request

{
  "supplier_id": "EDOMEX",
  "page": 1,
  "pageSize": 20,
  "query": {
    "nombres": "María",
    "entidadFederativa": "Estado de México",
    "totalIngresosNetosMin": 50000
  },
  "sort": {
    "primerApellido": 1,
    "totalIngresosNetos": -1
  }
}
page defaults to 1 and pageSize defaults to 10 when either field is absent, null, or not a valid number. These defaults are applied in the route handler after createQuery and createOrder have run.

Build docs developers (and LLMs) love