{
  "openapi": "3.1.0",
  "info": {
    "title": "Clean Validated Reference API",
    "version": "1.0.0",
    "description": "Read-only access to source-linked cleaning-validation references. Private editorial preview; all records are drafts pending human review. Regulatory source status and editorial approval are separate fields. Cite the stable identifier and canonical HTML page; consult the primary source.",
    "x-content-release": "preview-2026-09-16"
  },
  "servers": [
    {
      "url": "https://cleanvalidated.com/"
    }
  ],
  "externalDocs": {
    "description": "Data access, citation guidance and API examples",
    "url": "https://cleanvalidated.com/data-access/"
  },
  "security": [
    {
      "previewBasicAuth": []
    }
  ],
  "paths": {
    "/api/v1/reference-search.php": {
      "get": {
        "operationId": "searchReferences",
        "summary": "Search references using combined filters",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "All terms combine with AND. Maximum 200 UTF-8 bytes and 20 whitespace-separated terms; SQL wildcards are literal.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "authority",
            "in": "query",
            "required": false,
            "description": "Exact filter value. All supplied filters combine with AND.",
            "schema": {
              "type": "string",
              "enum": [
                "fda",
                "eu-gmp",
                "ema",
                "health-canada",
                "mhra"
              ]
            }
          },
          {
            "name": "document",
            "in": "query",
            "required": false,
            "description": "Exact filter value. All supplied filters combine with AND.",
            "schema": {
              "type": "string",
              "enum": [
                "eu-gmp-annex-15",
                "fda-cleaning-processes",
                "ich-q7",
                "ema-hbel-qa",
                "health-canada-gui-0028",
                "mhra-hbel-commentary"
              ]
            }
          },
          {
            "name": "topic",
            "in": "query",
            "required": false,
            "description": "Exact filter value. All supplied filters combine with AND.",
            "schema": {
              "type": "string",
              "enum": [
                "cleaning-validation",
                "hbel-pde",
                "maco",
                "recovery",
                "swab-sampling",
                "rinse-sampling",
                "worst-case",
                "visual-inspection",
                "hold-times",
                "analytical-methods",
                "acceptance-criteria",
                "shared-equipment",
                "revalidation",
                "microbial-control",
                "detergents"
              ]
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "description": "Exact filter value. All supplied filters combine with AND.",
            "schema": {
              "type": "string",
              "enum": [
                "United States",
                "European Union",
                "Canada",
                "United Kingdom"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Exact filter value. All supplied filters combine with AND.",
            "schema": {
              "type": "string",
              "enum": [
                "Current",
                "Draft",
                "Superseded",
                "Withdrawn"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number; values beyond the final page clamp to the final page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100000,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Maximum results per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "release",
            "in": "query",
            "required": false,
            "description": "Activated or retained release key. Omit to use the active release.",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Requirement"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "total",
                        "page",
                        "per_page",
                        "total_pages",
                        "release",
                        "filters"
                      ],
                      "properties": {
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "per_page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 50
                        },
                        "total_pages": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "release": {
                          "type": "string"
                        },
                        "filters": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The private preview requires HTTP Basic authentication before the API is reached. The response may be HTML."
          },
          "405": {
            "description": "Only GET is supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/requirement.php": {
      "get": {
        "operationId": "getReference",
        "summary": "Read one reference by its permanent slug",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": true,
            "description": "Stable reference slug from the search response.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 180
            }
          },
          {
            "name": "release",
            "in": "query",
            "required": false,
            "description": "Activated or retained release key. Omit to use the active release.",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Requirement"
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "release"
                      ],
                      "properties": {
                        "release": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The private preview requires HTTP Basic authentication before the API is reached. The response may be HTML."
          },
          "404": {
            "description": "Reference not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Only GET is supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/facets.php": {
      "get": {
        "operationId": "getReferenceFacets",
        "summary": "Read authorities, documents and topics for the release",
        "parameters": [
          {
            "name": "release",
            "in": "query",
            "required": false,
            "description": "Activated or retained release key. Omit to use the active release.",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "authorities": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "slug": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "short": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "region": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "documents": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "slug": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "authority": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "title": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "version": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "date": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "datePrecision": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "effective": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "type": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "lastVerified": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "accessedAt": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "statusNote": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        },
                        "topics": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "slug": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "release"
                      ],
                      "properties": {
                        "release": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The private preview requires HTTP Basic authentication before the API is reached. The response may be HTML."
          },
          "405": {
            "description": "Only GET is supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "previewBasicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Private preview access only. Credentials are supplied separately by the site owner."
      }
    },
    "schemas": {
      "Requirement": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "title",
          "summary",
          "sourceUrl",
          "editorialState",
          "revision"
        ],
        "additionalProperties": false,
        "description": "Canonical page: /reference/{slug}/. Document status is provisional unless independently verified; editorialState describes our review.",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "document": {
            "type": "string"
          },
          "authority": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "section": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "topics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "interpretation": {
            "type": "string"
          },
          "audit": {
            "type": "string"
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string"
          },
          "editorialState": {
            "type": "string"
          },
          "reviewedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "reviewer": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceUrl": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "message"
            ],
            "properties": {
              "message": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}