{
  "openapi": "3.1.0",
  "info": {
    "title": "CE Global manufacturer directory",
    "version": "1.1.0",
    "description": "Global source-listed manufacturer entities, industrial companies and exhibitors; not proof of factory operation, capacity, consent or membership."
  },
  "servers": [
    {
      "url": "https://factory-lookup.ce-net.com"
    }
  ],
  "paths": {
    "/api/v1/factories": {
      "get": {
        "operationId": "searchFactories",
        "responses": {
          "200": {
            "description": "Source-backed directory result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filters"
          },
          "404": {
            "description": "Not found"
          },
          "413": {
            "description": "Request too large"
          },
          "429": {
            "description": "Rate limited; respect Retry-After"
          },
          "503": {
            "description": "Registry unavailable; factories is null"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            }
          },
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "website",
                "email",
                "observed-email"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ]
      }
    },
    "/api/v1/factories/{id}": {
      "get": {
        "operationId": "getFactory",
        "responses": {
          "200": {
            "description": "Source-backed directory result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filters"
          },
          "404": {
            "description": "Not found"
          },
          "413": {
            "description": "Request too large"
          },
          "429": {
            "description": "Rate limited; respect Retry-After"
          },
          "503": {
            "description": "Registry unavailable; factories is null"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:cn-[a-f0-9]{20}|wd-Q[1-9][0-9]*|epa-[0-9]{12})$"
            }
          }
        ]
      }
    },
    "/api/v1/stats": {
      "get": {
        "operationId": "registryStats",
        "responses": {
          "200": {
            "description": "Source-backed directory result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filters"
          },
          "404": {
            "description": "Not found"
          },
          "413": {
            "description": "Request too large"
          },
          "429": {
            "description": "Rate limited; respect Retry-After"
          },
          "503": {
            "description": "Registry unavailable; factories is null"
          }
        }
      }
    },
    "/directory.json": {
      "get": {
        "operationId": "exportDirectory",
        "responses": {
          "200": {
            "description": "Source-backed directory result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filters"
          },
          "404": {
            "description": "Not found"
          },
          "413": {
            "description": "Request too large"
          },
          "429": {
            "description": "Rate limited; respect Retry-After"
          },
          "503": {
            "description": "Registry unavailable; factories is null"
          }
        }
      }
    }
  }
}
