{"source":"lottstift","operation":"summarize_allocations","description":"Rank recipients within one publication by their listed allocation amounts. Signature: summarize_allocations(dataset_id: string, required; municipality: string, optional, default None; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0).","signature":"summarize_allocations(dataset_id: string, required; municipality: string, optional, default None; limit: integer, items, optional, default 25; offset: integer, items, optional, default 0)","parameters":[{"name":"dataset_id","type":"string","schema":{"type":"string"},"required":true,"default":null,"description":"Identifier from list_datasets.","unit":null},{"name":"municipality","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Optional exact municipality name; not available in all publications.","unit":null},{"name":"limit","type":"integer","schema":{"maximum":100,"minimum":1,"type":"integer","default":25},"required":false,"default":25,"description":"Recipients per page, 1\u2013100. Unit: items. Through this API: default 25, maximum 100.","unit":"items"},{"name":"offset","type":"integer","schema":{"minimum":0,"type":"integer"},"required":false,"default":0,"description":"Recipients to skip. Unit: items.","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift/summarize_allocations?dataset_id={dataset_id}&municipality={municipality}&limit=25&offset=0","example_url":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift/summarize_allocations?dataset_id=vat-2024-a88ff58f&municipality=Trondheim","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"count":{"type":"integer"},"returned":{"type":"integer"},"recipients":{"type":"array","items":{"type":"object","properties":{"organization_id":{"type":["string","null"]},"name":{"type":["string","null"]},"allocation_count":{"type":"integer"},"amount_nok":{"type":["number","null"]},"missing_amount_rows":{"type":"integer"}},"additionalProperties":false}},"source":{"type":"object","properties":{"source_url":{"type":["string","null"]},"currency":{"type":["string","null"]},"funding_note":{"type":["string","null"]},"coverage_note":{"type":["string","null"]},"data_generated_at":{"type":["string","null"]},"first_transaction_date":{"type":["string","null"]},"last_transaction_date":{"type":["string","null"]},"dataset_id":{"type":["string","null"]},"scheme":{"type":["string","null"]},"name":{"type":["string","null"]},"amount_note":{"type":["string","null"]},"snapshot_refreshed_at":{"type":"string","format":"date-time"},"activity_count":{"type":"integer"},"year":{"type":"integer"},"has_municipality":{"type":"boolean"}},"additionalProperties":false},"dataset_id":{"type":["string","null"]}},"additionalProperties":false},"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","ENDPOINT_NOT_FOUND"],"retryable":false},"405":{"codes":["METHOD_NOT_ALLOWED"],"retryable":false},"429":{"codes":["RATE_LIMITED","GATEWAY_RATE_LIMITED"],"retryable":true},"503":{"codes":["SOURCE_UNAVAILABLE"],"retryable":true},"500":{"codes":["INTERNAL_ERROR"],"retryable":false}}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift/summarize_allocations/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift/summarize_allocations","source":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["count","returned","recipients","recipients[].organization_id","recipients[].name","recipients[].allocation_count","recipients[].amount_nok","recipients[].missing_amount_rows","source","source.source_url","source.currency","source.funding_note","source.coverage_note","source.data_generated_at","source.first_transaction_date","source.last_transaction_date","source.dataset_id","source.scheme","source.name","source.amount_note","source.snapshot_refreshed_at","source.activity_count","source.year","source.has_municipality","dataset_id"],"output_fields_truncated":false,"canonical_field_aliases":{"name":["recipients[].name","source.name"]},"temporal_conventions":{"timezone":"explicit_offset","join_guidance":"date-time fields are RFC 3339 with an explicit offset (Z, +00:00 or the Europe/Oslo offset); compare absolute instants, not clock text. date fields are calendar dates without a time zone.","datetime_fields":["source.snapshot_refreshed_at"]},"response_example":{"source":"lottstift","operation":"summarize_allocations","parameters":{"dataset_id":"vat-2024-a88ff58f","municipality":"Trondheim","limit":25,"offset":0},"data":{"count":1,"returned":1,"recipients":[{"organization_id":"example-id","name":"Example","allocation_count":1,"amount_nok":1.0,"missing_amount_rows":1}],"source":{"source_url":"https://example.invalid/resource","currency":"example value","funding_note":"example value","coverage_note":"example value","data_generated_at":"example value","first_transaction_date":"2026-01-15","last_transaction_date":"2026-01-15","dataset_id":"example-id","scheme":"example value","name":"Example","amount_note":"example value","snapshot_refreshed_at":"2026-01-15T12:00:00Z","activity_count":1,"year":1,"has_municipality":true},"dataset_id":"example-id"},"entities":[],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"lottstift","name":"Voluntary-sector allocations (Lottstift)","description":"Find VAT compensation for voluntary organizations and sports facilities, and allocations from Norsk Tipping's surplus. Search published spreadsheets by recipient, organization number or municipality and rank recipients. Published years vary by scheme; amounts are allocations or approvals, not necessarily payments. Older files and ledgers without recipient organization numbers are excluded.","publisher":"Lotteri- og stiftelsestilsynet","license":null,"cache_ttl_seconds":3600,"documentation":"https://lottstift.no/opne-data/"}]},"_provenance":{"data":{"source":"lottstift","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift"},"entities":{"source":"lottstift","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift/summarize_allocations","source":"https://allemannsdata.com/wiki/api/v1/kilder/lottstift","wiki":"https://allemannsdata.com/wiki/kilder/lottstift/summarize_allocations/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
