{"source":"partifinansiering","operation":"search_contributions","description":"Search reported contributions to parties for a year. Signature: search_contributions(year: integer, calendar year, required; contributor: string, optional, default None; party: string, optional, default None; level: string, optional, default None; municipality: string, optional, default None; county: string, optional, default None; election_year_reports: yes/no, optional, default False; limit: integer, items, optional, default 50; offset: integer, items, optional, default 0).","signature":"search_contributions(year: integer, calendar year, required; contributor: string, optional, default None; party: string, optional, default None; level: string, optional, default None; municipality: string, optional, default None; county: string, optional, default None; election_year_reports: yes/no, optional, default False; limit: integer, items, optional, default 50; offset: integer, items, optional, default 0)","parameters":[{"name":"year","type":"integer","schema":{"type":"integer"},"required":true,"default":null,"description":"Contribution year. Annual contributions 2014 to the current year; election-year reports only for the years the register publishes (currently 2017, 2019, 2021, 2023 and 2025). Unit: calendar year.","unit":"calendar year"},{"name":"contributor","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Case-insensitive substring of the contributor name.","unit":null},{"name":"party","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Party list code or a unique part of the party name.","unit":null},{"name":"level","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Restrict to one party level (see get_party_accounts).","unit":null},{"name":"municipality","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"4-digit municipality number, with level municipal.","unit":null},{"name":"county","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"2-digit county number or name, with the county levels.","unit":null},{"name":"election_year_reports","type":"boolean","schema":{"type":"boolean"},"required":false,"default":false,"description":"Search valgkampbidrag (election-year reports) instead of annual contributions.","unit":null},{"name":"limit","type":"integer","schema":{"type":"integer"},"required":false,"default":50,"description":"Max contributions to return, 1-500 (default 50). Unit: items.","unit":"items"},{"name":"offset","type":"integer","schema":{"type":"integer"},"required":false,"default":0,"description":"Contributions to skip before the first one returned (default 0); with limit, pages through every match. Unit: items.","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/partifinansiering/search_contributions?year={year}&contributor={contributor}&party={party}&level={level}&municipality={municipality}&county={county}&election_year_reports=false&limit=50&offset=0","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"year":{"type":"integer"},"kind":{"type":"string"},"total":{"type":"integer"},"returned":{"type":"integer"},"contributions":{"type":"array","items":{"type":"object","properties":{"party":{"type":["string","null"]},"level":{"type":["string","null"]},"contributor":{"type":["string","null"]},"location":{"type":["string","null"]},"amount":{"type":["number","null"]},"received":{"type":["string","null"],"format":"date"},"reported":{"type":["string","null"],"format":"date"},"note":{"type":["string","null"]}},"additionalProperties":false}}},"additionalProperties":false,"required":["year","kind","total","returned","contributions"]},"response_schema_status":{"status":"declared","codegen_safe":true,"description":"Maintained response contract."},"entity_projection":{"status":"intentionally_none","entity_types":[],"description":"No stable cross-source entity projection is defined for this operation; entities is intentionally empty."},"error_contract":{"scope":"top-level HTTP error response; never part of a success payload","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object"}},"additionalProperties":false,"required":["code","message","retryable"]},"suggestion":{"type":"string"},"_meta":{"type":"object","properties":{"retrieved_at":{"type":"string","format":"date-time"},"language":{"type":"string","const":"en"},"content_languages":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object"}}},"required":["retrieved_at","language","content_languages","sources"]},"_links":{"type":"object","properties":{"self":{"type":"string","format":"uri"},"api_index":{"type":"string","format":"uri"},"feedback":{"type":"string","format":"uri"}},"required":["self","api_index","feedback"],"additionalProperties":false}},"additionalProperties":false,"required":["error","suggestion","_meta","_links"]},"statuses":{"400":{"codes":["MISSING_PARAMETER","INVALID_PARAMETER","INVALID_REQUEST"],"retryable":false},"404":{"codes":["SOURCE_NOT_FOUND","OPERATION_NOT_FOUND","ENTITY_NOT_FOUND"],"retryable":false},"429":{"codes":["RATE_LIMITED","GATEWAY_RATE_LIMITED"],"retryable":true},"503":{"codes":["SOURCE_UNAVAILABLE"],"retryable":true},"500":{"codes":["INTERNAL_ERROR"],"retryable":true}}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/partifinansiering/search_contributions/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/partifinansiering/search_contributions","source":"https://allemannsdata.com/wiki/api/v1/kilder/partifinansiering","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["year","kind","total","returned","contributions","contributions[].party","contributions[].level","contributions[].contributor","contributions[].location","contributions[].amount","contributions[].received","contributions[].reported","contributions[].note"],"output_fields_truncated":false,"canonical_field_aliases":{},"response_example":{"source":"partifinansiering","operation":"search_contributions","parameters":{"year":1,"contributor":"example value","party":"example value","level":"example value","municipality":"example value","county":"example value","election_year_reports":false,"limit":50,"offset":0},"data":{"year":1,"kind":"example value","total":1,"returned":1,"contributions":[{"party":"example value","level":"example value","contributor":"example value","location":"example value","amount":1.0,"received":"2026-01-15","reported":"2026-01-15","note":"example value"}]},"entities":[],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"partifinansiering","name":"Partifinansiering","description":"Party accounts, contributions and top contributors reported under partiloven, from the undocumented endpoint behind partifinansiering.no.","cache_ttl_seconds":3600,"documentation":"https://www.partifinansiering.no/"}]},"_provenance":{"data":{"source":"partifinansiering","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/partifinansiering"},"entities":{"source":"partifinansiering","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/partifinansiering","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/partifinansiering/search_contributions","source":"https://allemannsdata.com/wiki/api/v1/kilder/partifinansiering","wiki":"https://allemannsdata.com/wiki/kilder/partifinansiering/search_contributions/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
