{
  "openapi": "3.1.0",
  "info": {
    "title": "Peildag",
    "version": "0.1.0",
    "description": "Dutch EIA Energielijst and MIA\\Vamil Milieulijst codes by year: rates, conditions, limits and changes, cited to the Staatscourant."
  },
  "servers": [],
  "security": [
    {
      "bearer": []
    },
    {}
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/v1/tools/lookup_code": {
      "post": {
        "operationId": "lookup_code",
        "summary": "Conditions, rate and limits of one EIA or MIA\\Vamil code",
        "description": "Returns one Energielijst (EIA) or Milieulijst (MIA\\Vamil) code as it stood in the list of a given year: title, deduction percentage (MIA and Vamil percentages from the code's letter; EIA percentage from RVO's brochure), the conditions in the official Dutch wording, maximum qualifying amounts, technical thresholds such as SCOP ≥ 4,0, RVO's status label, the change against the previous year's list, and the Staatscourant publication and brochure page to cite. Accepts D 3116, D3116 or just 3116 (Milieulijst letters change between years, so the number alone finds the item and a stale letter is flagged), a 6-digit Energielijst code such as 211107, or a regulation item such as A 1.2.D. Pass order_date (the date the purchase commitment was made) or year; the list of that year applies. Call it when you have a code. Do not call it to find a code from a description (use search_assets) or to compare years (use code_history). It cannot judge whether a particular product meets the conditions: that is RVO's assessment.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "maxLength": 20,
                    "description": "Milieulijst code (D 3116, D3116 or 3116), Energielijst code (211107) or Energielijst regulation item (A 1.2.D)."
                  },
                  "year": {
                    "type": "integer",
                    "minimum": 2000,
                    "maximum": 2100,
                    "description": "List year, for example 2026. The list of the year in which the purchase commitment was made applies. Give year or order_date, not both; with neither, the current calendar year is used."
                  },
                  "order_date": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Date the purchase commitment was made (order placed or contract signed), YYYY-MM-DD. Picks the list of that year."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/search_assets": {
      "post": {
        "operationId": "search_assets",
        "summary": "Find EIA or MIA\\Vamil codes from an asset description",
        "description": "Finds the codes on the Energielijst (EIA) and Milieulijst (MIA\\Vamil) of one year whose official description matches an asset, best first, with each code's MIA and Vamil percentages or EIA maximum amounts and thresholds, and a short excerpt of the Dutch wording. The lists exist only in Dutch: Dutch words work best (warmtepomp, vrachtwagen, isolatie); common English asset words are mapped to Dutch and the answer shows how the query was understood. Pass list to search one list only. At most 25 results per call; page with next_cursor while has_more is true. Call it when you know the asset but not the code. Do not treat a match as eligibility: an asset qualifies only if it meets every condition of the code, so follow up with lookup_code.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 200,
                    "description": "Asset description, for example 'lucht/water warmtepomp', 'elektrische vrachtwagen' or 'air to water heat pump'."
                  },
                  "list": {
                    "type": "string",
                    "enum": [
                      "energielijst",
                      "milieulijst",
                      "both"
                    ],
                    "description": "energielijst (EIA), milieulijst (MIA\\Vamil) or both (default)."
                  },
                  "year": {
                    "type": "integer",
                    "minimum": 2000,
                    "maximum": 2100,
                    "description": "List year, for example 2026. The list of the year in which the purchase commitment was made applies. Give year or order_date, not both; with neither, the current calendar year is used."
                  },
                  "order_date": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Date the purchase commitment was made (order placed or contract signed), YYYY-MM-DD. Picks the list of that year."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25,
                    "description": "Results per page, default 10."
                  },
                  "cursor": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "next_cursor from the previous call."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/list_changes": {
      "post": {
        "operationId": "list_changes",
        "summary": "What changed in a year's Energielijst or Milieulijst",
        "description": "Lists what changed in one year's list against the previous year: codes added, removed (with RVO's reason where the regulation gives one), renumbered, rate changed (a Milieulijst letter change, which moves the MIA or Vamil percentage), maximum amounts or thresholds changed, or wording changed, with counts and RVO's own status labels. Filter with kinds (added, removed, rate_changed, renumbered, limit_changed, threshold_changed, text_changed); page with next_cursor while has_more is true. Call it to brief a client on a new year's list, or to check whether an asset booked under last year's code still qualifies the same way. Do not use it for a single code's full conditions (use lookup_code). It compares the lists held, from 2024 on, so the first year held has no change record.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "list"
                ],
                "properties": {
                  "list": {
                    "type": "string",
                    "enum": [
                      "energielijst",
                      "milieulijst"
                    ],
                    "description": "energielijst (EIA) or milieulijst (MIA\\Vamil)."
                  },
                  "year": {
                    "type": "integer",
                    "minimum": 2000,
                    "maximum": 2100,
                    "description": "List year, for example 2026. The list of the year in which the purchase commitment was made applies. Give year or order_date, not both; with neither, the current calendar year is used."
                  },
                  "order_date": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Date the purchase commitment was made (order placed or contract signed), YYYY-MM-DD. Picks the list of that year."
                  },
                  "kinds": {
                    "type": [
                      "array",
                      "string"
                    ],
                    "maxItems": 7,
                    "maxLength": 120,
                    "items": {
                      "type": "string",
                      "enum": [
                        "added",
                        "removed",
                        "rate_changed",
                        "renumbered",
                        "limit_changed",
                        "threshold_changed",
                        "text_changed"
                      ]
                    },
                    "description": "Only these kinds, as a list or comma-separated: added, removed, rate_changed, renumbered, limit_changed, threshold_changed, text_changed."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "description": "Changes per page, default 50."
                  },
                  "cursor": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "next_cursor from the previous call."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/code_history": {
      "post": {
        "operationId": "code_history",
        "summary": "One code across every year held",
        "description": "Follows one Milieulijst item (by its 4-digit number, since the letter can change) or one Energielijst code through every year held, from 2024 on: whether it was on the list, its letter and MIA and Vamil percentages or its EIA maximum amounts and thresholds, RVO's status label, and the Staatscourant publication per year, plus the reason where it was withdrawn. Call it for an investment whose order date fell in an earlier year, or to see how a rate moved. Do not use it for the full conditions (use lookup_code with that year).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "maxLength": 20,
                    "description": "Milieulijst code or number (D 3116 or 3116) or Energielijst code (211107)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/scheme_rules": {
      "post": {
        "operationId": "scheme_rules",
        "summary": "Yearly scheme figures for EIA and MIA\\Vamil",
        "description": "Returns the scheme-wide figures for one year: how each Milieulijst letter maps to the MIA percentage (45, 36 or 27) and to 75% Vamil, read from the regulation; the EIA percentage, the minimum investment and the maximum per year from RVO's brochure (with every brochure edition, since RVO re-issues them during the year); the notification window; and the Energielijst's general provisions (payback-time rules for generic codes). Call it to explain how a percentage was arrived at or for yearly limits. It does not compute anyone's tax benefit.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "year": {
                    "type": "integer",
                    "minimum": 2000,
                    "maximum": 2100,
                    "description": "List year, for example 2026. The list of the year in which the purchase commitment was made applies. Give year or order_date, not both; with neither, the current calendar year is used."
                  },
                  "order_date": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Date the purchase commitment was made (order placed or contract signed), YYYY-MM-DD. Picks the list of that year."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    }
  }
}
