POST
/api/v1/validate
Validate a DNI/NIE/CIF/IBAN/CCC/NSS/card number.
Parameters
| Name | In | Required | Type / values | Description |
|---|---|---|---|---|
| lang | query | No | string, enum(es · en), default: "es" | Language of the human-readable texts in the response (validation `reason`, error `message`, generator `label`). Takes precedence over the `Accept-Language` header; defaults to Spanish. Generated data is the same in every language. |
Request body
{
"value": "29127292T",
"kind": "auto"
}Usage example
terminal
curl -X POST "https://datamockseed.firstflip.es/api/v1/validate?lang=en" \
-H "Content-Type: application/json" \
-d '{"value":"29127292T","kind":"auto"}'Example response
Generated when this page was built, with the same deterministic seed (docs-ejemplo).
{
"status": "success",
"data": {
"valid": true,
"normalized": "29127292T",
"kind": "DNI"
}
}Errors for this endpoint
- 400INVALID_BODY
The request body is not valid JSON, or does not have the expected shape.
- 400INVALID_PARAMS
A required parameter is missing or has an invalid value (e.g. "count").
- 429RATE_LIMIT_EXCEEDED
Your IP exceeded the requests-per-minute limit.
Full details in /en/docs/errors.