{"source":"partifinansiering","operation":"get_party_accounts","description":"One party unit's reported accounts for a year. Signature: get_party_accounts(party: string, required; year: integer, calendar year, required; level: string, optional, default 'national'; municipality: string, optional, default None; county: string, optional, default None; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0).","signature":"get_party_accounts(party: string, required; year: integer, calendar year, required; level: string, optional, default 'national'; municipality: string, optional, default None; county: string, optional, default None; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0)","parameters":[{"name":"party","type":"string","schema":{"type":"string"},"required":true,"default":null,"description":"Party list code (e.g. \"H\", \"SP\") or a unique part of the party name (e.g. \"H\u00f8yre\"). An ambiguous or unknown name raises an error.","unit":null},{"name":"year","type":"integer","schema":{"type":"integer"},"required":true,"default":null,"description":"Accounting year, 2014 to the current year. Unit: calendar year.","unit":"calendar year"},{"name":"level","type":"string","schema":{"type":"string"},"required":false,"default":"national","description":"Party level: national (default), national_youth, county, county_youth or municipal.","unit":null},{"name":"municipality","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"4-digit municipality number, required for level municipal.","unit":null},{"name":"county","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"2-digit county number or a county name, required for the county levels.","unit":null},{"name":"limit","type":"integer","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"display_type":"integer","required":false,"default":25,"description":"Maximum list items returned by the gateway (default 25, maximum 100).","unit":"items"},{"name":"offset","type":"integer","schema":{"type":"integer","minimum":0,"default":0},"display_type":"integer","required":false,"default":0,"description":"Number of list items to skip before returning the page.","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/partifinansiering/get_party_accounts?party={party}&year={year}&level=national&municipality={municipality}&county={county}&limit=25&offset=0","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"party":{"type":["string","null"]},"level":{"type":["string","null"]},"year":{"type":"integer"},"income":{"type":"object","properties":{"state_support":{"type":["number","null"]},"municipal_county_support":{"type":["number","null"]},"other_public_support":{"type":["number","null"]},"membership_fees":{"type":["number","null"]},"lotteries_and_fundraising":{"type":["number","null"]},"capital_income":{"type":["number","null"]},"business_income":{"type":["number","null"]},"other_own_income":{"type":["number","null"]},"from_private_persons":{"type":["number","null"]},"from_companies":{"type":["number","null"]},"from_labour_organisations":{"type":["number","null"]},"from_other_organisations":{"type":["number","null"]},"from_others":{"type":["number","null"]},"transfers_from_party_units":{"type":["number","null"]},"total":{"type":["number","null"]}},"additionalProperties":false},"costs_by_type":{"type":"object","properties":{"salaries":{"type":["number","null"]},"goods":{"type":["number","null"]},"services":{"type":["number","null"]},"depreciation":{"type":["number","null"]},"financial":{"type":["number","null"]},"transfers_to_party_units":{"type":["number","null"]},"total":{"type":["number","null"]}},"additionalProperties":false},"costs_by_activity":{"type":"object","properties":{"administration":{"type":["number","null"]},"party_activities":{"type":["number","null"]},"campaign_marketing":{"type":["number","null"]},"campaign_other":{"type":["number","null"]},"transfers_to_party_units":{"type":["number","null"]},"total":{"type":["number","null"]},"result":{"type":["number","null"]}},"additionalProperties":false},"balance":{"type":"object","properties":{"current_assets":{"type":"object","properties":{"start":{"type":["number","null"]},"end":{"type":["number","null"]}},"additionalProperties":false,"required":["start","end"]},"fixed_assets":{"type":"object","properties":{"start":{"type":["number","null"]},"end":{"type":["number","null"]}},"additionalProperties":false,"required":["start","end"]},"total_assets":{"type":"object","properties":{"start":{"type":["number","null"]},"end":{"type":["number","null"]}},"additionalProperties":false,"required":["start","end"]},"short_term_debt":{"type":"object","properties":{"start":{"type":["number","null"]},"end":{"type":["number","null"]}},"additionalProperties":false,"required":["start","end"]},"long_term_debt":{"type":"object","properties":{"start":{"type":["number","null"]},"end":{"type":["number","null"]}},"additionalProperties":false,"required":["start","end"]},"equity":{"type":"object","properties":{"start":{"type":["number","null"]},"end":{"type":["number","null"]}},"additionalProperties":false,"required":["start","end"]},"debt_and_equity":{"type":"object","properties":{"start":{"type":["number","null"]},"end":{"type":["number","null"]}},"additionalProperties":false,"required":["start","end"]}},"additionalProperties":false},"contributors":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"name":{"type":["string","null"]},"location":{"type":["string","null"]},"amount":{"type":["number","null"]}},"additionalProperties":false,"required":["kind"]}}},"additionalProperties":false,"required":["party","level","year","income","costs_by_type","costs_by_activity","balance","contributors"]},"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},"502":{"codes":["SOURCE_UNAVAILABLE"],"retryable":true},"500":{"codes":["INTERNAL_ERROR"],"retryable":true}}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/partifinansiering/get_party_accounts","operation":"https://allemannsdata.com/wiki/api/v1/kilder/partifinansiering/get_party_accounts","source":"https://allemannsdata.com/wiki/api/v1/kilder/partifinansiering","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["party","level","year","income","income.state_support","income.municipal_county_support","income.other_public_support","income.membership_fees","income.lotteries_and_fundraising","income.capital_income","income.business_income","income.other_own_income","income.from_private_persons","income.from_companies","income.from_labour_organisations","income.from_other_organisations","income.from_others","income.transfers_from_party_units","income.total","costs_by_type","costs_by_type.salaries","costs_by_type.goods","costs_by_type.services","costs_by_type.depreciation","costs_by_type.financial","costs_by_type.transfers_to_party_units","costs_by_type.total","costs_by_activity","costs_by_activity.administration","costs_by_activity.party_activities"],"output_fields_truncated":true,"canonical_field_aliases":{"name":["contributors[].name"]},"response_example":{"source":"partifinansiering","operation":"get_party_accounts","parameters":{"party":"example value","year":1,"level":"national","municipality":"example value","county":"example value"},"data":{"party":"example value","level":"example value","year":1,"income":{"state_support":1.0,"municipal_county_support":1.0,"other_public_support":1.0,"membership_fees":1.0,"lotteries_and_fundraising":1.0,"capital_income":1.0,"business_income":1.0,"other_own_income":1.0,"from_private_persons":1.0,"from_companies":1.0,"from_labour_organisations":1.0,"from_other_organisations":1.0,"from_others":1.0,"transfers_from_party_units":1.0,"total":1.0},"costs_by_type":{"salaries":1.0,"goods":1.0,"services":1.0,"depreciation":1.0,"financial":1.0,"transfers_to_party_units":1.0,"total":1.0},"costs_by_activity":{"administration":1.0,"party_activities":1.0,"campaign_marketing":1.0,"campaign_other":1.0,"transfers_to_party_units":1.0,"total":1.0,"result":1.0},"balance":{"current_assets":{"start":1.0,"end":1.0},"fixed_assets":{"start":1.0,"end":1.0},"total_assets":{"start":1.0,"end":1.0},"short_term_debt":{"start":1.0,"end":1.0},"long_term_debt":{"start":1.0,"end":1.0},"equity":{"start":1.0,"end":1.0},"debt_and_equity":{"start":1.0,"end":1.0}},"contributors":[{"kind":"example value","name":"Example","location":"example value","amount":1.0}]},"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/get_party_accounts","source":"https://allemannsdata.com/wiki/api/v1/kilder/partifinansiering","wiki":"https://allemannsdata.com/wiki/kilder/partifinansiering/get_party_accounts/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
