{
  "openapi": "3.1.0",
  "info": {
    "title": "Claim settlements API",
    "version": "1.0.0",
    "summary": "Open US class action settlements on Claim with official claim deadlines, payments, proof and who qualifies.",
    "description": "Read only JSON about the open class action settlements listed on Claim (claimmoney.com): the claim deadline the official settlement website states (else the date on Claim's page, labeled as such), the payment only when an official settlement website states it, whether proof is needed and who is in the class in the official website's own words, the official website and Claim's page. Free, no key needed. Every use shows the credit Data: Claim (claimmoney.com) as a visible link to https://claimmoney.com/. A listing does not mean a person qualifies. Claim is not a law firm, and the data is not legal advice.",
    "termsOfService": "https://claimmoney.com/datasets/api/#terms",
    "license": {
      "name": "CC BY 4.0",
      "identifier": "CC-BY-4.0"
    }
  },
  "externalDocs": {
    "description": "Documentation, terms and examples",
    "url": "https://claimmoney.com/datasets/api/"
  },
  "servers": [
    {
      "url": "https://claimmoney.com/datasets/api/v1"
    }
  ],
  "security": [
    {},
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "settlements",
      "description": "Open class action settlements"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "getIndex",
        "tags": [
          "settlements"
        ],
        "summary": "The API index: version, endpoints, credit and the documentation and OpenAPI links.",
        "responses": {
          "200": {
            "description": "The API index",
            "headers": {
              "ETag": {
                "description": "A hash of the body; send it back in If-None-Match to get 304 when nothing changed.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public, max-age=300",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "*",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Index"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the If-None-Match ETag still matches."
          },
          "401": {
            "description": "The X-API-Key header holds no active key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait the number of seconds in Retry-After, then try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/settlements.json": {
      "get": {
        "operationId": "listSettlements",
        "tags": [
          "settlements"
        ],
        "summary": "Open settlements, soonest claim deadline first, filtered and paged.",
        "description": "Open settlements on Claim, one per case, soonest claim deadline first (settlements without a deadline last). Ad and email click parameters such as utm_source are ignored; any other unknown parameter answers 400.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Company, brand, product or topic, 2 to 80 characters, for example amazon or data breach. Matched as whole words in the settlement name, brand, case name and category, with the settlement finder's words for its companies and situations.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 80
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "Two letter US state code, for example CA. Leaves out settlements Claim lists as limited to other states.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          {
            "name": "no_proof",
            "in": "query",
            "required": false,
            "description": "true: only settlements where at least one payment needs no proof, as the official site or Claim's page states it.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "deadline_from",
            "in": "query",
            "required": false,
            "description": "First claim deadline to include (YYYY-MM-DD). Leaves out settlements without a deadline.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "deadline_to",
            "in": "query",
            "required": false,
            "description": "Last claim deadline to include (YYYY-MM-DD). Leaves out settlements without a deadline.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "deadline_source",
            "in": "query",
            "required": false,
            "description": "official_site: only deadlines read on the official settlement website; claim_page: only dates from Claim's page.",
            "schema": {
              "type": "string",
              "enum": [
                "official_site",
                "claim_page"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results, from 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Results per page, 1 to 100; 50 by default.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of open settlements",
            "headers": {
              "ETag": {
                "description": "A hash of the body; send it back in If-None-Match to get 304 when nothing changed.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public, max-age=300",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "*",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementList"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the If-None-Match ETag still matches."
          },
          "400": {
            "description": "A parameter is unknown, repeated or invalid, or an API key was sent in the URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The X-API-Key header holds no active key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait the number of seconds in Retry-After, then try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "Claim's data store is busy; retry after Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/settlements/{id}.json": {
      "get": {
        "operationId": "getSettlement",
        "tags": [
          "settlements"
        ],
        "summary": "One open settlement by its id.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The settlement id from the list (the id field)",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-z]{1,8}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The settlement",
            "headers": {
              "ETag": {
                "description": "A hash of the body; send it back in If-None-Match to get 304 when nothing changed.",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public, max-age=300",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "*",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementOne"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the If-None-Match ETag still matches."
          },
          "401": {
            "description": "The X-API-Key header holds no active key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No open settlement has this id; a settlement leaves the API when its claims close.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait the number of seconds in Retry-After, then try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "Claim's data store is busy; retry after Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Attribution": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "text",
          "url",
          "rule",
          "terms",
          "license"
        ],
        "description": "The credit every use shows: the text Data: Claim (claimmoney.com) as a visible link to the url.",
        "properties": {
          "text": {
            "type": "string",
            "const": "Data: Claim (claimmoney.com)"
          },
          "url": {
            "type": "string",
            "const": "https://claimmoney.com/"
          },
          "rule": {
            "type": "string"
          },
          "terms": {
            "type": "string",
            "const": "https://claimmoney.com/datasets/api/#terms"
          },
          "license": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "url"
            ],
            "properties": {
              "name": {
                "type": "string",
                "const": "CC BY 4.0"
              },
              "url": {
                "type": "string",
                "const": "https://creativecommons.org/licenses/by/4.0/"
              }
            }
          }
        }
      },
      "Proof": {
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": false,
        "required": [
          "needed",
          "label",
          "source",
          "quotes",
          "url",
          "read_on"
        ],
        "properties": {
          "needed": {
            "type": "string",
            "enum": [
              "no",
              "yes",
              "mixed"
            ]
          },
          "label": {
            "type": "string",
            "enum": [
              "Not needed for at least one payment",
              "Needed for at least one payment",
              "Needed for some payments and not for others",
              "No proof",
              "Proof required",
              "Proof for some claims"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "official_site",
              "claim_page"
            ]
          },
          "quotes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The official settlement website's own sentences about proof (official_site only)"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "read_on": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        }
      },
      "WhoQualifies": {
        "type": [
          "object",
          "null"
        ],
        "additionalProperties": false,
        "required": [
          "quote",
          "url",
          "read_on",
          "scope",
          "states"
        ],
        "properties": {
          "quote": {
            "type": "string",
            "description": "The official settlement website's sentence that defines the class, as the site states it"
          },
          "url": {
            "type": "string"
          },
          "read_on": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "scope": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "nationwide",
              "state",
              "states",
              null
            ],
            "description": "Where the class lives as the sentence says; null when it does not say"
          },
          "states": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            }
          }
        }
      },
      "Settlement": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "brand",
          "claim_deadline",
          "deadline_source",
          "deadline_page",
          "deadline_read_on",
          "claim_page_deadline",
          "payment",
          "proof",
          "who_qualifies",
          "official_site",
          "claim_page",
          "api_url"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-z]{1,8}$",
            "description": "Stable id of the settlement on Claim (the id the deadline calendar uses)"
          },
          "name": {
            "type": "string",
            "description": "Settlement name as Claim lists it"
          },
          "brand": {
            "type": [
              "string",
              "null"
            ],
            "description": "Company or brand, when Claim names one"
          },
          "claim_deadline": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Claim deadline (YYYY-MM-DD): the date the official settlement website states, as Claim read it in the last 7 days, else the date on Claim's page; null when neither gives one"
          },
          "deadline_source": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "official_site",
              "claim_page",
              null
            ],
            "description": "official_site or claim_page: where claim_deadline comes from; null without a deadline"
          },
          "deadline_page": {
            "type": [
              "string",
              "null"
            ],
            "description": "Page of the official settlement website the deadline was read on (official_site deadlines only)"
          },
          "deadline_read_on": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Date Claim last read that page (YYYY-MM-DD; official_site deadlines only)"
          },
          "claim_page_deadline": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "The date Claim's page lists, only when it differs from the official deadline"
          },
          "payment": {
            "type": [
              "string",
              "null"
            ],
            "description": "Payment as Claim's settlement finder shows it, only when an official settlement website states the amount; null otherwise"
          },
          "proof": {
            "$ref": "#/components/schemas/Proof"
          },
          "who_qualifies": {
            "$ref": "#/components/schemas/WhoQualifies"
          },
          "official_site": {
            "type": [
              "string",
              "null"
            ],
            "description": "Official settlement website"
          },
          "claim_page": {
            "type": [
              "string",
              "null"
            ],
            "description": "Claim's page for the settlement on claimmoney.com"
          },
          "api_url": {
            "type": "string",
            "description": "This settlement in the API"
          }
        }
      },
      "SettlementList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "api_version",
          "attribution",
          "as_of",
          "note",
          "total",
          "page",
          "per_page",
          "pages",
          "next",
          "prev",
          "settlements"
        ],
        "properties": {
          "api_version": {
            "type": "string",
            "const": "1"
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          },
          "as_of": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "The US Eastern date the list is open on"
          },
          "note": {
            "type": "string"
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "per_page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "pages": {
            "type": "integer",
            "minimum": 1
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          },
          "prev": {
            "type": [
              "string",
              "null"
            ]
          },
          "settlements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Settlement"
            }
          }
        }
      },
      "SettlementOne": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "api_version",
          "attribution",
          "as_of",
          "note",
          "settlement"
        ],
        "properties": {
          "api_version": {
            "type": "string",
            "const": "1"
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          },
          "as_of": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "note": {
            "type": "string"
          },
          "settlement": {
            "$ref": "#/components/schemas/Settlement"
          }
        }
      },
      "Index": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "api_version",
          "attribution",
          "docs",
          "openapi",
          "postman_collection",
          "endpoints",
          "note"
        ],
        "properties": {
          "api_version": {
            "type": "string",
            "const": "1"
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          },
          "docs": {
            "type": "string"
          },
          "openapi": {
            "type": "string"
          },
          "postman_collection": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "url",
                "summary"
              ],
              "properties": {
                "url": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "api_version",
          "attribution",
          "error"
        ],
        "properties": {
          "api_version": {
            "type": "string",
            "const": "1"
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          },
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unknown_parameter",
                  "repeated_parameter",
                  "invalid_parameter",
                  "key_in_url",
                  "invalid_key",
                  "not_found",
                  "method_not_allowed",
                  "rate_limited",
                  "busy",
                  "internal_error"
                ]
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Optional. Claim does not offer keys yet, and every endpoint answers without one. Keep a key on a server: a key in a web page is public."
      }
    }
  }
}