{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tessio-eu/json-schema/tessio-eu-create-age-check-request-schema.json",
  "title": "CreateAgeCheckRequest",
  "description": "All fields optional. Omit the body to check age_over_18.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tessio-eu-openapi.json#/components/schemas/CreateAgeCheckRequest",
  "type": "object",
  "properties": {
    "minAge": {
      "type": "integer",
      "default": 18,
      "minimum": 1,
      "maximum": 99,
      "description": "Age threshold to verify. 18 is the only value guaranteed to work: the EU age verification attestation makes age_over_18 mandatory at issuance and leaves every other age_over_NN optional, so which further thresholds a holder can answer depends on who issued their credential. Any threshold from 1 to 99 is accepted (the ISO 18013-5 claim is age_over_NN, two digits); one the credential does not carry returns a check with status \"failed\" and a null meetsMinAge, rather than a guess. The sandbox only ever demonstrates 18."
    },
    "reference": {
      "type": "string",
      "maxLength": 200,
      "description": "Your correlation id, stored as you send it and returned with the check. Keep it opaque: do not put a name or other personal detail in it. Control characters are refused, including tab, carriage return and newline: the CSV export prints this column, and a newline in it would split one record into two. Printable characters are all accepted, so an id beginning with =, +, - or @ is fine; the export guards those itself."
    },
    "credential": {
      "type": "string",
      "enum": [
        "proof-of-age",
        "pid-mdoc",
        "pid-sdjwt",
        "pid-de-sdjwt",
        "photo-id"
      ],
      "description": "Which credential the person is asked to present. Omit it for this deployment's default, which is what every check asked for before this field existed. A deployment offers its default plus any credentials it is configured to offer: naming one it does not offer is refused with credential_not_offered, and a name not in this list with unknown_credential. The names are proof-of-age (the EU age verification attestation), pid-mdoc and pid-sdjwt (the EU PID in its two encodings), pid-de-sdjwt (the German PID) and photo-id (the ISO Photo ID). Each check records what it asked for and is judged by that alone."
    }
  }
}