{"openapi":"3.1.0","info":{"title":"HumanToll REST API","version":"1.0.0","summary":"Deaths and injuries statistically attributed to the supply chains of products, materials and consumer spending — every figure with its interval, scenario, run and sources.","description":"HumanToll is a research project of Quiescence, not a commercial service. This API is free and unauthenticated: 100 requests a day from one address, reset at 00:00 UTC. For advanced API access, contact info@quiescence.eu.\n\n**How to quote a figure.** With its interval, every time; at two significant figures; with its scenario, run and methodology version. A figure graded INDICATIVE has no central value. Say \"attributed to the supply chain of\", never \"caused by\". Production phase only; every figure is a floor.\n\n**Figures are withheld until a validated run is published.** Until then every response has `status: withheld`, `metrics: null` and `data.results: null`, and `withheld` says why. Facts from the register stay available.\n\n**Every response carries** `status`, `scenario`, `run`, `methodology_version`, `data_version`, `metrics`, `data`, `withheld`, `sources` (each release with its licence and the credit its licence requires), `licence` (what the response may be reused under), `caveats` and `citation`.\n\nEnglish only. Slugs and codes never change. Nothing in this API computes: every figure is a row a published run wrote.","contact":{"name":"HumanToll","email":"info@quiescence.eu","url":"https://quiescence.eu/humantoll/about/"}},"servers":[{"url":"https://quiescence.eu/humantoll/api/v1"}],"externalDocs":{"description":"The API reference and the rules for quoting a figure","url":"https://quiescence.eu/humantoll/docs/"},"tags":[{"name":"About","description":"What the API is, and finding things in it."},{"name":"Products","description":"Products, what carries each figure, and two products compared."},{"name":"Spending","description":"€1,000 of EU households' spending per consumption category."},{"name":"Ledger","description":"The harm behind the figures: materials, conflicts, countries, channels."},{"name":"Method","description":"Scenarios, runs, methodology versions and the source register."}],"paths":{"/":{"get":{"operationId":"getIndex","summary":"What this API is, where to start, and the daily allowance","tags":["About"],"parameters":[],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["name","version","figures_published","endpoints","rate_limit","access","language"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"figures_published":{"type":"boolean"},"endpoints":{"type":"array","items":{"type":"object","required":["path","summary"],"properties":{"path":{"type":"string"},"summary":{"type":"string"}}}},"rate_limit":{"type":"object","required":["requests","per","resets"],"properties":{"requests":{"type":"integer"},"per":{"type":"string"},"resets":{"type":"string"}}},"access":{"type":"string"},"language":{"type":"string"}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products":{"get":{"operationId":"listProducts","summary":"The product catalogue; with a published run, each product's deaths per unit and per kg","tags":["Products"],"parameters":[{"name":"tier","in":"query","required":false,"description":"semi_finished or finished.","schema":{"type":"string","enum":["semi_finished","finished"]}},{"name":"category","in":"query","required":false,"description":"A product category code, as each product's `category.code` gives it.","schema":{"type":"string","pattern":"^[a-z0-9]+([_-][a-z0-9]+)*$","maxLength":40}},{"name":"sort","in":"query","required":false,"description":"name, toll (deaths per kg on the material route), confidence or complete.","schema":{"type":"string","enum":["name","toll","confidence","complete"],"default":"name"}},{"name":"scenario","in":"query","required":false,"description":"The attribution scenario. The default is the published default (S-MAX).","schema":{"type":"string","enum":["S-MAX","S-EVID","S-RES","S-ARMS","S-CONS"]}}],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["sort","count","products","records","results"],"properties":{"sort":{"type":"string"},"count":{"type":"integer"},"products":{"type":"array","items":{"type":"object","required":["slug","name","links","tier","category","unit","unit_label","unit_mass_g","complete","bom_lines","bom_confidence","is_arms"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"links":{"type":"object"},"tier":{"type":"string"},"category":{"type":"object","required":["code","name"],"properties":{"code":{"type":"string"},"name":{"type":"string"}}},"unit":{"type":"string"},"unit_label":{"type":"string"},"unit_mass_g":{"type":["number","null"]},"complete":{"type":"boolean"},"bom_lines":{"type":"integer"},"bom_confidence":{"type":["string","null"]},"is_arms":{"type":"boolean"}}}},"records":{"type":"null"},"results":{"type":["object","null"],"required":["metric","route","figures"],"properties":{"metric":{"type":"string"},"route":{"type":"string"},"figures":{"type":"object","additionalProperties":{"type":"object","required":["per_unit","per_kg"],"properties":{"per_unit":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]},"per_kg":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]}}}}}}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/product/{slug}":{"get":{"operationId":"getProduct","summary":"One product: both routes and both metrics, the bill of materials and the chain it reaches","tags":["Products"],"parameters":[{"name":"slug","in":"path","required":true,"description":"The product's permanent slug, as in its page's address.","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","maxLength":80}},{"name":"scenario","in":"query","required":false,"description":"The attribution scenario. The default is the published default (S-MAX).","schema":{"type":"string","enum":["S-MAX","S-EVID","S-RES","S-ARMS","S-CONS"]}}],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["slug","name","links","tier","category","unit","unit_label","unit_mass_g","archetype","status","complete","bom_confidence","is_arms","bill_of_materials","raw_inputs","trace","industries","used_in","records","results"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"links":{"type":"object"},"tier":{"type":"string"},"category":{"type":"object","required":["code","name"],"properties":{"code":{"type":"string"},"name":{"type":"string"}}},"unit":{"type":"string"},"unit_label":{"type":"string"},"unit_mass_g":{"type":["number","null"]},"archetype":{"type":"string"},"status":{"type":"string"},"complete":{"type":"boolean"},"bom_confidence":{"type":["string","null"]},"is_arms":{"type":"boolean"},"bill_of_materials":{"type":"array","items":{"type":"object","required":["line","role","component","qty","unit","loss_factor","source","confidence","note"],"properties":{"line":{"type":"integer"},"role":{"type":"string"},"component":{"type":"object","required":["type","key","name"],"properties":{"type":{"type":"string"},"key":{"type":["string","null"]},"name":{"type":["string","null"]}}},"qty":{"type":"number"},"unit":{"type":"string"},"loss_factor":{"type":"number"},"source":{"type":"object","required":["text","url"],"properties":{"text":{"type":"string"},"url":{"type":"string"}}},"confidence":{"type":"string"},"note":{"type":["string","null"]}}}},"raw_inputs":{"type":"array","items":{"type":"object","required":["type","key","name","qty","unit"],"properties":{"type":{"type":"string"},"key":{"type":["string","null"]},"name":{"type":"string"},"qty":{"type":"number"},"unit":{"type":"string"}}}},"trace":{"type":["object","null"]},"industries":{"type":"array","items":{"type":"object"}},"used_in":{"type":"array","items":{"type":"object"}},"records":{"type":"null"},"results":{"type":["object","null"],"required":["scenarios","nearest_by_kg"],"properties":{"scenarios":{"type":"array","items":{"type":"object","required":["code","name","run","deaths_per_unit"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"run":{"type":["integer","null"]},"deaths_per_unit":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]}}}},"nearest_by_kg":{"type":"array","items":{"type":"object","required":["product","deaths_per_kg"],"properties":{"product":{"$ref":"#/components/schemas/ProductRef"},"deaths_per_kg":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]}}}}}}}},"metrics":{"$ref":"#/components/schemas/ProductMetrics"}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/product/{slug}/contributions":{"get":{"operationId":"getProductContributions","summary":"What carries one figure: its breakdown by material, country, conflict, channel or industry","tags":["Products"],"parameters":[{"name":"slug","in":"path","required":true,"description":"The product's permanent slug, as in its page's address.","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","maxLength":80}},{"name":"metric","in":"query","required":false,"description":"deaths or injuries.","schema":{"type":"string","enum":["deaths","injuries"],"default":"deaths"}},{"name":"method","in":"query","required":false,"description":"material (the route through the bill of materials) or mrio (per €1,000).","schema":{"type":"string","enum":["material","mrio"],"default":"material"}},{"name":"type","in":"query","required":false,"description":"One breakdown; all of the route's when absent.","schema":{"type":"string","enum":["material","country","conflict","channel","sector"]}},{"name":"scenario","in":"query","required":false,"description":"The attribution scenario. The default is the published default (S-MAX).","schema":{"type":"string","enum":["S-MAX","S-EVID","S-RES","S-ARMS","S-CONS"]}}],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["slug","name","links","metric","method","records","results"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"links":{"type":"object"},"metric":{"type":"string"},"method":{"type":"string"},"records":{"type":"null"},"results":{"type":["object","null"],"required":["headline","breakdowns"],"properties":{"headline":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]},"breakdowns":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/Contribution"}}}}}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/product/{slug}/explain":{"get":{"operationId":"getProductExplain","summary":"The audit trail of one figure: every stage, each summing to the headline","tags":["Products"],"parameters":[{"name":"slug","in":"path","required":true,"description":"The product's permanent slug, as in its page's address.","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","maxLength":80}},{"name":"metric","in":"query","required":false,"description":"deaths or injuries.","schema":{"type":"string","enum":["deaths","injuries"],"default":"deaths"}},{"name":"scenario","in":"query","required":false,"description":"The attribution scenario. The default is the published default (S-MAX).","schema":{"type":"string","enum":["S-MAX","S-EVID","S-RES","S-ARMS","S-CONS"]}}],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["slug","name","links","metric","records","results"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"links":{"type":"object"},"metric":{"type":"string"},"records":{"type":"null"},"results":{"type":["object","null"],"required":["routes","quantities","check"],"properties":{"routes":{"type":"object","additionalProperties":{"type":["object","null"],"required":["headline","steps"],"properties":{"headline":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]},"steps":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/Contribution"}}}}}},"quantities":{"type":"array","items":{"type":"object","required":["material","qty","unit"],"properties":{"material":{"type":"object","required":["key","name"],"properties":{"key":{"type":["string","null"]},"name":{"type":["string","null"]}}},"qty":{"type":"number"},"unit":{"type":"string"}}}},"check":{"type":"string"}}}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compare":{"get":{"operationId":"compareProducts","summary":"Two products drawn together: the interval of their ratio, and a verdict only where it holds","tags":["Products"],"parameters":[{"name":"a","in":"query","required":true,"description":"The first product's slug.","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","maxLength":80}},{"name":"b","in":"query","required":true,"description":"The second product's slug.","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","maxLength":80}},{"name":"metric","in":"query","required":false,"description":"deaths or injuries.","schema":{"type":"string","enum":["deaths","injuries"],"default":"deaths"}},{"name":"scenario","in":"query","required":false,"description":"The attribution scenario. The default is the published default (S-MAX).","schema":{"type":"string","enum":["S-MAX","S-EVID","S-RES","S-ARMS","S-CONS"]}}],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["a","b","metric","records","results"],"properties":{"a":{"type":"object"},"b":{"type":"object"},"metric":{"type":"string"},"records":{"type":"null"},"results":{"type":["object","null"],"required":["a","b","pair"],"properties":{"a":{"type":"object","required":["per_unit","per_kg","per_1000_eur"],"properties":{"per_unit":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]},"per_kg":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]},"per_1000_eur":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]}}},"b":{"type":"object","required":["per_unit","per_kg","per_1000_eur"],"properties":{"per_unit":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]},"per_kg":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]},"per_1000_eur":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]}}},"pair":{"type":["object","null"],"required":["ratio_of","by","p_a_greater","samples"],"properties":{"ratio_of":{"type":"string"},"by":{"type":"object","additionalProperties":{"type":"object","required":["central","low","median","high","verdict"],"properties":{"central":{"type":["number","null"]},"low":{"type":["number","null"]},"median":{"type":["number","null"]},"high":{"type":["number","null"]},"verdict":{"type":"string","enum":["a_larger","b_larger","not_distinguishable"]}}}},"p_a_greater":{"type":["number","null"]},"samples":{"type":"integer"}}}}}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/spend":{"get":{"operationId":"getSpend","summary":"EU households' spending on each consumption category: the harm in €amount, grouped against all spending","tags":["Spending"],"parameters":[{"name":"category","in":"query","required":false,"description":"A COICOP 2018 category code; all of them when absent.","schema":{"type":"string","pattern":"^[0-9]{2}(-[0-9]{2})?$","maxLength":5}},{"name":"amount","in":"query","required":false,"description":"Euros spent; every figure and its interval scale with it.","schema":{"type":"number","exclusiveMinimum":0,"maximum":1000000000,"default":1000}},{"name":"scenario","in":"query","required":false,"description":"The attribution scenario. The default is the published default (S-MAX).","schema":{"type":"string","enum":["S-MAX","S-EVID","S-RES","S-ARMS","S-CONS"]}}],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["amount_eur","consumer","categories","records","results"],"properties":{"amount_eur":{"type":"number"},"consumer":{"type":"string"},"categories":{"type":"array","items":{"type":"object","required":["code","name","divisions","note"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"divisions":{"type":"string"},"note":{"type":"string"}}}},"records":{"type":"null"},"results":{"type":["object","null"],"required":["rows","left_out"],"properties":{"rows":{"type":"array","items":{"type":"object","required":["code","reference","deaths","injuries","share_of_spend","made_in_consumer","group"],"properties":{"code":{"type":"string"},"reference":{"type":"boolean"},"deaths":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]},"injuries":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]},"share_of_spend":{"type":["number","null"]},"made_in_consumer":{"type":["number","null"]},"group":{"type":["object","null"]}}}},"left_out":{"type":"object","required":["industries","share_of_spend","why"],"properties":{"industries":{"type":"array","items":{"type":"string"}},"share_of_spend":{"type":["number","null"]},"why":{"type":"string"}}}}}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/material/{slug}":{"get":{"operationId":"getMaterial","summary":"A raw material: who produces it, which products use it, and what it carries in a run","tags":["Ledger"],"parameters":[{"name":"slug","in":"path","required":true,"description":"The material's permanent slug, as in its page's address.","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","maxLength":80}},{"name":"scenario","in":"query","required":false,"description":"The attribution scenario. The default is the published default (S-MAX).","schema":{"type":"string","enum":["S-MAX","S-EVID","S-RES","S-ARMS","S-CONS"]}}],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["slug","name","category","unit","flags","criticality","conflict_mineral","note","used_in","records","results"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"unit":{"type":"string"},"flags":{"type":"object"},"criticality":{"type":"object","required":["level","source"],"properties":{"level":{"type":"string"},"source":{"type":"string"}}},"conflict_mineral":{"type":"object","required":["flag","source"],"properties":{"flag":{"type":"boolean"},"source":{"type":"string"}}},"note":{"type":"string"},"used_in":{"type":"array","items":{"type":"object"}},"records":{"type":["object","null"],"required":["production"],"properties":{"production":{"type":["object","null"],"required":["year","unit","world_total","countries"],"properties":{"year":{"type":["integer","null"]},"unit":{"type":"string"},"world_total":{"type":["number","null"]},"countries":{"type":"array","items":{"type":"object","required":["iso3","name","qty","quality"],"properties":{"iso3":{"type":"string"},"name":{"type":"string"},"qty":{"type":"number"},"quality":{"type":"string"}}}}}}}},"results":{"type":["object","null"],"required":["reach","deaths_per_tonne"],"properties":{"reach":{"type":"array","items":{"$ref":"#/components/schemas/Reach"}},"deaths_per_tonne":{"type":"null"}}}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/conflict/{slug}":{"get":{"operationId":"getConflict","summary":"A scored conflict: the deaths UCDP counted, the model's attribution, and the products it reaches","tags":["Ledger"],"parameters":[{"name":"slug","in":"path","required":true,"description":"The conflict's permanent slug, as in its page's address.","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","maxLength":80}},{"name":"scenario","in":"query","required":false,"description":"The attribution scenario. The default is the published default (S-MAX).","schema":{"type":"string","enum":["S-MAX","S-EVID","S-RES","S-ARMS","S-CONS"]}}],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["slug","name","ucdp_conflict_id","type","region","years","attribution","records","results"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"ucdp_conflict_id":{"type":"integer"},"type":{"type":"string"},"region":{"type":"string"},"years":{"type":"object","required":["from","to"],"properties":{"from":{"type":["integer","null"]},"to":{"type":["integer","null"]}}},"attribution":{"type":"object","required":["scenario","periods"],"properties":{"scenario":{"type":"string"},"periods":{"type":"array","items":{"type":"object","required":["label","year_from","year_to","rationale","shares"],"properties":{"label":{"type":"string"},"year_from":{"type":"integer"},"year_to":{"type":"integer"},"rationale":{"type":"string"},"shares":{"type":"array","items":{"type":"object","required":["sector","name","share","confidence"],"properties":{"sector":{"type":"string"},"name":{"type":"string"},"share":{"type":["number","null"]},"confidence":{"type":["string","null"]}}}}}}}}},"records":{"type":["object","null"],"required":["ledger"],"properties":{"ledger":{"type":"object","required":["events","deaths_best","precise_location_pct","year_min","year_max","countries"],"properties":{"events":{"type":"integer"},"deaths_best":{"type":"integer"},"precise_location_pct":{"type":["number","null"]},"year_min":{"type":["integer","null"]},"year_max":{"type":["integer","null"]},"countries":{"type":"integer"}}}}},"results":{"type":["object","null"],"required":["reach"],"properties":{"reach":{"type":"array","items":{"$ref":"#/components/schemas/Reach"}}}}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/country/{iso3}":{"get":{"operationId":"getCountry","summary":"A country: the harm counted there, and the products it reaches","tags":["Ledger"],"parameters":[{"name":"iso3","in":"path","required":true,"description":"ISO 3166-1 alpha-3, in either case.","schema":{"type":"string","pattern":"^[A-Za-z]{3}$"}},{"name":"scenario","in":"query","required":false,"description":"The attribution scenario. The default is the published default (S-MAX).","schema":{"type":"string","enum":["S-MAX","S-EVID","S-RES","S-ARMS","S-CONS"]}}],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["iso3","name","region","income_group","records","results"],"properties":{"iso3":{"type":"string"},"name":{"type":"string"},"region":{"type":"string"},"income_group":{"type":"string"},"records":{"type":["object","null"],"required":["harm_counted"],"properties":{"harm_counted":{"type":"object","required":["channels","deaths"],"properties":{"channels":{"type":"array","items":{"type":"object","required":["channel","deaths","year_min","year_max","latest_year_deaths"],"properties":{"channel":{"type":"string"},"deaths":{"type":"integer"},"year_min":{"type":["integer","null"]},"year_max":{"type":["integer","null"]},"latest_year_deaths":{"type":["integer","null"]}}}},"deaths":{"type":"integer"}}}}},"results":{"type":["object","null"],"required":["reach"],"properties":{"reach":{"type":"array","items":{"$ref":"#/components/schemas/Reach"}}}}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/channel/{code}":{"get":{"operationId":"getChannel","summary":"A harm channel: what it counts, how it is attributed, and what it reaches","tags":["Ledger"],"parameters":[{"name":"code","in":"path","required":true,"description":"C1 conflict · C2 work · C3 deprivation · C4 exposure.","schema":{"type":"string","pattern":"^[Cc][1-5]$"}},{"name":"scenario","in":"query","required":false,"description":"The attribution scenario. The default is the published default (S-MAX).","schema":{"type":"string","enum":["S-MAX","S-EVID","S-RES","S-ARMS","S-CONS"]}}],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["code","name","description","requires_paf","exclusion_rule","attribution","records","results"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"requires_paf":{"type":"boolean"},"exclusion_rule":{"type":"string"},"attribution":{"type":["object","null"]},"records":{"type":["object","null"],"required":["events","deaths","countries","year_min","year_max"],"properties":{"events":{"type":"integer"},"deaths":{"type":"integer"},"countries":{"type":"integer"},"year_min":{"type":"integer"},"year_max":{"type":"integer"}}},"results":{"type":["object","null"],"required":["reach"],"properties":{"reach":{"type":"array","items":{"$ref":"#/components/schemas/Reach"}}}}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/scenarios":{"get":{"operationId":"listScenarios","summary":"The five attribution scenarios and their parameters","tags":["Method"],"parameters":[],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["scenarios","records","results"],"properties":{"scenarios":{"type":"array","items":{"type":"object","required":["code","name","description","default","params"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"default":{"type":"boolean"},"params":{"type":["object","null"]}}}},"records":{"type":"null"},"results":{"type":"null"}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/runs":{"get":{"operationId":"listRuns","summary":"The published runs; none while figures are withheld","tags":["Method"],"parameters":[],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["runs","records","results"],"properties":{"runs":{"type":"array","items":{"type":"object"}},"records":{"type":"null"},"results":{"type":"null"}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/runs/{id}":{"get":{"operationId":"getRun","summary":"One published run and the verdict of each validation gate","tags":["Method"],"parameters":[{"name":"id","in":"path","required":true,"description":"The run id a figure's citation names.","schema":{"type":"integer","minimum":1}}],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["run","gates","records","results"],"properties":{"run":{"type":"object"},"gates":{"type":"array","items":{"type":"object","required":["gate","passed","offenders","explained","detail","engine","checked_at"],"properties":{"gate":{"type":"string"},"passed":{"type":"boolean"},"offenders":{"type":"integer"},"explained":{"type":"integer"},"detail":{"type":"string"},"engine":{"type":"string"},"checked_at":{"type":["string","null"]}}}},"records":{"type":"null"},"results":{"type":"null"}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/methodology":{"get":{"operationId":"listMethodology","summary":"The versions of the methodology","tags":["Method"],"parameters":[],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["versions","records","results"],"properties":{"versions":{"type":"array","items":{"type":"object","required":["code","version","published_on","summary","frozen","document_sha256","links"],"properties":{"code":{"type":"string"},"version":{"type":"string"},"published_on":{"type":["string","null"]},"summary":{"type":"string"},"frozen":{"type":"boolean"},"document_sha256":{"type":"string"},"links":{"type":"object"}}}},"records":{"type":"null"},"results":{"type":"null"}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sources":{"get":{"operationId":"listSources","summary":"The source register: every source, its licence, and the basis it is used on","tags":["Method"],"parameters":[],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["sources","records","results"],"properties":{"sources":{"type":"array","items":{"type":"object","required":["code","name","homepage","enabled","verified_on","basis","licence","credit","releases"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"},"enabled":{"type":"boolean"},"verified_on":{"type":["string","null"]},"basis":{"type":["string","null"]},"licence":{"type":"object"},"credit":{"type":"string"},"releases":{"type":"array","items":{"type":"object"}}}}},"records":{"type":"null"},"results":{"type":"null"}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search":{"get":{"operationId":"search","summary":"Find a product, material, conflict, country or channel","tags":["About"],"parameters":[{"name":"q","in":"query","required":true,"description":"Two to 64 characters.","schema":{"type":"string","minLength":2,"maxLength":64}}],"security":[{},{"key":[]}],"responses":{"200":{"description":"The response, with the whole apparatus: status, scenario, run, metrics, sources, licence, caveats, citation.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"properties":{"data":{"type":"object","required":["q","count","hits","records","results"],"properties":{"q":{"type":"string"},"count":{"type":"integer"},"hits":{"type":"array","items":{"type":"object","required":["type","key","name","links"],"properties":{"type":{"type":"string","enum":["product","material","conflict","country","channel"]},"key":{"type":"string"},"name":{"type":"string"},"links":{"type":"object"}}}},"records":{"type":"null"},"results":{"type":"null"}}}}}]}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This API as an OpenAPI 3.1 document, generated from the route table","tags":["About"],"parameters":[],"security":[{},{"key":[]}],"responses":{"200":{"description":"This document.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"A parameter is missing, unknown or malformed; `error.detail` names it and what is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A key was presented and is not valid (unknown, revoked or expired). It is refused, never served as anonymous.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such path, or no such product, material, conflict, country, channel, category or published run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Only GET, HEAD and OPTIONS are answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This address has used its requests for today (UTC). For advanced API access, contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"A fault on our side, logged. A figure that fails its own checks is a 500, never a number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The database is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Figure":{"type":"object","required":["value","low","high","confidence","range_only","unit"],"properties":{"value":{"type":["number","null"],"description":"The central estimate at two significant figures; null when the grade is INDICATIVE, which publishes a range only."},"low":{"type":"number","description":"5th percentile of the draws."},"high":{"type":"number","description":"95th percentile of the draws."},"confidence":{"type":"string","enum":["HIGH","MEDIUM","LOW","INDICATIVE"]},"range_only":{"type":"boolean"},"unit":{"type":"string"}},"description":"One published figure. Quote the interval with it, always."},"Inversion":{"type":["object","null"],"required":["fewest","most","unit"],"properties":{"fewest":{"type":["number","null"]},"most":{"type":["number","null"]},"unit":{"type":"string"}},"description":"The human-scale inversion (\"one death per N units\"), rounded outward from the interval."},"MaterialRoute":{"type":["object","null"],"required":["per_unit","per_kg","traced_share","units_per_harm"],"properties":{"per_unit":{"$ref":"#/components/schemas/Figure"},"per_kg":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]},"traced_share":{"type":["number","null"],"description":"Share of the bill of materials' mass that reaches a registered raw material."},"units_per_harm":{"$ref":"#/components/schemas/Inversion"}},"description":"The route through the bill of materials: a floor. Null when nothing is traced — a zero of the model, not of the world."},"MrioRoute":{"type":["object","null"],"required":["per_1000_eur","eur_per_harm"],"properties":{"per_1000_eur":{"$ref":"#/components/schemas/Figure"},"eur_per_harm":{"$ref":"#/components/schemas/Inversion"}},"description":"The monetary route through the multi-regional input–output tables, per €1,000 spent in the product's industry."},"MetricRoutes":{"type":"object","required":["material","mrio"],"properties":{"material":{"$ref":"#/components/schemas/MaterialRoute"},"mrio":{"$ref":"#/components/schemas/MrioRoute"}}},"ProductMetrics":{"type":["object","null"],"required":["deaths","injuries"],"properties":{"deaths":{"$ref":"#/components/schemas/MetricRoutes"},"injuries":{"$ref":"#/components/schemas/MetricRoutes"}}},"ProductRef":{"type":"object","required":["slug","name","links"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"links":{"type":"object","required":["api","html"],"properties":{"api":{"type":"string"},"html":{"type":"string"}}}}},"RunRef":{"type":["object","null"],"required":["id","year","system","engine","published_at"],"properties":{"id":{"type":"integer"},"year":{"type":"integer"},"system":{"type":"string"},"engine":{"type":"string"},"published_at":{"type":["string","null"]}}},"Withheld":{"type":"object","required":["field","reason"],"properties":{"field":{"type":"string"},"reason":{"type":"string"}}},"Source":{"type":"object","required":["release_id","source","name","release","licence","licence_url","attribution","for"],"properties":{"release_id":{"type":"integer"},"source":{"type":"string"},"name":{"type":"string"},"release":{"type":"string"},"licence":{"type":"string"},"licence_url":{"type":"string"},"attribution":{"type":"string"},"for":{"type":"string","enum":["records","results"]}}},"Licence":{"type":["object","null"],"required":["code","name","url","note"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"note":{"type":"string"}}},"Contribution":{"type":"object","required":["contributor","value","share"],"properties":{"contributor":{"type":"object","required":["type","key","name","residue"],"properties":{"type":{"type":"string"},"key":{"type":["string","null"]},"name":{"type":["string","null"]},"residue":{"type":"boolean"}}},"value":{"type":["number","null"]},"share":{"type":["number","null"]}}},"Reach":{"type":"object","required":["product","share","figure"],"properties":{"product":{"$ref":"#/components/schemas/ProductRef"},"share":{"type":["number","null"]},"figure":{"oneOf":[{"$ref":"#/components/schemas/Figure"},{"type":"null"}]}}},"Envelope":{"type":"object","required":["ok","api","status","scenario","run","methodology_version","data_version","lifecycle_phase","metrics","data","withheld","sources","licence","caveats","citation","links"],"properties":{"ok":{"const":true},"api":{"const":"humantoll/v1"},"status":{"type":"string","enum":["published","preview","withheld"],"description":"withheld: no figure anywhere in this response, and `withheld` says why."},"scenario":{"type":"object","required":["code","name","default"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"default":{"type":"boolean"}}},"run":{"$ref":"#/components/schemas/RunRef"},"methodology_version":{"type":"string"},"data_version":{"type":["string","null"]},"lifecycle_phase":{"const":"production"},"metrics":{"type":["object","null"]},"data":{"type":"object"},"withheld":{"type":"array","items":{"$ref":"#/components/schemas/Withheld"}},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"}},"licence":{"$ref":"#/components/schemas/Licence"},"caveats":{"type":"array","items":{"type":"string"}},"citation":{"type":"string"},"links":{"type":"object","required":["self","html","docs","openapi"],"properties":{"self":{"type":"string"},"html":{"type":"string"},"docs":{"type":"string"},"openapi":{"type":"string"}}}}},"Error":{"type":"object","required":["ok","api","error"],"properties":{"ok":{"const":false},"api":{"const":"humantoll/v1"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"detail":{"type":"object"}}}}}},"securitySchemes":{"key":{"type":"http","scheme":"bearer","description":"Optional. A key for advanced access, issued on request — contact info@quiescence.eu. Send it as `Authorization: Bearer <key>` (or `X-API-Key`). Without one, the allowance per address applies."}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed today — from this address, or with this key.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left today.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"When the allowance resets, as a Unix time: 00:00 UTC.","schema":{"type":"integer"}}}}}
