{
  "openapi": "3.1.0",
  "info": {
    "title": "Presumo",
    "version": "0.1.0",
    "description": "Whether an EN standard gives presumption of conformity under an EU act on a date, cited to the OJ."
  },
  "servers": [
    {
      "url": "https://presumo.bulkhead.solutions"
    }
  ],
  "security": [
    {
      "bearer": []
    },
    {}
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/v1/tools/status_on_date": {
      "post": {
        "operationId": "status_on_date",
        "summary": "Status of a harmonised standard on a date",
        "description": "Says whether a harmonised standard reference gives presumption of conformity under an EU harmonisation act on a given day, and returns since when, until when, the Official Journal decisions that published and ended it, its item number, restriction notes and successors. Call it for any question like \"can we still cite EN X under directive Y on date Z\". Pass the exact reference with its year; amendments count, so EN ISO 10993-23:2021 and EN ISO 10993-23:2021/A1:2025 are separate listings and both come back. Without act it answers for every act that lists the reference. status is in_effect, not_yet, ended or unknown (unknown: before the first decision Presumo holds for an act whose earlier references sat in a Commission communication it does not hold). found false means the reference is not cited under the covered acts, and otherEditions lists the editions that are; complete false says when that cannot be concluded. It knows only what the Official Journal and the Commission's summary lists say; it does not know standards that were never cited, national standards or the content of any standard.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reference"
                ],
                "additionalProperties": false,
                "properties": {
                  "reference": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 120,
                    "description": "The standard's reference as cited in the Official Journal, for example EN 60204-1:2018, EN ISO 13849-1:2023, EN 300 328 V2.2.2 or an amendment such as EN ISO 10993-23:2021/A1:2025. Spacing and case do not matter; the year does. A national or ETSI prefix (DIN EN, BS EN, ETSI EN), \"+A1\" written for \"/A1\" or the reverse, ISO or IEC without EN, and EN for EN IEC are read as the Official Journal cites them; query.readAs and a warning then say which reading matched."
                  },
                  "act": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 60,
                    "description": "The EU act: its number (2006/42/EC, 2014/35/EU, 2017/745), short name (MD, LVD, EMC, RED, MDR, IVDR, PED, ATEX) or words of its title (machinery, toy safety). A number wins over the words around it. 2023/1230 is the Machinery Regulation, under which nothing is listed yet. Call list_acts for every covered act."
                  },
                  "date": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "The day to answer for, YYYY-MM-DD. Defaults to today (UTC). Future dates use the end dates already published."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "dataVersion",
                    "retrieved",
                    "sources",
                    "attribution",
                    "warnings",
                    "complete"
                  ],
                  "properties": {
                    "dataVersion": {
                      "type": "string"
                    },
                    "retrieved": {
                      "type": "string"
                    },
                    "sources": {
                      "type": "array"
                    },
                    "attribution": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/replaced_by": {
      "post": {
        "operationId": "replaced_by",
        "summary": "What replaced a harmonised standard",
        "description": "Lists what took the place of a harmonised standard under each act that cites it: entries an Official Journal decision put in its place (basis oj_entry) and later editions of the same standard number under the same act (basis same_designation, which the decision does not itself call a replacement). Each successor comes with its status today and its dates. Call it when a reference has ended or is ending and you need the one to cite instead. For the status on a specific date, call status_on_date. It cannot say whether the successor covers the same essential requirements; read the restriction notes and the standard itself.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reference"
                ],
                "additionalProperties": false,
                "properties": {
                  "reference": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 120,
                    "description": "The standard's reference as cited in the Official Journal, for example EN 60204-1:2018, EN ISO 13849-1:2023, EN 300 328 V2.2.2 or an amendment such as EN ISO 10993-23:2021/A1:2025. Spacing and case do not matter; the year does. A national or ETSI prefix (DIN EN, BS EN, ETSI EN), \"+A1\" written for \"/A1\" or the reverse, ISO or IEC without EN, and EN for EN IEC are read as the Official Journal cites them; query.readAs and a warning then say which reading matched."
                  },
                  "act": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 60,
                    "description": "The EU act: its number (2006/42/EC, 2014/35/EU, 2017/745), short name (MD, LVD, EMC, RED, MDR, IVDR, PED, ATEX) or words of its title (machinery, toy safety). A number wins over the words around it. 2023/1230 is the Machinery Regulation, under which nothing is listed yet. Call list_acts for every covered act."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "dataVersion",
                    "retrieved",
                    "sources",
                    "attribution",
                    "warnings",
                    "complete"
                  ],
                  "properties": {
                    "dataVersion": {
                      "type": "string"
                    },
                    "retrieved": {
                      "type": "string"
                    },
                    "sources": {
                      "type": "array"
                    },
                    "attribution": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/list_changes": {
      "post": {
        "operationId": "list_changes",
        "summary": "Changes under an act since a date",
        "description": "Lists every date on which a reference starts or stops giving presumption of conformity under one act, from since onward, oldest first, including dates already published for the future (such as the machinery end dates of 20 January 2027). Call it on a schedule to see what moved, or to plan the work behind a coming withdrawal. Pass until to bound the window; page on with nextCursor. For a single reference, call status_on_date instead. Events come from the summary list and, where it lags, from the Official Journal; basis says which.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "act",
                  "since"
                ],
                "additionalProperties": false,
                "properties": {
                  "act": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 60,
                    "description": "The EU act: its number (2006/42/EC, 2014/35/EU, 2017/745), short name (MD, LVD, EMC, RED, MDR, IVDR, PED, ATEX) or words of its title (machinery, toy safety). A number wins over the words around it. 2023/1230 is the Machinery Regulation, under which nothing is listed yet. Call list_acts for every covered act."
                  },
                  "since": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "First day to include, YYYY-MM-DD."
                  },
                  "until": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Last day to include, YYYY-MM-DD. Defaults to no limit, which includes scheduled future dates."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "description": "Default 50."
                  },
                  "cursor": {
                    "type": "string",
                    "maxLength": 12,
                    "description": "nextCursor from the previous page."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "dataVersion",
                    "retrieved",
                    "sources",
                    "attribution",
                    "warnings",
                    "complete"
                  ],
                  "properties": {
                    "dataVersion": {
                      "type": "string"
                    },
                    "retrieved": {
                      "type": "string"
                    },
                    "sources": {
                      "type": "array"
                    },
                    "attribution": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/list_lag": {
      "post": {
        "operationId": "list_lag",
        "summary": "Where the summary list trails the Official Journal",
        "description": "Reports each place where the Commission's summary list for an act disagrees with the Official Journal decisions: an entry the decision publishes that the list lacks, an end date the list does not show, a list row or an end date attributed to the wrong decision, a different set of amendments, or a deleted entry that cannot be traced. Call it before relying on the Commission's spreadsheet for an act, or to audit a list you keep yourself. Without act it covers every act. It checks only the decisions linked from the Commission's pages and the decisions they amend; the Official Journal is the authentic text.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "act": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 60,
                    "description": "The EU act: its number (2006/42/EC, 2014/35/EU, 2017/745), short name (MD, LVD, EMC, RED, MDR, IVDR, PED, ATEX) or words of its title (machinery, toy safety). A number wins over the words around it. 2023/1230 is the Machinery Regulation, under which nothing is listed yet. Call list_acts for every covered act."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "description": "Default 50."
                  },
                  "cursor": {
                    "type": "string",
                    "maxLength": 12
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "dataVersion",
                    "retrieved",
                    "sources",
                    "attribution",
                    "warnings",
                    "complete"
                  ],
                  "properties": {
                    "dataVersion": {
                      "type": "string"
                    },
                    "retrieved": {
                      "type": "string"
                    },
                    "sources": {
                      "type": "array"
                    },
                    "attribution": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/machinery_cliff": {
      "post": {
        "operationId": "machinery_cliff",
        "summary": "Machinery switch on 20 January 2027",
        "description": "For up to 50 references, says what happens to each under machinery law on 20 January 2027, when Regulation (EU) 2023/1230 replaces Directive 2006/42/EC: whether it gives presumption under the Directive until 19 January 2027, its end date and the decision that set it, and whether any list under the Regulation cites it yet. Call it when planning machinery declarations, CE marking or test work that runs past January 2027. For the Directive alone on a date before the switch, status_on_date is enough. It does not say what the Regulation will list, only what is published.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "references"
                ],
                "additionalProperties": false,
                "properties": {
                  "references": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "minLength": 3,
                      "maxLength": 120,
                      "description": "The standard's reference as cited in the Official Journal, for example EN 60204-1:2018, EN ISO 13849-1:2023, EN 300 328 V2.2.2 or an amendment such as EN ISO 10993-23:2021/A1:2025. Spacing and case do not matter; the year does. A national or ETSI prefix (DIN EN, BS EN, ETSI EN), \"+A1\" written for \"/A1\" or the reverse, ISO or IEC without EN, and EN for EN IEC are read as the Official Journal cites them; query.readAs and a warning then say which reading matched."
                    },
                    "description": "References to check, for example [\"EN 60204-1:2018\", \"EN ISO 13849-1:2023\"]."
                  },
                  "date": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Also report the status on this day, YYYY-MM-DD. Defaults to today."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "dataVersion",
                    "retrieved",
                    "sources",
                    "attribution",
                    "warnings",
                    "complete"
                  ],
                  "properties": {
                    "dataVersion": {
                      "type": "string"
                    },
                    "retrieved": {
                      "type": "string"
                    },
                    "sources": {
                      "type": "array"
                    },
                    "attribution": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/list_acts": {
      "post": {
        "operationId": "list_acts",
        "summary": "Acts covered and how fresh each list is",
        "description": "Lists the EU harmonisation acts on the Commission's harmonised standards pages and what Presumo holds for each: whether a summary list exists and when it was generated, how many entries and Official Journal decisions are held, how many lag items were found, and acts it cannot answer for yet. Call it first when you do not know the act number, or to judge how fresh an answer can be. For a reference, call status_on_date.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "query": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "Words in the act's title or its number, for example machinery, radio or 2017/745."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "dataVersion",
                    "retrieved",
                    "sources",
                    "attribution",
                    "warnings",
                    "complete"
                  ],
                  "properties": {
                    "dataVersion": {
                      "type": "string"
                    },
                    "retrieved": {
                      "type": "string"
                    },
                    "sources": {
                      "type": "array"
                    },
                    "attribution": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    }
  }
}
