GET

/api/v1/{locale}/{generator}

Generate records of one type.

Parameters

NameInRequiredType / valuesDescription
localepathYesstring, enum(es)—
generatorpathYesstring, enum(document · phone · identity · iban · card · passport · uuid · username · password)—
countqueryNointeger, 1–1000, default: 1—
seedqueryNostringSame as the X-Seed header.
X-SeedheaderNostring—
langqueryNostring, 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.

Usage example

terminal
curl "https://datamockseed.firstflip.es/api/v1/es/document?sub=dni&ok=true&fmt=plain&count=2&seed=docs-ejemplo"

Example response

Generated when this page was built, with the same deterministic seed (docs-ejemplo).

{
  "status": "success",
  "meta": {
    "generator": "document",
    "locale": "es",
    "seed": "docs-ejemplo",
    "count": 2,
    "options": {
      "sub": "dni",
      "ok": "true",
      "fmt": "plain"
    }
  },
  "data": [
    {
      "documento": "29127292T",
      "tipo": "DNI"
    },
    {
      "documento": "61521712R",
      "tipo": "DNI"
    }
  ]
}

Try it live

Errors for this endpoint

  • 400UNSUPPORTED_LOCALE

    The `locale` in the URL is not supported (currently only "es").

  • 404UNKNOWN_GENERATOR

    The `generator` in the URL does not exist (`GET /generators` lists the valid ones).

  • 400INVALID_PARAMS

    A required parameter is missing or has an invalid value (e.g. "count").

  • 413COUNT_LIMIT_EXCEEDED

    "count" exceeds the maximum allowed by that endpoint.

  • 429RATE_LIMIT_EXCEEDED

    Your IP exceeded the requests-per-minute limit.

Full details in /en/docs/errors.