{"openapi":"3.1.0","info":{"title":"Mexico API","description":"Mexican data services — ZIP codes, phone numbers, CURP/RFC validation, Banxico CEP payment proofs, CFDI (status/query/issue/cancel), and search over the Diario Oficial de la Federación (DOF).\n\nAuthenticate every `/v1` call with `Authorization: Bearer <api-key>`. Usage is billed per operation, only on success — see the pricing page for rates.","version":"1.0.0"},"servers":[{"url":"/mx"}],"paths":{"/v1/cfdi/query":{"post":{"tags":["CFDI"],"summary":"Consultar CFDIs (emitidas o recibidas)","operationId":"query_v1_cfdi_query_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CFDIQueryRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CFDIIssueAccepted"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cfdi/query/{request_id}":{"get":{"tags":["CFDI"],"summary":"Resultado de una consulta","operationId":"query_status_v1_cfdi_query__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CFDIQueryResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cfdi/status/{uuid}":{"get":{"tags":["CFDI"],"summary":"Consulta sincrónica del estado de un CFDI (servicio público SAT)","description":"Direct call to ``ConsultaCFDIService.svc`` — no captcha, no auth.\n\nPara una respuesta autoritativa el SAT requiere los 4 datos\n(rfc_emisor, rfc_receptor, total, uuid). Sin ellos retorna 'No Encontrado'.","operationId":"cfdi_status_sync_v1_cfdi_status__uuid__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","minLength":36,"maxLength":36,"title":"Uuid"}},{"name":"rfc_emisor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rfc Emisor"}},{"name":"rfc_receptor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rfc Receptor"}},{"name":"total","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CFDIStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/curp/batch":{"post":{"tags":["CURP"],"summary":"Submit a CURP lookup batch","description":"Submit a batch of CURP lookups. **Idempotency**: send an `Idempotency-Key` header to safely retry on network errors. Same key + same body within 24h returns the original batch (200). Same key + different body returns 409. Without a key, duplicate POSTs within 10 minutes return the existing batch.","operationId":"create_curp_batch_v1_curp_batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurpBatchSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/curp/batch/{batch_id}":{"get":{"tags":["CURP"],"summary":"Get CURP batch summary","operationId":"get_curp_batch_v1_curp_batch__batch_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"integer","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurpBatchSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["CURP"],"summary":"Cancel a CURP batch (cooperative)","operationId":"delete_curp_batch_v1_curp_batch__batch_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"integer","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurpBatchSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/curp/batch/{batch_id}/items":{"get":{"tags":["CURP"],"summary":"List items of a CURP batch","operationId":"list_curp_batch_items_v1_curp_batch__batch_id__items_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"integer","title":"Batch Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Per Page"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurpBatchItemsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz":{"get":{"summary":"Healthz Check","description":"Liveness probe — always 200, no dependencies.","operationId":"healthz_check_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Healthz Check Healthz Get"}}}}}}},"/readyz":{"get":{"summary":"Readyz Check","description":"Readiness probe — checks database connectivity.","operationId":"readyz_check_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Readyz Check Readyz Get"}}}}}}},"/":{"get":{"summary":"Root","description":"Root endpoint with API information.\n\nReturns:\n    dict: API information","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Root  Get"}}}}}}},"/v1/zip":{"get":{"tags":["ZIP Codes"],"summary":"Get ZIP code information","description":"Retrieve information for a Mexican ZIP code including settlement, municipality, and state data.","operationId":"get_zip_code_v1_zip_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","description":"5-digit ZIP code","title":"Code"},"description":"5-digit ZIP code","example":"01000"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ZipCodeResponse"},"title":"Response Get Zip Code V1 Zip Get"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/phone":{"get":{"tags":["Phone Numbers"],"summary":"Get phone number information","description":"Retrieve carrier and location information for a Mexican phone number using PNN (Plan Nacional de Numeración) data.","operationId":"get_phone_number_v1_phone_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"number","in":"query","required":true,"schema":{"type":"string","description":"10-digit phone number","title":"Number"},"description":"10-digit phone number","example":"5551234567"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumberResponse"},"title":"Response Get Phone Number V1 Phone Get"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/curp":{"get":{"tags":["CURP"],"summary":"Validate CURP","description":"Validate and retrieve information for a Mexican CURP (Clave Única de Registro de Población).","operationId":"get_curp_data_v1_curp_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"curp","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"18-character CURP","title":"Curp"},"description":"18-character CURP","example":"ABCD123456HDFRGG09"},{"name":"names","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"First name(s)","title":"Names"},"description":"First name(s)","example":"JUAN CARLOS"},{"name":"first_last_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"First last name (apellido paterno)","title":"First Last Name"},"description":"First last name (apellido paterno)","example":"PEREZ"},{"name":"second_last_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Second last name (apellido materno)","title":"Second Last Name"},"description":"Second last name (apellido materno)","example":"GOMEZ"},{"name":"date_of_birth","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"description":"Date of birth YYYY-MM-DD","title":"Date Of Birth"},"description":"Date of birth YYYY-MM-DD","example":"1980-05-12"},{"name":"gender","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[MHX]$"},{"type":"null"}],"description":"Gender code (M=Mujer, H=Hombre, X=No binario)","title":"Gender"},"description":"Gender code (M=Mujer, H=Hombre, X=No binario)","example":"H"},{"name":"state_of_birth","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"State of birth name or code","title":"State Of Birth"},"description":"State of birth name or code","example":"Jalisco"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CURPDataResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Bad Request"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"}}}},"/v1/rfc":{"get":{"tags":["RFC"],"summary":"Validate RFC","description":"Validate and retrieve information for a Mexican RFC (Registro Federal de Contribuyentes). Supports validation with optional name and postal code verification.\n\nThe RFC prefix may contain `Ñ` and `&` (a persona moral derives it from its razón social). Because `&` separates parameters in a query string, it must be sent URL-encoded as `%26` — `?rfc=AB%26C123456T1A`. Sent raw it truncates the parameter before it reaches the API.","operationId":"validate_rfc_v1_rfc_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rfc","in":"query","required":true,"schema":{"type":"string","description":"RFC code (12 or 13 characters). `Ñ` and `&` are valid in the prefix; send `&` URL-encoded as `%26`.","title":"Rfc"},"description":"RFC code (12 or 13 characters). `Ñ` and `&` are valid in the prefix; send `&` URL-encoded as `%26`.","example":"ABC123456T1A"},{"name":"nombre_razon_social","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional name or business name for additional validation","title":"Nombre Razon Social"},"description":"Optional name or business name for additional validation","example":"EMPRESA EJEMPLO SA DE CV"},{"name":"codigo_postal","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional 5-digit postal code for additional validation","title":"Codigo Postal"},"description":"Optional 5-digit postal code for additional validation","example":"01000"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RFCDataResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cep":{"get":{"tags":["CEP"],"summary":"Download CEP (payment proof)","description":"Download a Comprobante Electronico de Pago (CEP) as XML from Banco de Mexico. Requires cuenta (CLABE) and monto.\n\nError semantics:\n- **404** — Banxico's `valida.do` explicitly confirmed the operation does not exist. Re-check the parameters; usually the issuing bank has not yet reported the payment to SPEI (can take up to a few hours).\n- **409** — The criteria match more than one payment, so Banxico refuses to pick one and asks for the clave de rastreo. Re-query with `tipo_criterio=T`; retrying the same parameters cannot succeed.\n- **502** — Banxico is reachable but cannot deliver the CEP (e.g. `descarga.do` returned 5xx). Safe to retry after a few minutes.\n- **504** — Network timeout to Banxico. Safe to retry.","operationId":"download_cep_v1_cep_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"fecha","in":"query","required":true,"schema":{"type":"string","description":"Payment date (YYYY-MM-DD)","title":"Fecha"},"description":"Payment date (YYYY-MM-DD)","example":"2024-01-15"},{"name":"tipo_criterio","in":"query","required":true,"schema":{"type":"string","description":"Criteria type: T (tracking key) or R (numeric reference)","title":"Tipo Criterio"},"description":"Criteria type: T (tracking key) or R (numeric reference)","example":"T"},{"name":"criterio","in":"query","required":true,"schema":{"type":"string","description":"Search criterion value","title":"Criterio"},"description":"Search criterion value"},{"name":"emisor","in":"query","required":true,"schema":{"type":"string","description":"Issuing institution code","title":"Emisor"},"description":"Issuing institution code","example":"40002"},{"name":"receptor","in":"query","required":true,"schema":{"type":"string","description":"Receiving institution code","title":"Receptor"},"description":"Receiving institution code","example":"40012"},{"name":"cuenta","in":"query","required":true,"schema":{"type":"string","description":"18-digit CLABE account number","title":"Cuenta"},"description":"18-digit CLABE account number","example":"012345678901234567"},{"name":"monto","in":"query","required":true,"schema":{"type":"string","description":"Payment amount","title":"Monto"},"description":"Payment amount","example":"1500.00"},{"name":"receptor_participante","in":"query","required":false,"schema":{"type":"string","description":"Receiver participant type (default 0)","default":"0","title":"Receptor Participante"},"description":"Receiver participant type (default 0)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CEPDownloadResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Bad Request"},"404":{"description":"Banxico explicitly reports operation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Criteria match more than one payment; Banxico requires the clave de rastreo (tipo_criterio=T). Never retry as-is.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal Server Error"},"502":{"description":"Banxico CEP unavailable (5xx, non-XML body, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Banxico timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cep_query":{"get":{"tags":["CEP"],"summary":"Query CEP payment status","description":"Quick status check of a payment via Banco de Mexico CEP system. Does not require cuenta or monto.\n\nSame error semantics as `/v1/cep`: **404** = confirmed not-found, **409** = the criteria match several payments and Banxico wants the clave de rastreo instead, **502** = Banxico unavailable, **504** = timeout.","operationId":"query_cep_v1_cep_query_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"fecha","in":"query","required":true,"schema":{"type":"string","description":"Payment date (YYYY-MM-DD)","title":"Fecha"},"description":"Payment date (YYYY-MM-DD)","example":"2024-01-15"},{"name":"tipo_criterio","in":"query","required":true,"schema":{"type":"string","description":"Criteria type: T (tracking key) or R (numeric reference)","title":"Tipo Criterio"},"description":"Criteria type: T (tracking key) or R (numeric reference)","example":"T"},{"name":"criterio","in":"query","required":true,"schema":{"type":"string","description":"Search criterion value","title":"Criterio"},"description":"Search criterion value"},{"name":"emisor","in":"query","required":true,"schema":{"type":"string","description":"Issuing institution code","title":"Emisor"},"description":"Issuing institution code","example":"40002"},{"name":"receptor","in":"query","required":true,"schema":{"type":"string","description":"Receiving institution code","title":"Receptor"},"description":"Receiving institution code","example":"40012"},{"name":"receptor_participante","in":"query","required":false,"schema":{"type":"string","description":"Receiver participant type (default 0)","default":"0","title":"Receptor Participante"},"description":"Receiver participant type (default 0)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CEPQueryResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Bad Request"},"404":{"description":"Banxico explicitly reports operation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Criteria match more than one payment; Banxico requires the clave de rastreo (tipo_criterio=T). Never retry as-is.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal Server Error"},"502":{"description":"Banxico CEP unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Banxico timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cep/instituciones":{"get":{"tags":["CEP"],"summary":"List financial institutions","description":"Retrieve the list of financial institutions valid for CEP queries on a given date.","operationId":"get_instituciones_v1_cep_instituciones_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"fecha","in":"query","required":true,"schema":{"type":"string","description":"Date (YYYY-MM-DD)","title":"Fecha"},"description":"Date (YYYY-MM-DD)","example":"2024-01-15"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InstitutionResponse"},"title":"Response Get Instituciones V1 Cep Instituciones Get"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dof/search":{"get":{"tags":["DOF"],"summary":"Search the DOF","description":"Search every publication in the DOF by meaning or exact keywords, with\noptional date/type/dependency filters. Results carry the unit id, issue\n(*ejemplar*) date and matching context; fetch the full text with\n`/v1/dof/units/{unit_id}`.","operationId":"dof_search_v1_dof_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Natural-language or keyword query.","title":"Q"},"description":"Natural-language or keyword query."},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of results.","default":10,"title":"Top K"},"description":"Number of results."},{"name":"fecha_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only units published on/after this date (`YYYY-MM-DD`).","title":"Fecha From"},"description":"Only units published on/after this date (`YYYY-MM-DD`)."},{"name":"fecha_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only units published on/before this date (`YYYY-MM-DD`).","title":"Fecha To"},"description":"Only units published on/before this date (`YYYY-MM-DD`)."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by unit type as indexed by DOF (e.g. `decreto`, `acuerdo`, `aviso`).","title":"Type"},"description":"Filter by unit type as indexed by DOF (e.g. `decreto`, `acuerdo`, `aviso`)."},{"name":"dep","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text match on the issuing dependency (e.g. `\"Secretaría de Gobernación\"`).","title":"Dep"},"description":"Text match on the issuing dependency (e.g. `\"Secretaría de Gobernación\"`)."},{"name":"lexical","in":"query","required":false,"schema":{"type":"string","pattern":"^(auto|on|off)$","description":"Exact-keyword matching: `auto` (default) combines it with meaning-based ranking when it helps, `on` forces it, `off` ranks by meaning only.","default":"auto","title":"Lexical"},"description":"Exact-keyword matching: `auto` (default) combines it with meaning-based ranking when it helps, `on` forces it, `off` ranks by meaning only."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dof Search V1 Dof Search Get"}}}},"401":{"description":"Missing or invalid API key"},"402":{"description":"Insufficient balance"},"502":{"description":"DOF service unreachable or upstream 5xx"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dof/search/deep":{"get":{"tags":["DOF"],"summary":"DOF subsection search","description":"Search *within* units at subsection granularity — finds the specific\npassage (article, clause, annex) that matches instead of the whole\npublication. Slower and deeper than `/v1/dof/search`; use it when the plain\nsearch surfaces the right document but not the right place in it.","operationId":"dof_search_deep_v1_dof_search_deep_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Natural-language or keyword query.","title":"Q"},"description":"Natural-language or keyword query."},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Number of results.","default":10,"title":"Top K"},"description":"Number of results."},{"name":"fecha_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only units published on/after this date (`YYYY-MM-DD`).","title":"Fecha From"},"description":"Only units published on/after this date (`YYYY-MM-DD`)."},{"name":"fecha_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only units published on/before this date (`YYYY-MM-DD`).","title":"Fecha To"},"description":"Only units published on/before this date (`YYYY-MM-DD`)."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by unit type as indexed by DOF (e.g. `decreto`, `acuerdo`, `aviso`).","title":"Type"},"description":"Filter by unit type as indexed by DOF (e.g. `decreto`, `acuerdo`, `aviso`)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dof Search Deep V1 Dof Search Deep Get"}}}},"401":{"description":"Missing or invalid API key"},"402":{"description":"Insufficient balance"},"502":{"description":"DOF service unreachable or upstream 5xx"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dof/entities":{"get":{"tags":["DOF"],"summary":"DOF entity autocomplete","description":"Autocomplete over the entities mentioned across the whole DOF corpus\n(organizations, companies, programs, people…). Each suggestion carries its\ncanonical/normalized name, surface variants, and mention counts — feed the\n`norm` value to `/v1/dof/entities/units` to list where it appears.","operationId":"dof_entities_v1_dof_entities_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Entity name prefix or fragment.","title":"Q"},"description":"Entity name prefix or fragment."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Number of suggestions.","default":10,"title":"Limit"},"description":"Number of suggestions."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by entity type (e.g. `dependencia`, `organismo`, `empresa`, `persona`, `programa`, `documento`).","title":"Type"},"description":"Filter by entity type (e.g. `dependencia`, `organismo`, `empresa`, `persona`, `programa`, `documento`)."},{"name":"min_mentions","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Hide entities mentioned fewer times than this across the corpus.","default":3,"title":"Min Mentions"},"description":"Hide entities mentioned fewer times than this across the corpus."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dof Entities V1 Dof Entities Get"}}}},"401":{"description":"Missing or invalid API key"},"402":{"description":"Insufficient balance"},"502":{"description":"DOF service unreachable or upstream 5xx"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dof/entities/units":{"get":{"tags":["DOF"],"summary":"Units mentioning a DOF entity","description":"Every DOF unit that mentions a given entity, with mention counts and\npublication dates — the drill-down companion to `/v1/dof/entities`.","operationId":"dof_entities_units_v1_dof_entities_units_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"norm","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Normalized entity name, as returned in `norm` by `/v1/dof/entities`.","title":"Norm"},"description":"Normalized entity name, as returned in `norm` by `/v1/dof/entities`."},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Number of units.","default":20,"title":"Top K"},"description":"Number of units."},{"name":"order","in":"query","required":false,"schema":{"type":"string","pattern":"^(mentions|recent)$","description":"`mentions` = most-mentioning units first; `recent` = newest first.","default":"mentions","title":"Order"},"description":"`mentions` = most-mentioning units first; `recent` = newest first."},{"name":"fecha_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only units published on/after this date (`YYYY-MM-DD`).","title":"Fecha From"},"description":"Only units published on/after this date (`YYYY-MM-DD`)."},{"name":"fecha_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only units published on/before this date (`YYYY-MM-DD`).","title":"Fecha To"},"description":"Only units published on/before this date (`YYYY-MM-DD`)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dof Entities Units V1 Dof Entities Units Get"}}}},"401":{"description":"Missing or invalid API key"},"402":{"description":"Insufficient balance"},"502":{"description":"DOF service unreachable or upstream 5xx"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dof/units/{unit_id}":{"get":{"tags":["DOF"],"summary":"DOF unit content + highlights","description":"Full text of one DOF unit (a single publication inside an issue), plus\nits detected entities and optional highlight offsets for rendering. Unit ids\ncome from the search and entity endpoints.","operationId":"dof_unit_v1_dof_units__unit_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"unit_id","in":"path","required":true,"schema":{"type":"string","title":"Unit Id"}},{"name":"include_entities","in":"query","required":false,"schema":{"type":"boolean","description":"Attach the entities detected in the unit.","default":true,"title":"Include Entities"},"description":"Attach the entities detected in the unit."},{"name":"max_entities","in":"query","required":false,"schema":{"type":"integer","description":"Cap on attached entities.","default":20,"title":"Max Entities"},"description":"Cap on attached entities."},{"name":"highlights","in":"query","required":false,"schema":{"type":"boolean","description":"Attach character-offset highlights for the detected entities.","default":false,"title":"Highlights"},"description":"Attach character-offset highlights for the detected entities."},{"name":"max_highlights","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"description":"Cap on highlight spans.","default":500,"title":"Max Highlights"},"description":"Cap on highlight spans."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dof Unit V1 Dof Units  Unit Id  Get"}}}},"401":{"description":"Missing or invalid API key"},"402":{"description":"Insufficient balance"},"502":{"description":"DOF service unreachable or upstream 5xx"},"404":{"description":"Unknown unit id"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/dof/ejemplares/{ejemplar_id}":{"get":{"tags":["DOF"],"summary":"DOF issue table of contents","description":"Table of contents of one DOF issue (*ejemplar*): every unit it contains\nwith titles and ids, e.g. `01012025-MAT` for the 2025-01-01 morning\nedition.","operationId":"dof_ejemplar_v1_dof_ejemplares__ejemplar_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ejemplar_id","in":"path","required":true,"schema":{"type":"string","title":"Ejemplar Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dof Ejemplar V1 Dof Ejemplares  Ejemplar Id  Get"}}}},"401":{"description":"Missing or invalid API key"},"402":{"description":"Insufficient balance"},"502":{"description":"DOF service unreachable or upstream 5xx"},"404":{"description":"Unknown ejemplar id"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/geo/geocode":{"get":{"tags":["Geo"],"summary":"Geocode a Mexican address (freeform)","operationId":"geo_geocode_v1_geo_geocode_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Geo Geocode V1 Geo Geocode Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Geo"],"summary":"Geocode pre-parsed address components","operationId":"geo_geocode_structured_v1_geo_geocode_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Geo Geocode Structured V1 Geo Geocode Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/geo/reverse":{"get":{"tags":["Geo"],"summary":"Marco geográfico for a point","operationId":"geo_reverse_v1_geo_reverse_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Geo Reverse V1 Geo Reverse Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/geo/zip":{"get":{"tags":["Geo"],"summary":"Postal-code polygon centroid + marco","operationId":"geo_zip_v1_geo_zip_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Geo Zip V1 Geo Zip Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/geo/batch":{"post":{"tags":["Geo"],"summary":"Batch geocoding (up to 100 mixed items)","operationId":"geo_batch_v1_geo_batch_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Geo Batch V1 Geo Batch Post"}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"CEPDownloadResponse":{"properties":{"found":{"type":"boolean","title":"Found","description":"Whether the CEP was found"},"xml_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Xml Content","description":"Raw XML content"},"beneficiario":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Beneficiario","description":"Beneficiario"},"ordenante":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ordenante","description":"Ordenante"},"monto":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Monto","description":"Monto"},"fecha_operacion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fecha Operacion","description":"Fecha de operacion"},"clave_rastreo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clave Rastreo","description":"Clave de rastreo"},"referencia_numerica":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencia Numerica","description":"Referencia numerica"},"estado":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estado","description":"Estado del pago"},"leyenda":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leyenda","description":"Leyenda"},"institucion_emisora":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Institucion Emisora","description":"Institucion emisora"},"institucion_receptora":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Institucion Receptora","description":"Institucion receptora"}},"type":"object","required":["found"],"title":"CEPDownloadResponse","description":"CEP download response with parsed XML fields."},"CEPQueryResponse":{"properties":{"found":{"type":"boolean","title":"Found","description":"Whether the payment was found"},"estado":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estado","description":"Payment status"},"detalle":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detalle","description":"Parsed payment details"}},"type":"object","required":["found"],"title":"CEPQueryResponse","description":"CEP query response with payment status."},"CFDIInfo":{"properties":{"uuid":{"type":"string","title":"Uuid"},"flujo":{"type":"string","title":"Flujo"},"fecha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fecha"},"rfc_emisor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rfc Emisor"},"nombre_emisor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nombre Emisor"},"rfc_receptor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rfc Receptor"},"nombre_receptor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nombre Receptor"},"tipo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tipo"},"estado":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estado"},"total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total"},"moneda":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Moneda"}},"type":"object","required":["uuid","flujo"],"title":"CFDIInfo","description":"Un CFDI individual del listado."},"CFDIIssueAccepted":{"properties":{"request_id":{"type":"integer","title":"Request Id"},"status":{"type":"string","title":"Status"},"op":{"type":"string","title":"Op"}},"type":"object","required":["request_id","status","op"],"title":"CFDIIssueAccepted","description":"202 Accepted response for issue/cancel/query."},"CFDIQueryRequest":{"properties":{"flujo":{"type":"string","pattern":"^(emitidas|recibidas)$","title":"Flujo"},"desde":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Desde","description":"YYYY-MM-DD (sólo emitidas)"},"hasta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hasta","description":"YYYY-MM-DD (sólo emitidas)"},"anio":{"anyOf":[{"type":"integer","maximum":2100.0,"minimum":2000.0},{"type":"null"}],"title":"Anio"},"mes":{"anyOf":[{"type":"integer","maximum":12.0,"minimum":1.0},{"type":"null"}],"title":"Mes"},"dia":{"anyOf":[{"type":"integer","maximum":31.0,"minimum":1.0},{"type":"null"}],"title":"Dia"},"uuid":{"anyOf":[{"type":"string","maxLength":36,"minLength":36},{"type":"null"}],"title":"Uuid"},"rfc_receptor":{"anyOf":[{"type":"string","maxLength":13,"minLength":12},{"type":"null"}],"title":"Rfc Receptor"},"rfc_tercero":{"anyOf":[{"type":"string","maxLength":13,"minLength":12},{"type":"null"}],"title":"Rfc Tercero"},"estado":{"type":"string","pattern":"^(todos|vigente|cancelado)$","title":"Estado","default":"todos"},"complemento":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Complemento"},"descargar_xml":{"type":"boolean","title":"Descargar Xml","description":"Si true, descarga XMLs además de metadata","default":false}},"type":"object","required":["flujo"],"title":"CFDIQueryRequest","description":"POST /v1/cfdi/query body."},"CFDIQueryResultResponse":{"properties":{"id":{"type":"integer","title":"Id"},"op":{"type":"string","title":"Op","default":"query"},"status":{"type":"string","title":"Status"},"processing_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"retry_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retry Reason"},"retry_count":{"type":"integer","title":"Retry Count","default":0},"cfdis":{"anyOf":[{"items":{"$ref":"#/components/schemas/CFDIInfo"},"type":"array"},{"type":"null"}],"title":"Cfdis"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","status"],"title":"CFDIQueryResultResponse","description":"GET /v1/cfdi/query/{id} response."},"CFDIStatusResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"estado":{"type":"string","title":"Estado","description":"Vigente | Cancelado | No Encontrado"},"es_cancelable":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Es Cancelable"},"estatus_cancelacion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estatus Cancelacion"},"codigo_estatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Codigo Estatus"},"raw":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw","description":"Raw SOAP envelope for debugging"}},"type":"object","required":["uuid","estado"],"title":"CFDIStatusResponse","description":"GET /v1/cfdi/status/{uuid} synchronous response."},"CURPDataResponse":{"properties":{"nacionalidad":{"type":"string","title":"Nacionalidad","description":"Nacionalidad"},"docProbatorio":{"type":"integer","title":"Docprobatorio","description":"Documento probatorio"},"statusCurp":{"type":"string","title":"Statuscurp","description":"Status CURP"},"nombres":{"type":"string","title":"Nombres","description":"Nombres"},"parametro":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parametro","description":"Parámetro"},"primerApellido":{"type":"string","title":"Primerapellido","description":"Primer apellido"},"segundoApellido":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segundoapellido","description":"Segundo apellido"},"curp":{"type":"string","title":"Curp","description":"CURP"},"fechaNacimiento":{"type":"string","title":"Fechanacimiento","description":"Fecha de nacimiento"},"sexo":{"type":"string","title":"Sexo","description":"Sexo"},"datosDocProbatorio":{"$ref":"#/components/schemas/DatosDocProbatorio","description":"Datos documento probatorio"},"claveEntidad":{"type":"string","title":"Claveentidad","description":"Clave entidad"},"entidad":{"type":"string","title":"Entidad","description":"Entidad"}},"type":"object","required":["nacionalidad","docProbatorio","statusCurp","nombres","primerApellido","curp","fechaNacimiento","sexo","datosDocProbatorio","claveEntidad","entidad"],"title":"CURPDataResponse","description":"CURP data response schema."},"CurpBatchItemResult":{"properties":{"idx":{"type":"integer","title":"Idx"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"status":{"type":"string","title":"Status"},"cache_hit":{"type":"boolean","title":"Cache Hit"},"billed":{"type":"boolean","title":"Billed"},"result":{"anyOf":[{"$ref":"#/components/schemas/CURPDataResponse"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"processed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processed At"}},"type":"object","required":["idx","input","status","cache_hit","billed"],"title":"CurpBatchItemResult","description":"Per-item result inside the items page response."},"CurpBatchItemsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CurpBatchItemResult"},"type":"array","title":"Items"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","page","per_page","total"],"title":"CurpBatchItemsPage","description":"Paginated items response."},"CurpBatchSummary":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"termination_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Termination Reason"},"items_total":{"type":"integer","title":"Items Total"},"items_unique":{"type":"integer","title":"Items Unique"},"items_pending":{"type":"integer","title":"Items Pending"},"items_processing":{"type":"integer","title":"Items Processing"},"items_success":{"type":"integer","title":"Items Success"},"items_not_found":{"type":"integer","title":"Items Not Found"},"items_error":{"type":"integer","title":"Items Error"},"items_cancelled":{"type":"integer","title":"Items Cancelled"},"items_skipped_insufficient_balance":{"type":"integer","title":"Items Skipped Insufficient Balance"},"items_cache_hit":{"type":"integer","title":"Items Cache Hit"},"cost_billed_mxn":{"type":"string","title":"Cost Billed Mxn"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"_links":{"additionalProperties":{"type":"string"},"type":"object","title":"Links"}},"type":"object","required":["id","type","status","items_total","items_unique","items_pending","items_processing","items_success","items_not_found","items_error","items_cancelled","items_skipped_insufficient_balance","items_cache_hit","cost_billed_mxn","created_at"],"title":"CurpBatchSummary","description":"Summary of a batch (POST 202 / GET batch). Items are paginated separately."},"DatosDocProbatorio":{"properties":{"claveEntidadRegistro":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claveentidadregistro","description":"Clave entidad registro"},"entidadRegistro":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entidadregistro","description":"Entidad registro"},"claveMunicipioRegistro":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clavemunicipioregistro","description":"Clave municipio registro"},"municipioRegistro":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Municipioregistro","description":"Municipio registro"},"anioReg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anioreg","description":"Año de registro"},"foja":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Foja","description":"Foja"},"tomo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tomo","description":"Tomo"},"libro":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Libro","description":"Libro"},"numActa":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Numacta","description":"Número de acta"}},"type":"object","title":"DatosDocProbatorio","description":"Datos del documento probatorio."},"ErrorResponse":{"properties":{"error":{"type":"string","title":"Error","description":"Error type"},"message":{"type":"string","title":"Message","description":"Error message"},"details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Details","description":"Additional error details"}},"type":"object","required":["error","message"],"title":"ErrorResponse","description":"Error response schema."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InstitutionResponse":{"properties":{"codigo":{"type":"string","title":"Codigo","description":"Institution code"},"nombre":{"type":"string","title":"Nombre","description":"Institution name"}},"type":"object","required":["codigo","nombre"],"title":"InstitutionResponse","description":"Financial institution entry."},"PhoneNumberResponse":{"properties":{"clave_censal":{"type":"string","title":"Clave Censal","description":"Clave censal"},"poblacion":{"type":"string","title":"Poblacion","description":"Población"},"municipio":{"type":"string","title":"Municipio","description":"Municipio"},"estado":{"type":"string","title":"Estado","description":"Estado"},"region":{"type":"integer","title":"Region","description":"Región"},"nir":{"type":"integer","title":"Nir","description":"NIR (Número de Identificación de Red)"},"serie":{"type":"integer","title":"Serie","description":"Serie"},"asl":{"type":"integer","title":"Asl","description":"ASL"},"tipo_red":{"type":"string","title":"Tipo Red","description":"Tipo de red (MOVIL/FIJO)"},"modalidad":{"type":"string","title":"Modalidad","description":"Modalidad (MPP/CPP/FIJO)"},"razon_social":{"type":"string","title":"Razon Social","description":"Razón social (carrier)"},"numeracion_inicial":{"type":"string","title":"Numeracion Inicial","description":"Numeración inicial"},"numeracion_final":{"type":"string","title":"Numeracion Final","description":"Numeración final"},"ocupacion":{"type":"integer","title":"Ocupacion","description":"Ocupación (capacidad del rango)"},"fecha_asignacion":{"type":"string","title":"Fecha Asignacion","description":"Fecha de asignación"},"fecha_consolidacion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fecha Consolidacion","description":"Fecha de consolidación"},"fecha_migracion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fecha Migracion","description":"Fecha de migración"},"presuscripcion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Presuscripcion","description":"Presuscripción"},"nir_anterior":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nir Anterior","description":"NIR anterior"}},"type":"object","required":["clave_censal","poblacion","municipio","estado","region","nir","serie","asl","tipo_red","modalidad","razon_social","numeracion_inicial","numeracion_final","ocupacion","fecha_asignacion"],"title":"PhoneNumberResponse","description":"Phone number response schema with PNN data."},"RFCDataResponse":{"properties":{"valid":{"type":"boolean","title":"Valid","description":"Whether the RFC is valid"},"accept_cfdi":{"type":"boolean","title":"Accept Cfdi","description":"Whether the RFC can receive invoices (facturas)"},"reason":{"type":"string","title":"Reason","description":"Detailed validation result message"}},"type":"object","required":["valid","accept_cfdi","reason"],"title":"RFCDataResponse","description":"RFC data response schema."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ValidationErrorResponse":{"properties":{"error":{"type":"string","title":"Error","description":"Error type","default":"validation_error"},"message":{"type":"string","title":"Message","description":"Validation error message"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field","description":"Field that failed validation"}},"type":"object","required":["message"],"title":"ValidationErrorResponse","description":"Validation error response schema."},"ZipCodeResponse":{"properties":{"asentamiento":{"type":"string","title":"Asentamiento","description":"Asentamiento"},"tipo_asentamiento":{"type":"string","title":"Tipo Asentamiento","description":"Tipo de asentamiento"},"municipio":{"type":"string","title":"Municipio","description":"Municipio"},"estado":{"type":"string","title":"Estado","description":"Estado"},"ciudad":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ciudad","description":"Ciudad"},"cp_administracion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cp Administracion","description":"Código postal de administración"},"clave_estado":{"type":"string","title":"Clave Estado","description":"Clave del estado"},"cp_oficina_reparto":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cp Oficina Reparto","description":"Código postal de oficina de reparto"},"clave_tipo_asentamiento":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clave Tipo Asentamiento","description":"Clave del tipo de asentamiento"},"clave_municipio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clave Municipio","description":"Clave del municipio"},"zona":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zona","description":"Zona"},"clave_ciudad":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clave Ciudad","description":"Clave de la ciudad"},"clave_asentamiento":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clave Asentamiento","description":"Clave del asentamiento"}},"type":"object","required":["asentamiento","tipo_asentamiento","municipio","estado","clave_estado"],"title":"ZipCodeResponse","description":"ZIP code response schema."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"ZIP Codes","description":"SEPOMEX postal-code lookups."},{"name":"Phone Numbers","description":"IFT PNN phone-number metadata."},{"name":"CURP","description":"CURP validation against RENAPO (single + batch)."},{"name":"RFC","description":"RFC validation against SAT."},{"name":"CEP","description":"Banxico SPEI payment proofs (CEP)."},{"name":"CFDI","description":"SAT CFDI status, query, issue and cancel."},{"name":"DOF","description":"Search over the **Diario Oficial de la Federación** — the full corpus, updated daily. Search publications by meaning or keywords, browse the entities they mention (organizations, companies, programs…), and fetch full texts and issue TOCs. Typical flow: `/v1/dof/search` (or `/v1/dof/entities` → `/v1/dof/entities/units`) → `/v1/dof/units/{unit_id}`."}]}