{
  "openapi": "3.1.0",
  "info": {
    "title": "Daystamp",
    "version": "0.1.0",
    "description": "Was this appliance or heat pump ENERGY STAR certified on its purchase date? Daily EPA snapshots, archived lists and disqualifications, cited."
  },
  "servers": [],
  "security": [
    {
      "bearer": []
    },
    {}
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/v1/tools/status_on_date": {
      "post": {
        "operationId": "status_on_date",
        "summary": "Certification status of a model on a date",
        "description": "Answers whether a model was ENERGY STAR certified on a given date, usually the purchase or installation date on a rebate claim. Returns status (certified, not_certified, disqualified, not_found, unknown, or ambiguous when several brands share the model number and disagree), a one-sentence answer to quote, the basis (our daily snapshot of EPA's list, EPA's date certified, an archived list for the previous specification, or the Disqualified Products List), the matching listings with ENERGY STAR ID, specification version and dates, and how far back the category's data reaches. Call it for any appliance, water heater, furnace, boiler or thermostat model and a date. For an air-source heat pump use pairing_status_on_date instead, because certification is per outdoor and indoor combination. It cannot see listings EPA dropped before our first capture unless they are on an archived list or the Disqualified Products List; those dates answer unknown, never a guess. It states EPA facts, not rebate eligibility.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "model",
                  "date"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 80,
                    "description": "Model number as printed on the invoice or nameplate, for example CDH2445PS. Case, spaces and dashes are ignored; EPA's wildcard listings (CDH2445***) match it."
                  },
                  "date": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Purchase or installation date to check, from 1992-01-01 to today, YYYY-MM-DD."
                  },
                  "brand": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Optional brand name, for example Panasonic. Narrows matches when a model number is shared across brands."
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "Optional category id, for example heat-pumps, water-heaters, dishwashers, clothes-washers, refrigerators, furnaces (call coverage for all 20). Plain words such as 'heat pump water heater' also work."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/pairing_status_on_date": {
      "post": {
        "operationId": "pairing_status_on_date",
        "summary": "Heat pump combination status on a date",
        "description": "Answers whether an air-source heat pump outdoor unit paired with a specific indoor unit (air handler, coil or ductless head) was ENERGY STAR certified on a given date. EPA certifies heat pumps as combinations, so a rebate needs the pair, not the outdoor unit alone. Returns status, a sentence to quote, the matching certified combinations (newest first) with ENERGY STAR ID, AHRI reference number and any furnace model, and, when the pair is not listed, how many combinations each unit does appear in with examples. Call it for central ducted and mini-split heat pumps. Do not call it for geothermal heat pumps or heat pump water heaters (use status_on_date). EPA's current heat pump list reaches back to 28 March 2023 and EPA publishes no archived list for the version before it, so earlier dates answer unknown unless the combination is on today's list with an earlier certification date.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "outdoor_model",
                  "indoor_model",
                  "date"
                ],
                "properties": {
                  "outdoor_model": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 80,
                    "description": "Outdoor unit model number, for example CU-XZ12AKUAC."
                  },
                  "indoor_model": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 80,
                    "description": "Indoor unit model number (air handler, coil or ductless head), for example CS-XZ12AKUAW."
                  },
                  "furnace_model": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 80,
                    "description": "Optional furnace model, for a heat pump certified with a gas furnace as backup (dual fuel)."
                  },
                  "date": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Purchase or installation date to check, from 1992-01-01 to today, YYYY-MM-DD."
                  },
                  "brand": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Optional brand name, for example Panasonic. Narrows matches when a model number is shared across brands."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/model_history": {
      "post": {
        "operationId": "model_history",
        "summary": "Every listing and certified window for a model",
        "description": "Lists every record Daystamp holds for a model number: listings on EPA's current lists, listings we saw delisted (with the capture they disappeared), listings on EPA's archived lists for the previous specification, and dated disqualifications. Each record carries its certified window (from, to and the basis of each end), ENERGY STAR ID, category and specification version. Call it to explain a status answer, to find when a model was certified or dropped, or when status_on_date says ambiguous. Pages with next_cursor; a heat pump outdoor unit can appear in thousands of combinations, so pass category or brand to narrow. It cannot list what EPA dropped before our first capture unless an archived list or the Disqualified Products List records it.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "model"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 80,
                    "description": "Model number as printed on the invoice or nameplate, for example CDH2445PS. Case, spaces and dashes are ignored; EPA's wildcard listings (CDH2445***) match it."
                  },
                  "indoor_model": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 80,
                    "description": "Optional indoor unit model, to narrow a heat pump outdoor unit to one combination (implies category heat-pumps)."
                  },
                  "brand": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Optional brand name, for example Panasonic. Narrows matches when a model number is shared across brands."
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "Optional category id, for example heat-pumps, water-heaters, dishwashers, clothes-washers, refrigerators, furnaces (call coverage for all 20). Plain words such as 'heat pump water heater' also work."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "description": "Maximum items to return, default 20, at most 100."
                  },
                  "cursor": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "next_cursor from the previous call with the same filters."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/changes_between": {
      "post": {
        "operationId": "changes_between",
        "summary": "Certifications, delistings and disqualifications in a period",
        "description": "Lists what changed on EPA's lists between two dates: listings that appeared, were delisted, relisted or changed in our daily captures, certification dates EPA states on current listings, and disqualifications from EPA's Disqualified Products List. Kinds: listed, delisted, relisted, changed, certified, disqualified. Call it to poll once a day for models that left the list, or to find what was certified in a month. Filter by category, kinds and brand; pages with next_cursor (default 50 items). Changes observed by capture start on our first capture date; a period before it returns only certified and disqualified items, and says so.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "from"
                ],
                "properties": {
                  "from": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "First day of the period, inclusive, YYYY-MM-DD."
                  },
                  "to": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Last day of the period, inclusive; defaults to the latest capture, YYYY-MM-DD."
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "Optional category id, for example heat-pumps, water-heaters, dishwashers, clothes-washers, refrigerators, furnaces (call coverage for all 20). Plain words such as 'heat pump water heater' also work."
                  },
                  "kinds": {
                    "type": [
                      "array",
                      "string"
                    ],
                    "maxItems": 6,
                    "maxLength": 120,
                    "items": {
                      "type": "string",
                      "enum": [
                        "listed",
                        "delisted",
                        "relisted",
                        "changed",
                        "certified",
                        "disqualified"
                      ]
                    },
                    "description": "Only these kinds, as a list or a comma-separated string: listed, delisted, relisted, changed, certified, disqualified. Defaults to all."
                  },
                  "brand": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Optional brand name, for example Panasonic. Narrows matches when a model number is shared across brands."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "description": "Maximum items to return, default 50, at most 200."
                  },
                  "cursor": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "next_cursor from the previous call with the same filters."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/disqualified_search": {
      "post": {
        "operationId": "disqualified_search",
        "summary": "Search EPA's Disqualified Products List",
        "description": "Searches EPA's Disqualified Products List: models that failed ENERGY STAR verification testing and lost the label, with the date of disqualification, product type, organization and brand. Filter by brand, model (exact, EPA wildcard or a prefix of 4 or more characters), product_type (words such as Dishwashers or Heat Pump) and a date range; newest first, pages with next_cursor. Call it to check a brand's record or a batch of models against disqualifications. For a single model on a single date, status_on_date already includes this list. The list records failed tests only, not models a partner withdrew or that lapsed when a specification changed.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "brand": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Optional brand name, for example Panasonic. Narrows matches when a model number is shared across brands."
                  },
                  "model": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 80,
                    "description": "Model number, an EPA wildcard pattern, or the first 4 or more characters of one."
                  },
                  "product_type": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "Words from EPA's product type, for example Dishwashers, Heat Pump, Water Heaters."
                  },
                  "from": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Earliest disqualification date, YYYY-MM-DD."
                  },
                  "to": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "Latest disqualification date, YYYY-MM-DD."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "description": "Maximum items to return, default 25, at most 100."
                  },
                  "cursor": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "next_cursor from the previous call with the same filters."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/coverage": {
      "post": {
        "operationId": "coverage",
        "summary": "What Daystamp covers and how far back",
        "description": "Lists the 20 product categories Daystamp captures, each with its EPA dataset, current specification version and effective date, number of listings, the earliest certification date in EPA's data, any archived list for the previous specification with the date that certification ended, and a plain statement of how far back certified and not certified answers reach. Also the span of our daily captures and of the Disqualified Products List, and what is not covered. Call it once before relying on old dates, or when a status answer comes back unknown. It returns no model-level data.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "category": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "Optional category id, for example heat-pumps, water-heaters, dishwashers, clothes-washers, refrigerators, furnaces (call coverage for all 20). Plain words such as 'heat pump water heater' also work."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    }
  }
}
