{
  "openapi": "3.1.0",
  "info": {
    "title": "Rohdea Device Safety Feed API",
    "version": "1.0.0",
    "summary": "FDA safety and compliance events for US-listed medical-device makers, mapped to tickers, point in time.",
    "description": "Docs: https://rohdeadata.com/docs/. Not investment advice. Not affiliated with the US Food and Drug Administration.",
    "contact": {
      "name": "Rohdea Limited",
      "email": "info@rohdeadata.com",
      "url": "https://rohdeadata.com/device-safety/"
    }
  },
  "servers": [
    {
      "url": "https://rohdeadata.com/api/v1"
    }
  ],
  "security": [
    {},
    {
      "bearer": []
    },
    {
      "apiKeyQuery": []
    }
  ],
  "paths": {
    "/status": {
      "get": {
        "operationId": "getStatus",
        "summary": "Current build, coverage dates and demo tickers",
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Rohdea-Build": {
                "$ref": "#/components/headers/X-Rohdea-Build"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/NoData"
          }
        }
      }
    },
    "/companies": {
      "get": {
        "operationId": "listCompanies",
        "summary": "Companies your tier can see",
        "parameters": [
          {
            "$ref": "#/components/parameters/ticker"
          },
          {
            "$ref": "#/components/parameters/rohdea_id"
          },
          {
            "$ref": "#/components/parameters/columns"
          },
          {
            "$ref": "#/components/parameters/as_of"
          },
          {
            "$ref": "#/components/parameters/format"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Rohdea-Build": {
                "$ref": "#/components/headers/X-Rohdea-Build"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Company"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/NotInPlan"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/NoData"
          }
        }
      }
    },
    "/signals/weekly": {
      "get": {
        "operationId": "listWeeklySignals",
        "summary": "Weekly signal rows",
        "parameters": [
          {
            "name": "week_start",
            "in": "query",
            "description": "week_start equals",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "week_start.gte",
            "in": "query",
            "description": "week_start on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "week_start.gt",
            "in": "query",
            "description": "week_start after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "week_start.lte",
            "in": "query",
            "description": "week_start on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "week_start.lt",
            "in": "query",
            "description": "week_start before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "week_end",
            "in": "query",
            "description": "week_end equals",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "week_end.gte",
            "in": "query",
            "description": "week_end on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "week_end.gt",
            "in": "query",
            "description": "week_end after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "week_end.lte",
            "in": "query",
            "description": "week_end on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "week_end.lt",
            "in": "query",
            "description": "week_end before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "available_at",
            "in": "query",
            "description": "available_at equals",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "available_at.gte",
            "in": "query",
            "description": "available_at on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "available_at.gt",
            "in": "query",
            "description": "available_at after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "available_at.lte",
            "in": "query",
            "description": "available_at on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "available_at.lt",
            "in": "query",
            "description": "available_at before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "is_complete",
            "in": "query",
            "description": "true (default) or all",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "all"
              ],
              "default": "true"
            }
          },
          {
            "$ref": "#/components/parameters/ticker"
          },
          {
            "$ref": "#/components/parameters/rohdea_id"
          },
          {
            "$ref": "#/components/parameters/columns"
          },
          {
            "$ref": "#/components/parameters/per_page"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/as_of"
          },
          {
            "$ref": "#/components/parameters/format"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Rohdea-Build": {
                "$ref": "#/components/headers/X-Rohdea-Build"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WeeklySignal"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/NotInPlan"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/NoData"
          }
        }
      }
    },
    "/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "Inspections, warning letters, compliance actions and recalls",
        "parameters": [
          {
            "name": "event_date",
            "in": "query",
            "description": "event_date equals",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "event_date.gte",
            "in": "query",
            "description": "event_date on or after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "event_date.gt",
            "in": "query",
            "description": "event_date after",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "event_date.lte",
            "in": "query",
            "description": "event_date on or before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "event_date.lt",
            "in": "query",
            "description": "event_date before",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "event_type",
            "in": "query",
            "description": "Exact match, e.g. recall, inspection, warning_letter",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/ticker"
          },
          {
            "$ref": "#/components/parameters/rohdea_id"
          },
          {
            "$ref": "#/components/parameters/columns"
          },
          {
            "$ref": "#/components/parameters/per_page"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/as_of"
          },
          {
            "$ref": "#/components/parameters/format"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-Rohdea-Build": {
                "$ref": "#/components/headers/X-Rohdea-Build"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/NotInPlan"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/NoData"
          }
        }
      }
    },
    "/metadata/{table}": {
      "get": {
        "operationId": "getMetadata",
        "summary": "Column names, types, descriptions and filterability",
        "security": [
          {}
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/table"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Metadata"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/changelog": {
      "get": {
        "operationId": "getChangelog",
        "summary": "Dated schema and method changes",
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Changelog"
                }
              }
            }
          }
        }
      }
    },
    "/builds": {
      "get": {
        "operationId": "listBuilds",
        "summary": "Past build dates accepted by as_of (full tier)",
        "security": [
          {
            "bearer": []
          },
          {
            "apiKeyQuery": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "date"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer"
                        },
                        "current": {
                          "type": "string"
                        },
                        "tier": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/NotInPlan"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/NoData"
          }
        }
      }
    },
    "/bulk/{table}": {
      "get": {
        "operationId": "getBulk",
        "summary": "Whole table as Parquet (or gzipped CSV) (full tier)",
        "security": [
          {
            "bearer": []
          },
          {
            "apiKeyQuery": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/table"
          },
          {
            "$ref": "#/components/parameters/as_of"
          },
          {
            "name": "format",
            "in": "query",
            "description": "parquet (default) or csv (gzipped)",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "parquet",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File",
            "content": {
              "application/vnd.apache.parquet": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/vnd.apache.parquet"
                }
              },
              "application/gzip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/gzip"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/NotInPlan"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/NoData"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer rd_t_… or rd_f_…"
      },
      "apiKeyQuery": {
        "type": "apiKey",
        "in": "query",
        "name": "api_key",
        "description": "Works, but a key in a URL can end up in logs. Prefer the header."
      }
    },
    "parameters": {
      "ticker": {
        "name": "ticker",
        "in": "query",
        "description": "One or more tickers, comma-separated, at most 10",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "rohdea_id": {
        "name": "rohdea_id",
        "in": "query",
        "description": "One or more Rohdea IDs, comma-separated, at most 10",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "columns": {
        "name": "columns",
        "in": "query",
        "description": "Comma-separated fields to return",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "per_page": {
        "name": "per_page",
        "in": "query",
        "description": "Rows per page",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 500,
          "minimum": 1,
          "maximum": 1000
        }
      },
      "cursor": {
        "name": "cursor",
        "in": "query",
        "description": "next_cursor from the previous response",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "as_of": {
        "name": "as_of",
        "in": "query",
        "description": "Full tier: a past build date from /builds",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "format": {
        "name": "format",
        "in": "query",
        "description": "json (default) or csv",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "json",
            "csv"
          ],
          "default": "json"
        }
      },
      "table": {
        "name": "table",
        "in": "path",
        "description": "Table name",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "signals_weekly",
            "events",
            "companies"
          ]
        }
      }
    },
    "headers": {
      "X-RateLimit-Limit": {
        "description": "Calls allowed per minute",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining": {
        "description": "Calls left this minute",
        "schema": {
          "type": "integer"
        }
      },
      "X-Rohdea-Build": {
        "description": "Build date that answered",
        "schema": {
          "type": "string",
          "format": "date"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "invalid_parameter",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "invalid_api_key",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotInPlan": {
        "description": "not_in_plan",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "not_found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NoData": {
        "description": "no_data_published",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "rate_limited",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Meta": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "as_of": {
            "type": "string",
            "format": "date"
          },
          "data_version": {
            "type": "string"
          },
          "adverse_event_data_through": {
            "type": "string",
            "format": "date"
          },
          "tier": {
            "type": "string",
            "enum": [
              "demo",
              "trial",
              "full"
            ]
          }
        }
      },
      "Status": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "build": {
            "type": "string",
            "format": "date"
          },
          "built_at": {
            "type": "string",
            "format": "date-time"
          },
          "api_version": {
            "type": "string"
          },
          "data_version": {
            "type": "string"
          },
          "adverse_event_data_through": {
            "type": "string",
            "format": "date"
          },
          "coverage": {
            "type": "object",
            "properties": {
              "signals_first_week": {
                "type": "string",
                "format": "date"
              },
              "signals_last_complete_week": {
                "type": "string",
                "format": "date"
              },
              "events_first": {
                "type": "string",
                "format": "date"
              },
              "events_last": {
                "type": "string",
                "format": "date"
              }
            }
          },
          "counts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "demo_tickers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Company": {
        "type": "object",
        "properties": {
          "rohdea_id": {
            "type": "string",
            "description": "Stable company ID."
          },
          "ticker": {
            "type": "string",
            "description": "Ticker at listing."
          },
          "exchange": {
            "type": "string",
            "description": "Listing exchange, for example Nasdaq or NYSE."
          },
          "status": {
            "type": "string",
            "description": "listed or delisted. Delisted companies stay in the data so backtests aren't biased toward survivors."
          },
          "cik": {
            "type": "integer",
            "description": "SEC Central Index Key."
          },
          "composite_figi": {
            "type": "string",
            "description": "Composite FIGI (OpenFIGI)."
          },
          "share_class_figi": {
            "type": "string",
            "description": "Share-class FIGI."
          },
          "sec_name": {
            "type": "string",
            "description": "Company name as registered with the SEC."
          },
          "delisted_on": {
            "type": "string",
            "format": "date",
            "description": "Last trading day of a delisted company, or null while listed. Weekly rows and events after this date are not produced."
          }
        }
      },
      "WeeklySignal": {
        "type": "object",
        "properties": {
          "rohdea_id": {
            "type": "string",
            "description": "Stable company ID (RDS0001…). It never changes, even if the ticker does."
          },
          "ticker": {
            "type": "string",
            "description": "Ticker at listing (see companies)."
          },
          "week_start": {
            "type": "string",
            "format": "date",
            "description": "Monday of the week FDA received the reports."
          },
          "week_end": {
            "type": "string",
            "format": "date",
            "description": "Sunday of the same week."
          },
          "available_at": {
            "type": "string",
            "format": "date",
            "description": "The earliest date this row's adverse-event counts could have been known: week_end + lag_days. Filter on this in backtests."
          },
          "is_complete": {
            "type": "boolean",
            "description": "true when available_at is on or before the build date and FDA's files cover the whole week. Only complete rows are returned unless you pass is_complete=all."
          },
          "adverse_event_data_through": {
            "type": "string",
            "format": "date",
            "description": "The last FDA receipt date the adverse-event files fully cover at build time. FDA's files can stop weeks before today."
          },
          "is_backfilled": {
            "type": "boolean",
            "description": "true for weeks before live daily capture began (23 Oct 2026). Those rows were rebuilt from FDA's current files, which can include later corrections."
          },
          "deaths": {
            "type": "integer",
            "description": "Adverse-event reports received that week where the reporter marked the event as a death."
          },
          "injuries": {
            "type": "integer",
            "description": "Reports received that week marked as an injury."
          },
          "malfunctions": {
            "type": "integer",
            "description": "Reports received that week marked as a malfunction."
          },
          "reports": {
            "type": "integer",
            "description": "All reports received that week, including other event types."
          },
          "summary_reports": {
            "type": "integer",
            "description": "Reports flagged as summary (batched) reports. Rare in practice."
          },
          "late_reports": {
            "type": "integer",
            "description": "Reports whose event happened more than 180 days before FDA received them."
          },
          "max_day_reports": {
            "type": "integer",
            "description": "Reports on the single busiest receipt day of the week."
          },
          "deaths_base_mean": {
            "type": [
              "number",
              "null"
            ],
            "description": "Mean weekly count over the previous 52 weeks (at least 26 needed)"
          },
          "injuries_base_mean": {
            "type": [
              "number",
              "null"
            ],
            "description": "Mean weekly count over the previous 52 weeks (at least 26 needed)"
          },
          "malfunctions_base_mean": {
            "type": [
              "number",
              "null"
            ],
            "description": "Mean weekly count over the previous 52 weeks (at least 26 needed)"
          },
          "reports_base_mean": {
            "type": [
              "number",
              "null"
            ],
            "description": "Mean weekly count over the previous 52 weeks (at least 26 needed)"
          },
          "deaths_z": {
            "type": [
              "number",
              "null"
            ],
            "description": "This week against that baseline: (count − mean) / max(sd, 0.5)."
          },
          "injuries_z": {
            "type": [
              "number",
              "null"
            ],
            "description": "This week against that baseline: (count − mean) / max(sd, 0.5)."
          },
          "malfunctions_z": {
            "type": [
              "number",
              "null"
            ],
            "description": "This week against that baseline: (count − mean) / max(sd, 0.5)."
          },
          "reports_z": {
            "type": [
              "number",
              "null"
            ],
            "description": "This week against that baseline: (count − mean) / max(sd, 0.5)."
          },
          "deaths_4w": {
            "type": "integer",
            "description": "Sum of the last 4 weeks."
          },
          "injuries_4w": {
            "type": "integer",
            "description": "Sum of the last 4 weeks."
          },
          "malfunctions_4w": {
            "type": "integer",
            "description": "Sum of the last 4 weeks."
          },
          "reports_4w": {
            "type": "integer",
            "description": "Sum of the last 4 weeks."
          },
          "deaths_4w_z": {
            "type": [
              "number",
              "null"
            ],
            "description": "The 4-week mean against the 52 weeks before the window: (mean − baseline mean) / max(sd / 2, 0.5)."
          },
          "injuries_4w_z": {
            "type": [
              "number",
              "null"
            ],
            "description": "The 4-week mean against the 52 weeks before the window: (mean − baseline mean) / max(sd / 2, 0.5)."
          },
          "malfunctions_4w_z": {
            "type": [
              "number",
              "null"
            ],
            "description": "The 4-week mean against the 52 weeks before the window: (mean − baseline mean) / max(sd / 2, 0.5)."
          },
          "reports_4w_z": {
            "type": [
              "number",
              "null"
            ],
            "description": "The 4-week mean against the 52 weeks before the window: (mean − baseline mean) / max(sd / 2, 0.5)."
          },
          "late_share_4w": {
            "type": "number",
            "description": "Late reports divided by all reports, last 4 weeks."
          },
          "top_day_share_4w": {
            "type": "number",
            "description": "Busiest single day divided by all reports, last 4 weeks."
          },
          "late_reports_4w": {
            "type": "integer",
            "description": "Late reports in the last 4 weeks."
          },
          "likely_batch_4w": {
            "type": "boolean",
            "description": "False-alarm flag. The last 4 weeks have at least 10 more reports than the 52-week baseline, and at least half of that excess is extra late reports or the busiest single day. Spikes like this usually come from a maker filing old complaints in bulk, not from new harm."
          },
          "death_spike_4w": {
            "type": "boolean",
            "description": "deaths_4w_z ≥ 3 and deaths_4w ≥ 3."
          },
          "injury_spike_4w": {
            "type": "boolean",
            "description": "injuries_4w_z ≥ 3 and injuries_4w ≥ 10."
          },
          "inspections": {
            "type": "integer",
            "description": "FDA inspections ending that week."
          },
          "oai_inspections": {
            "type": "integer",
            "description": "Inspections ending that week with the outcome \"official action indicated\", the worst result."
          },
          "warning_letters": {
            "type": "integer",
            "description": "FDA warning letters issued that week."
          },
          "other_compliance_actions": {
            "type": "integer",
            "description": "Seizures, injunctions and other FDA compliance actions that week."
          },
          "class1_recalls": {
            "type": "integer",
            "description": "Class I recalls published that week. Class I is the most serious (risk of death or serious harm)."
          },
          "class2_recalls": {
            "type": "integer",
            "description": "Class II recalls published that week."
          },
          "lag_days": {
            "type": "integer",
            "description": "The publishing delay used for available_at on this row."
          },
          "data_version": {
            "type": "string",
            "description": "Schema version, for example 1.0."
          },
          "built_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the build that produced this row ran (UTC)."
          }
        }
      },
      "Event": {
        "type": "object",
        "properties": {
          "rohdea_id": {
            "type": "string",
            "description": "Stable company ID."
          },
          "ticker": {
            "type": "string",
            "description": "Ticker at listing."
          },
          "event_type": {
            "type": "string",
            "description": "inspection, warning_letter, recall, or another FDA compliance action type. /metadata/events lists the values in the current build."
          },
          "event_date": {
            "type": "string",
            "format": "date",
            "description": "Inspection end date, action date, or recall start date."
          },
          "published_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Recalls only: the date FDA published the recall in its weekly recall notices. null for other types, because FDA gives none."
          },
          "detail": {
            "type": "string",
            "description": "Inspection outcome (NAI, VAI or OAI), the action type, or the recall class."
          },
          "firm_name": {
            "type": "string",
            "description": "The firm name as FDA wrote it on the record."
          },
          "event_id": {
            "type": "string",
            "description": "FDA's inspection ID or recall number."
          },
          "source": {
            "type": "string",
            "description": "fda_inspections (inspections, warning letters and other compliance actions) or fda_enforcement_report (recalls)."
          },
          "captured_at": {
            "type": "string",
            "format": "date-time",
            "description": "When we captured the record (UTC)."
          }
        }
      },
      "Metadata": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "description": {
                "type": "string"
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "filterable": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "table": {
                "type": "string"
              },
              "as_of": {
                "type": "string"
              },
              "data_version": {
                "type": "string"
              }
            }
          }
        }
      },
      "Changelog": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "version": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "change": {
                  "type": "string"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer"
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "invalid_parameter",
                  "invalid_api_key",
                  "not_in_plan",
                  "not_found",
                  "method_not_allowed",
                  "rate_limited",
                  "internal_error",
                  "no_data_published",
                  "storage_not_bound"
                ]
              },
              "message": {
                "type": "string"
              },
              "docs": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}
