{
  "openapi": "3.1.0",
  "info": {
    "title": "Art Agenda MX public catalog",
    "version": "1.0.0",
    "description": "Read-only published CDMX catalog. Dates without confirmed hours are date-only. Venue IDs are derived from normalized venue/address and may change after editorial corrections; a persistent venue registry is pending. District and free entry can be null when not explicitly supplied. No license to redistribute images or editorial text is implied."
  },
  "servers": [
    {
      "url": "https://artagenda.mx"
    }
  ],
  "paths": {
    "/api/public/v1/events": {
      "get": {
        "summary": "List events",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "description": "Inclusive local start date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Inclusive local end date",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "venue",
            "in": "query",
            "description": "Derived venue ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "district",
            "in": "query",
            "description": "Explicit district, when known",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "description": "City, Mexico City in this version",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "free",
            "in": "query",
            "description": "Explicitly confirmed free entry; unknown values excluded",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public JSON response; ETag available",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "400": {
            "description": "Invalid filters"
          },
          "404": {
            "description": "Not found"
          },
          "503": {
            "description": "Temporarily unavailable"
          }
        }
      }
    },
    "/api/public/v1/events/{id}": {
      "get": {
        "summary": "Get event",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public JSON response; ETag available",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "400": {
            "description": "Invalid filters"
          },
          "404": {
            "description": "Not found"
          },
          "503": {
            "description": "Temporarily unavailable"
          }
        }
      }
    },
    "/api/public/v1/venues": {
      "get": {
        "summary": "List venues",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Page size",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public JSON response; ETag available",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "400": {
            "description": "Invalid filters"
          },
          "404": {
            "description": "Not found"
          },
          "503": {
            "description": "Temporarily unavailable"
          }
        }
      }
    },
    "/api/public/v1/venues/{id}": {
      "get": {
        "summary": "Get venue",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public JSON response; ETag available",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "400": {
            "description": "Invalid filters"
          },
          "404": {
            "description": "Not found"
          },
          "503": {
            "description": "Temporarily unavailable"
          }
        }
      }
    },
    "/api/specials/1": {
      "get": {
        "summary": "Published Mérida special issue",
        "responses": {
          "200": {
            "description": "Published public programme only",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Disabled or unavailable issue"
          },
          "503": {
            "description": "Temporarily unavailable"
          }
        }
      }
    },
    "/api/specials/2": {
      "get": {
        "summary": "Published Miami special issue",
        "responses": {
          "200": {
            "description": "Published public programme only",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Disabled or unavailable issue"
          },
          "503": {
            "description": "Temporarily unavailable"
          }
        }
      }
    },
    "/api/public/v1/digest": {
      "get": {
        "summary": "Upcoming CDMX events in one response",
        "description": "Cached public editorial snapshot; includes snapshot timestamp, city timezone and canonical event URLs. No API key. Only published data, no personal data.",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "today",
                "week",
                "month"
              ],
              "default": "week"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "es",
                "en",
                "ru"
              ],
              "default": "es"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published summary with data, from, to and snapshotAt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "400": {
            "description": "Invalid period or language"
          },
          "503": {
            "description": "Published snapshot unavailable; retry later"
          }
        }
      }
    }
  }
}
