{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bettermenu/json-schema/bettermenu-create-search-token-request-schema.json",
  "title": "CreateSearchTokenRequest",
  "description": "Optional mint-request body — every field is optional and defaults apply.\n\nEverything except ``market`` derives from the authenticated context;\nthis model exists only to carry ``market``, which cannot be derived\nserver-side (unlike ``org_id``/``member_id``).",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bettermenu-org-api-openapi.yml#/components/schemas/CreateSearchTokenRequest",
  "properties": {
    "market": {
      "anyOf": [
        {
          "$ref": "#/$defs/CountryCode"
        },
        {
          "type": "null"
        }
      ],
      "description": "Market to scope ingredient search to, mirroring searchIngredients' market parameter (ADR 0007's approved_markets gate). If the caller is entitled to ingredient search but omits this, the response degrades to whatever else the caller is entitled to rather than including an incorrectly-scoped ingredients grant. An empty string is rejected as a 422 (not a valid CountryCode value), not treated as an omitted field."
    }
  },
  "type": "object",
  "$defs": {
    "CountryCode": {
      "type": "string",
      "enum": [
        "US"
      ],
      "title": "CountryCode",
      "description": "Market code: the country whose food data and labelling rules apply.\n\nParameters name it `market`, `country` or `country_code`; all take this value."
    }
  }
}