{
  "openapi": "3.1.0",
  "info": {
    "title": "Aerís Roasting — ask_roastery",
    "version": "0.1.1",
    "description": "ChatGPT Actions / Custom GPT import. Use ask_roastery to send human-reviewed questions (e.g. Brazil ETA). Use list_coffees before guessing stock. No checkout."
  },
  "servers": [
    {
      "url": "https://www.aerisroasting.com"
    }
  ],
  "paths": {
    "/api/agent/coffees.php": {
      "get": {
        "operationId": "list_coffees",
        "summary": "List coffees on the board + availability",
        "description": "Returns live lots. If the customer asks about a lot not listed (e.g. Brazil), call ask_roastery — do not invent ETAs.",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional lot slug filter"
          }
        ],
        "responses": {
          "200": {
            "description": "Lots JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/message.php": {
      "get": {
        "operationId": "ask_roastery_usage",
        "summary": "Usage help for ask_roastery",
        "responses": {
          "200": {
            "description": "Example payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "ask_roastery",
        "summary": "Ask Shawn/Brandon a question (human-reviewed)",
        "description": "Submit a structured question to Aerís Roasting. Example: When is your Brazil coffee expected to be available?",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "message"
                ],
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "The question or request",
                    "example": "When is your Brazil coffee expected to be available?"
                  },
                  "kind": {
                    "type": "string",
                    "description": "question | order | bulk | pickup | tasting | updates | other",
                    "default": "question"
                  },
                  "lot": {
                    "type": "string",
                    "description": "Coffee name or slug if relevant",
                    "example": "Brazil"
                  },
                  "name": {
                    "type": "string",
                    "description": "Customer name if known"
                  },
                  "email": {
                    "type": "string",
                    "description": "Customer email for the roastery to reply"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "agent": {
                    "type": "string",
                    "description": "Your product name",
                    "default": "ChatGPT",
                    "example": "ChatGPT"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Queued for humans",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/recommend.php": {
      "get": {
        "operationId": "recommend_coffee_get",
        "summary": "Recommend coffees from the live board",
        "parameters": [
          {
            "name": "budget",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "preference",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "e.g. very fruity"
          },
          {
            "name": "process",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "natural | washed | honey | decaf"
          },
          {
            "name": "brew",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lane",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "decaf",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "no",
                "ok",
                "only"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 3
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recommendation JSON"
          }
        }
      },
      "post": {
        "operationId": "recommend_coffee",
        "summary": "Recommend coffees from the live board",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "budget": {
                    "type": "number"
                  },
                  "preference": {
                    "type": "string"
                  },
                  "process": {
                    "type": "string"
                  },
                  "brew": {
                    "type": "string"
                  },
                  "lane": {
                    "type": "string"
                  },
                  "decaf": {
                    "type": "string"
                  },
                  "limit": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recommendation JSON"
          }
        }
      }
    }
  }
}
