{
  "Protocol": "AIXE",
  "Version": "3.03",
  "ProtocolReference": {
    "ProtocolHome": "http://aixeprotocol.com/",
    "CanonicalUsageContract": "http://aixeprotocol.com/usage/?",
    "Whitepaper": "http://aixeprotocol.com/whitepaper/full-spec.html",
    "Inventor": "Gregory Oglethorpe"
  },
  "Endpoint": "/aixe/recipes/search-public-recipes/",
  "Title": "Search Public Recipes",
  "Purpose": "Search and read public recipes without signup, login, PIN, or authentication token. Anyone can use this endpoint.",
  "Method": "POST",
  "ContentType": "application/json",
  "AccessType": "Public",
  "DiscoveryRequest": "GET /aixe/recipes/search-public-recipes/?",
  "AIXEContractVersionKey": "e63b1d61-6c1f-4a95-b6bc-632d68a8b09c",
  "DiscoveryFreshness": {
    "Required": true,
    "Rule": "Read this discovery immediately before executing; send its current version key in the JSON body."
  },
  "RequiredFields": {
    "AIXEContractVersionKey": {
      "Type": "string",
      "Description": "Copy the current version key from this live contract immediately before execution; do not ask the person for it.",
      "Required": true,
      "SubmittedIn": "JSON body"
    }
  },
  "OptionalFields": {
    "Search": {
      "Type": "string or null",
      "Description": "Optional name substring, at most 200 trimmed characters. Omit, null, or empty means no filter.",
      "Required": false,
      "SubmittedIn": "JSON body"
    },
    "Offset": {
      "Type": "integer",
      "Description": "Matching-row offset, 0\u20132147483647; default 0. Use returned NextOffset with unchanged filters.",
      "Required": false,
      "SubmittedIn": "JSON body"
    },
    "Limit": {
      "Type": "integer",
      "Description": "Page size 1\u2013100; default 50. Read HasMore to determine whether another page exists.",
      "Required": false,
      "SubmittedIn": "JSON body"
    }
  },
  "BusinessRules": [
    "Submit every input in an application/json POST body over HTTPS. Query parameters are rejected. Public keys identify records but grant no access.",
    "Read live discovery immediately before each action. Only SuccessCode SUCCESS means completion; missing or empty responses mean failure or uncertainty.",
    "Never display or log PINs, password hashes, or authentication tokens. Unknown JSON properties are ignored; use only documented fields.",
    "Omitted editable fields remain unchanged. Null or empty optional text clears it. Null is rejected for required names, quantities, booleans, paging, and public keys.",
    "No authentication is required. Do not ask the person to register, log in, or provide credentials to search public recipes. AIXEContractVersionKey is public protocol metadata from this GET contract, not a credential.",
    "Search optionally matches a substring in recipe name, description, or ingredients. Omit Search or use blank text to browse all public recipes. Matching uses the database collation. Filter RecipeIsPrivate=false in SQL before searching and paging; private recipes never appear, even if their names or ingredients match.",
    "Results contain full recipe fields and PublicUrl, ordered by RecipeName then RecipeKey. Follow NextOffset with the same Search and Limit while HasMore=true. An empty page returns SUCCESS with no records. Public viewing does not grant edit, delete, or ownership permissions. No account details, credentials, or numeric database IDs are returned."
  ],
  "AuthenticationSession": "None. This endpoint is public and requires no login or authentication token.",
  "InteractionGuidance": "Translate the person\u0027s intent into the declared action. Obtain missing required business inputs without inventing them. Use public keys returned by bounded list/search calls. Unknown price or location never prevents basket actions.",
  "ActionResponse": {
    "RequiredResponseFields": [
      "SuccessCode"
    ],
    "SuccessCodes": [
      "SUCCESS"
    ],
    "Fields": "Records: array of RecipeKey, CreationDate (UTC), RecipeName, RecipeIsPrivate, nullable RecipeDescription, RecipeIngredientsText, RecipeInstructions, RecipeServings, RecipePrepMinutes, RecipeCookMinutes, and system RecipeUpdatedDate (UTC). No numeric IDs.; PublicUrl links to the recipe\u0027s public website page. HasMore boolean and NextOffset integer or null. RecipeIsPrivate is always false.",
    "MissingOrEmptyResponse": "Treat as failed or uncertain; read current state before retrying a mutation."
  },
  "Errors": [
    {
      "SuccessCode": "VALIDATION_FAILED",
      "Meaning": "A request field is missing, has the wrong type, or is out of range.",
      "Recovery": "Read Field and Message; correct that exact field using this contract. Boolean fields accept true or false only."
    },
    {
      "SuccessCode": "DISCOVERY_REFRESH_REQUIRED",
      "Meaning": "The contract version is absent or stale.",
      "Recovery": "Read this live discovery again and rebuild the request."
    },
    {
      "SuccessCode": "UNAUTHORIZED",
      "Meaning": "Phone/PIN or session token was rejected, or the account is inactive.",
      "Recovery": "Log in with the correct credentials. Existing email users without a PIN use account/login then shopping/set-pin."
    },
    {
      "SuccessCode": "NOT_FOUND",
      "Meaning": "The capability is inactive or the selected record does not exist within your authorized account/list.",
      "Recovery": "Use the manifest and your own list/search results to select a current public key."
    },
    {
      "SuccessCode": "BUSINESS_RULE_FAILED",
      "Meaning": "PhoneNumber already belongs to an account, or a duplicate/concurrent change prevented completion.",
      "Recovery": "For PhoneNumber follow the field-specific message. Otherwise read current state before retrying."
    },
    {
      "SuccessCode": "RATE_LIMITED",
      "Meaning": "PIN signup/login exceeded five requests per remote IP in one minute.",
      "Recovery": "Wait one minute before retrying; do not create parallel attempts."
    },
    {
      "SuccessCode": "FAILED",
      "Meaning": "An unexpected failure prevented normal completion.",
      "Recovery": "Read current state before retrying; never infer success from HTTP status alone."
    }
  ]
}