POST

/api/v1/{locale}/bulk

Generate composite records from a schema.

Parameters

NameInRequiredType / valuesDescription
localepathYesstring, enum(es)—
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.

Request body

{
  "seed": "docs-ejemplo",
  "count": 3,
  "format": "json",
  "fields": [
    {
      "name": "documento",
      "type": "documento"
    },
    {
      "name": "email",
      "type": "email"
    },
    {
      "name": "iban",
      "type": "iban"
    }
  ]
}

Usage example

terminal
curl -X POST "https://datamockseed.firstflip.es/api/v1/es/bulk" \
  -H "Content-Type: application/json" \
  -d '{"seed":"docs-ejemplo","count":3,"format":"json","fields":[{"name":"documento","type":"documento"},{"name":"email","type":"email"},{"name":"iban","type":"iban"}]}'

Example response

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

{
  "status": "success",
  "meta": {
    "locale": "es",
    "seed": "docs-ejemplo",
    "count": 3,
    "fields": [
      {
        "name": "documento",
        "type": "documento"
      },
      {
        "name": "email",
        "type": "email"
      },
      {
        "name": "iban",
        "type": "iban"
      }
    ],
    "checksum_valid": true
  },
  "data": [
    {
      "documento": "41149646R",
      "email": "l.garridoiglesias@example.net",
      "iban": "ES4514653507010270624785"
    },
    {
      "documento": "15108176M",
      "email": "maria.blanco@example.com",
      "iban": "ES5201828508817332283035"
    },
    {
      "documento": "53385481C",
      "email": "d.castropena@example.net",
      "iban": "ES2500499547640779607410"
    }
  ]
}

Errors for this endpoint

  • 400UNSUPPORTED_LOCALE

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

  • 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").

  • 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.