{"openapi":"3.1.0","info":{"title":"Kvickd API","version":"1","description":"Allt som går att se och göra i Kvickd, som REST-anrop. Varje adress är ett MCP-verktyg med samma namn (operationId), samma behörigheter och samma credits. Se kvickd.com/api.","summary":"REST API for Kvickd, bookkeeping for Swedish small businesses (AB, enskild firma, handelsbolag): ledger, invoices, VAT, payroll, year-end and annual reports. Every endpoint is also an MCP tool with the same name.","termsOfService":"https://www.kvickd.com/villkor#api","contact":{"name":"Kvickd","url":"https://www.kvickd.com/api","email":"hello@kvickd.com"},"x-logo":{"url":"https://www.kvickd.com/kvickd-logo.png","altText":"Kvickd"}},"externalDocs":{"description":"API-dokumentation","url":"https://www.kvickd.com/api"},"tags":[{"name":"Avstämning"},{"name":"Bokslut och räkenskapsår"},{"name":"Instruktioner och policyer"},{"name":"Tidrapportering"},{"name":"Underlag, inkorg och dokument"},{"name":"Moms"},{"name":"Bokföring och huvudbok"},{"name":"Kundfakturor"},{"name":"Leverantörsfakturor"},{"name":"Lön"},{"name":"ROT och RUT"},{"name":"Skatt, INK2 och årsredovisning"},{"name":"Bolag och översikt"},{"name":"Anläggningstillgångar"},{"name":"Kundportal"},{"name":"Rapporter"},{"name":"Kopplingar (Shopify, Stripe m.fl.)"},{"name":"Verktyg (som MCP)"}],"servers":[{"url":"https://api.kvickd.com"}],"security":[{"ApiKey":[]},{"Bearer":[]}],"paths":{"/api/v1/companies/{orgnr}/reconciliations/spec-rows":{"post":{"operationId":"add_bilaga_row","tags":["Avstämning"],"summary":"Lägg till en avstämningsrad","description":"Lägger till en manuell specifikationsrad på en avstämning (bilaga) och behåller befintliga rader. Använd för att lägga till en enstaka post, t.ex. hela slutsaldot så att differensen nollas; för att ersätta eller tömma alla rader på en gång, använd set_bilaga_spec. Returnerar bilagan med alla rader, avstämt belopp och differens. Bieffekt: raden sparas; attesten ändras inte, den görs i appen. Kräver behörigheten reconcile.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"add_bilaga_row","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"bilaga_type":{"description":"Avstämningens typ som den visas i get_open_reconciliations, t.ex. BANK eller GL_ACCOUNT.","title":"Bilaga Type","type":"string"},"account":{"description":"Kontonummer i BAS-kontoplanen, t.ex. 1930.","title":"Account","type":"integer"},"year":{"description":"Kalenderår för avstämningsmånaden, t.ex. 2026.","title":"Year","type":"integer"},"month":{"description":"Avstämningsmånad 1 till 12, t.ex. 3 för mars.","title":"Month","type":"integer"},"description":{"description":"Radens text, t.ex. Saldo enligt kontoutdrag 2026-03-31.","title":"Description","type":"string"},"amount_ore":{"description":"Belopp i öre (heltal), t.ex. 1250000 för 12 500 kr. Negativt för kreditsaldo.","title":"Amount Ore","type":"integer"}},"required":["bilaga_type","account","year","month","description","amount_ore"],"title":"add_bilaga_rowArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/add_bilaga_row":{"post":{"operationId":"tool_add_bilaga_row","tags":["Verktyg (som MCP)"],"summary":"Lägg till en avstämningsrad","description":"Lägger till en manuell specifikationsrad på en avstämning (bilaga) och behåller befintliga rader. Använd för att lägga till en enstaka post, t.ex. hela slutsaldot så att differensen nollas; för att ersätta eller tömma alla rader på en gång, använd set_bilaga_spec. Returnerar bilagan med alla rader, avstämt belopp och differens. Bieffekt: raden sparas; attesten ändras inte, den görs i appen. Kräver behörigheten reconcile.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"bilaga_type":{"description":"Avstämningens typ som den visas i get_open_reconciliations, t.ex. BANK eller GL_ACCOUNT.","title":"Bilaga Type","type":"string"},"account":{"description":"Kontonummer i BAS-kontoplanen, t.ex. 1930.","title":"Account","type":"integer"},"year":{"description":"Kalenderår för avstämningsmånaden, t.ex. 2026.","title":"Year","type":"integer"},"month":{"description":"Avstämningsmånad 1 till 12, t.ex. 3 för mars.","title":"Month","type":"integer"},"description":{"description":"Radens text, t.ex. Saldo enligt kontoutdrag 2026-03-31.","title":"Description","type":"string"},"amount_ore":{"description":"Belopp i öre (heltal), t.ex. 1250000 för 12 500 kr. Negativt för kreditsaldo.","title":"Amount Ore","type":"integer"}},"required":["orgnr","bilaga_type","account","year","month","description","amount_ore"],"title":"add_bilaga_rowArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/fiscal-years":{"post":{"operationId":"add_fiscal_year","tags":["Bokslut och räkenskapsår"],"summary":"Lägg till räkenskapsår","description":"Lägg till ett räkenskapsår: året efter det senaste (nytt år) eller året före det tidigaste (börja bokföra ett tidigare år utan SIE-fil). Inga luckor. Balansräkningen rullas fram automatiskt och resultaträkningen börjar om på 0. Är föregående års resultat redan bokfört (årsbokslutet klart) förs det direkt om till eget kapital på nya årets första dag, annars sker det när föregående år låses. Kontona följer bolagsformen: aktiebolag och föreningar 2099 till 2091, enskild firma 2011-2019 till 2010, handelsbolag per delägare 20x1-20x9 till 20x0, ideell förening och stiftelse 2069 till 2067. Scope book. Argument: orgnr, year (slutår, t.ex. 2027).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"add_fiscal_year","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"year":{"title":"Year","type":"integer"}},"required":["year"],"title":"add_fiscal_yearArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"list_fiscal_years","tags":["Bokslut och räkenskapsår"],"summary":"Lista räkenskapsår","description":"Lista bolagets räkenskapsår (senaste först) med period, status (open/partly_locked/locked), antal verifikat, årets resultat (öre, vinst positiv) och var föregående års resultat står (prior_result.state: none/waiting/ready/transferred). Visar också vilket år som kan läggas till efter (next_year) och före (previous_year). Scope view. Argument: orgnr.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_fiscal_years","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/add_fiscal_year":{"post":{"operationId":"tool_add_fiscal_year","tags":["Verktyg (som MCP)"],"summary":"Lägg till räkenskapsår","description":"Lägg till ett räkenskapsår: året efter det senaste (nytt år) eller året före det tidigaste (börja bokföra ett tidigare år utan SIE-fil). Inga luckor. Balansräkningen rullas fram automatiskt och resultaträkningen börjar om på 0. Är föregående års resultat redan bokfört (årsbokslutet klart) förs det direkt om till eget kapital på nya årets första dag, annars sker det när föregående år låses. Kontona följer bolagsformen: aktiebolag och föreningar 2099 till 2091, enskild firma 2011-2019 till 2010, handelsbolag per delägare 20x1-20x9 till 20x0, ideell förening och stiftelse 2069 till 2067. Scope book. Argument: orgnr, year (slutår, t.ex. 2027).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"}},"required":["orgnr","year"],"title":"add_fiscal_yearArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/instructions":{"post":{"operationId":"add_instruction","tags":["Instruktioner och policyer"],"summary":"Spara instruktion","description":"Sparar en ny instruktion: en regel som användaren vill att AI:n följer när den bokför, t.ex. 'Representation bokas på 6072'. Använd när användaren ber dig komma ihåg något för framtiden; ändra en befintlig med update_instruction i stället för att spara en dubblett. Med orgnr gäller den bara det bolaget, annars alla bolag i kontot (det kräver att användaren är kontots administratör). Syns för användaren i Kvickd under Inställningar, Instruktioner. Returnerar id, text och vilka bolag den gäller. Kräver behörigheten manage_documents i bolaget.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"add_instruction","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"text":{"description":"Instruktionen i klartext, högst 2000 tecken, t.ex. 'Konto 6540 används för IT-tjänster.'","title":"Text","type":"string"},"orgnr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: bolagets organisationsnummer, t.ex. 559900-1004, när instruktionen bara gäller det bolaget. Utelämna för en instruktion som gäller alla bolag i kontot.","title":"Orgnr"}},"required":["text"],"title":"add_instructionArguments","type":"object"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"list_instructions","tags":["Instruktioner och policyer"],"summary":"Lista instruktioner","description":"Listar bolagets instruktioner: regler som användaren sparat för hur bokföringen ska göras, t.ex. vilket konto en viss kostnad bokförs på. Läs och följ dem innan du bokför eller föreslår konteringar. Med orgnr returneras det som gäller bolaget (dess egna och kontots gemensamma), utan orgnr alla instruktioner du har åtkomst till. Returnerar per instruktion id, text, orgnr (null = alla bolag) och vilka bolag den gäller. Drar ingen credit. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_instructions","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: bolagets organisationsnummer, t.ex. 559900-1004, för det som gäller bolaget. Utelämna för alla bolag du har åtkomst till.","title":"Orgnr"},"description":"Valfritt: bolagets organisationsnummer, t.ex. 559900-1004, för det som gäller bolaget. Utelämna för alla bolag du har åtkomst till."}]}},"/api/v1/tools/add_instruction":{"post":{"operationId":"tool_add_instruction","tags":["Verktyg (som MCP)"],"summary":"Spara instruktion","description":"Sparar en ny instruktion: en regel som användaren vill att AI:n följer när den bokför, t.ex. 'Representation bokas på 6072'. Använd när användaren ber dig komma ihåg något för framtiden; ändra en befintlig med update_instruction i stället för att spara en dubblett. Med orgnr gäller den bara det bolaget, annars alla bolag i kontot (det kräver att användaren är kontots administratör). Syns för användaren i Kvickd under Inställningar, Instruktioner. Returnerar id, text och vilka bolag den gäller. Kräver behörigheten manage_documents i bolaget.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"text":{"description":"Instruktionen i klartext, högst 2000 tecken, t.ex. 'Konto 6540 används för IT-tjänster.'","title":"Text","type":"string"},"orgnr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: bolagets organisationsnummer, t.ex. 559900-1004, när instruktionen bara gäller det bolaget. Utelämna för en instruktion som gäller alla bolag i kontot.","title":"Orgnr"}},"required":["text"],"title":"add_instructionArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/time-entries":{"post":{"operationId":"add_time_entry","tags":["Tidrapportering"],"summary":"Lägg in tidpost","description":"Lägg in en tidpost åt en anställd (t.ex. från en tidlapp). Högst 24 timmar per dag. Posten väntar alltid på attest: tidrapporter attesteras av en människa i Kvickd under Lön, Tidrapporter, aldrig via den här kopplingen. Scope payroll. Argument: orgnr, employee_id, work_date (YYYY-MM-DD), hours (t.ex. 7.5); valfritt kind (arbete|overtid|ob|sjuk|semester|vab|ledig, default arbete), project (kund eller projekt), note.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"add_time_entry","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"employee_id":{"title":"Employee Id","type":"integer"},"work_date":{"title":"Work Date","type":"string"},"hours":{"title":"Hours","type":"number"},"kind":{"default":"arbete","title":"Kind","type":"string"},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Project"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"}},"required":["employee_id","work_date","hours"],"title":"add_time_entryArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"list_time_entries","tags":["Tidrapportering"],"summary":"Lista tidposter","description":"Listar rapporterade tidposter, nyast först, valfritt filtrerade på datum, anställd och status. Använd för att granska tid (attesten görs i Kvickd); för en sammanställning inför lönen, använd get_payroll_time_basis, och för länk och koder, get_time_reporting. Returnerar per post id, datum, typ, minuter och timmar, projekt, notering, status, anställd, vem som attesterat och ev. lönekörning, samt minuter per status och totalt. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_time_entries","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: från och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-10-01.","title":"Date From"},"description":"Valfritt: från och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-10-01."},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: till och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-10-31.","title":"Date To"},"description":"Valfritt: till och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-10-31."},{"name":"employee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: den anställdes id (heltal), från list_employees.","title":"Employee Id"},"description":"Valfritt: den anställdes id (heltal), från list_employees."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: rapporterad, attesterad, avvisad eller utbetald.","title":"Status"},"description":"Valfritt: rapporterad, attesterad, avvisad eller utbetald."}]}},"/api/v1/tools/add_time_entry":{"post":{"operationId":"tool_add_time_entry","tags":["Verktyg (som MCP)"],"summary":"Lägg in tidpost","description":"Lägg in en tidpost åt en anställd (t.ex. från en tidlapp). Högst 24 timmar per dag. Posten väntar alltid på attest: tidrapporter attesteras av en människa i Kvickd under Lön, Tidrapporter, aldrig via den här kopplingen. Scope payroll. Argument: orgnr, employee_id, work_date (YYYY-MM-DD), hours (t.ex. 7.5); valfritt kind (arbete|overtid|ob|sjuk|semester|vab|ledig, default arbete), project (kund eller projekt), note.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"employee_id":{"title":"Employee Id","type":"integer"},"work_date":{"title":"Work Date","type":"string"},"hours":{"title":"Hours","type":"number"},"kind":{"default":"arbete","title":"Kind","type":"string"},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Project"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"}},"required":["orgnr","employee_id","work_date","hours"],"title":"add_time_entryArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/attachments":{"post":{"operationId":"add_voucher_underlag","tags":["Underlag, inkorg och dokument"],"summary":"Ladda upp underlag till verifikat","description":"Laddar upp en liten fil, t.ex. ett kvitto eller en faktura, som underlag och kopplar den valfritt till ett verifikat. Använd när filen inte redan finns i Kvickd och är liten nog att skicka base64-kodad. Finns filen redan i inkorgen eller bland underlagen, använd attach_underlag; är den stor (t.ex. ett foto), använd create_underlag_upload; gäller den en avstämning (kontoutdrag, avtal), använd upload_underlag. Returnerar underlagets id, filnamn, filtyp, storlek och verifikat-id (null om det inte kopplats). Bieffekt: filen sparas bland bolagets underlag; utan voucher_id hamnar den i underlagspoolen och kan kopplas senare med attach_underlag. Kräver behörigheten upload.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"add_voucher_underlag","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"description":"Filnamn med filändelse, t.ex. kvitto-2026-03-14.pdf.","title":"Name","type":"string"},"content_base64":{"description":"Filens innehåll, base64-kodat. Passar små filer; för stora filer, använd create_underlag_upload.","title":"Content Base64","type":"string"},"voucher_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: id (heltal) på verifikatet som underlaget ska kopplas till, t.ex. från list_vouchers eller svaret från book_voucher. Utelämna för att lägga underlaget i underlagspoolen.","title":"Voucher Id"}},"required":["name","content_base64"],"title":"add_voucher_underlagArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"list_available_underlag","tags":["Underlag, inkorg och dokument"],"summary":"Lista kopplingsbara underlag","description":"Lista underlag som kan kopplas till ett verifikat: dokument i inkorgen (inbox), uppladdade dokument som får delas med LLM (documents) och underlag som redan ligger i poolen (pool). Använd id:na — document_id för inbox/documents och underlag_id för pool — med create_voucher eller attach_underlag. Scope view. Argument: orgnr.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_available_underlag","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/add_voucher_underlag":{"post":{"operationId":"tool_add_voucher_underlag","tags":["Verktyg (som MCP)"],"summary":"Ladda upp underlag till verifikat","description":"Laddar upp en liten fil, t.ex. ett kvitto eller en faktura, som underlag och kopplar den valfritt till ett verifikat. Använd när filen inte redan finns i Kvickd och är liten nog att skicka base64-kodad. Finns filen redan i inkorgen eller bland underlagen, använd attach_underlag; är den stor (t.ex. ett foto), använd create_underlag_upload; gäller den en avstämning (kontoutdrag, avtal), använd upload_underlag. Returnerar underlagets id, filnamn, filtyp, storlek och verifikat-id (null om det inte kopplats). Bieffekt: filen sparas bland bolagets underlag; utan voucher_id hamnar den i underlagspoolen och kan kopplas senare med attach_underlag. Kräver behörigheten upload.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"name":{"description":"Filnamn med filändelse, t.ex. kvitto-2026-03-14.pdf.","title":"Name","type":"string"},"content_base64":{"description":"Filens innehåll, base64-kodat. Passar små filer; för stora filer, använd create_underlag_upload.","title":"Content Base64","type":"string"},"voucher_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: id (heltal) på verifikatet som underlaget ska kopplas till, t.ex. från list_vouchers eller svaret från book_voucher. Utelämna för att lägga underlaget i underlagspoolen.","title":"Voucher Id"}},"required":["orgnr","name","content_base64"],"title":"add_voucher_underlagArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/vat-returns/{key}/book":{"post":{"operationId":"approve_and_book_vat","tags":["Moms"],"summary":"Bokför momsavräkning","description":"Godkänn och bokför momsavräkningen för en period (nolla momskontona mot redovisningskontot). KODEN postar. Kräver scope book; ett satt bokföringstak (0 = ingen gräns) får inte överstigas. Före periodens slut avvisas bokföringen; fråga användaren och sätt before_period_end=true bara om hen godtar att perioden bokförs i förväg (det som bokförs i perioden senare blir då en differens). Visar get_vat_return drift_ore skilt från 0 har moms bokförts i perioden efter omföringen: difference=true bokför bara differensen. Argument: orgnr, key (periodnyckel); valfritt year, before_period_end (eller confirm), difference.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"approve_and_book_vat","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Year"},"before_period_end":{"default":false,"title":"Before Period End","type":"boolean"},"difference":{"default":false,"title":"Difference","type":"boolean"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"title":"approve_and_book_vatArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"key","in":"path","required":true,"schema":{"title":"Key","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/approve_and_book_vat":{"post":{"operationId":"tool_approve_and_book_vat","tags":["Verktyg (som MCP)"],"summary":"Bokför momsavräkning","description":"Godkänn och bokför momsavräkningen för en period (nolla momskontona mot redovisningskontot). KODEN postar. Kräver scope book; ett satt bokföringstak (0 = ingen gräns) får inte överstigas. Före periodens slut avvisas bokföringen; fråga användaren och sätt before_period_end=true bara om hen godtar att perioden bokförs i förväg (det som bokförs i perioden senare blir då en differens). Visar get_vat_return drift_ore skilt från 0 har moms bokförts i perioden efter omföringen: difference=true bokför bara differensen. Argument: orgnr, key (periodnyckel); valfritt year, before_period_end (eller confirm), difference.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"key":{"title":"Key","type":"string"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Year"},"before_period_end":{"default":false,"title":"Before Period End","type":"boolean"},"difference":{"default":false,"title":"Difference","type":"boolean"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"required":["orgnr","key"],"title":"approve_and_book_vatArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/voucher-drafts/{draft_id}/approve":{"post":{"operationId":"approve_voucher_draft","tags":["Bokföring och huvudbok"],"summary":"Godkänn verifikatförslag","description":"Godkänn och bokför ett väntande verifikatförslag (draft). Det postas i huvudboken som ett vanligt verifikat och KODEN validerar dubbel bokföring. Gör bara detta när användaren instruerat dig att godkänna. Kräver behörigheten 'book'. Ett bokföringstak på nyckeln gäller även här. Argument: orgnr, draft_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"approve_voucher_draft","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"approve_voucher_draftArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"draft_id","in":"path","required":true,"schema":{"title":"Draft Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/approve_voucher_draft":{"post":{"operationId":"tool_approve_voucher_draft","tags":["Verktyg (som MCP)"],"summary":"Godkänn verifikatförslag","description":"Godkänn och bokför ett väntande verifikatförslag (draft). Det postas i huvudboken som ett vanligt verifikat och KODEN validerar dubbel bokföring. Gör bara detta när användaren instruerat dig att godkänna. Kräver behörigheten 'book'. Ett bokföringstak på nyckeln gäller även här. Argument: orgnr, draft_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"draft_id":{"title":"Draft Id","type":"integer"}},"required":["orgnr","draft_id"],"title":"approve_voucher_draftArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/inbox/{inbox_id}/archive":{"post":{"operationId":"attach_inbox_item","tags":["Underlag, inkorg och dokument"],"summary":"Arkivera inkorgspost","description":"Arkiverar en post i inkorgen: bilagorna sparas i dokumentarkivet med vald kategori och posten markeras som hanterad. Använd för avtal, policyer, protokoll och liknande som ska sparas; ska en leverantörsfaktura registreras, använd create_supplier_invoice, och ska ett kvitto kopplas till ett verifikat, använd attach_underlag. Returnerar posten med ny status (filed) och dess bilagor. Bieffekt: posten flyttas från väntande till hanterade. Kräver behörigheten manage_documents.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"attach_inbox_item","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"category":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: avtal, policy, protokoll, attestordning, leverantorsfaktura eller ovrigt.","title":"Category"}},"title":"attach_inbox_itemArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"inbox_id","in":"path","required":true,"schema":{"description":"Inkorgspostens id (heltal), t.ex. 18. Hämta med list_inbox.","title":"Inbox Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/attach_inbox_item":{"post":{"operationId":"tool_attach_inbox_item","tags":["Verktyg (som MCP)"],"summary":"Arkivera inkorgspost","description":"Arkiverar en post i inkorgen: bilagorna sparas i dokumentarkivet med vald kategori och posten markeras som hanterad. Använd för avtal, policyer, protokoll och liknande som ska sparas; ska en leverantörsfaktura registreras, använd create_supplier_invoice, och ska ett kvitto kopplas till ett verifikat, använd attach_underlag. Returnerar posten med ny status (filed) och dess bilagor. Bieffekt: posten flyttas från väntande till hanterade. Kräver behörigheten manage_documents.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"inbox_id":{"description":"Inkorgspostens id (heltal), t.ex. 18. Hämta med list_inbox.","title":"Inbox Id","type":"integer"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: avtal, policy, protokoll, attestordning, leverantorsfaktura eller ovrigt.","title":"Category"}},"required":["orgnr","inbox_id"],"title":"attach_inbox_itemArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/vouchers/{voucher_id}/attach":{"post":{"operationId":"attach_underlag","tags":["Underlag, inkorg och dokument"],"summary":"Koppla befintligt underlag till verifikat","description":"Kopplar underlag som redan finns i Kvickd till ett verifikat, även ett som redan är bokfört. Använd för fakturor och kvitton i inkorgen eller uppladdade dokument (document_ids) och för underlag i underlagspoolen (underlag_ids); hämta id med list_available_underlag. Ska en ny fil laddas upp, använd add_voucher_underlag eller create_underlag_upload. Returnerar verifikatets id och de kopplade underlagen. Bieffekt: underlagen kopplas till verifikatet; själva bokföringen ändras inte. Kräver behörigheten book.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"attach_underlag","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"document_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"Valfritt: lista med dokument-id (heltal) från inkorgen eller dokumentarkivet, t.ex. [12, 15]. Hämta med list_available_underlag.","title":"Document Ids"},"underlag_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"Valfritt: lista med underlags-id (heltal) från underlagspoolen, t.ex. [7]. Hämta med list_available_underlag.","title":"Underlag Ids"}},"title":"attach_underlagArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"voucher_id","in":"path","required":true,"schema":{"description":"Id (heltal) på verifikatet som underlagen ska kopplas till, t.ex. från list_vouchers.","title":"Voucher Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/attach_underlag":{"post":{"operationId":"tool_attach_underlag","tags":["Verktyg (som MCP)"],"summary":"Koppla befintligt underlag till verifikat","description":"Kopplar underlag som redan finns i Kvickd till ett verifikat, även ett som redan är bokfört. Använd för fakturor och kvitton i inkorgen eller uppladdade dokument (document_ids) och för underlag i underlagspoolen (underlag_ids); hämta id med list_available_underlag. Ska en ny fil laddas upp, använd add_voucher_underlag eller create_underlag_upload. Returnerar verifikatets id och de kopplade underlagen. Bieffekt: underlagen kopplas till verifikatet; själva bokföringen ändras inte. Kräver behörigheten book.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"voucher_id":{"description":"Id (heltal) på verifikatet som underlagen ska kopplas till, t.ex. från list_vouchers.","title":"Voucher Id","type":"integer"},"document_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"Valfritt: lista med dokument-id (heltal) från inkorgen eller dokumentarkivet, t.ex. [12, 15]. Hämta med list_available_underlag.","title":"Document Ids"},"underlag_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"Valfritt: lista med underlags-id (heltal) från underlagspoolen, t.ex. [7]. Hämta med list_available_underlag.","title":"Underlag Ids"}},"required":["orgnr","voucher_id"],"title":"attach_underlagArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/customer-invoices/{invoice_id}/book":{"post":{"operationId":"book_customer_invoice","tags":["Kundfakturor"],"summary":"Bokför kundfaktura","description":"Bokför en kundfaktura som redan har skapats med create_customer_invoice, så att fordran, intäkt och utgående moms hamnar i huvudboken (D 1510 / K intäkt / K moms på 2611, 2621 eller 2631 beroende på momssats). Använd för fakturor i kundreskontran i stället för book_voucher eller create_voucher, så att fakturan får rätt status och kan betalas av med register_customer_payment. En ROT/RUT-faktura delas: kundens del på 1510 och den preliminära skattereduktionen på 1513 (fordran på Skatteverket); den kräver kompletta uppgifter (se husarbete.missing). Returnerar fakturan med verifikatnummer och status. Bieffekt: verifikatet postas direkt och ett satt bokföringstak får inte överstigas. Kräver behörigheten book.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"book_customer_invoice","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"confirm":{"default":false,"description":"ROT/RUT-faktura när F-skatt inte är angiven i företagsinformationen: true först när användaren har bekräftat att företaget har F-skatt.","title":"Confirm","type":"boolean"}},"title":"book_customer_invoiceArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"description":"Kundfakturans id (heltal), t.ex. 42. Hämta med list_customer_invoices.","title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/book_customer_invoice":{"post":{"operationId":"tool_book_customer_invoice","tags":["Verktyg (som MCP)"],"summary":"Bokför kundfaktura","description":"Bokför en kundfaktura som redan har skapats med create_customer_invoice, så att fordran, intäkt och utgående moms hamnar i huvudboken (D 1510 / K intäkt / K moms på 2611, 2621 eller 2631 beroende på momssats). Använd för fakturor i kundreskontran i stället för book_voucher eller create_voucher, så att fakturan får rätt status och kan betalas av med register_customer_payment. En ROT/RUT-faktura delas: kundens del på 1510 och den preliminära skattereduktionen på 1513 (fordran på Skatteverket); den kräver kompletta uppgifter (se husarbete.missing). Returnerar fakturan med verifikatnummer och status. Bieffekt: verifikatet postas direkt och ett satt bokföringstak får inte överstigas. Kräver behörigheten book.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"description":"Kundfakturans id (heltal), t.ex. 42. Hämta med list_customer_invoices.","title":"Invoice Id","type":"integer"},"confirm":{"default":false,"description":"ROT/RUT-faktura när F-skatt inte är angiven i företagsinformationen: true först när användaren har bekräftat att företaget har F-skatt.","title":"Confirm","type":"boolean"}},"required":["orgnr","invoice_id"],"title":"book_customer_invoiceArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/supplier-invoices/{invoice_id}/book":{"post":{"operationId":"book_supplier_invoice","tags":["Leverantörsfakturor"],"summary":"Bokför leverantörsfaktura","description":"Bokför en leverantörsfaktura som redan har registrerats med create_supplier_invoice, så att kostnad, ingående moms och leverantörsskuld hamnar i huvudboken (D kostnadskonto + D 2640 / K 2440). Använd för fakturor i leverantörsreskontran i stället för book_voucher eller create_voucher, så att fakturan får rätt status och kan betalas med register_supplier_payment. Returnerar fakturan med verifikatnummer och status. Bieffekt: verifikatet postas direkt och ett satt bokföringstak får inte överstigas. Faktura i annan valuta utan kurs: ange fx_rate eller total_sek_ore som användaren har angett, gissa aldrig. Kräver behörigheten book.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"book_supplier_invoice","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"fx_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: växelkurs i SEK per 1 enhet som användaren har angett, t.ex. 11.42. Bara för faktura i annan valuta som saknar kurs.","title":"Fx Rate"},"total_sek_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt, i stället för fx_rate: fakturans totalbelopp i SEK, i öre, som användaren har angett.","title":"Total Sek Ore"}},"title":"book_supplier_invoiceArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"description":"Leverantörsfakturans id (heltal), t.ex. 42. Hämta med list_supplier_invoices.","title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/book_supplier_invoice":{"post":{"operationId":"tool_book_supplier_invoice","tags":["Verktyg (som MCP)"],"summary":"Bokför leverantörsfaktura","description":"Bokför en leverantörsfaktura som redan har registrerats med create_supplier_invoice, så att kostnad, ingående moms och leverantörsskuld hamnar i huvudboken (D kostnadskonto + D 2640 / K 2440). Använd för fakturor i leverantörsreskontran i stället för book_voucher eller create_voucher, så att fakturan får rätt status och kan betalas med register_supplier_payment. Returnerar fakturan med verifikatnummer och status. Bieffekt: verifikatet postas direkt och ett satt bokföringstak får inte överstigas. Faktura i annan valuta utan kurs: ange fx_rate eller total_sek_ore som användaren har angett, gissa aldrig. Kräver behörigheten book.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"description":"Leverantörsfakturans id (heltal), t.ex. 42. Hämta med list_supplier_invoices.","title":"Invoice Id","type":"integer"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: växelkurs i SEK per 1 enhet som användaren har angett, t.ex. 11.42. Bara för faktura i annan valuta som saknar kurs.","title":"Fx Rate"},"total_sek_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt, i stället för fx_rate: fakturans totalbelopp i SEK, i öre, som användaren har angett.","title":"Total Sek Ore"}},"required":["orgnr","invoice_id"],"title":"book_supplier_invoiceArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/vouchers/with-basis":{"post":{"operationId":"book_voucher","tags":["Bokföring och huvudbok"],"summary":"Bokför verifikat med källhänvisning","description":"Bokför ett verifikat i huvudboken med debet- och kreditrader och en obligatorisk källhänvisning (basis). Använd när verifikatet bygger på något du har läst i Kvickd, t.ex. en bankrad, en avvikelse eller ett godkänt förslag, och ska kunna spåras dit. Vill du bokföra med tecknade belopp och bifoga kvitton direkt, använd create_voucher; ska en människa granska först, använd propose_voucher. Returnerar verifikatets id, serie och nummer. Bieffekt: verifikatet postas direkt. Koden validerar att debet är lika med kredit, att det finns minst två rader och att perioden inte är låst, och ett satt bokföringstak får inte överstigas. Underlag i annan valuta än SEK: gissa aldrig växelkursen. Fråga användaren efter kursen (SEK per 1 enhet) eller SEK-beloppet (t.ex. det som drogs från kontot), räkna raderna i SEK och ange currency, foreign_amount_minor och fx_rate eller total_sek_ore, så dokumenteras kursen på verifikatet. Ett datum mer än 30 dagar fram kräver confirm=true efter att användaren bekräftat datumet. Rader: [{account, debit_ore, credit_ore, text?}] i öre med exakt ett belopp skilt från noll per rad, eller [{account, amount_ore, text?}] med tecken (debet positivt, kredit negativt). Raderna kommer tillbaka med båda formaten från list_voucher_drafts och get_voucher. Kräver behörigheten book.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"book_voucher","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"date":{"title":"Date","type":"string"},"lines":{"items":{},"title":"Lines","type":"array"},"text":{"title":"Text","type":"string"},"basis":{"items":{},"title":"Basis","type":"array"},"series":{"default":"A","title":"Series","type":"string"},"proposal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Proposal Id"},"finding_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Finding Ref"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Currency"},"foreign_amount_minor":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Foreign Amount Minor"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"default":null,"title":"Fx Rate"},"total_sek_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Sek Ore"},"confirm":{"default":false,"title":"Confirm","type":"boolean"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Ref"}},"required":["date","lines","text","basis"],"title":"book_voucherArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/book_voucher":{"post":{"operationId":"tool_book_voucher","tags":["Verktyg (som MCP)"],"summary":"Bokför verifikat med källhänvisning","description":"Bokför ett verifikat i huvudboken med debet- och kreditrader och en obligatorisk källhänvisning (basis). Använd när verifikatet bygger på något du har läst i Kvickd, t.ex. en bankrad, en avvikelse eller ett godkänt förslag, och ska kunna spåras dit. Vill du bokföra med tecknade belopp och bifoga kvitton direkt, använd create_voucher; ska en människa granska först, använd propose_voucher. Returnerar verifikatets id, serie och nummer. Bieffekt: verifikatet postas direkt. Koden validerar att debet är lika med kredit, att det finns minst två rader och att perioden inte är låst, och ett satt bokföringstak får inte överstigas. Underlag i annan valuta än SEK: gissa aldrig växelkursen. Fråga användaren efter kursen (SEK per 1 enhet) eller SEK-beloppet (t.ex. det som drogs från kontot), räkna raderna i SEK och ange currency, foreign_amount_minor och fx_rate eller total_sek_ore, så dokumenteras kursen på verifikatet. Ett datum mer än 30 dagar fram kräver confirm=true efter att användaren bekräftat datumet. Rader: [{account, debit_ore, credit_ore, text?}] i öre med exakt ett belopp skilt från noll per rad, eller [{account, amount_ore, text?}] med tecken (debet positivt, kredit negativt). Raderna kommer tillbaka med båda formaten från list_voucher_drafts och get_voucher. Kräver behörigheten book.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"date":{"title":"Date","type":"string"},"lines":{"items":{},"title":"Lines","type":"array"},"text":{"title":"Text","type":"string"},"basis":{"items":{},"title":"Basis","type":"array"},"series":{"default":"A","title":"Series","type":"string"},"proposal_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Proposal Id"},"finding_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Finding Ref"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Currency"},"foreign_amount_minor":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Foreign Amount Minor"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"default":null,"title":"Fx Rate"},"total_sek_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Sek Ore"},"confirm":{"default":false,"title":"Confirm","type":"boolean"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Ref"}},"required":["orgnr","date","lines","text","basis"],"title":"book_voucherArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/year-end/{year}/steps/{step}/book":{"post":{"operationId":"book_year_end_step","tags":["Bokslut och räkenskapsår"],"summary":"Bokför årsavslutssteg","description":"Bokför ett årsavslutssteg. Har steget ett förslag (action='book') postar KODEN checklistans balanserade verifikat — LLM väljer bara steget. För ett manuellt steg (action='manual', t.ex. periodiseringar utan förslag) anger du en egen balanserad journal. Låser aldrig perioden (det gör en människa). När aktuell_skatt bokförs låses skatteberäkningen för året (den sparade skatten är den som bokförs); den låses upp under Skatt och deklaration. Året måste finnas bland bolagets räkenskapsår (list_fiscal_years). Kräver scope book. Argument: orgnr, year (slutåret), step (periodiseringar|dispositioner|aktuell_skatt|arets_resultat); valfritt journal ([{account, debit_ore, credit_ore, text?}]) för manuella steg. Före räkenskapsårets slut avvisas bokföringen; fråga användaren och sätt before_year_end=true (eller confirm=true) bara om hen godtar att steget bokförs i förväg.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"book_year_end_step","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"journal":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Journal"},"before_year_end":{"default":false,"title":"Before Year End","type":"boolean"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"title":"book_year_end_stepArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"step","in":"path","required":true,"schema":{"title":"Step","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/book_year_end_step":{"post":{"operationId":"tool_book_year_end_step","tags":["Verktyg (som MCP)"],"summary":"Bokför årsavslutssteg","description":"Bokför ett årsavslutssteg. Har steget ett förslag (action='book') postar KODEN checklistans balanserade verifikat — LLM väljer bara steget. För ett manuellt steg (action='manual', t.ex. periodiseringar utan förslag) anger du en egen balanserad journal. Låser aldrig perioden (det gör en människa). När aktuell_skatt bokförs låses skatteberäkningen för året (den sparade skatten är den som bokförs); den låses upp under Skatt och deklaration. Året måste finnas bland bolagets räkenskapsår (list_fiscal_years). Kräver scope book. Argument: orgnr, year (slutåret), step (periodiseringar|dispositioner|aktuell_skatt|arets_resultat); valfritt journal ([{account, debit_ore, credit_ore, text?}]) för manuella steg. Före räkenskapsårets slut avvisas bokföringen; fråga användaren och sätt before_year_end=true (eller confirm=true) bara om hen godtar att steget bokförs i förväg.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"step":{"title":"Step","type":"string"},"journal":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Journal"},"before_year_end":{"default":false,"title":"Before Year End","type":"boolean"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"required":["orgnr","year","step"],"title":"book_year_end_stepArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/payroll-runs/calculate":{"post":{"operationId":"calc_payroll","tags":["Lön"],"summary":"Förhandsberäkna lön","description":"Förhandsberäkna en lönekörning (skatt + arbetsgivaravgift) UTAN att bokföra. Scope payroll. Argument: orgnr, year, month, pay_date (YYYY-MM-DD), entries ([{employee_id, gross_cash_ore, benefit_ore?, extra_tax_ore?, components?}]); extra_tax_ore justerar skatteavdraget (+extra skatt / −jämkning). components = lönearter [{kind, description?, amount_ore, category?}], kind ∈ LON|SEMESTER|OVERTID|SJUKLON|OB|SJUKAVDRAG|BRUTTOAVDRAG|FORMAN|UTLAGG|TRAKTAMENTE|MILERSATTNING|NETTOAVDRAG (positiva belopp; arten styr tecknet). TRAKTAMENTE och MILERSATTNING (tjänsteresa inom Sverige) delas mot Skatteverkets schablon för resans år: det som ryms är skattefritt (bolagets konton, standard 7321 och 7331, och kryss i ruta 051 respektive 050), det som överstiger blir lön med skatt och arbetsgivaravgift (ruta 011), och warnings visar uträkningen. TRAKTAMENTE: full_days, half_days, nights (utan betald logi), meals och half_day_meals ({breakfast, lunch, dinner} som arbetsgivaren betalat), long_stay (none, over_3_months, over_2_years) och trip_year (standard: körningens år). MILERSATTNING: mil och vehicle (egen_bil, formansbil, formansbil_el); för förmånsbil krävs fuel_paid_by_employee=true, annars blir allt lön. Utan antal dagar eller mil blir hela beloppet skattefritt med en varning. För FORMAN anger category förmånstypen, som styr rutan i arbetsgivardeklarationen: ovrig (012, standard), bil (013), drivmedel (018), bostad_smahus eller bostad_ejsmahus (värdet i 012 och kryss i 041 respektive 043). Valfritt note. Arbetsgivaravgiften åldersjusteras ur personnumret per pay_date (född 1937 eller tidigare 0 %, fyllt 67 vid årets ingång 10,21 %, unga 20,81 % upp till 25 000 kr i månaden april 2026 till september 2027, annars 31,42 %); employer_fee_note per rad förklarar, och notes listar anställda vars födelsedatum inte gick att läsa ut (full avgift används). warnings listar det som bör ses över men inte stoppar körningen: skattekolumn 3 för den som fyllt 66 vid årets ingång, utbetalningskonto som saknas och utlägg. Utlägg (UTLAGG) bokförs mot bolagets konto för utlägg (standard 2890, se get_payroll_accounts); kvittot bokförs för sig med kostnad och ingående moms mot samma konto så att det nollas. En anställd med skatteavdrag i procent (jämkning, upsert_employee) får det i stället för tabellen. Personnummer visas maskerade (ÅÅÅÅMMDD-XXXX); saknas ett personnummer läggs det in av användaren i Kvickd under Lön > Anställda.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"calc_payroll","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"},"pay_date":{"title":"Pay Date","type":"string"},"entries":{"items":{},"title":"Entries","type":"array"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"}},"required":["year","month","pay_date","entries"],"title":"calc_payrollArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/calc_payroll":{"post":{"operationId":"tool_calc_payroll","tags":["Verktyg (som MCP)"],"summary":"Förhandsberäkna lön","description":"Förhandsberäkna en lönekörning (skatt + arbetsgivaravgift) UTAN att bokföra. Scope payroll. Argument: orgnr, year, month, pay_date (YYYY-MM-DD), entries ([{employee_id, gross_cash_ore, benefit_ore?, extra_tax_ore?, components?}]); extra_tax_ore justerar skatteavdraget (+extra skatt / −jämkning). components = lönearter [{kind, description?, amount_ore, category?}], kind ∈ LON|SEMESTER|OVERTID|SJUKLON|OB|SJUKAVDRAG|BRUTTOAVDRAG|FORMAN|UTLAGG|TRAKTAMENTE|MILERSATTNING|NETTOAVDRAG (positiva belopp; arten styr tecknet). TRAKTAMENTE och MILERSATTNING (tjänsteresa inom Sverige) delas mot Skatteverkets schablon för resans år: det som ryms är skattefritt (bolagets konton, standard 7321 och 7331, och kryss i ruta 051 respektive 050), det som överstiger blir lön med skatt och arbetsgivaravgift (ruta 011), och warnings visar uträkningen. TRAKTAMENTE: full_days, half_days, nights (utan betald logi), meals och half_day_meals ({breakfast, lunch, dinner} som arbetsgivaren betalat), long_stay (none, over_3_months, over_2_years) och trip_year (standard: körningens år). MILERSATTNING: mil och vehicle (egen_bil, formansbil, formansbil_el); för förmånsbil krävs fuel_paid_by_employee=true, annars blir allt lön. Utan antal dagar eller mil blir hela beloppet skattefritt med en varning. För FORMAN anger category förmånstypen, som styr rutan i arbetsgivardeklarationen: ovrig (012, standard), bil (013), drivmedel (018), bostad_smahus eller bostad_ejsmahus (värdet i 012 och kryss i 041 respektive 043). Valfritt note. Arbetsgivaravgiften åldersjusteras ur personnumret per pay_date (född 1937 eller tidigare 0 %, fyllt 67 vid årets ingång 10,21 %, unga 20,81 % upp till 25 000 kr i månaden april 2026 till september 2027, annars 31,42 %); employer_fee_note per rad förklarar, och notes listar anställda vars födelsedatum inte gick att läsa ut (full avgift används). warnings listar det som bör ses över men inte stoppar körningen: skattekolumn 3 för den som fyllt 66 vid årets ingång, utbetalningskonto som saknas och utlägg. Utlägg (UTLAGG) bokförs mot bolagets konto för utlägg (standard 2890, se get_payroll_accounts); kvittot bokförs för sig med kostnad och ingående moms mot samma konto så att det nollas. En anställd med skatteavdrag i procent (jämkning, upsert_employee) får det i stället för tabellen. Personnummer visas maskerade (ÅÅÅÅMMDD-XXXX); saknas ett personnummer läggs det in av användaren i Kvickd under Lön > Anställda.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"},"pay_date":{"title":"Pay Date","type":"string"},"entries":{"items":{},"title":"Entries","type":"array"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"}},"required":["orgnr","year","month","pay_date","entries"],"title":"calc_payrollArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/customer-invoices/{invoice_id}/cancel":{"post":{"operationId":"cancel_customer_invoice","tags":["Kundfakturor"],"summary":"Makulera kundfaktura","description":"Makulera en kundfaktura (obetald → backar bokföringsverifikatet). Ett utkast makuleras utan bokföring. En bokförd kreditfaktura kan makuleras så länge inget återbetalats; kvittningen mot originalet backas då. En faktura med kreditfaktura makuleras inte förrän krediten är makulerad. Scope book. Argument: orgnr, invoice_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"cancel_customer_invoice","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"cancel_customer_invoiceArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/cancel_customer_invoice":{"post":{"operationId":"tool_cancel_customer_invoice","tags":["Verktyg (som MCP)"],"summary":"Makulera kundfaktura","description":"Makulera en kundfaktura (obetald → backar bokföringsverifikatet). Ett utkast makuleras utan bokföring. En bokförd kreditfaktura kan makuleras så länge inget återbetalats; kvittningen mot originalet backas då. En faktura med kreditfaktura makuleras inte förrän krediten är makulerad. Scope book. Argument: orgnr, invoice_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"title":"Invoice Id","type":"integer"}},"required":["orgnr","invoice_id"],"title":"cancel_customer_invoiceArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/supplier-invoices/{invoice_id}/cancel":{"post":{"operationId":"cancel_supplier_invoice","tags":["Leverantörsfakturor"],"summary":"Makulera leverantörsfaktura","description":"Makulera en leverantörsfaktura (återför bokföringen om den redan bokförts). KODEN postar återföringen. Kräver scope book. Argument: orgnr, invoice_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"cancel_supplier_invoice","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"cancel_supplier_invoiceArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/cancel_supplier_invoice":{"post":{"operationId":"tool_cancel_supplier_invoice","tags":["Verktyg (som MCP)"],"summary":"Makulera leverantörsfaktura","description":"Makulera en leverantörsfaktura (återför bokföringen om den redan bokförts). KODEN postar återföringen. Kräver scope book. Argument: orgnr, invoice_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"title":"Invoice Id","type":"integer"}},"required":["orgnr","invoice_id"],"title":"cancel_supplier_invoiceArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/rot-rut/{request_id}/check-file":{"post":{"operationId":"check_rot_rut_request_file","tags":["ROT och RUT"],"summary":"Kontrollera ROT/RUT-filen","description":"Kontrollerar att filen till Skatteverket (XML, schema version 6) går att ta fram för en ROT/RUT-begäran och visar en sammanfattning: typ, status, begärt belopp, antal köpare, fakturor och var filen laddas ner. Själva filen innehåller köparnas personnummer och lämnas därför inte ut via AI-kopplingen: användaren laddar ner den i Kvickd under Kundfakturor > ROT/RUT (Ladda ner fil på begäran), importerar den i Skatteverkets e-tjänst Rot och rut och signerar där. Använd efter create_rot_rut_request; markera sedan inlämningen med mark_rot_rut_request_submitted. Ofullständiga uppgifter ger ett fel som säger vad som saknas. Läser bara, ändrar inget; Kvickd skickar ingenting. Scope view. Argument: orgnr, request_id.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"check_rot_rut_request_file","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"check_rot_rut_request_fileArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"request_id","in":"path","required":true,"schema":{"title":"Request Id","type":"integer"}}]}},"/api/v1/tools/check_rot_rut_request_file":{"post":{"operationId":"tool_check_rot_rut_request_file","tags":["Verktyg (som MCP)"],"summary":"Kontrollera ROT/RUT-filen","description":"Kontrollerar att filen till Skatteverket (XML, schema version 6) går att ta fram för en ROT/RUT-begäran och visar en sammanfattning: typ, status, begärt belopp, antal köpare, fakturor och var filen laddas ner. Själva filen innehåller köparnas personnummer och lämnas därför inte ut via AI-kopplingen: användaren laddar ner den i Kvickd under Kundfakturor > ROT/RUT (Ladda ner fil på begäran), importerar den i Skatteverkets e-tjänst Rot och rut och signerar där. Använd efter create_rot_rut_request; markera sedan inlämningen med mark_rot_rut_request_submitted. Ofullständiga uppgifter ger ett fel som säger vad som saknas. Läser bara, ändrar inget; Kvickd skickar ingenting. Scope view. Argument: orgnr, request_id.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"request_id":{"title":"Request Id","type":"integer"}},"required":["orgnr","request_id"],"title":"check_rot_rut_request_fileArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/tax/compute":{"post":{"operationId":"compute_tax","tags":["Skatt, INK2 och årsredovisning"],"summary":"Beräkna skatt","description":"Räknar fram bolagets skatt och INK2 med de justeringar som görs i årsredovisningsguiden, t.ex. ändrade rader i resultat- och balansräkningen, INK2S-justeringar och periodiseringsfond. Använd för att pröva hur justeringar påverkar skatten; för skatteberäkningen härledd direkt ur bokslutet utan justeringar, använd read_tax. Utan något annat argument än orgnr räknas skatten på det senaste räkenskapsårets bokslut som det är. Returnerar skatteberäkningen med underlag till INK2 och räkenskapsschemat INK2R. Sparar inget. Kräver behörigheten statutory.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"compute_tax","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"user_inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Valfria justeringar som i årsredovisningsguidens skattesteg, t.ex. INK2S-justeringar och periodiseringsfond. Utelämna för att räkna på bokslutet som det är.","title":"User Inputs"},"income_statement":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"Valfria rader i resultaträkningen [{label, amount}], belopp i kronor, som ersätter de rader som annars härleds ur bokslutet.","title":"Income Statement"},"balance_sheet":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"Valfria rader i balansräkningen [{label, amount}], belopp i kronor, som ersätter de rader som annars härleds ur bokslutet.","title":"Balance Sheet"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025), som i övriga verktyg. Utelämna för det senaste räkenskapsåret med verifikat.","title":"Year"}},"title":"compute_taxArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/compute_tax":{"post":{"operationId":"tool_compute_tax","tags":["Verktyg (som MCP)"],"summary":"Beräkna skatt","description":"Räknar fram bolagets skatt och INK2 med de justeringar som görs i årsredovisningsguiden, t.ex. ändrade rader i resultat- och balansräkningen, INK2S-justeringar och periodiseringsfond. Använd för att pröva hur justeringar påverkar skatten; för skatteberäkningen härledd direkt ur bokslutet utan justeringar, använd read_tax. Utan något annat argument än orgnr räknas skatten på det senaste räkenskapsårets bokslut som det är. Returnerar skatteberäkningen med underlag till INK2 och räkenskapsschemat INK2R. Sparar inget. Kräver behörigheten statutory.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"user_inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Valfria justeringar som i årsredovisningsguidens skattesteg, t.ex. INK2S-justeringar och periodiseringsfond. Utelämna för att räkna på bokslutet som det är.","title":"User Inputs"},"income_statement":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"Valfria rader i resultaträkningen [{label, amount}], belopp i kronor, som ersätter de rader som annars härleds ur bokslutet.","title":"Income Statement"},"balance_sheet":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"description":"Valfria rader i balansräkningen [{label, amount}], belopp i kronor, som ersätter de rader som annars härleds ur bokslutet.","title":"Balance Sheet"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025), som i övriga verktyg. Utelämna för det senaste räkenskapsåret med verifikat.","title":"Year"}},"required":["orgnr"],"title":"compute_taxArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies":{"post":{"operationId":"create_company","tags":["Bolag och översikt"],"summary":"Skapa bolag","description":"Lägg till ett bolag i koncernen (seedar BAS-kontoplanen). Scope book. Argument: orgnr, name, fiscal_year, fiscal_year_end_month (räkenskapsårets slutmånad 1-12; 12 = jan-dec, 11 = dec-nov), vat_period (manad|kvartal|ar, eller ingen om bolaget inte är momsregistrerat); valfritt city, first_fy_start och first_fy_end (ISO-datum) för ett nystartat bolags avvikande första räkenskapsår, t.ex. 2026-01-13 till 2026-12-31 (högst 18 månader; slutet måste vara sista dagen i slutmånaden, utelämnat = närmaste årsslut). Bolaget bokförs enligt fakturametoden (kontantmetoden stöds inte). legal_form: bolagsformen när kontot har fler bolagsformer påslaget (ab, hb, kb, ek, brf, if, st; utelämnat = föreslås ur organisationsnumret och namnet). En enskild firma läggs till i appen, eftersom ägarens personnummer inte tas emot här.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"create_company","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"name":{"title":"Name","type":"string"},"fiscal_year":{"title":"Fiscal Year","type":"integer"},"fiscal_year_end_month":{"title":"Fiscal Year End Month","type":"integer"},"vat_period":{"title":"Vat Period","type":"string"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"City"},"first_fy_start":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"First Fy Start"},"first_fy_end":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"First Fy End"},"legal_form":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Legal Form"}},"required":["orgnr","name","fiscal_year","fiscal_year_end_month","vat_period"],"title":"create_companyArguments","type":"object"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"list_companies","tags":["Bolag och översikt"],"summary":"Lista bolag","description":"Lista koncernens bolag med härledd status, antal findings och bankmatchningsgrad. Ingen indata; scopas av din behörighet.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_companies","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[]}},"/api/v1/tools/create_company":{"post":{"operationId":"tool_create_company","tags":["Verktyg (som MCP)"],"summary":"Skapa bolag","description":"Lägg till ett bolag i koncernen (seedar BAS-kontoplanen). Scope book. Argument: orgnr, name, fiscal_year, fiscal_year_end_month (räkenskapsårets slutmånad 1-12; 12 = jan-dec, 11 = dec-nov), vat_period (manad|kvartal|ar, eller ingen om bolaget inte är momsregistrerat); valfritt city, first_fy_start och first_fy_end (ISO-datum) för ett nystartat bolags avvikande första räkenskapsår, t.ex. 2026-01-13 till 2026-12-31 (högst 18 månader; slutet måste vara sista dagen i slutmånaden, utelämnat = närmaste årsslut). Bolaget bokförs enligt fakturametoden (kontantmetoden stöds inte). legal_form: bolagsformen när kontot har fler bolagsformer påslaget (ab, hb, kb, ek, brf, if, st; utelämnat = föreslås ur organisationsnumret och namnet). En enskild firma läggs till i appen, eftersom ägarens personnummer inte tas emot här.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"name":{"title":"Name","type":"string"},"fiscal_year":{"title":"Fiscal Year","type":"integer"},"fiscal_year_end_month":{"title":"Fiscal Year End Month","type":"integer"},"vat_period":{"title":"Vat Period","type":"string"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"City"},"first_fy_start":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"First Fy Start"},"first_fy_end":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"First Fy End"},"legal_form":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Legal Form"}},"required":["orgnr","name","fiscal_year","fiscal_year_end_month","vat_period"],"title":"create_companyArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/customer-invoices":{"post":{"operationId":"create_customer_invoice","tags":["Kundfakturor"],"summary":"Skapa kundfaktura","description":"Skapa en kundfaktura (utkast; bokförs inte förrän du bokför den). Scope reconcile. Rader: [{description, period?, quantity_milli?, unit_price_ore, vat_rate, account?}] (antal ×1000). Radens account = intäktskonto; utelämnas det används income_account, annars 3001. Radens belopp (antal × pris) avrundas först till hela öre per rad (0,5 uppåt). Momsen räknas sedan per momssats på summan av raderna och avrundas till närmaste öre (0-4 nedåt, 5-9 uppåt); skickas total_ore och vat_ore med raderna kontrolleras att de stämmer, annars avvisas fakturan med Kvickds belopp. Utan rader anges total_ore/vat_ore/income_account (enradsläge). Momsen bokförs på rate-specifikt konto (25 %→2611, 12 %→2621, 6 %→2631, BAS 2026) så deklarationen hamnar i rätt ruta. Argument: orgnr, customer_name, invoice_date; valfritt invoice_number (unikt per bolag; utelämnat tas nästa nummer i bolagets serie), customer_id (kund i kundregistret; kundens org.nr, adress, e-post och referens följer med), lines, due_date, ocr, income_account, total_ore, vat_ore, currency (default SEK), rounding_ore (öresutjämning), customer_orgnr, customer_address, customer_email, customer_reference, payment_terms, service_description, seller_address (avsändarens adress, rullas fram), seller_bank, seller_iban, seller_bic, seller_bankgiro, seller_contact, customer_vat_number, customer_country (ISO-kod, t.ex. DE), vat_mode. Försäljning till ett företag i annat EU-land: vat_mode eu_tjanster (omvänd betalningsskyldighet, konto 3308, ruta 39) eller eu_varor (unionsintern leverans, konto 3108, ruta 35); kräver köparens momsregistreringsnummer från det landet, raderna får 0 % moms och fakturan hänvisningen till mervärdesskattedirektivet. Försäljningen ska även redovisas i periodisk sammanställning, som användaren lämnar i Skatteverkets e-tjänst. Utan due_date räknas förfallodagen fram ur payment_terms (t.ex. \"30 dagar\"); utan payment_terms gäller kundens eller bolagets villkor. Förfallodagen får inte vara före invoice_date. Ändra i efterhand med update_customer_invoice. ROT/RUT (husarbete till privatperson): märk raderna med husarbete_kind (arbete|material|ovrigt), och för arbetsrader work_type (Skatteverkets kategori, se arbetstyper i list_rot_rut, t.ex. Bygg, El, Vvs, Stadning, Tradgardsarbete) samt hours_milli (arbetade timmar ×1000, krävs även vid fast pris). Skicka husarbete = {type: ROT|RUT, buyers?: [{name?, amount_ore?}], amount_ore?, property? (fastighetsbeteckning) ELLER brf_orgnr + apartment (bostadsrätt)}. Utan buyers blir kunden köpare. Köparnas personnummer tas inte emot här: användaren lägger in dem i Kvickd under Kundfakturor (Redigera fakturan, ROT/RUT-uppgifterna), och fakturan kan bokföras först när de finns. Be inte om personnummer i chatten. Utan belopp begärs högsta möjliga avdrag (ROT 30 %, RUT 50 % av arbetskostnaden inkl. moms; tak 50 000/75 000 kr per person och år). Svaret har husarbete.to_pay_ore = det kunden betalar och husarbete.missing = det som saknas för bokföring.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"create_customer_invoice","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"customer_name":{"title":"Customer Name","type":"string"},"invoice_date":{"title":"Invoice Date","type":"string"},"invoice_number":{"default":"","title":"Invoice Number","type":"string"},"customer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Customer Id"},"lines":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Lines"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Due Date"},"ocr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Ocr"},"income_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Income Account"},"total_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Ore"},"vat_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Vat Ore"},"currency":{"default":"SEK","title":"Currency","type":"string"},"rounding_ore":{"default":0,"title":"Rounding Ore","type":"integer"},"customer_orgnr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Orgnr"},"customer_address":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Address"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Email"},"customer_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Reference"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Payment Terms"},"service_description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Service Description"},"seller_address":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Address"},"seller_bank":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Bank"},"seller_iban":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Iban"},"seller_bic":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Bic"},"seller_bankgiro":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Bankgiro"},"seller_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Contact"},"husarbete":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Husarbete"},"customer_vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Vat Number"},"customer_country":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Country"},"vat_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Vat Mode"}},"required":["customer_name","invoice_date"],"title":"create_customer_invoiceArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"list_customer_invoices","tags":["Kundfakturor"],"summary":"Lista kundfakturor","description":"Listar bolagets kundfakturor, nyast först, valfritt filtrerade på status. Använd för att hitta en faktura eller se vad som är obetalt; för en enskild faktura, använd get_customer_invoice, och för obetalt per kund, customer_outstanding. Returnerar fakturorna med kund, fakturanummer, datum, rader, belopp, moms och kvarvarande saldo i öre, status och ev. ROT/RUT, samt summa totalt och summa kvarvarande saldo i öre. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_customer_invoices","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt filter: ej_bokford (utkast), obetald (allt med saldo kvar, även förfallna och delbetalda), forfallen, under_betalning (delbetald), slutbetald eller makulerad. Utelämna för alla.","title":"Status"},"description":"Valfritt filter: ej_bokford (utkast), obetald (allt med saldo kvar, även förfallna och delbetalda), forfallen, under_betalning (delbetald), slutbetald eller makulerad. Utelämna för alla."}]}},"/api/v1/tools/create_customer_invoice":{"post":{"operationId":"tool_create_customer_invoice","tags":["Verktyg (som MCP)"],"summary":"Skapa kundfaktura","description":"Skapa en kundfaktura (utkast; bokförs inte förrän du bokför den). Scope reconcile. Rader: [{description, period?, quantity_milli?, unit_price_ore, vat_rate, account?}] (antal ×1000). Radens account = intäktskonto; utelämnas det används income_account, annars 3001. Radens belopp (antal × pris) avrundas först till hela öre per rad (0,5 uppåt). Momsen räknas sedan per momssats på summan av raderna och avrundas till närmaste öre (0-4 nedåt, 5-9 uppåt); skickas total_ore och vat_ore med raderna kontrolleras att de stämmer, annars avvisas fakturan med Kvickds belopp. Utan rader anges total_ore/vat_ore/income_account (enradsläge). Momsen bokförs på rate-specifikt konto (25 %→2611, 12 %→2621, 6 %→2631, BAS 2026) så deklarationen hamnar i rätt ruta. Argument: orgnr, customer_name, invoice_date; valfritt invoice_number (unikt per bolag; utelämnat tas nästa nummer i bolagets serie), customer_id (kund i kundregistret; kundens org.nr, adress, e-post och referens följer med), lines, due_date, ocr, income_account, total_ore, vat_ore, currency (default SEK), rounding_ore (öresutjämning), customer_orgnr, customer_address, customer_email, customer_reference, payment_terms, service_description, seller_address (avsändarens adress, rullas fram), seller_bank, seller_iban, seller_bic, seller_bankgiro, seller_contact, customer_vat_number, customer_country (ISO-kod, t.ex. DE), vat_mode. Försäljning till ett företag i annat EU-land: vat_mode eu_tjanster (omvänd betalningsskyldighet, konto 3308, ruta 39) eller eu_varor (unionsintern leverans, konto 3108, ruta 35); kräver köparens momsregistreringsnummer från det landet, raderna får 0 % moms och fakturan hänvisningen till mervärdesskattedirektivet. Försäljningen ska även redovisas i periodisk sammanställning, som användaren lämnar i Skatteverkets e-tjänst. Utan due_date räknas förfallodagen fram ur payment_terms (t.ex. \"30 dagar\"); utan payment_terms gäller kundens eller bolagets villkor. Förfallodagen får inte vara före invoice_date. Ändra i efterhand med update_customer_invoice. ROT/RUT (husarbete till privatperson): märk raderna med husarbete_kind (arbete|material|ovrigt), och för arbetsrader work_type (Skatteverkets kategori, se arbetstyper i list_rot_rut, t.ex. Bygg, El, Vvs, Stadning, Tradgardsarbete) samt hours_milli (arbetade timmar ×1000, krävs även vid fast pris). Skicka husarbete = {type: ROT|RUT, buyers?: [{name?, amount_ore?}], amount_ore?, property? (fastighetsbeteckning) ELLER brf_orgnr + apartment (bostadsrätt)}. Utan buyers blir kunden köpare. Köparnas personnummer tas inte emot här: användaren lägger in dem i Kvickd under Kundfakturor (Redigera fakturan, ROT/RUT-uppgifterna), och fakturan kan bokföras först när de finns. Be inte om personnummer i chatten. Utan belopp begärs högsta möjliga avdrag (ROT 30 %, RUT 50 % av arbetskostnaden inkl. moms; tak 50 000/75 000 kr per person och år). Svaret har husarbete.to_pay_ore = det kunden betalar och husarbete.missing = det som saknas för bokföring.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"customer_name":{"title":"Customer Name","type":"string"},"invoice_date":{"title":"Invoice Date","type":"string"},"invoice_number":{"default":"","title":"Invoice Number","type":"string"},"customer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Customer Id"},"lines":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Lines"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Due Date"},"ocr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Ocr"},"income_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Income Account"},"total_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Ore"},"vat_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Vat Ore"},"currency":{"default":"SEK","title":"Currency","type":"string"},"rounding_ore":{"default":0,"title":"Rounding Ore","type":"integer"},"customer_orgnr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Orgnr"},"customer_address":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Address"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Email"},"customer_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Reference"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Payment Terms"},"service_description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Service Description"},"seller_address":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Address"},"seller_bank":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Bank"},"seller_iban":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Iban"},"seller_bic":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Bic"},"seller_bankgiro":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Bankgiro"},"seller_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Contact"},"husarbete":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Husarbete"},"customer_vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Vat Number"},"customer_country":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Country"},"vat_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Vat Mode"}},"required":["orgnr","customer_name","invoice_date"],"title":"create_customer_invoiceArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/fixed-assets":{"post":{"operationId":"create_fixed_asset","tags":["Anläggningstillgångar"],"summary":"Registrera anläggningstillgång","description":"Registrera en anläggningstillgång (K2, linjär helavskrivning). useful_life_months måste vara ≥ 1 utom för mark (asset_type LAND) som inte skrivs av. Med book_acquisition=true bokförs anskaffningen direkt (D tillgångskonto / K funding_account, default 1930). Kräver behörigheten 'book'. Argument: orgnr, name, acquired (YYYY-MM-DD), cost_ore, useful_life_months, gl_account (tillgångskonto 1000-1299, BAS 2026: t.ex. 1220 inventarier, 1224 datorer eller 1226 bilar), accum_depr_account (ackumulerade avskrivningar, kontot i samma grupp som slutar på 9, t.ex. 1229), depr_expense_account (avskrivningskostnad 7800-7899, t.ex. 7832); valfritt residual_ore, asset_type (EQUIPMENT|BUILDING|LAND|OTHER), notes, book_acquisition, funding_account, depreciation_start (YYYY-MM-DD, om avskrivning börjar senare än acquired), opening_accumulated_ore (ingående ack. avskrivning vid import), document_id (kopplat underlag/inköpsfaktura).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"create_fixed_asset","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"title":"Name","type":"string"},"acquired":{"title":"Acquired","type":"string"},"cost_ore":{"title":"Cost Ore","type":"integer"},"useful_life_months":{"title":"Useful Life Months","type":"integer"},"gl_account":{"title":"Gl Account","type":"integer"},"accum_depr_account":{"title":"Accum Depr Account","type":"integer"},"depr_expense_account":{"title":"Depr Expense Account","type":"integer"},"residual_ore":{"default":0,"title":"Residual Ore","type":"integer"},"asset_type":{"default":"EQUIPMENT","title":"Asset Type","type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Notes"},"book_acquisition":{"default":false,"title":"Book Acquisition","type":"boolean"},"funding_account":{"default":1930,"title":"Funding Account","type":"integer"},"depreciation_start":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Depreciation Start"},"opening_accumulated_ore":{"default":0,"title":"Opening Accumulated Ore","type":"integer"},"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Document Id"}},"required":["name","acquired","cost_ore","useful_life_months","gl_account","accum_depr_account","depr_expense_account"],"title":"create_fixed_assetArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"list_fixed_assets","tags":["Anläggningstillgångar"],"summary":"Lista anläggningstillgångar","description":"Lista anläggningstillgångar (K2). accumulated_depreciation_ore är BERÄKNAD (planerad linjär) avskrivning; booked_depreciation_ore är FAKTISKT bokförd i huvudboken och unbooked_depreciation_ore skillnaden (ännu ej bokförd). Kräver 'view'. Argument: orgnr.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_fixed_assets","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/create_fixed_asset":{"post":{"operationId":"tool_create_fixed_asset","tags":["Verktyg (som MCP)"],"summary":"Registrera anläggningstillgång","description":"Registrera en anläggningstillgång (K2, linjär helavskrivning). useful_life_months måste vara ≥ 1 utom för mark (asset_type LAND) som inte skrivs av. Med book_acquisition=true bokförs anskaffningen direkt (D tillgångskonto / K funding_account, default 1930). Kräver behörigheten 'book'. Argument: orgnr, name, acquired (YYYY-MM-DD), cost_ore, useful_life_months, gl_account (tillgångskonto 1000-1299, BAS 2026: t.ex. 1220 inventarier, 1224 datorer eller 1226 bilar), accum_depr_account (ackumulerade avskrivningar, kontot i samma grupp som slutar på 9, t.ex. 1229), depr_expense_account (avskrivningskostnad 7800-7899, t.ex. 7832); valfritt residual_ore, asset_type (EQUIPMENT|BUILDING|LAND|OTHER), notes, book_acquisition, funding_account, depreciation_start (YYYY-MM-DD, om avskrivning börjar senare än acquired), opening_accumulated_ore (ingående ack. avskrivning vid import), document_id (kopplat underlag/inköpsfaktura).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"name":{"title":"Name","type":"string"},"acquired":{"title":"Acquired","type":"string"},"cost_ore":{"title":"Cost Ore","type":"integer"},"useful_life_months":{"title":"Useful Life Months","type":"integer"},"gl_account":{"title":"Gl Account","type":"integer"},"accum_depr_account":{"title":"Accum Depr Account","type":"integer"},"depr_expense_account":{"title":"Depr Expense Account","type":"integer"},"residual_ore":{"default":0,"title":"Residual Ore","type":"integer"},"asset_type":{"default":"EQUIPMENT","title":"Asset Type","type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Notes"},"book_acquisition":{"default":false,"title":"Book Acquisition","type":"boolean"},"funding_account":{"default":1930,"title":"Funding Account","type":"integer"},"depreciation_start":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Depreciation Start"},"opening_accumulated_ore":{"default":0,"title":"Opening Accumulated Ore","type":"integer"},"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Document Id"}},"required":["orgnr","name","acquired","cost_ore","useful_life_months","gl_account","accum_depr_account","depr_expense_account"],"title":"create_fixed_assetArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/client-requests":{"post":{"operationId":"create_kundportal_request","tags":["Kundportal"],"summary":"Skapa förfrågan i kundportalen","description":"Skapar en förfrågan i kundportalen: byrån ber kunden om ett underlag eller ett svar, t.ex. ett kontoutdrag eller ett kvitto som saknas. Kunden ser förfrågan i Kvickd och svarar och laddar upp där. Kräver att bolaget sköts av en byrå och att användaren är byråns medlem med minst en skrivbehörighet i bolaget. Ingen e-post skickas. Returnerar förfrågan med id och status oppen.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"create_kundportal_request","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"title":{"description":"Vad byrån behöver, kort, t.ex. Kontoutdrag för mars (högst 200 tecken).","title":"Title","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: det kunden behöver veta, t.ex. vilka sidor eller vilken period.","title":"Description"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: sista dag, ÅÅÅÅ-MM-DD, t.ex. 2026-11-15.","title":"Due Date"}},"required":["title"],"title":"create_kundportal_requestArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"list_kundportal","tags":["Kundportal"],"summary":"Lista kundportalen","description":"Listar kundportalen för ett bolag som sköts av en redovisningsbyrå i Kvickd: byråns förfrågningar till kunden (status oppen = väntar på kunden, besvarad = kunden har svarat eller laddat upp, klar) och underlag som kunden skickat utan förfrågan. Använd för att se vad som saknas och vad kunden har skickat in; filerna ligger också i inkorgen (list_inbox, källa kundportal) och bokförs därifrån. Returnerar per förfrågan id, rubrik, beskrivning, förfallodatum, status, antal filer och senaste aktivitet, de senaste fristående uppladdningarna med avsändarens namn och e-post, samt inmejlade underlag (för en kund bara mejl från den egna adressen) med vilka förfrågningar de är kopplade till. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_kundportal","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: oppen, besvarad eller klar (flera med komma). Utelämnat = alla.","title":"Status"},"description":"Valfritt: oppen, besvarad eller klar (flera med komma). Utelämnat = alla."}]}},"/api/v1/tools/create_kundportal_request":{"post":{"operationId":"tool_create_kundportal_request","tags":["Verktyg (som MCP)"],"summary":"Skapa förfrågan i kundportalen","description":"Skapar en förfrågan i kundportalen: byrån ber kunden om ett underlag eller ett svar, t.ex. ett kontoutdrag eller ett kvitto som saknas. Kunden ser förfrågan i Kvickd och svarar och laddar upp där. Kräver att bolaget sköts av en byrå och att användaren är byråns medlem med minst en skrivbehörighet i bolaget. Ingen e-post skickas. Returnerar förfrågan med id och status oppen.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"title":{"description":"Vad byrån behöver, kort, t.ex. Kontoutdrag för mars (högst 200 tecken).","title":"Title","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: det kunden behöver veta, t.ex. vilka sidor eller vilken period.","title":"Description"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: sista dag, ÅÅÅÅ-MM-DD, t.ex. 2026-11-15.","title":"Due Date"}},"required":["orgnr","title"],"title":"create_kundportal_requestArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/proposals":{"post":{"operationId":"create_proposal","tags":["Avstämning"],"summary":"Föreslå justering i avstämning","description":"Föreslår en justerande post för en avstämning (bilaga) på ett konto och en månad, med motivering och källhänvisning. Använd när en avstämning visar en differens som behöver rättas; för ett vanligt verifikat som en människa ska godkänna, använd propose_voucher. proposed_journal måste balansera (summa debet lika med summa kredit i öre, minst två rader) och basis måste innehålla käll-id, annars avvisas förslaget. Returnerar proposal_id och status proposed. Bieffekt: inget bokförs; förslaget visas för granskning och kan kopplas till en avvikelse via finding_ref. Kräver behörigheten reconcile.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"create_proposal","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"},"bilaga_type":{"title":"Bilaga Type","type":"string"},"account":{"title":"Account","type":"integer"},"proposed_journal":{"items":{},"title":"Proposed Journal","type":"array"},"basis":{"items":{},"title":"Basis","type":"array"},"reasoning":{"title":"Reasoning","type":"string"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Confidence"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Model"},"finding_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Finding Ref"}},"required":["year","month","bilaga_type","account","proposed_journal","basis","reasoning"],"title":"create_proposalArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"list_proposals","tags":["Avstämning"],"summary":"Lista förslag","description":"Listar förslag på justerande poster och bankmatchningar, nyast först, med status och motivering. Använd för att se vad som väntar på granskning eller redan har hanterats; verifikatförslag i kön Väntande verifikat listas med list_voucher_drafts. Returnerar per förslag id, typ, status, bilaga och konto, säkerhet (0 till 1), motivering, källhänvisning, föreslaget verifikat i öre, finding_ref, period och när det skapades. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_proposals","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: kalenderår för perioden förslaget gäller, t.ex. 2026.","title":"Year"},"description":"Valfritt: kalenderår för perioden förslaget gäller, t.ex. 2026."},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: månad 1 till 12 för perioden förslaget gäller.","title":"Month"},"description":"Valfritt: månad 1 till 12 för perioden förslaget gäller."}]}},"/api/v1/tools/create_proposal":{"post":{"operationId":"tool_create_proposal","tags":["Verktyg (som MCP)"],"summary":"Föreslå justering i avstämning","description":"Föreslår en justerande post för en avstämning (bilaga) på ett konto och en månad, med motivering och källhänvisning. Använd när en avstämning visar en differens som behöver rättas; för ett vanligt verifikat som en människa ska godkänna, använd propose_voucher. proposed_journal måste balansera (summa debet lika med summa kredit i öre, minst två rader) och basis måste innehålla käll-id, annars avvisas förslaget. Returnerar proposal_id och status proposed. Bieffekt: inget bokförs; förslaget visas för granskning och kan kopplas till en avvikelse via finding_ref. Kräver behörigheten reconcile.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"},"bilaga_type":{"title":"Bilaga Type","type":"string"},"account":{"title":"Account","type":"integer"},"proposed_journal":{"items":{},"title":"Proposed Journal","type":"array"},"basis":{"items":{},"title":"Basis","type":"array"},"reasoning":{"title":"Reasoning","type":"string"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Confidence"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Model"},"finding_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Finding Ref"}},"required":["orgnr","year","month","bilaga_type","account","proposed_journal","basis","reasoning"],"title":"create_proposalArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/rot-rut":{"post":{"operationId":"create_rot_rut_request","tags":["ROT och RUT"],"summary":"Skapa ROT/RUT-begäran","description":"Skapa en begäran om utbetalning till Skatteverket för betalda ROT- eller RUT-fakturor (se att_begara i list_rot_rut). ROT och RUT begärs var för sig, alla fakturor ska vara betalda samma år och en begäran rymmer högst 100 köpare. Skapar ett ärende per köpare med köparens personnummer som användaren lagt in på fakturan i Kvickd (be aldrig om personnummer i chatten; saknas ett ges ett fel med var det läggs in). Inget skickas till Skatteverket: kontrollera filen med check_rot_rut_request_file och låt användaren ladda ner den i Kvickd och lämna den i e-tjänsten Rot och rut. Scope reconcile. Argument: orgnr, type (ROT|RUT), invoice_ids; valfritt name (högst 16 tecken).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"create_rot_rut_request","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"type":{"title":"Type","type":"string"},"invoice_ids":{"items":{},"title":"Invoice Ids","type":"array"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Name"}},"required":["type","invoice_ids"],"title":"create_rot_rut_requestArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"list_rot_rut","tags":["ROT och RUT"],"summary":"ROT/RUT-läget","description":"Visar läget för ROT- och RUT-avdrag: fakturor där utbetalning kan begäras nu, fakturor som väntar på kundens betalning, gjorda begäranden till Skatteverket och gällande regler. Använd innan du skapar en begäran med create_rot_rut_request; för filen till Skatteverket, använd check_rot_rut_request_file. Returnerar fakturorna med avdragsbelopp och deadline, begärandena med status (skapad, inskickad eller klar) och belopp, summor i öre, arbetstyper samt procentsatser och tak. Läser bara, ändrar inget. Köparnas personnummer visas bara maskerade (ÅÅÅÅMMDD-XXXX).","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_rot_rut","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/create_rot_rut_request":{"post":{"operationId":"tool_create_rot_rut_request","tags":["Verktyg (som MCP)"],"summary":"Skapa ROT/RUT-begäran","description":"Skapa en begäran om utbetalning till Skatteverket för betalda ROT- eller RUT-fakturor (se att_begara i list_rot_rut). ROT och RUT begärs var för sig, alla fakturor ska vara betalda samma år och en begäran rymmer högst 100 köpare. Skapar ett ärende per köpare med köparens personnummer som användaren lagt in på fakturan i Kvickd (be aldrig om personnummer i chatten; saknas ett ges ett fel med var det läggs in). Inget skickas till Skatteverket: kontrollera filen med check_rot_rut_request_file och låt användaren ladda ner den i Kvickd och lämna den i e-tjänsten Rot och rut. Scope reconcile. Argument: orgnr, type (ROT|RUT), invoice_ids; valfritt name (högst 16 tecken).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"type":{"title":"Type","type":"string"},"invoice_ids":{"items":{},"title":"Invoice Ids","type":"array"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Name"}},"required":["orgnr","type","invoice_ids"],"title":"create_rot_rut_requestArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/supplier-invoices":{"post":{"operationId":"create_supplier_invoice","tags":["Leverantörsfakturor"],"summary":"Registrera leverantörsfaktura","description":"Registrera en leverantörsfaktura (bokförs inte förrän du bokför den med book_supplier_invoice). Scope reconcile. Ange antingen kontorader (lines = [{account, net_ore, vat_rate, description}]; momsen räknas per momssats på summan av raderna, avrundad till närmaste öre, och total härleds ur raderna + rounding_ore. Skicka gärna med fakturans vat_ore och total_ore: har leverantören avrundat momsen annorlunda används dess moms om skillnaden ryms i avrundningen, högst ett öre per rad; större skillnader och en total som inte går ihop avvisas) ELLER enradsläget (total_ore + vat_ore + expense_account). document_id kopplar ett underlag (fakturans PDF från inkorg/dokument, se list_available_underlag). ANNAN VALUTA än SEK (currency, t.ex. EUR/USD): ange beloppen som på fakturan (hundradelar i fakturans valuta) och fx_rate (SEK per 1 enhet) ELLER total_sek_ore (totalbelopp i SEK) som ANVÄNDAREN har angett. Gissa aldrig kursen: fråga användaren. Klienter med stöd för elicitation får frågan direkt; annars returneras ett fel med frågan. Kvickd räknar om till SEK och sparar originalbelopp och kurs. Argument: orgnr, supplier_name, invoice_number, invoice_date; valfritt lines, rounding_ore, total_ore, vat_ore, due_date, ocr, currency, fx_rate, total_sek_ore, expense_account, supplier_id, document_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"create_supplier_invoice","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"supplier_name":{"title":"Supplier Name","type":"string"},"invoice_number":{"title":"Invoice Number","type":"string"},"invoice_date":{"title":"Invoice Date","type":"string"},"lines":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Lines"},"rounding_ore":{"default":0,"title":"Rounding Ore","type":"integer"},"total_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Ore"},"vat_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Vat Ore"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Due Date"},"ocr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Ocr"},"currency":{"default":"SEK","title":"Currency","type":"string"},"expense_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Expense Account"},"supplier_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Supplier Id"},"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Document Id"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"default":null,"title":"Fx Rate"},"total_sek_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Sek Ore"}},"required":["supplier_name","invoice_number","invoice_date"],"title":"create_supplier_invoiceArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"list_supplier_invoices","tags":["Leverantörsfakturor"],"summary":"Lista leverantörsfakturor","description":"Listar bolagets leverantörsfakturor, nyast först, valfritt filtrerat på status. Använd för att se vad som ska betalas eller hitta en faktura; för en enskild faktura med alla detaljer, använd get_supplier_invoice. Returnerar fakturorna med samma fält som get_supplier_invoice samt summa totalt och summa kvarvarande saldo i öre. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_supplier_invoices","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt filter: ej_bokford, obetald (allt med saldo kvar, även förfallna och delbetalda), forfallen, under_betalning, slutbetald eller makulerad. Utelämna för alla.","title":"Status"},"description":"Valfritt filter: ej_bokford, obetald (allt med saldo kvar, även förfallna och delbetalda), forfallen, under_betalning, slutbetald eller makulerad. Utelämna för alla."}]}},"/api/v1/tools/create_supplier_invoice":{"post":{"operationId":"tool_create_supplier_invoice","tags":["Verktyg (som MCP)"],"summary":"Registrera leverantörsfaktura","description":"Registrera en leverantörsfaktura (bokförs inte förrän du bokför den med book_supplier_invoice). Scope reconcile. Ange antingen kontorader (lines = [{account, net_ore, vat_rate, description}]; momsen räknas per momssats på summan av raderna, avrundad till närmaste öre, och total härleds ur raderna + rounding_ore. Skicka gärna med fakturans vat_ore och total_ore: har leverantören avrundat momsen annorlunda används dess moms om skillnaden ryms i avrundningen, högst ett öre per rad; större skillnader och en total som inte går ihop avvisas) ELLER enradsläget (total_ore + vat_ore + expense_account). document_id kopplar ett underlag (fakturans PDF från inkorg/dokument, se list_available_underlag). ANNAN VALUTA än SEK (currency, t.ex. EUR/USD): ange beloppen som på fakturan (hundradelar i fakturans valuta) och fx_rate (SEK per 1 enhet) ELLER total_sek_ore (totalbelopp i SEK) som ANVÄNDAREN har angett. Gissa aldrig kursen: fråga användaren. Klienter med stöd för elicitation får frågan direkt; annars returneras ett fel med frågan. Kvickd räknar om till SEK och sparar originalbelopp och kurs. Argument: orgnr, supplier_name, invoice_number, invoice_date; valfritt lines, rounding_ore, total_ore, vat_ore, due_date, ocr, currency, fx_rate, total_sek_ore, expense_account, supplier_id, document_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"supplier_name":{"title":"Supplier Name","type":"string"},"invoice_number":{"title":"Invoice Number","type":"string"},"invoice_date":{"title":"Invoice Date","type":"string"},"lines":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Lines"},"rounding_ore":{"default":0,"title":"Rounding Ore","type":"integer"},"total_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Ore"},"vat_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Vat Ore"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Due Date"},"ocr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Ocr"},"currency":{"default":"SEK","title":"Currency","type":"string"},"expense_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Expense Account"},"supplier_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Supplier Id"},"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Document Id"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"default":null,"title":"Fx Rate"},"total_sek_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Sek Ore"}},"required":["orgnr","supplier_name","invoice_number","invoice_date"],"title":"create_supplier_invoiceArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/attachments/upload-url":{"post":{"operationId":"create_underlag_upload","tags":["Underlag, inkorg och dokument"],"summary":"Uppladdningslänk för stor fil","description":"Skapar en kortlivad uppladdningslänk för en stor fil, t.ex. ett foto av ett kvitto, så att filen inte behöver skickas base64-kodad genom modellen. Använd när filen är för stor för ett vanligt verktygsanrop; små filer laddas upp direkt med add_voucher_underlag (till ett verifikat) eller upload_underlag (till en avstämning). Returnerar en URL som filens råa bytes PUT:as till (t.ex. med curl), hur länge länken gäller och största tillåtna storlek. Bieffekt: inget sparas förrän filen har PUT:ats; då blir den ett dokument vars document_id kan kopplas till ett verifikat med attach_underlag. Kräver behörigheten upload.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"create_underlag_upload","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"description":"Filnamn med filändelse, t.ex. kvitto-2026-03-14.jpg.","title":"Name","type":"string"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: filens MIME-typ, t.ex. image/jpeg eller application/pdf.","title":"Content Type"}},"required":["name"],"title":"create_underlag_uploadArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/create_underlag_upload":{"post":{"operationId":"tool_create_underlag_upload","tags":["Verktyg (som MCP)"],"summary":"Uppladdningslänk för stor fil","description":"Skapar en kortlivad uppladdningslänk för en stor fil, t.ex. ett foto av ett kvitto, så att filen inte behöver skickas base64-kodad genom modellen. Använd när filen är för stor för ett vanligt verktygsanrop; små filer laddas upp direkt med add_voucher_underlag (till ett verifikat) eller upload_underlag (till en avstämning). Returnerar en URL som filens råa bytes PUT:as till (t.ex. med curl), hur länge länken gäller och största tillåtna storlek. Bieffekt: inget sparas förrän filen har PUT:ats; då blir den ett dokument vars document_id kan kopplas till ett verifikat med attach_underlag. Kräver behörigheten upload.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"name":{"description":"Filnamn med filändelse, t.ex. kvitto-2026-03-14.jpg.","title":"Name","type":"string"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: filens MIME-typ, t.ex. image/jpeg eller application/pdf.","title":"Content Type"}},"required":["orgnr","name"],"title":"create_underlag_uploadArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/vouchers":{"post":{"operationId":"create_voucher","tags":["Bokföring och huvudbok"],"summary":"Bokför verifikat med underlag","description":"Bokför ett verifikat i huvudboken med tecknade belopp (debet positivt, kredit negativt), som när en människa använder bokföringsformuläret i appen. Använd för fristående bokningar, t.ex. skatteberäkningens poster efter godkännande, och när kvitton eller fakturor ska kopplas direkt via document_ids eller underlag_ids. Ska verifikatet hänvisa till källor (basis), använd book_voucher; ska en människa granska först, använd propose_voucher. Returnerar verifikatets id, serie och nummer. Bieffekt: verifikatet postas direkt. Koden validerar att summan blir 0 och att det finns minst två rader, och ett satt bokföringstak får inte överstigas. Underlag i annan valuta än SEK: gissa aldrig växelkursen. Fråga användaren efter kursen (SEK per 1 enhet) eller SEK-beloppet (t.ex. det som drogs från kontot), räkna raderna i SEK och ange currency, foreign_amount_minor och fx_rate eller total_sek_ore, så dokumenteras kursen på verifikatet. Ett datum mer än 30 dagar fram kräver confirm=true efter att användaren bekräftat datumet. Kräver behörigheten book. rows: [{konto, belopp_ore, text?, vat_code?}], t.ex. [{\"konto\": 6110, \"belopp_ore\": 12500}, {\"konto\": 1930, \"belopp_ore\": -12500}] (account och amount_ore går också, liksom debit_ore/credit_ore som i propose_voucher).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"create_voucher","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"date":{"title":"Date","type":"string"},"rows":{"items":{},"title":"Rows","type":"array"},"text":{"title":"Text","type":"string"},"series":{"default":"A","title":"Series","type":"string"},"document_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Document Ids"},"underlag_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Underlag Ids"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Currency"},"foreign_amount_minor":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Foreign Amount Minor"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"default":null,"title":"Fx Rate"},"total_sek_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Sek Ore"},"confirm":{"default":false,"title":"Confirm","type":"boolean"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Ref"}},"required":["date","rows","text"],"title":"create_voucherArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"list_vouchers","tags":["Bokföring och huvudbok"],"summary":"Lista verifikat","description":"Listar bokförda verifikat för ett räkenskapsår, sorterade på serie och nummer, en sida i taget. Använd för att bläddra bland verifikat eller hitta ett id; för ett enskilt verifikat med momskoder, använd get_voucher, och för ett kontos rörelser, get_general_ledger. Returnerar totalt antal, limit och offset, och per verifikat id, serie, nummer, datum, text, källa, vem som skapade det, underlag och rader med konto och belopp i öre (debet positivt, kredit negativt). Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_vouchers","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"query","required":true,"schema":{"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2026.","title":"Year","type":"integer"},"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2026."},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: kalendermånad 1 till 12 för verifikatets datum.","title":"Month"},"description":"Valfritt: kalendermånad 1 till 12 för verifikatets datum."},{"name":"limit","in":"query","required":false,"schema":{"default":200,"description":"Antal verifikat per sida, standard 200.","title":"Limit","type":"integer"},"description":"Antal verifikat per sida, standard 200."},{"name":"offset","in":"query","required":false,"schema":{"default":0,"description":"Antal verifikat att hoppa över, för nästa sida. Standard 0.","title":"Offset","type":"integer"},"description":"Antal verifikat att hoppa över, för nästa sida. Standard 0."}]}},"/api/v1/tools/create_voucher":{"post":{"operationId":"tool_create_voucher","tags":["Verktyg (som MCP)"],"summary":"Bokför verifikat med underlag","description":"Bokför ett verifikat i huvudboken med tecknade belopp (debet positivt, kredit negativt), som när en människa använder bokföringsformuläret i appen. Använd för fristående bokningar, t.ex. skatteberäkningens poster efter godkännande, och när kvitton eller fakturor ska kopplas direkt via document_ids eller underlag_ids. Ska verifikatet hänvisa till källor (basis), använd book_voucher; ska en människa granska först, använd propose_voucher. Returnerar verifikatets id, serie och nummer. Bieffekt: verifikatet postas direkt. Koden validerar att summan blir 0 och att det finns minst två rader, och ett satt bokföringstak får inte överstigas. Underlag i annan valuta än SEK: gissa aldrig växelkursen. Fråga användaren efter kursen (SEK per 1 enhet) eller SEK-beloppet (t.ex. det som drogs från kontot), räkna raderna i SEK och ange currency, foreign_amount_minor och fx_rate eller total_sek_ore, så dokumenteras kursen på verifikatet. Ett datum mer än 30 dagar fram kräver confirm=true efter att användaren bekräftat datumet. Kräver behörigheten book. rows: [{konto, belopp_ore, text?, vat_code?}], t.ex. [{\"konto\": 6110, \"belopp_ore\": 12500}, {\"konto\": 1930, \"belopp_ore\": -12500}] (account och amount_ore går också, liksom debit_ore/credit_ore som i propose_voucher).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"date":{"title":"Date","type":"string"},"rows":{"items":{},"title":"Rows","type":"array"},"text":{"title":"Text","type":"string"},"series":{"default":"A","title":"Series","type":"string"},"document_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Document Ids"},"underlag_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Underlag Ids"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Currency"},"foreign_amount_minor":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Foreign Amount Minor"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"default":null,"title":"Fx Rate"},"total_sek_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Sek Ore"},"confirm":{"default":false,"title":"Confirm","type":"boolean"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Ref"}},"required":["orgnr","date","rows","text"],"title":"create_voucherArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/customer-invoices/{invoice_id}/credit":{"post":{"operationId":"credit_customer_invoice","tags":["Kundfakturor"],"summary":"Skapa kreditfaktura","description":"Skapa en kreditfaktura för en BOKFÖRD kundfaktura (utkast; negativa belopp, omvänd bokföring vid bokför). Ett utkast krediteras inte: ändra det med update_customer_invoice eller makulera det med cancel_customer_invoice. Utan rader krediteras hela originalet; ange lines ([{description, quantity_milli?, unit_price_ore, vat_rate, account?}]) för delkreditering. När krediten bokförs kvittas den mot originalets obetalda saldo; det som inte ryms där ska betalas tillbaka till kunden (register_customer_payment på kreditfakturan). Scope reconcile. Argument: orgnr, invoice_id; valfritt invoice_number (utelämnat tas nästa nummer i bolagets serie), invoice_date (inte före originalets fakturadatum), lines.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"credit_customer_invoice","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"invoice_number":{"default":"","title":"Invoice Number","type":"string"},"invoice_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Invoice Date"},"lines":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Lines"}},"title":"credit_customer_invoiceArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/credit_customer_invoice":{"post":{"operationId":"tool_credit_customer_invoice","tags":["Verktyg (som MCP)"],"summary":"Skapa kreditfaktura","description":"Skapa en kreditfaktura för en BOKFÖRD kundfaktura (utkast; negativa belopp, omvänd bokföring vid bokför). Ett utkast krediteras inte: ändra det med update_customer_invoice eller makulera det med cancel_customer_invoice. Utan rader krediteras hela originalet; ange lines ([{description, quantity_milli?, unit_price_ore, vat_rate, account?}]) för delkreditering. När krediten bokförs kvittas den mot originalets obetalda saldo; det som inte ryms där ska betalas tillbaka till kunden (register_customer_payment på kreditfakturan). Scope reconcile. Argument: orgnr, invoice_id; valfritt invoice_number (utelämnat tas nästa nummer i bolagets serie), invoice_date (inte före originalets fakturadatum), lines.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"title":"Invoice Id","type":"integer"},"invoice_number":{"default":"","title":"Invoice Number","type":"string"},"invoice_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Invoice Date"},"lines":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Lines"}},"required":["orgnr","invoice_id"],"title":"credit_customer_invoiceArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/customer-invoices/outstanding":{"get":{"operationId":"customer_outstanding","tags":["Kundfakturor"],"summary":"Utestående kundfordringar","description":"Visar utestående kundfordringar per kund: hur mycket som är obetalt och hur mycket som har förfallit. Använd för frågor som vilka kunder som är skyldiga bolaget pengar; för fakturorna i detalj, använd list_customer_invoices. Returnerar per kund namn, utestående och förfallet belopp i öre (förfallet är en del av utestående), to_refund_ore (kreditfakturor som ska betalas tillbaka) och antal fakturor, sorterat på störst utestående, samt summorna summa_ore, summa_forfallet_ore och summa_att_aterbetala_ore. Ej bokförda, makulerade och betalda fakturor räknas inte med. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"customer_outstanding","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/customer_outstanding":{"post":{"operationId":"tool_customer_outstanding","tags":["Verktyg (som MCP)"],"summary":"Utestående kundfordringar","description":"Visar utestående kundfordringar per kund: hur mycket som är obetalt och hur mycket som har förfallit. Använd för frågor som vilka kunder som är skyldiga bolaget pengar; för fakturorna i detalj, använd list_customer_invoices. Returnerar per kund namn, utestående och förfallet belopp i öre (förfallet är en del av utestående), to_refund_ore (kreditfakturor som ska betalas tillbaka) och antal fakturor, sorterat på störst utestående, samt summorna summa_ore, summa_forfallet_ore och summa_att_aterbetala_ore. Ej bokförda, makulerade och betalda fakturor räknas inte med. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"customer_outstandingArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/documents/{doc_id}":{"delete":{"operationId":"delete_document","tags":["Underlag, inkorg och dokument"],"summary":"Radera dokument","description":"Raderar ett dokument ur bolagets dokumentarkiv permanent. Använd bara när användaren uttryckligen vill ta bort dokumentet; hitta doc_id med list_documents. Vill du bara ändra namn, kategori eller vilka bolag det gäller, använd edit_document. Returnerar ok: true. Bieffekt: dokumentet raderas och kan inte återställas. Ett dokument som används som underlag på en kund- eller leverantörsfaktura eller hör till en inkorgspost kan inte raderas; då returneras ett fel. Kräver behörigheten manage_documents.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"delete_document","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"description":"Dokumentets id (heltal), t.ex. 31. Hämta med list_documents.","title":"Doc Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"patch":{"operationId":"edit_document","tags":["Underlag, inkorg och dokument"],"summary":"Redigera dokument","description":"Redigera ett dokuments metadata (namn, kategori, kopplade bolag). Bara angivna fält ändras. Synlighet och LLM-delning styr vad assistenten får läsa och vem som ser dokumentet; de sätts bara i Kvickd-appen, inte via MCP. Scope manage_documents. Argument: doc_id; valfritt name, category, companies (lista med org.nr).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"edit_document","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Category"},"companies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Companies"}},"title":"edit_documentArguments","type":"object"}}}},"parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"title":"Doc Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/delete_document":{"post":{"operationId":"tool_delete_document","tags":["Verktyg (som MCP)"],"summary":"Radera dokument","description":"Raderar ett dokument ur bolagets dokumentarkiv permanent. Använd bara när användaren uttryckligen vill ta bort dokumentet; hitta doc_id med list_documents. Vill du bara ändra namn, kategori eller vilka bolag det gäller, använd edit_document. Returnerar ok: true. Bieffekt: dokumentet raderas och kan inte återställas. Ett dokument som används som underlag på en kund- eller leverantörsfaktura eller hör till en inkorgspost kan inte raderas; då returneras ett fel. Kräver behörigheten manage_documents.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"doc_id":{"description":"Dokumentets id (heltal), t.ex. 31. Hämta med list_documents.","title":"Doc Id","type":"integer"}},"required":["doc_id"],"title":"delete_documentArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/employees/{employee_id}":{"delete":{"operationId":"delete_employee","tags":["Lön"],"summary":"Ta bort/inaktivera anställd","description":"Ta bort eller inaktivera en anställd. Utan hard inaktiveras den anställde (bevarar historik). Med hard=true raderas den helt, men bara om den saknar lönekörningar. Scope payroll. Argument: orgnr, employee_id; valfritt hard.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"delete_employee","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"employee_id","in":"path","required":true,"schema":{"title":"Employee Id","type":"integer"}},{"name":"hard","in":"query","required":false,"schema":{"default":false,"title":"Hard","type":"boolean"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/delete_employee":{"post":{"operationId":"tool_delete_employee","tags":["Verktyg (som MCP)"],"summary":"Ta bort/inaktivera anställd","description":"Ta bort eller inaktivera en anställd. Utan hard inaktiveras den anställde (bevarar historik). Med hard=true raderas den helt, men bara om den saknar lönekörningar. Scope payroll. Argument: orgnr, employee_id; valfritt hard.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"employee_id":{"title":"Employee Id","type":"integer"},"hard":{"default":false,"title":"Hard","type":"boolean"}},"required":["orgnr","employee_id"],"title":"delete_employeeArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/fixed-assets/{asset_id}":{"delete":{"operationId":"delete_fixed_asset","tags":["Anläggningstillgångar"],"summary":"Ta bort anläggningstillgång","description":"Ta bort en anläggningstillgång ur registret, t.ex. en felregistrering. Bara tillgångar utan bokföring: har den en bokförd anskaffning, avskrivning eller avyttring nekas det, eftersom huvudboken då inte längre skulle stämma mot registret. Avyttra eller utrangera den i stället (dispose_fixed_asset). Kräver behörigheten 'book'. Argument: orgnr, asset_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"delete_fixed_asset","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"asset_id","in":"path","required":true,"schema":{"title":"Asset Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"get_fixed_asset","tags":["Anläggningstillgångar"],"summary":"Hämta anläggningstillgång","description":"Hämtar en anläggningstillgång med avskrivningsplan och bokförda avskrivningar per i dag. Använd när du har tillgångens id; för alla tillgångar, använd list_fixed_assets, och för vad nästa avskrivning blir, använd preview_depreciation. Returnerar namn, typ och konton, anskaffningsdatum, nyttjandeperiod i månader, och i öre anskaffningsvärde, restvärde, månadsavskrivning, planenlig och faktiskt bokförd ackumulerad avskrivning, ej bokförd avskrivning och bokfört värde, samt ev. avyttring. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_fixed_asset","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"asset_id","in":"path","required":true,"schema":{"description":"Tillgångens id (heltal), t.ex. 4. Hämta med list_fixed_assets.","title":"Asset Id","type":"integer"}}]},"patch":{"operationId":"update_fixed_asset","tags":["Anläggningstillgångar"],"summary":"Ändra anläggningstillgång","description":"Ändra en anläggningstillgång. Kräver behörigheten 'book'. Argument: orgnr, asset_id; valfritt name, acquired (YYYY-MM-DD), cost_ore, useful_life_months, residual_ore, gl_account (1000-1299), accum_depr_account (samma grupp, slutar på 9), depr_expense_account (7800-7899), asset_type, notes, depreciation_start (YYYY-MM-DD), opening_accumulated_ore, document_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"update_fixed_asset","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"acquired":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Acquired"},"cost_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Cost Ore"},"useful_life_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Useful Life Months"},"residual_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Residual Ore"},"gl_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Gl Account"},"accum_depr_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Accum Depr Account"},"depr_expense_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Depr Expense Account"},"asset_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Asset Type"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Notes"},"depreciation_start":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Depreciation Start"},"opening_accumulated_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Opening Accumulated Ore"},"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Document Id"}},"title":"update_fixed_assetArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"asset_id","in":"path","required":true,"schema":{"title":"Asset Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/delete_fixed_asset":{"post":{"operationId":"tool_delete_fixed_asset","tags":["Verktyg (som MCP)"],"summary":"Ta bort anläggningstillgång","description":"Ta bort en anläggningstillgång ur registret, t.ex. en felregistrering. Bara tillgångar utan bokföring: har den en bokförd anskaffning, avskrivning eller avyttring nekas det, eftersom huvudboken då inte längre skulle stämma mot registret. Avyttra eller utrangera den i stället (dispose_fixed_asset). Kräver behörigheten 'book'. Argument: orgnr, asset_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"asset_id":{"title":"Asset Id","type":"integer"}},"required":["orgnr","asset_id"],"title":"delete_fixed_assetArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/instructions/{instruction_id}":{"delete":{"operationId":"delete_instruction","tags":["Instruktioner och policyer"],"summary":"Ta bort instruktion","description":"Tar bort en sparad instruktion permanent. Använd när användaren ber dig glömma en regel eller när den inte gäller längre. Argument: instruction_id (från list_instructions). Returnerar id och texten som togs bort. Kräver behörigheten manage_documents i bolaget; instruktioner för alla bolag tas bara bort av kontots administratör.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"delete_instruction","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"instruction_id","in":"path","required":true,"schema":{"description":"Instruktionens id från list_instructions.","title":"Instruction Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"patch":{"operationId":"update_instruction","tags":["Instruktioner och policyer"],"summary":"Ändra instruktion","description":"Ändrar en sparad instruktion: ny text och/eller vilka bolag den gäller. Använd när användaren ber dig ändra eller rätta en regel. Den gamla texten skrivs över. Argument: instruction_id (från list_instructions); valfritt text, orgnr för att låta den gälla ett bolag och all_companies=true för att låta den gälla alla bolag. Returnerar instruktionen som den ser ut efter ändringen. Kräver behörigheten manage_documents i bolaget; instruktioner för alla bolag ändras bara av kontots administratör.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"update_instruction","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: ny text, högst 2000 tecken. Utelämna för att behålla texten.","title":"Text"},"orgnr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: låt instruktionen gälla bara det här bolaget, t.ex. 559900-1004.","title":"Orgnr"},"all_companies":{"default":false,"description":"true för att låta instruktionen gälla alla bolag i kontot.","title":"All Companies","type":"boolean"}},"title":"update_instructionArguments","type":"object"}}}},"parameters":[{"name":"instruction_id","in":"path","required":true,"schema":{"description":"Instruktionens id från list_instructions.","title":"Instruction Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/delete_instruction":{"post":{"operationId":"tool_delete_instruction","tags":["Verktyg (som MCP)"],"summary":"Ta bort instruktion","description":"Tar bort en sparad instruktion permanent. Använd när användaren ber dig glömma en regel eller när den inte gäller längre. Argument: instruction_id (från list_instructions). Returnerar id och texten som togs bort. Kräver behörigheten manage_documents i bolaget; instruktioner för alla bolag tas bara bort av kontots administratör.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"instruction_id":{"description":"Instruktionens id från list_instructions.","title":"Instruction Id","type":"integer"}},"required":["instruction_id"],"title":"delete_instructionArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/payroll-runs/{run_id}":{"delete":{"operationId":"delete_payroll_draft","tags":["Lön"],"summary":"Ta bort löneutkast","description":"Ta bort ett väntande utkast till lönekörning (sparat med run_payroll draft=true). Inget är bokfört, så inget behöver vändas. En bokförd körning backas i stället med reverse_payroll_run. Vill du byta ut utkastets rader och behålla run_id, använd run_payroll med replace_run_id. Kräver scope payroll. Argument: orgnr, run_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"delete_payroll_draft","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"run_id","in":"path","required":true,"schema":{"title":"Run Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/delete_payroll_draft":{"post":{"operationId":"tool_delete_payroll_draft","tags":["Verktyg (som MCP)"],"summary":"Ta bort löneutkast","description":"Ta bort ett väntande utkast till lönekörning (sparat med run_payroll draft=true). Inget är bokfört, så inget behöver vändas. En bokförd körning backas i stället med reverse_payroll_run. Vill du byta ut utkastets rader och behålla run_id, använd run_payroll med replace_run_id. Kräver scope payroll. Argument: orgnr, run_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"run_id":{"title":"Run Id","type":"integer"}},"required":["orgnr","run_id"],"title":"delete_payroll_draftArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/rot-rut/{request_id}":{"delete":{"operationId":"delete_rot_rut_request","tags":["ROT och RUT"],"summary":"Ta bort ROT/RUT-begäran","description":"Ta bort en ROT/RUT-begäran som inte fått någon utbetalning registrerad. Fakturorna blir valbara för en ny begäran. Scope reconcile. Argument: orgnr, request_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"delete_rot_rut_request","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"request_id","in":"path","required":true,"schema":{"title":"Request Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/delete_rot_rut_request":{"post":{"operationId":"tool_delete_rot_rut_request","tags":["Verktyg (som MCP)"],"summary":"Ta bort ROT/RUT-begäran","description":"Ta bort en ROT/RUT-begäran som inte fått någon utbetalning registrerad. Fakturorna blir valbara för en ny begäran. Scope reconcile. Argument: orgnr, request_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"request_id":{"title":"Request Id","type":"integer"}},"required":["orgnr","request_id"],"title":"delete_rot_rut_requestArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/time-entries/{entry_id}":{"delete":{"operationId":"delete_time_entry","tags":["Tidrapportering"],"summary":"Ta bort tidpost","description":"Ta bort en tidpost som inte ingår i en bokförd lönekörning. Scope payroll. Argument: orgnr, entry_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"delete_time_entry","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"entry_id","in":"path","required":true,"schema":{"title":"Entry Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/delete_time_entry":{"post":{"operationId":"tool_delete_time_entry","tags":["Verktyg (som MCP)"],"summary":"Ta bort tidpost","description":"Ta bort en tidpost som inte ingår i en bokförd lönekörning. Scope payroll. Argument: orgnr, entry_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"entry_id":{"title":"Entry Id","type":"integer"}},"required":["orgnr","entry_id"],"title":"delete_time_entryArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/fixed-assets/{asset_id}/dispose":{"post":{"operationId":"dispose_fixed_asset","tags":["Anläggningstillgångar"],"summary":"Avyttra anläggningstillgång","description":"Sälj eller utrangera en anläggningstillgång: bokför bort anskaffningsvärdet och den ackumulerade avskrivning som faktiskt är bokförd för tillgången t.o.m. avyttringsdagen (ack.-kontot för tillgången blir 0), tar in köpeskillingen, bokför utgående moms och redovisar vinst/förlust mot bokfört värde. Tillgången slutar skrivas av. Ej bokförd avskrivning blir en del av vinsten/förlusten: bokför avskrivning t.o.m. avyttringsmånaden FÖRST om den ska redovisas som avskrivning (svaret visar calculation.unbooked_depreciation_ore). Kräver behörigheten 'book'. Argument: orgnr, asset_id, disposal_date (YYYY-MM-DD); valfritt proceeds_ore (köpeskilling INKLUSIVE moms, det som betalas in; 0 = utrangering), vat_rate (momssats i procent: 25, 12, 6 eller 0; standard 25 för inventarier och övrigt, 0 för byggnad och mark; ange 0 när försäljningen är momsfri, t.ex. en personbil som köptes utan avdrag för moms), proceeds_account (default 1930), gain_account (default 3973), loss_account (default 7973), note, book (default true, sätt false för att bara registrera avyttringen utan verifikat).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"dispose_fixed_asset","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"disposal_date":{"title":"Disposal Date","type":"string"},"proceeds_ore":{"default":0,"title":"Proceeds Ore","type":"integer"},"proceeds_account":{"default":1930,"title":"Proceeds Account","type":"integer"},"gain_account":{"default":3973,"title":"Gain Account","type":"integer"},"loss_account":{"default":7973,"title":"Loss Account","type":"integer"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"book":{"default":true,"title":"Book","type":"boolean"},"vat_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Vat Rate"}},"required":["disposal_date"],"title":"dispose_fixed_assetArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"asset_id","in":"path","required":true,"schema":{"title":"Asset Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/dispose_fixed_asset":{"post":{"operationId":"tool_dispose_fixed_asset","tags":["Verktyg (som MCP)"],"summary":"Avyttra anläggningstillgång","description":"Sälj eller utrangera en anläggningstillgång: bokför bort anskaffningsvärdet och den ackumulerade avskrivning som faktiskt är bokförd för tillgången t.o.m. avyttringsdagen (ack.-kontot för tillgången blir 0), tar in köpeskillingen, bokför utgående moms och redovisar vinst/förlust mot bokfört värde. Tillgången slutar skrivas av. Ej bokförd avskrivning blir en del av vinsten/förlusten: bokför avskrivning t.o.m. avyttringsmånaden FÖRST om den ska redovisas som avskrivning (svaret visar calculation.unbooked_depreciation_ore). Kräver behörigheten 'book'. Argument: orgnr, asset_id, disposal_date (YYYY-MM-DD); valfritt proceeds_ore (köpeskilling INKLUSIVE moms, det som betalas in; 0 = utrangering), vat_rate (momssats i procent: 25, 12, 6 eller 0; standard 25 för inventarier och övrigt, 0 för byggnad och mark; ange 0 när försäljningen är momsfri, t.ex. en personbil som köptes utan avdrag för moms), proceeds_account (default 1930), gain_account (default 3973), loss_account (default 7973), note, book (default true, sätt false för att bara registrera avyttringen utan verifikat).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"asset_id":{"title":"Asset Id","type":"integer"},"disposal_date":{"title":"Disposal Date","type":"string"},"proceeds_ore":{"default":0,"title":"Proceeds Ore","type":"integer"},"proceeds_account":{"default":1930,"title":"Proceeds Account","type":"integer"},"gain_account":{"default":3973,"title":"Gain Account","type":"integer"},"loss_account":{"default":7973,"title":"Loss Account","type":"integer"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"book":{"default":true,"title":"Book","type":"boolean"},"vat_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Vat Rate"}},"required":["orgnr","asset_id","disposal_date"],"title":"dispose_fixed_assetArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/tax/ink2-sru":{"get":{"operationId":"download_ink2_sru","tags":["Skatt, INK2 och årsredovisning"],"summary":"Ta fram INK2 SRU","description":"Tar fram INK2 som SRU-filer (INFO.SRU och BLANKETTER.SRU) för ett räkenskapsår, ifyllda ur bokslutet. Använd när användaren själv ska lämna in inkomstdeklarationen hos Skatteverket; för själva skatteberäkningen, använd read_tax. Kräver att postnummer och postort är kända (från årsredovisningsguiden eller SIE-filen), annars returneras ett fel med vad som saknas. Returnerar filernas innehåll som text och vilket år de gäller; Skatteverket kräver att filerna sparas i ISO 8859-1. Skatten följer de val som sparats på skattesidan. Bieffekt: som nedladdningen i appen registreras filen som skapad för året (syns som Skapad under Skatt och deklaration). Inget skickas till Skatteverket.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"download_ink2_sru","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025). Utelämna för det senaste räkenskapsåret med verifikat.","title":"Year"},"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025). Utelämna för det senaste räkenskapsåret med verifikat."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/download_ink2_sru":{"post":{"operationId":"tool_download_ink2_sru","tags":["Verktyg (som MCP)"],"summary":"Ta fram INK2 SRU","description":"Tar fram INK2 som SRU-filer (INFO.SRU och BLANKETTER.SRU) för ett räkenskapsår, ifyllda ur bokslutet. Använd när användaren själv ska lämna in inkomstdeklarationen hos Skatteverket; för själva skatteberäkningen, använd read_tax. Kräver att postnummer och postort är kända (från årsredovisningsguiden eller SIE-filen), annars returneras ett fel med vad som saknas. Returnerar filernas innehåll som text och vilket år de gäller; Skatteverket kräver att filerna sparas i ISO 8859-1. Skatten följer de val som sparats på skattesidan. Bieffekt: som nedladdningen i appen registreras filen som skapad för året (syns som Skapad under Skatt och deklaration). Inget skickas till Skatteverket.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025). Utelämna för det senaste räkenskapsåret med verifikat.","title":"Year"}},"required":["orgnr"],"title":"download_ink2_sruArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/annual-report/{year}/draft":{"patch":{"operationId":"edit_annual_report_draft","tags":["Skatt, INK2 och årsredovisning"],"summary":"Spara hela årsredovisningsutkastet","description":"Sparar hela utkastet till årsredovisningen för ett räkenskapsår, som när årsredovisningsguiden autosparar: resultat- och balansräkning, noter, förvaltningsberättelse och undertecknare. Använd bara när du har hela utkastet, t.ex. hämtat med read_annual_report_draft och ändrat; för att ändra enstaka uppgifter, använd set_arsredovisning_inputs, som skriver en delmängd och returnerar vad som återstår. Returnerar ok och när utkastet sparades. Bieffekt: det sparade utkastet ersätts med payload; postnummer och postort för INK2 behålls från det tidigare utkastet. Undertecknarnas personnummer ingår inte och tas inte emot; fastställelseintygets signerare anges av användaren i Kvickd under Årsredovisning > Underskrift vid inlämningen. Kräver behörigheten statutory.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"edit_annual_report_draft","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"payload":{"additionalProperties":true,"description":"Hela utkastet i samma form som payload i read_annual_report_draft, med belopp i hela kronor.","title":"Payload","type":"object"}},"required":["payload"],"title":"edit_annual_report_draftArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025).","title":"Year","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"read_annual_report_draft","tags":["Skatt, INK2 och årsredovisning"],"summary":"Läs årsredovisningsutkast","description":"Läser det sparade utkastet till årsredovisningen för ett räkenskapsår, som det sparats i årsredovisningsguiden: belopp, noter, förvaltningsberättelse och undertecknare. Använd för att fortsätta på ett påbörjat utkast; för årsredovisningen härledd ur bokföringen, använd read_annual_report, och för vad som saknas inför inlämning, använd get_arsredovisning_status. Returnerar exists, utkastets innehåll (payload) och när det senast sparades. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"read_annual_report_draft","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025).","title":"Year","type":"integer"}}]}},"/api/v1/tools/edit_annual_report_draft":{"post":{"operationId":"tool_edit_annual_report_draft","tags":["Verktyg (som MCP)"],"summary":"Spara hela årsredovisningsutkastet","description":"Sparar hela utkastet till årsredovisningen för ett räkenskapsår, som när årsredovisningsguiden autosparar: resultat- och balansräkning, noter, förvaltningsberättelse och undertecknare. Använd bara när du har hela utkastet, t.ex. hämtat med read_annual_report_draft och ändrat; för att ändra enstaka uppgifter, använd set_arsredovisning_inputs, som skriver en delmängd och returnerar vad som återstår. Returnerar ok och när utkastet sparades. Bieffekt: det sparade utkastet ersätts med payload; postnummer och postort för INK2 behålls från det tidigare utkastet. Undertecknarnas personnummer ingår inte och tas inte emot; fastställelseintygets signerare anges av användaren i Kvickd under Årsredovisning > Underskrift vid inlämningen. Kräver behörigheten statutory.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025).","title":"Year","type":"integer"},"payload":{"additionalProperties":true,"description":"Hela utkastet i samma form som payload i read_annual_report_draft, med belopp i hela kronor.","title":"Payload","type":"object"}},"required":["orgnr","year","payload"],"title":"edit_annual_report_draftArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/edit_document":{"post":{"operationId":"tool_edit_document","tags":["Verktyg (som MCP)"],"summary":"Redigera dokument","description":"Redigera ett dokuments metadata (namn, kategori, kopplade bolag). Bara angivna fält ändras. Synlighet och LLM-delning styr vad assistenten får läsa och vem som ser dokumentet; de sätts bara i Kvickd-appen, inte via MCP. Scope manage_documents. Argument: doc_id; valfritt name, category, companies (lista med org.nr).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"doc_id":{"title":"Doc Id","type":"integer"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Category"},"companies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Companies"}},"required":["doc_id"],"title":"edit_documentArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/voucher-drafts/{draft_id}":{"patch":{"operationId":"edit_voucher_draft","tags":["Bokföring och huvudbok"],"summary":"Ändra verifikatförslag","description":"Ändra ett väntande verifikatförslag (draft) innan det godkänns. Kräver behörigheten 'reconcile'. Argument: orgnr, draft_id; valfritt date (YYYY-MM-DD), series, text, lines, note. Rader: [{account, debit_ore, credit_ore, text?}] i öre med exakt ett belopp skilt från noll per rad, eller [{account, amount_ore, text?}] med tecken (debet positivt, kredit negativt). Raderna kommer tillbaka med båda formaten från list_voucher_drafts och get_voucher.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"edit_voucher_draft","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Date"},"series":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Series"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Text"},"lines":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Lines"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"}},"title":"edit_voucher_draftArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"draft_id","in":"path","required":true,"schema":{"title":"Draft Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/edit_voucher_draft":{"post":{"operationId":"tool_edit_voucher_draft","tags":["Verktyg (som MCP)"],"summary":"Ändra verifikatförslag","description":"Ändra ett väntande verifikatförslag (draft) innan det godkänns. Kräver behörigheten 'reconcile'. Argument: orgnr, draft_id; valfritt date (YYYY-MM-DD), series, text, lines, note. Rader: [{account, debit_ore, credit_ore, text?}] i öre med exakt ett belopp skilt från noll per rad, eller [{account, amount_ore, text?}] med tecken (debet positivt, kredit negativt). Raderna kommer tillbaka med båda formaten från list_voucher_drafts och get_voucher.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"draft_id":{"title":"Draft Id","type":"integer"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Date"},"series":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Series"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Text"},"lines":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Lines"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"}},"required":["orgnr","draft_id"],"title":"edit_voucher_draftArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/reports/export":{"post":{"operationId":"export_report","tags":["Rapporter"],"summary":"Exportera rapport","description":"Generera kvickds riktiga rapport som fil (pdf eller xlsx) att ladda ner eller dela, med bolagsnamn och korrekt svenska. Använd det här i stället för att bygga en egen PDF. kind ∈ {resultatrakning, balansrakning, huvudbok, momsrapport, leverantorsreskontra, kundreskontra}. Datum: resultatrakning/huvudbok/momsrapport tar start+end; balansrakning/leverantorsreskontra/kundreskontra tar balansdag (alla YYYY-MM-DD). Scope view. Returnerar filen base64-kodad (content_base64 + filename + media_type).","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"export_report","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"kind":{"title":"Kind","type":"string"},"format":{"title":"Format","type":"string"},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Start"},"end":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"End"},"balansdag":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Balansdag"}},"required":["kind","format"],"title":"export_reportArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/export_report":{"post":{"operationId":"tool_export_report","tags":["Verktyg (som MCP)"],"summary":"Exportera rapport","description":"Generera kvickds riktiga rapport som fil (pdf eller xlsx) att ladda ner eller dela, med bolagsnamn och korrekt svenska. Använd det här i stället för att bygga en egen PDF. kind ∈ {resultatrakning, balansrakning, huvudbok, momsrapport, leverantorsreskontra, kundreskontra}. Datum: resultatrakning/huvudbok/momsrapport tar start+end; balansrakning/leverantorsreskontra/kundreskontra tar balansdag (alla YYYY-MM-DD). Scope view. Returnerar filen base64-kodad (content_base64 + filename + media_type).","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"kind":{"title":"Kind","type":"string"},"format":{"title":"Format","type":"string"},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Start"},"end":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"End"},"balansdag":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Balansdag"}},"required":["orgnr","kind","format"],"title":"export_reportArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/vouchers/find":{"get":{"operationId":"find_voucher","tags":["Bokföring och huvudbok"],"summary":"Följ förslag eller egen referens","description":"Slår upp var ett verifikatförslag eller en egen referens (external_ref) befinner sig: pending (väntar på godkännande i Kvickd), booked (bokfört, med verifikatets id, serie och nummer), rejected (avvisat i Kvickd) eller not_found (okänt). Använd för att följa ett förslag från propose_voucher till verifikatet efter att någon godkänt det i Kvickd. Ange external_ref eller draft_id. Läser bara, ändrar inget. Kräver behörigheten view.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"find_voucher","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"external_ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Ref"}},{"name":"draft_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Draft Id"}}]}},"/api/v1/tools/find_voucher":{"post":{"operationId":"tool_find_voucher","tags":["Verktyg (som MCP)"],"summary":"Följ förslag eller egen referens","description":"Slår upp var ett verifikatförslag eller en egen referens (external_ref) befinner sig: pending (väntar på godkännande i Kvickd), booked (bokfört, med verifikatets id, serie och nummer), rejected (avvisat i Kvickd) eller not_found (okänt). Använd för att följa ett förslag från propose_voucher till verifikatet efter att någon godkänt det i Kvickd. Ange external_ref eller draft_id. Läser bara, ändrar inget. Kräver behörigheten view.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Ref"},"draft_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Draft Id"}},"required":["orgnr"],"title":"find_voucherArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/annual-report/ixbrl":{"post":{"operationId":"generate_ixbrl","tags":["Skatt, INK2 och årsredovisning"],"summary":"Generera iXBRL","description":"Genererar årsredovisningen (K2) som iXBRL-fil för Bolagsverket utifrån årsredovisningsguidens uppgifter. Använd när get_arsredovisning_status visar att allt är klart; ofullständiga uppgifter ger ett fel som säger vad som saknas. Skicka med alla uppgifter i user_inputs, t.ex. payload.user_inputs från read_annual_report_draft; det sparade utkastet fylls inte i av sig självt. Ange räkenskapsåret med year; året måste vara avslutat (skatten låst och året låst). Returnerar XHTML-dokumentet som text. Sparar och skickar inget; inlämningen till Bolagsverket görs av användaren. Kräver behörigheten statutory.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"generate_ixbrl","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"user_inputs":{"additionalProperties":true,"description":"Årsredovisningsguidens alla uppgifter, samma fält som i set_arsredovisning_inputs, med belopp i hela kronor. Hämta t.ex. payload.user_inputs med read_annual_report_draft.","title":"User Inputs","type":"object"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025). Utelämna för året i user_inputs.fy_end, eller om det saknas det senaste räkenskapsåret med verifikat.","title":"Year"}},"required":["user_inputs"],"title":"generate_ixbrlArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/generate_ixbrl":{"post":{"operationId":"tool_generate_ixbrl","tags":["Verktyg (som MCP)"],"summary":"Generera iXBRL","description":"Genererar årsredovisningen (K2) som iXBRL-fil för Bolagsverket utifrån årsredovisningsguidens uppgifter. Använd när get_arsredovisning_status visar att allt är klart; ofullständiga uppgifter ger ett fel som säger vad som saknas. Skicka med alla uppgifter i user_inputs, t.ex. payload.user_inputs från read_annual_report_draft; det sparade utkastet fylls inte i av sig självt. Ange räkenskapsåret med year; året måste vara avslutat (skatten låst och året låst). Returnerar XHTML-dokumentet som text. Sparar och skickar inget; inlämningen till Bolagsverket görs av användaren. Kräver behörigheten statutory.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"user_inputs":{"additionalProperties":true,"description":"Årsredovisningsguidens alla uppgifter, samma fält som i set_arsredovisning_inputs, med belopp i hela kronor. Hämta t.ex. payload.user_inputs med read_annual_report_draft.","title":"User Inputs","type":"object"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025). Utelämna för året i user_inputs.fy_end, eller om det saknas det senaste räkenskapsåret med verifikat.","title":"Year"}},"required":["orgnr","user_inputs"],"title":"generate_ixbrlArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/supplier-invoices/{invoice_id}/pdf":{"post":{"operationId":"generate_supplier_invoice_pdf","tags":["Leverantörsfakturor"],"summary":"Faktura-PDF","description":"Generera Kvickds sammanställning av en registrerad leverantörsfaktura som PDF och spara den i dokumentarkivet (kategori Leverantörsfaktura, syns sedan via list_documents/list_policies och kan läsas/laddas ner). PDF:en heter \"Registrerad leverantörsfaktura ... (sammanställning från Kvickd)\" och är inte leverantörens original, som ska sparas separat. Skapar ett dokument, så scope upload (inte view). Argument: orgnr, invoice_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"generate_supplier_invoice_pdf","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"generate_supplier_invoice_pdfArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/generate_supplier_invoice_pdf":{"post":{"operationId":"tool_generate_supplier_invoice_pdf","tags":["Verktyg (som MCP)"],"summary":"Faktura-PDF","description":"Generera Kvickds sammanställning av en registrerad leverantörsfaktura som PDF och spara den i dokumentarkivet (kategori Leverantörsfaktura, syns sedan via list_documents/list_policies och kan läsas/laddas ner). PDF:en heter \"Registrerad leverantörsfaktura ... (sammanställning från Kvickd)\" och är inte leverantörens original, som ska sparas separat. Skapar ett dokument, så scope upload (inte view). Argument: orgnr, invoice_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"title":"Invoice Id","type":"integer"}},"required":["orgnr","invoice_id"],"title":"generate_supplier_invoice_pdfArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/annual-report/{year}/status":{"get":{"operationId":"get_arsredovisning_status","tags":["Skatt, INK2 och årsredovisning"],"summary":"Årsredovisning: öppna poster","description":"Öppna poster för årsredovisningen: exakt vad som återstår innan iXBRL kan genereras, per sektion + platt lista (blockerande först). ARBETSSÄTT: gå igenom posterna med användaren som 'godkänn eller ändra', POST FÖR POST (säte, verksamhet, väsentliga händelser, resultatdisposition/utdelning, förändring eget kapital), och vänta på bekräftelse innan du skriver med set_arsredovisning_inputs och går vidare och färdigställer utkastet. Föreslå där suggested_value finns; fråga där kind=question. kind=toggle (EK-händelser, utdelning) är Nej/Ja: skriv toggle_field=true + belopp vid Ja, annars false (eller belopp 0), och sätt confirm_field=true när frågan besvarats. Genereringen släpps först när complete==true. OBS: belopp i HELA KRONOR (inte öre). Scope view. Argument: orgnr, year.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_arsredovisning_status","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}}]}},"/api/v1/tools/get_arsredovisning_status":{"post":{"operationId":"tool_get_arsredovisning_status","tags":["Verktyg (som MCP)"],"summary":"Årsredovisning: öppna poster","description":"Öppna poster för årsredovisningen: exakt vad som återstår innan iXBRL kan genereras, per sektion + platt lista (blockerande först). ARBETSSÄTT: gå igenom posterna med användaren som 'godkänn eller ändra', POST FÖR POST (säte, verksamhet, väsentliga händelser, resultatdisposition/utdelning, förändring eget kapital), och vänta på bekräftelse innan du skriver med set_arsredovisning_inputs och går vidare och färdigställer utkastet. Föreslå där suggested_value finns; fråga där kind=question. kind=toggle (EK-händelser, utdelning) är Nej/Ja: skriv toggle_field=true + belopp vid Ja, annars false (eller belopp 0), och sätt confirm_field=true när frågan besvarats. Genereringen släpps först när complete==true. OBS: belopp i HELA KRONOR (inte öre). Scope view. Argument: orgnr, year.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"}},"required":["orgnr","year"],"title":"get_arsredovisning_statusArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/reports/balance-sheet":{"get":{"operationId":"get_balance_sheet","tags":["Rapporter"],"summary":"Hämta balansräkning","description":"Visar balansräkningen per ett datum, uppställd enligt K2. Använd för frågor om tillgångar, skulder och eget kapital; för saldon per konto, använd get_trial_balance, och för resultaträkningen, get_income_statement. Returnerar tillgångar samt eget kapital och skulder med delsummor, beräknat resultat och en balanskontroll, med belopp i öre. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_balance_sheet","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"balansdag","in":"query","required":true,"schema":{"description":"Datum som saldona gäller per, ÅÅÅÅ-MM-DD, t.ex. 2026-06-30.","title":"Balansdag","type":"string"},"description":"Datum som saldona gäller per, ÅÅÅÅ-MM-DD, t.ex. 2026-06-30."}]}},"/api/v1/tools/get_balance_sheet":{"post":{"operationId":"tool_get_balance_sheet","tags":["Verktyg (som MCP)"],"summary":"Hämta balansräkning","description":"Visar balansräkningen per ett datum, uppställd enligt K2. Använd för frågor om tillgångar, skulder och eget kapital; för saldon per konto, använd get_trial_balance, och för resultaträkningen, get_income_statement. Returnerar tillgångar samt eget kapital och skulder med delsummor, beräknat resultat och en balanskontroll, med belopp i öre. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"balansdag":{"description":"Datum som saldona gäller per, ÅÅÅÅ-MM-DD, t.ex. 2026-06-30.","title":"Balansdag","type":"string"}},"required":["orgnr","balansdag"],"title":"get_balance_sheetArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}":{"get":{"operationId":"get_company","tags":["Bolag och översikt"],"summary":"Hämta bolag","description":"Full bolagsdetalj för ett organisationsnummer: resultat/balans, bankavstämning, tie-outs mot reskontra, moms och findings. Argument: orgnr; valfritt year, month (period). Utan period skopas det till räkenskapsårsstart till idag, så etikett och data matchar avstämning och saldobalans.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_company","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Year"}},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Month"}}]},"patch":{"operationId":"update_company","tags":["Bolag och översikt"],"summary":"Ändra bolag","description":"Ändra ett bolags inställningar (namn, ort, räkenskapsår, momsperiod). Scope book. Argument: orgnr (eller company_id från list_companies); valfritt name, city, fiscal_year, fiscal_year_end_month (slutmånad 1-12), vat_period, first_fy_start/first_fy_end (ISO-datum, avvikande första räkenskapsår för nystartat bolag, högst 18 månader) och clear_first_fy=true för att ta bort det. Ändrat räkenskapsår räknar om verifikatens år; nekas om bolaget har låsta perioder.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"update_company","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Company Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"City"},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Fiscal Year"},"fiscal_year_end_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Fiscal Year End Month"},"vat_period":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Vat Period"},"first_fy_start":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"First Fy Start"},"first_fy_end":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"First Fy End"},"clear_first_fy":{"default":false,"title":"Clear First Fy","type":"boolean"}},"title":"update_companyArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Bolagets organisationsnummer (i stället för company_id), t.ex. 559900-1004.","title":"Orgnr"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/get_company":{"post":{"operationId":"tool_get_company","tags":["Verktyg (som MCP)"],"summary":"Hämta bolag","description":"Full bolagsdetalj för ett organisationsnummer: resultat/balans, bankavstämning, tie-outs mot reskontra, moms och findings. Argument: orgnr; valfritt year, month (period). Utan period skopas det till räkenskapsårsstart till idag, så etikett och data matchar avstämning och saldobalans.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Year"},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Month"}},"required":["orgnr"],"title":"get_companyArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/customer-invoices/{invoice_id}":{"get":{"operationId":"get_customer_invoice","tags":["Kundfakturor"],"summary":"Hämta kundfaktura","description":"Hämtar en kundfaktura med alla uppgifter. Använd när du har fakturans id och behöver detaljer; för att hitta fakturor eller se flera, använd list_customer_invoices, och för obetalt per kund, använd customer_outstanding. Returnerar kund, fakturanummer, fakturadatum och förfallodag, rader, belopp och moms i öre, kvarvarande saldo, status (status_label i ord, som i appen) och verifikatnummer, mailings (alla utskick och påminnelser med mottagare och tid, samt studsar och skräppostanmälningar), och för ROT/RUT köparna med personnummer maskerat till födelsedatum (ÅÅÅÅMMDD-XXXX). Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_customer_invoice","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"description":"Kundfakturans id (heltal), t.ex. 42. Hämta med list_customer_invoices.","title":"Invoice Id","type":"integer"}}]},"patch":{"operationId":"update_customer_invoice","tags":["Kundfakturor"],"summary":"Ändra kundfaktura","description":"Ändra en EJ bokförd kundfaktura (utkast). Bara medskickade fält ändras. Med lines ersätts raderna och total/moms räknas om (per momssats, se create_customer_invoice; skickade total_ore/vat_ore kontrolleras). Scope reconcile. Argument: orgnr, invoice_id; valfritt customer_name, invoice_number, ocr, invoice_date, due_date, total_ore, vat_ore, currency, income_account, rounding_ore, lines, customer_orgnr, customer_address, customer_email, customer_reference, payment_terms, service_description, seller_address, seller_bank, seller_iban, seller_bic, seller_bankgiro, seller_contact, customer_vat_number, customer_country, vat_mode (normal, eu_tjanster, eu_varor; se create_customer_invoice), husarbete (ROT/RUT, samma form som i create_customer_invoice; {type: \"\"} tar bort husarbetet). Köpare som redan finns på fakturan behåller sitt personnummer: utelämna buyers för att behålla dem (avdraget räknas då om), eller hänvisa till en köpare med namn eller det maskerade personnumret ur svaret (t.ex. 19850312-XXXX). Fullständiga personnummer tas inte emot; de läggs in i Kvickd under Kundfakturor (Redigera fakturan). Ändras raderna utan att husarbete skickas med behålls beloppen om de ryms, annars sänks avdraget till högsta möjliga.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"update_customer_invoice","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Name"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Invoice Number"},"ocr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Ocr"},"invoice_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Invoice Date"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Due Date"},"total_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Ore"},"vat_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Vat Ore"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Currency"},"income_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Income Account"},"rounding_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Rounding Ore"},"lines":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Lines"},"customer_orgnr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Orgnr"},"customer_address":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Address"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Email"},"customer_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Reference"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Payment Terms"},"service_description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Service Description"},"seller_address":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Address"},"seller_bank":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Bank"},"seller_iban":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Iban"},"seller_bic":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Bic"},"seller_bankgiro":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Bankgiro"},"seller_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Contact"},"husarbete":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Husarbete"},"customer_vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Vat Number"},"customer_country":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Country"},"vat_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Vat Mode"}},"title":"update_customer_invoiceArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/get_customer_invoice":{"post":{"operationId":"tool_get_customer_invoice","tags":["Verktyg (som MCP)"],"summary":"Hämta kundfaktura","description":"Hämtar en kundfaktura med alla uppgifter. Använd när du har fakturans id och behöver detaljer; för att hitta fakturor eller se flera, använd list_customer_invoices, och för obetalt per kund, använd customer_outstanding. Returnerar kund, fakturanummer, fakturadatum och förfallodag, rader, belopp och moms i öre, kvarvarande saldo, status (status_label i ord, som i appen) och verifikatnummer, mailings (alla utskick och påminnelser med mottagare och tid, samt studsar och skräppostanmälningar), och för ROT/RUT köparna med personnummer maskerat till födelsedatum (ÅÅÅÅMMDD-XXXX). Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"description":"Kundfakturans id (heltal), t.ex. 42. Hämta med list_customer_invoices.","title":"Invoice Id","type":"integer"}},"required":["orgnr","invoice_id"],"title":"get_customer_invoiceArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/get_fixed_asset":{"post":{"operationId":"tool_get_fixed_asset","tags":["Verktyg (som MCP)"],"summary":"Hämta anläggningstillgång","description":"Hämtar en anläggningstillgång med avskrivningsplan och bokförda avskrivningar per i dag. Använd när du har tillgångens id; för alla tillgångar, använd list_fixed_assets, och för vad nästa avskrivning blir, använd preview_depreciation. Returnerar namn, typ och konton, anskaffningsdatum, nyttjandeperiod i månader, och i öre anskaffningsvärde, restvärde, månadsavskrivning, planenlig och faktiskt bokförd ackumulerad avskrivning, ej bokförd avskrivning och bokfört värde, samt ev. avyttring. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"asset_id":{"description":"Tillgångens id (heltal), t.ex. 4. Hämta med list_fixed_assets.","title":"Asset Id","type":"integer"}},"required":["orgnr","asset_id"],"title":"get_fixed_assetArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/reports/general-ledger":{"get":{"operationId":"get_general_ledger","tags":["Bokföring och huvudbok"],"summary":"Hämta huvudbok","description":"Visar huvudboken för en period: transaktionerna per konto med ingående, löpande och utgående saldo. Använd för att följa ett kontos rörelser; för hela verifikat, använd list_vouchers eller get_voucher, och för bara saldon per konto, get_trial_balance. Returnerar en rapport med kolumnerna datum, verifikat, text, debet, kredit och saldo, med belopp i öre. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_general_ledger","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"start","in":"query","required":true,"schema":{"description":"Från och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-01-01.","title":"Start","type":"string"},"description":"Från och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-01-01."},{"name":"end","in":"query","required":true,"schema":{"description":"Till och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-03-31.","title":"End","type":"string"},"description":"Till och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-03-31."},{"name":"account","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: visa bara ett konto, t.ex. 1930.","title":"Account"},"description":"Valfritt: visa bara ett konto, t.ex. 1930."}]}},"/api/v1/tools/get_general_ledger":{"post":{"operationId":"tool_get_general_ledger","tags":["Verktyg (som MCP)"],"summary":"Hämta huvudbok","description":"Visar huvudboken för en period: transaktionerna per konto med ingående, löpande och utgående saldo. Använd för att följa ett kontos rörelser; för hela verifikat, använd list_vouchers eller get_voucher, och för bara saldon per konto, get_trial_balance. Returnerar en rapport med kolumnerna datum, verifikat, text, debet, kredit och saldo, med belopp i öre. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"start":{"description":"Från och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-01-01.","title":"Start","type":"string"},"end":{"description":"Till och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-03-31.","title":"End","type":"string"},"account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: visa bara ett konto, t.ex. 1930.","title":"Account"}},"required":["orgnr","start","end"],"title":"get_general_ledgerArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/reports/income-statement":{"get":{"operationId":"get_income_statement","tags":["Rapporter"],"summary":"Hämta resultaträkning","description":"Visar resultaträkningen för en period, uppställd enligt K2 med alla konton. Använd för frågor om intäkter, kostnader och resultat; för balansräkningen, använd get_balance_sheet, och för årsredovisningens siffror med jämförelseår, read_annual_report. Returnerar grupper med konton och belopp i öre (intäkter positiva, kostnader negativa) och beräknat resultat. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_income_statement","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"start","in":"query","required":true,"schema":{"description":"Från och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-01-01.","title":"Start","type":"string"},"description":"Från och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-01-01."},{"name":"end","in":"query","required":true,"schema":{"description":"Till och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-03-31.","title":"End","type":"string"},"description":"Till och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-03-31."}]}},"/api/v1/tools/get_income_statement":{"post":{"operationId":"tool_get_income_statement","tags":["Verktyg (som MCP)"],"summary":"Hämta resultaträkning","description":"Visar resultaträkningen för en period, uppställd enligt K2 med alla konton. Använd för frågor om intäkter, kostnader och resultat; för balansräkningen, använd get_balance_sheet, och för årsredovisningens siffror med jämförelseår, read_annual_report. Returnerar grupper med konton och belopp i öre (intäkter positiva, kostnader negativa) och beräknat resultat. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"start":{"description":"Från och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-01-01.","title":"Start","type":"string"},"end":{"description":"Till och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-03-31.","title":"End","type":"string"}},"required":["orgnr","start","end"],"title":"get_income_statementArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/integration-records/{record_id}":{"get":{"operationId":"get_integration_record","tags":["Kopplingar (Shopify, Stripe m.fl.)"],"summary":"Hämta post från koppling","description":"Hämtar en post från en koppling med all normaliserad data, t.ex. en Shopify-order, en Stripe-betalning eller en utbetalning. Använd innan du bokför posten; för att hitta poster, använd list_integration_data. Belopp är i öre i källans valuta (Stripe: saldots valuta). En order har totalbelopp, moms per sats (tax_lines, och current_tax_lines efter återbetalningar), frakt, rabatter, återbetalt belopp, leveransland, betalväg och transaktioner. En utbetalning har nettobelopp, summering och alla transaktioner (försäljning, återbetalningar, avgifter, justeringar, tvister) med order och avgift. En Stripe-betalning (charge) har belopp, avgift, netto, återbetalt, kundens land och momsen från Stripe-fakturan (invoice) när betalningen hör till en. En Pleo-utgift (expense) har Pleos kontering per rad (konto, netto, moms), motkonto, leverantör och kvittona som dokument i Kvickd (document_ids, bifoga med attach_underlag). suggested_voucher är ett förslag på verifikat (konton och belopp i öre, debet positivt) med anteckningar om sådant att kontrollera; granska det innan du bokför. För Stripe bokförs avgiften med betalningen (6570 mot fordringskontot 1686, eller 1580 i BAS 2025) och utbetalningen flyttar nettot till banken, så att fordran går mot noll även vid manuella utbetalningar. Med include_raw följer källans oförändrade svar med. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_integration_record","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"record_id","in":"path","required":true,"schema":{"description":"Postens id (heltal), t.ex. 42. Hämta med list_integration_data.","title":"Record Id","type":"integer"}},{"name":"include_raw","in":"query","required":false,"schema":{"default":false,"description":"Ta med källans oförändrade svar (stort). Standard false.","title":"Include Raw","type":"boolean"},"description":"Ta med källans oförändrade svar (stort). Standard false."}]}},"/api/v1/tools/get_integration_record":{"post":{"operationId":"tool_get_integration_record","tags":["Verktyg (som MCP)"],"summary":"Hämta post från koppling","description":"Hämtar en post från en koppling med all normaliserad data, t.ex. en Shopify-order, en Stripe-betalning eller en utbetalning. Använd innan du bokför posten; för att hitta poster, använd list_integration_data. Belopp är i öre i källans valuta (Stripe: saldots valuta). En order har totalbelopp, moms per sats (tax_lines, och current_tax_lines efter återbetalningar), frakt, rabatter, återbetalt belopp, leveransland, betalväg och transaktioner. En utbetalning har nettobelopp, summering och alla transaktioner (försäljning, återbetalningar, avgifter, justeringar, tvister) med order och avgift. En Stripe-betalning (charge) har belopp, avgift, netto, återbetalt, kundens land och momsen från Stripe-fakturan (invoice) när betalningen hör till en. En Pleo-utgift (expense) har Pleos kontering per rad (konto, netto, moms), motkonto, leverantör och kvittona som dokument i Kvickd (document_ids, bifoga med attach_underlag). suggested_voucher är ett förslag på verifikat (konton och belopp i öre, debet positivt) med anteckningar om sådant att kontrollera; granska det innan du bokför. För Stripe bokförs avgiften med betalningen (6570 mot fordringskontot 1686, eller 1580 i BAS 2025) och utbetalningen flyttar nettot till banken, så att fordran går mot noll även vid manuella utbetalningar. Med include_raw följer källans oförändrade svar med. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"record_id":{"description":"Postens id (heltal), t.ex. 42. Hämta med list_integration_data.","title":"Record Id","type":"integer"},"include_raw":{"default":false,"description":"Ta med källans oförändrade svar (stort). Standard false.","title":"Include Raw","type":"boolean"}},"required":["orgnr","record_id"],"title":"get_integration_recordArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/customer-invoices/setup":{"get":{"operationId":"get_invoice_setup","tags":["Kundfakturor"],"summary":"Fakturauppgifter och kundregister","description":"Det som behövs för att skapa en kundfaktura: nästa fakturanummer i bolagets serie, betalningsvillkor, intäktskonto, senast fakturerade tjänster (recent_lines med pris och moms), företagsinformationen som står på fakturan (adress, momsreg.nr, F-skatt, bankgiro) och kundregistret (customers, senast fakturerade först; customer_query söker i namn, org.nr och e-post). mail säger om fakturor kan skickas med e-post. Använd kundens id som customer_id i create_customer_invoice så uppdateras kunden. Scope view. Argument: orgnr; valfritt customer_query.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_invoice_setup","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"customer_query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Query"}}]}},"/api/v1/tools/get_invoice_setup":{"post":{"operationId":"tool_get_invoice_setup","tags":["Verktyg (som MCP)"],"summary":"Fakturauppgifter och kundregister","description":"Det som behövs för att skapa en kundfaktura: nästa fakturanummer i bolagets serie, betalningsvillkor, intäktskonto, senast fakturerade tjänster (recent_lines med pris och moms), företagsinformationen som står på fakturan (adress, momsreg.nr, F-skatt, bankgiro) och kundregistret (customers, senast fakturerade först; customer_query söker i namn, org.nr och e-post). mail säger om fakturor kan skickas med e-post. Använd kundens id som customer_id i create_customer_invoice så uppdateras kunden. Scope view. Argument: orgnr; valfritt customer_query.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"customer_query":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Query"}},"required":["orgnr"],"title":"get_invoice_setupArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/reconciliations/open":{"get":{"operationId":"get_open_reconciliations","tags":["Avstämning"],"summary":"Öppna avstämningar","description":"Visar vad som återstår att stämma av för en månad: alla avstämningar (bilagor) som inte är attesterade, med en summering. Använd för frågor som hur mycket är inte avstämt; för full detalj per bilaga med poster och attester, använd get_reconciliation. Returnerar antal bilagor totalt, attesterade och öppna, öppen differens i öre och antal per status, samt per öppen bilaga typ, konto, status, saldo, avstämt belopp och differens i öre. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_open_reconciliations","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"query","required":true,"schema":{"description":"Kalenderår för månaden, t.ex. 2026.","title":"Year","type":"integer"},"description":"Kalenderår för månaden, t.ex. 2026."},{"name":"month","in":"query","required":true,"schema":{"description":"Månad 1 till 12, t.ex. 3 för mars. Avstämningen gäller månadens sista dag.","title":"Month","type":"integer"},"description":"Månad 1 till 12, t.ex. 3 för mars. Avstämningen gäller månadens sista dag."}]}},"/api/v1/tools/get_open_reconciliations":{"post":{"operationId":"tool_get_open_reconciliations","tags":["Verktyg (som MCP)"],"summary":"Öppna avstämningar","description":"Visar vad som återstår att stämma av för en månad: alla avstämningar (bilagor) som inte är attesterade, med en summering. Använd för frågor som hur mycket är inte avstämt; för full detalj per bilaga med poster och attester, använd get_reconciliation. Returnerar antal bilagor totalt, attesterade och öppna, öppen differens i öre och antal per status, samt per öppen bilaga typ, konto, status, saldo, avstämt belopp och differens i öre. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"description":"Kalenderår för månaden, t.ex. 2026.","title":"Year","type":"integer"},"month":{"description":"Månad 1 till 12, t.ex. 3 för mars. Avstämningen gäller månadens sista dag.","title":"Month","type":"integer"}},"required":["orgnr","year","month"],"title":"get_open_reconciliationsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/overview":{"get":{"operationId":"get_overview","tags":["Bolag och översikt"],"summary":"Översikt: resultat och deadlines","description":"Visar en översikt för ett bolag: omsättning och resultat per månad samt kommande deadlines för moms, INK2 och årsredovisning. Använd för en snabb lägesbild; för vad som återstår att göra, använd read_checklist, och för om årsredovisning och INK2 är inlämnade, använd read_statutory_status. Returnerar månadsvärden för omsättning och resultat och en lista över kommande deadlines. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_overview","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/get_overview":{"post":{"operationId":"tool_get_overview","tags":["Verktyg (som MCP)"],"summary":"Översikt: resultat och deadlines","description":"Visar en översikt för ett bolag: omsättning och resultat per månad samt kommande deadlines för moms, INK2 och årsredovisning. Använd för en snabb lägesbild; för vad som återstår att göra, använd read_checklist, och för om årsredovisning och INK2 är inlämnade, använd read_statutory_status. Returnerar månadsvärden för omsättning och resultat och en lista över kommande deadlines. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"get_overviewArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/payroll-accounts":{"get":{"operationId":"get_payroll_accounts","tags":["Lön"],"summary":"Lönekonton","description":"Visar vilka konton lönekörningen bokför på: löner, arbetsgivaravgifter (kostnad och skuld), personalens källskatt, utlägg, nettolöneavdrag, traktamenten och bilersättningar (skattefria och skattepliktiga delen över schablonen), med standardkonto och om bolaget valt ett eget. En anställd kan dessutom ha ett eget lönekonto (upsert_employee, salary_account). Ändra med set_payroll_accounts. Läser bara, ändrar inget. Kräver behörigheten payroll.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_payroll_accounts","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]},"put":{"operationId":"set_payroll_accounts","tags":["Lön"],"summary":"Välj lönekonton","description":"Väljer egna konton för lönekörningen, t.ex. {\"utlagg\": 2820} för utlägg mot Kortfristiga skulder till anställda, eller {\"salary\": 7210}. Nycklar: salary, employer_fee_expense, employer_fee_liability, withheld_tax, utlagg, net_deduction, traktamente, milersattning, traktamente_taxable, milersattning_taxable (det som överstiger schablonen, standard 7322 och 7332); null ger standardkontot igen. Gäller körningar som bokförs härefter, redan bokförda verifikat ändras inte. Ett konto som inte finns i kontoplanen läggs upp med BAS-namnet vid första lönekörningen. Returnerar kontona som get_payroll_accounts. Kräver behörigheten payroll.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"set_payroll_accounts","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"accounts":{"additionalProperties":true,"title":"Accounts","type":"object"}},"required":["accounts"],"title":"set_payroll_accountsArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/get_payroll_accounts":{"post":{"operationId":"tool_get_payroll_accounts","tags":["Verktyg (som MCP)"],"summary":"Lönekonton","description":"Visar vilka konton lönekörningen bokför på: löner, arbetsgivaravgifter (kostnad och skuld), personalens källskatt, utlägg, nettolöneavdrag, traktamenten och bilersättningar (skattefria och skattepliktiga delen över schablonen), med standardkonto och om bolaget valt ett eget. En anställd kan dessutom ha ett eget lönekonto (upsert_employee, salary_account). Ändra med set_payroll_accounts. Läser bara, ändrar inget. Kräver behörigheten payroll.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"get_payroll_accountsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/payroll-time-basis":{"get":{"operationId":"get_payroll_time_basis","tags":["Tidrapportering"],"summary":"Löneunderlag ur tidrapporter","description":"Löneunderlag ur tidrapporteringen: attesterade, ännu inte utbetalda timmar per anställd t.o.m. ett datum. Varje anställd har components (förslag på lönearter: timlön = timmar × timlön, övertid och OB om ersättning per timme är angiven, semesterersättning om den betalas med varje lön) och entry_ids. Skicka components och time_entry_ids = entry_ids i entries till calc_payroll/run_payroll, så märks timmarna som utbetalda. Frånvaro (absence) och notes visar det som måste hanteras manuellt. Räkna aldrig om beloppen själv. Scope view. Argument: orgnr; valfritt through (YYYY-MM-DD, default i dag).","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_payroll_time_basis","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"through","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Through"}}]}},"/api/v1/tools/get_payroll_time_basis":{"post":{"operationId":"tool_get_payroll_time_basis","tags":["Verktyg (som MCP)"],"summary":"Löneunderlag ur tidrapporter","description":"Löneunderlag ur tidrapporteringen: attesterade, ännu inte utbetalda timmar per anställd t.o.m. ett datum. Varje anställd har components (förslag på lönearter: timlön = timmar × timlön, övertid och OB om ersättning per timme är angiven, semesterersättning om den betalas med varje lön) och entry_ids. Skicka components och time_entry_ids = entry_ids i entries till calc_payroll/run_payroll, så märks timmarna som utbetalda. Frånvaro (absence) och notes visar det som måste hanteras manuellt. Räkna aldrig om beloppen själv. Scope view. Argument: orgnr; valfritt through (YYYY-MM-DD, default i dag).","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"through":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Through"}},"required":["orgnr"],"title":"get_payroll_time_basisArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/payslips/{line_id}":{"get":{"operationId":"get_payslip","tags":["Lön"],"summary":"Hämta lönebesked","description":"Hämta lönebeskedet för en lönerad som utskrivbar HTML (line_id från en lönekörnings rader, se list_payroll_runs). Den anställdes personnummer visas maskerat till födelsedatum (ÅÅÅÅMMDD-XXXX); lönebeskedet med fullständigt personnummer skrivs ut i Kvickd under Lön > Löner. Scope view. Argument: orgnr, line_id.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_payslip","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"line_id","in":"path","required":true,"schema":{"title":"Line Id","type":"integer"}}]}},"/api/v1/tools/get_payslip":{"post":{"operationId":"tool_get_payslip","tags":["Verktyg (som MCP)"],"summary":"Hämta lönebesked","description":"Hämta lönebeskedet för en lönerad som utskrivbar HTML (line_id från en lönekörnings rader, se list_payroll_runs). Den anställdes personnummer visas maskerat till födelsedatum (ÅÅÅÅMMDD-XXXX); lönebeskedet med fullständigt personnummer skrivs ut i Kvickd under Lön > Löner. Scope view. Argument: orgnr, line_id.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"line_id":{"title":"Line Id","type":"integer"}},"required":["orgnr","line_id"],"title":"get_payslipArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/reconciliations":{"get":{"operationId":"get_reconciliation","tags":["Avstämning"],"summary":"Hämta avstämning","description":"Hämtar alla avstämningar (bilagor) för en månad med full detalj: bank, kund- och leverantörsreskontra, moms, skattekonto, anläggningar m.fl. Använd när du ska arbeta med en avstämning; för bara det som återstår, använd get_open_reconciliations, och för avvikelser med förslag till rättelse, använd list_findings. Returnerar per bilaga typ, konto, saldo i huvudboken, avstämt belopp och differens i öre, status, specifikationsrader, underlag, poster och attester. Räknas fram vid anropet. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_reconciliation","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"query","required":true,"schema":{"description":"Kalenderår för månaden, t.ex. 2026.","title":"Year","type":"integer"},"description":"Kalenderår för månaden, t.ex. 2026."},{"name":"month","in":"query","required":true,"schema":{"description":"Månad 1 till 12, t.ex. 3 för mars. Avstämningen gäller månadens sista dag.","title":"Month","type":"integer"},"description":"Månad 1 till 12, t.ex. 3 för mars. Avstämningen gäller månadens sista dag."}]}},"/api/v1/tools/get_reconciliation":{"post":{"operationId":"tool_get_reconciliation","tags":["Verktyg (som MCP)"],"summary":"Hämta avstämning","description":"Hämtar alla avstämningar (bilagor) för en månad med full detalj: bank, kund- och leverantörsreskontra, moms, skattekonto, anläggningar m.fl. Använd när du ska arbeta med en avstämning; för bara det som återstår, använd get_open_reconciliations, och för avvikelser med förslag till rättelse, använd list_findings. Returnerar per bilaga typ, konto, saldo i huvudboken, avstämt belopp och differens i öre, status, specifikationsrader, underlag, poster och attester. Räknas fram vid anropet. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"description":"Kalenderår för månaden, t.ex. 2026.","title":"Year","type":"integer"},"month":{"description":"Månad 1 till 12, t.ex. 3 för mars. Avstämningen gäller månadens sista dag.","title":"Month","type":"integer"}},"required":["orgnr","year","month"],"title":"get_reconciliationArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/supplier-invoices/{invoice_id}":{"get":{"operationId":"get_supplier_invoice","tags":["Leverantörsfakturor"],"summary":"Hämta leverantörsfaktura","description":"Hämtar en leverantörsfaktura med alla uppgifter. Använd när du har fakturans id och behöver detaljer; för att hitta fakturor eller se flera, använd list_supplier_invoices. Returnerar leverantör, fakturanummer, OCR, fakturadatum och förfallodag, rader med konto och moms, totalbelopp, moms och kvarvarande saldo i öre, status, valutauppgifter och verifikatnummer för bokföring och betalning. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_supplier_invoice","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"description":"Leverantörsfakturans id (heltal), t.ex. 42. Hämta med list_supplier_invoices.","title":"Invoice Id","type":"integer"}}]},"patch":{"operationId":"update_supplier_invoice","tags":["Leverantörsfakturor"],"summary":"Ändra leverantörsfaktura","description":"Ändra en ännu ej bokförd leverantörsfaktura (bara medskickade fält ändras). Med lines ([{account, net_ore, vat_rate, description?}]) ersätts raderna och total/moms räknas om (skickade total_ore/vat_ore som i create_supplier_invoice); document_id kopplar/ändrar fakturans underlag (PDF) i efterhand. Scope reconcile. Argument: orgnr, invoice_id; valfritt supplier_name, invoice_number, ocr, invoice_date, due_date, total_ore, vat_ore, currency, expense_account, document_id, lines, rounding_ore, fx_rate, total_sek_ore (annan valuta: belopp i fakturans valuta, kurs eller SEK-belopp från ANVÄNDAREN).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"update_supplier_invoice","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"supplier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Supplier Name"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Invoice Number"},"ocr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Ocr"},"invoice_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Invoice Date"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Due Date"},"total_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Ore"},"vat_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Vat Ore"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Currency"},"expense_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Expense Account"},"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Document Id"},"lines":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Lines"},"rounding_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Rounding Ore"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"default":null,"title":"Fx Rate"},"total_sek_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Sek Ore"}},"title":"update_supplier_invoiceArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/get_supplier_invoice":{"post":{"operationId":"tool_get_supplier_invoice","tags":["Verktyg (som MCP)"],"summary":"Hämta leverantörsfaktura","description":"Hämtar en leverantörsfaktura med alla uppgifter. Använd när du har fakturans id och behöver detaljer; för att hitta fakturor eller se flera, använd list_supplier_invoices. Returnerar leverantör, fakturanummer, OCR, fakturadatum och förfallodag, rader med konto och moms, totalbelopp, moms och kvarvarande saldo i öre, status, valutauppgifter och verifikatnummer för bokföring och betalning. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"description":"Leverantörsfakturans id (heltal), t.ex. 42. Hämta med list_supplier_invoices.","title":"Invoice Id","type":"integer"}},"required":["orgnr","invoice_id"],"title":"get_supplier_invoiceArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/time-reporting":{"get":{"operationId":"get_time_reporting","tags":["Tidrapportering"],"summary":"Tidrapportering: länk och läge","description":"Visar läget för tidrapporteringen: bolagets länk för tidrapportering, vilka anställda som har en personlig kod och hur mycket som väntar på attest. Använd för att ge en anställd länken eller se om något väntar på attest i Kvickd; för själva tidposterna, använd list_time_entries. Returnerar länken (om den är aktiverad), aktiva anställda med om de har kod och med timlön och månadslön i öre, antal poster och minuter som väntar på attest och vilka tidstyper som finns. Koderna visas aldrig. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_time_reporting","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/get_time_reporting":{"post":{"operationId":"tool_get_time_reporting","tags":["Verktyg (som MCP)"],"summary":"Tidrapportering: länk och läge","description":"Visar läget för tidrapporteringen: bolagets länk för tidrapportering, vilka anställda som har en personlig kod och hur mycket som väntar på attest. Använd för att ge en anställd länken eller se om något väntar på attest i Kvickd; för själva tidposterna, använd list_time_entries. Returnerar länken (om den är aktiverad), aktiva anställda med om de har kod och med timlön och månadslön i öre, antal poster och minuter som väntar på attest och vilka tidstyper som finns. Koderna visas aldrig. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"get_time_reportingArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/reports/trial-balance":{"get":{"operationId":"get_trial_balance","tags":["Bokföring och huvudbok"],"summary":"Hämta saldobalans","description":"Visar saldobalansen per ett datum: saldot på varje konto som har ett saldo. Använd för saldon per konto; för en uppställd balansräkning, använd get_balance_sheet, för resultaträkningen, get_income_statement, och för transaktioner, get_general_ledger. Returnerar per konto nummer, namn och saldo i öre (debet positivt) samt summa debet och summa kredit. Balanskonton räknas från start, resultatkonton från räkenskapsårets början. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_trial_balance","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"balansdag","in":"query","required":true,"schema":{"description":"Datum som saldona gäller per, ÅÅÅÅ-MM-DD, t.ex. 2026-06-30.","title":"Balansdag","type":"string"},"description":"Datum som saldona gäller per, ÅÅÅÅ-MM-DD, t.ex. 2026-06-30."}]}},"/api/v1/tools/get_trial_balance":{"post":{"operationId":"tool_get_trial_balance","tags":["Verktyg (som MCP)"],"summary":"Hämta saldobalans","description":"Visar saldobalansen per ett datum: saldot på varje konto som har ett saldo. Använd för saldon per konto; för en uppställd balansräkning, använd get_balance_sheet, för resultaträkningen, get_income_statement, och för transaktioner, get_general_ledger. Returnerar per konto nummer, namn och saldo i öre (debet positivt) samt summa debet och summa kredit. Balanskonton räknas från start, resultatkonton från räkenskapsårets början. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"balansdag":{"description":"Datum som saldona gäller per, ÅÅÅÅ-MM-DD, t.ex. 2026-06-30.","title":"Balansdag","type":"string"}},"required":["orgnr","balansdag"],"title":"get_trial_balanceArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/vat-returns/{key}":{"get":{"operationId":"get_vat_return","tags":["Moms"],"summary":"Hämta momsrapport","description":"Momsrapporten för en period: rutorna, netto och 'att betala/få tillbaka' med förfallodatum. Scope view. Argument: orgnr, key (periodnyckel, t.ex. 2026-01); valfritt year (annars ur nyckeln).","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_vat_return","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"key","in":"path","required":true,"schema":{"title":"Key","type":"string"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Year"}}]}},"/api/v1/tools/get_vat_return":{"post":{"operationId":"tool_get_vat_return","tags":["Verktyg (som MCP)"],"summary":"Hämta momsrapport","description":"Momsrapporten för en period: rutorna, netto och 'att betala/få tillbaka' med förfallodatum. Scope view. Argument: orgnr, key (periodnyckel, t.ex. 2026-01); valfritt year (annars ur nyckeln).","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"key":{"title":"Key","type":"string"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Year"}},"required":["orgnr","key"],"title":"get_vat_returnArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/vouchers/{voucher_id}":{"get":{"operationId":"get_voucher","tags":["Bokföring och huvudbok"],"summary":"Hämta verifikat","description":"Hämtar ett bokfört verifikat med alla rader och kopplade underlag. Använd när du har verifikatets id; för att hitta verifikat, använd list_vouchers. Returnerar serie, nummer, räkenskapsår, datum, text, källa, rader med konto, belopp i öre (amount_ore, debet positivt och kredit negativt, samt debit_ore och credit_ore), text, transaktionsdatum och momskod, samt underlag med id och filnamn. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_voucher","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"voucher_id","in":"path","required":true,"schema":{"description":"Verifikatets id (heltal), t.ex. 812. Hämta med list_vouchers.","title":"Voucher Id","type":"integer"}}]}},"/api/v1/tools/get_voucher":{"post":{"operationId":"tool_get_voucher","tags":["Verktyg (som MCP)"],"summary":"Hämta verifikat","description":"Hämtar ett bokfört verifikat med alla rader och kopplade underlag. Använd när du har verifikatets id; för att hitta verifikat, använd list_vouchers. Returnerar serie, nummer, räkenskapsår, datum, text, källa, rader med konto, belopp i öre (amount_ore, debet positivt och kredit negativt, samt debit_ore och credit_ore), text, transaktionsdatum och momskod, samt underlag med id och filnamn. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"voucher_id":{"description":"Verifikatets id (heltal), t.ex. 812. Hämta med list_vouchers.","title":"Voucher Id","type":"integer"}},"required":["orgnr","voucher_id"],"title":"get_voucherArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/year-end/{year}/checklist":{"get":{"operationId":"get_year_end_checklist","tags":["Bokslut och räkenskapsår"],"summary":"Bokslutsposternas fyra steg","description":"Visar årsbokslutets bokföringssteg för ett räkenskapsår: periodiseringar, bokslutsdispositioner, aktuell skatt och årets resultat för aktiebolag och ekonomisk förening, periodiseringar och årets resultat för övriga bolagsformer (handelsbolag per delägare). Använd när du arbetar med bokslutet för ett visst år; för bolagets allmänna att göra-lista, använd read_checklist, och för om årsredovisning och INK2 är inlämnade, använd read_statutory_status. Returnerar status per steg, om steget kan bokföras nu och det föreslagna, beräknade verifikatet. Läser bara; stegen bokförs med book_year_end_step.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"get_year_end_checklist","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025).","title":"Year","type":"integer"}}]}},"/api/v1/tools/get_year_end_checklist":{"post":{"operationId":"tool_get_year_end_checklist","tags":["Verktyg (som MCP)"],"summary":"Bokslutsposternas fyra steg","description":"Visar årsbokslutets bokföringssteg för ett räkenskapsår: periodiseringar, bokslutsdispositioner, aktuell skatt och årets resultat för aktiebolag och ekonomisk förening, periodiseringar och årets resultat för övriga bolagsformer (handelsbolag per delägare). Använd när du arbetar med bokslutet för ett visst år; för bolagets allmänna att göra-lista, använd read_checklist, och för om årsredovisning och INK2 är inlämnade, använd read_statutory_status. Returnerar status per steg, om steget kan bokföras nu och det föreslagna, beräknade verifikatet. Läser bara; stegen bokförs med book_year_end_step.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025).","title":"Year","type":"integer"}},"required":["orgnr","year"],"title":"get_year_end_checklistArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/sie-import":{"post":{"operationId":"import_sie","tags":["Bokföring och huvudbok"],"summary":"Importera SIE","description":"Importera en SIE-fil till huvudboken (kontoplan + IB + alla verifikat). KODEN tolkar och postar; kräver scope book. Argument: orgnr, content_base64; valfritt filename, replace. Filen importeras till angivet bolag även om filens #ORGNR skiljer sig; då följer en upplysning med i orgnr_note (allow_orgnr_mismatch behövs inte längre och ignoreras). Skydd mot dataförlust: finns redan importerad bokföring för årens filen rör avbryts importen (inget raderas) om inte replace=true skickas — då ersätts årets importerade verifikat. Native (appbokförda) verifikat rörs aldrig.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"import_sie","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"content_base64":{"title":"Content Base64","type":"string"},"filename":{"default":"import.sie","title":"Filename","type":"string"},"replace":{"default":false,"title":"Replace","type":"boolean"},"allow_orgnr_mismatch":{"default":false,"title":"Allow Orgnr Mismatch","type":"boolean"}},"required":["content_base64"],"title":"import_sieArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/import_sie":{"post":{"operationId":"tool_import_sie","tags":["Verktyg (som MCP)"],"summary":"Importera SIE","description":"Importera en SIE-fil till huvudboken (kontoplan + IB + alla verifikat). KODEN tolkar och postar; kräver scope book. Argument: orgnr, content_base64; valfritt filename, replace. Filen importeras till angivet bolag även om filens #ORGNR skiljer sig; då följer en upplysning med i orgnr_note (allow_orgnr_mismatch behövs inte längre och ignoreras). Skydd mot dataförlust: finns redan importerad bokföring för årens filen rör avbryts importen (inget raderas) om inte replace=true skickas — då ersätts årets importerade verifikat. Native (appbokförda) verifikat rörs aldrig.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"content_base64":{"title":"Content Base64","type":"string"},"filename":{"default":"import.sie","title":"Filename","type":"string"},"replace":{"default":false,"title":"Replace","type":"boolean"},"allow_orgnr_mismatch":{"default":false,"title":"Allow Orgnr Mismatch","type":"boolean"}},"required":["orgnr","content_base64"],"title":"import_sieArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/accounts":{"get":{"operationId":"list_accounts","tags":["Bokföring och huvudbok"],"summary":"Lista konton","description":"Listar bolagets kontoplan, sorterad på kontonummer. Använd för att hitta rätt konto inför bokföring eller kontrollera ett kontos namn; för saldon, använd get_trial_balance. Returnerar per konto nummer, namn, typ, SRU-kod och momskod. Har bolaget ingen kontoplan ännu returneras BAS-grundkontoplanen (BAS 2026) som förslag (bas_forslag: true); ett BAS-konto läggs upp först när det bokförs. Konton som togs bort i BAS 2026 (t.ex. 1250, 1580) fungerar fortfarande i bolag som redan har dem. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_accounts","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/list_accounts":{"post":{"operationId":"tool_list_accounts","tags":["Verktyg (som MCP)"],"summary":"Lista konton","description":"Listar bolagets kontoplan, sorterad på kontonummer. Använd för att hitta rätt konto inför bokföring eller kontrollera ett kontos namn; för saldon, använd get_trial_balance. Returnerar per konto nummer, namn, typ, SRU-kod och momskod. Har bolaget ingen kontoplan ännu returneras BAS-grundkontoplanen (BAS 2026) som förslag (bas_forslag: true); ett BAS-konto läggs upp först när det bokförs. Konton som togs bort i BAS 2026 (t.ex. 1250, 1580) fungerar fortfarande i bolag som redan har dem. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"list_accountsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/list_available_underlag":{"post":{"operationId":"tool_list_available_underlag","tags":["Verktyg (som MCP)"],"summary":"Lista kopplingsbara underlag","description":"Lista underlag som kan kopplas till ett verifikat: dokument i inkorgen (inbox), uppladdade dokument som får delas med LLM (documents) och underlag som redan ligger i poolen (pool). Använd id:na — document_id för inbox/documents och underlag_id för pool — med create_voucher eller attach_underlag. Scope view. Argument: orgnr.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"list_available_underlagArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/list_companies":{"post":{"operationId":"tool_list_companies","tags":["Verktyg (som MCP)"],"summary":"Lista bolag","description":"Lista koncernens bolag med härledd status, antal findings och bankmatchningsgrad. Ingen indata; scopas av din behörighet.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"list_companiesArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/list_customer_invoices":{"post":{"operationId":"tool_list_customer_invoices","tags":["Verktyg (som MCP)"],"summary":"Lista kundfakturor","description":"Listar bolagets kundfakturor, nyast först, valfritt filtrerade på status. Använd för att hitta en faktura eller se vad som är obetalt; för en enskild faktura, använd get_customer_invoice, och för obetalt per kund, customer_outstanding. Returnerar fakturorna med kund, fakturanummer, datum, rader, belopp, moms och kvarvarande saldo i öre, status och ev. ROT/RUT, samt summa totalt och summa kvarvarande saldo i öre. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt filter: ej_bokford (utkast), obetald (allt med saldo kvar, även förfallna och delbetalda), forfallen, under_betalning (delbetald), slutbetald eller makulerad. Utelämna för alla.","title":"Status"}},"required":["orgnr"],"title":"list_customer_invoicesArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/documents":{"get":{"operationId":"list_documents","tags":["Underlag, inkorg och dokument"],"summary":"Lista dokument","description":"Listar dokumenten i dokumentarkivet, t.ex. avtal, policyer, protokoll, attestordningar och leverantörsfakturor, för alla bolag du har åtkomst till, nyast först. Använd för att hitta ett dokument och dess id; policyernas innehåll läses med list_policies och read_policy. Returnerar per dokument id, namn, filnamn, filtyp, storlek, kategori, vilka bolag det gäller, synlighet och vem som laddade upp det. Bara uppgifter om dokumenten, inget innehåll. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_documents","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[]}},"/api/v1/tools/list_documents":{"post":{"operationId":"tool_list_documents","tags":["Verktyg (som MCP)"],"summary":"Lista dokument","description":"Listar dokumenten i dokumentarkivet, t.ex. avtal, policyer, protokoll, attestordningar och leverantörsfakturor, för alla bolag du har åtkomst till, nyast först. Använd för att hitta ett dokument och dess id; policyernas innehåll läses med list_policies och read_policy. Returnerar per dokument id, namn, filnamn, filtyp, storlek, kategori, vilka bolag det gäller, synlighet och vem som laddade upp det. Bara uppgifter om dokumenten, inget innehåll. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"list_documentsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/employees":{"get":{"operationId":"list_employees","tags":["Lön"],"summary":"Lista anställda","description":"Listar bolagets anställda. Använd för att hitta en anställds id inför run_payroll, calc_payroll, get_payslip eller upsert_employee; för tidrapporterade timmar, använd list_time_entries. Returnerar per anställd id, namn, personnummer maskerat till födelsedatum (ÅÅÅÅMMDD-XXXX) och om det är inlagt (has_personnummer), skattetabell och kolumn, månadslön och timlöner i öre, arbetsgivaravgift, semesterersättning och om den anställde är aktiv. Fullständiga personnummer visas aldrig här; användaren lägger in dem i Kvickd under Lön > Anställda. Läser bara, ändrar inget. Svaret innehåller personuppgifter; visa bara det användaren behöver.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_employees","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]},"post":{"operationId":"upsert_employee","tags":["Lön"],"summary":"Spara anställd","description":"Skapa eller uppdatera en anställd. Utan employee_id skapas en ny; med employee_id uppdateras den och BARA medskickade fält ändras. Personnummer tas inte emot här: användaren lägger in det i Kvickd under Lön > Anställda (det behövs innan lön kan köras), så be inte om det i chatten. Svaret visar personnumret maskerat och has_personnummer. Scope payroll. Argument: orgnr; valfritt employee_id, first_name, last_name, tax_table, tax_column, monthly_salary_ore, employer_fee_bps (standard 3142 = 31,42 %, som räknas om efter ålder ur personnumret vid lönekörningen; en annan sats används som den är), bank_account, active, note. Timanställda: hourly_rate_ore (timlön), overtime_rate_ore (ersättning per övertidstimme), ob_rate_ore (OB-tillägg per timme) och vacation_pay_bps (semesterersättning som betalas med varje lön, 1200 = 12 %); de används av get_payroll_time_basis. tax_percent_bps: skatteavdrag i procent enligt Skatteverkets jämkningsbeslut (3000 = 30 %), används i stället för skattetabellen; -1 tar bort procentsatsen så att tabellen gäller igen. salary_account: konto för den anställdas lön, t.ex. 7210 (tjänstemän) eller 7220 (företagsledare); 0 = bolagets konto för löner (get_payroll_accounts).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"upsert_employee","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"employee_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Employee Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Last Name"},"tax_table":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Tax Table"},"tax_column":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Tax Column"},"monthly_salary_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Monthly Salary Ore"},"employer_fee_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Employer Fee Bps"},"bank_account":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Bank Account"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Active"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"hourly_rate_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Hourly Rate Ore"},"overtime_rate_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Overtime Rate Ore"},"ob_rate_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Ob Rate Ore"},"vacation_pay_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Vacation Pay Bps"},"tax_percent_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Tax Percent Bps"},"salary_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Salary Account"}},"title":"upsert_employeeArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/list_employees":{"post":{"operationId":"tool_list_employees","tags":["Verktyg (som MCP)"],"summary":"Lista anställda","description":"Listar bolagets anställda. Använd för att hitta en anställds id inför run_payroll, calc_payroll, get_payslip eller upsert_employee; för tidrapporterade timmar, använd list_time_entries. Returnerar per anställd id, namn, personnummer maskerat till födelsedatum (ÅÅÅÅMMDD-XXXX) och om det är inlagt (has_personnummer), skattetabell och kolumn, månadslön och timlöner i öre, arbetsgivaravgift, semesterersättning och om den anställde är aktiv. Fullständiga personnummer visas aldrig här; användaren lägger in dem i Kvickd under Lön > Anställda. Läser bara, ändrar inget. Svaret innehåller personuppgifter; visa bara det användaren behöver.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"list_employeesArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/findings":{"get":{"operationId":"list_findings","tags":["Avstämning"],"summary":"Lista avvikelser","description":"Listar avvikelser som avstämningen inte har kunnat klara av automatiskt, var och en med ett förslag till rättelse. Gäller hela det senaste räkenskapsåret, inte en enskild månad; för månadsvisa avstämningar, använd get_open_reconciliations. Returnerar per avvikelse ett stabilt id (ref, används som finding_ref i create_proposal och book_voucher), kategori, rubrik, förklaring, belopp i öre, konto, underlag och ett föreslaget verifikat. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_findings","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/list_findings":{"post":{"operationId":"tool_list_findings","tags":["Verktyg (som MCP)"],"summary":"Lista avvikelser","description":"Listar avvikelser som avstämningen inte har kunnat klara av automatiskt, var och en med ett förslag till rättelse. Gäller hela det senaste räkenskapsåret, inte en enskild månad; för månadsvisa avstämningar, använd get_open_reconciliations. Returnerar per avvikelse ett stabilt id (ref, används som finding_ref i create_proposal och book_voucher), kategori, rubrik, förklaring, belopp i öre, konto, underlag och ett föreslaget verifikat. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"list_findingsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/list_fiscal_years":{"post":{"operationId":"tool_list_fiscal_years","tags":["Verktyg (som MCP)"],"summary":"Lista räkenskapsår","description":"Lista bolagets räkenskapsår (senaste först) med period, status (open/partly_locked/locked), antal verifikat, årets resultat (öre, vinst positiv) och var föregående års resultat står (prior_result.state: none/waiting/ready/transferred). Visar också vilket år som kan läggas till efter (next_year) och före (previous_year). Scope view. Argument: orgnr.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"list_fiscal_yearsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/list_fixed_assets":{"post":{"operationId":"tool_list_fixed_assets","tags":["Verktyg (som MCP)"],"summary":"Lista anläggningstillgångar","description":"Lista anläggningstillgångar (K2). accumulated_depreciation_ore är BERÄKNAD (planerad linjär) avskrivning; booked_depreciation_ore är FAKTISKT bokförd i huvudboken och unbooked_depreciation_ore skillnaden (ännu ej bokförd). Kräver 'view'. Argument: orgnr.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"list_fixed_assetsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/inbox":{"get":{"operationId":"list_inbox","tags":["Underlag, inkorg och dokument"],"summary":"Lista inkorg","description":"Listar bolagets inkorg: inkomna mejl med kvitton och fakturor, nyast först. Använd för att se vad som väntar på att bokföras eller registreras; för att sortera ett mejl, använd attach_inbox_item, och för underlag som kan kopplas till ett verifikat, list_available_underlag. Returnerar per meddelande id, avsändare, ämne, text, status (pending eller filed), när det kom in, vem som hanterat det och bilagor med dokument-id, samt antal som väntar. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_inbox","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/list_inbox":{"post":{"operationId":"tool_list_inbox","tags":["Verktyg (som MCP)"],"summary":"Lista inkorg","description":"Listar bolagets inkorg: inkomna mejl med kvitton och fakturor, nyast först. Använd för att se vad som väntar på att bokföras eller registreras; för att sortera ett mejl, använd attach_inbox_item, och för underlag som kan kopplas till ett verifikat, list_available_underlag. Returnerar per meddelande id, avsändare, ämne, text, status (pending eller filed), när det kom in, vem som hanterat det och bilagor med dokument-id, samt antal som väntar. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"list_inboxArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/list_instructions":{"post":{"operationId":"tool_list_instructions","tags":["Verktyg (som MCP)"],"summary":"Lista instruktioner","description":"Listar bolagets instruktioner: regler som användaren sparat för hur bokföringen ska göras, t.ex. vilket konto en viss kostnad bokförs på. Läs och följ dem innan du bokför eller föreslår konteringar. Med orgnr returneras det som gäller bolaget (dess egna och kontots gemensamma), utan orgnr alla instruktioner du har åtkomst till. Returnerar per instruktion id, text, orgnr (null = alla bolag) och vilka bolag den gäller. Drar ingen credit. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: bolagets organisationsnummer, t.ex. 559900-1004, för det som gäller bolaget. Utelämna för alla bolag du har åtkomst till.","title":"Orgnr"}},"title":"list_instructionsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/integration-records":{"get":{"operationId":"list_integration_data","tags":["Kopplingar (Shopify, Stripe m.fl.)"],"summary":"Lista data från kopplingar","description":"Listar data som kommit in från bolagets kopplingar, till exempel Shopify-ordrar, Stripe-betalningar och utbetalningar, sorterad i fack per källa och sort. Kvickd bokför inte den här datan själv: den ligger kvar som ohanterad tills den bokförts eller sorterats bort. Använd när list_companies eller get_overview visar ohanterad kopplingsdata, eller när användaren vill bokföra försäljning och utbetalningar från en koppling; för all detalj om en post, använd get_integration_record, och när posten är bokförd, resolve_integration_records. Returnerar kopplingarna med antal per fack och status, samt poster (äldst först) med id, källa, sort, datum, rubrik, belopp i öre, status och en kort sammanfattning. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_integration_data","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: källa, t.ex. shopify eller stripe. Utelämna för alla kopplingar.","title":"Provider"},"description":"Valfritt: källa, t.ex. shopify eller stripe. Utelämna för alla kopplingar."},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: sort inom källan, t.ex. order eller payout för Shopify, charge eller payout för Stripe.","title":"Kind"},"description":"Valfritt: sort inom källan, t.ex. order eller payout för Shopify, charge eller payout för Stripe."},{"name":"status","in":"query","required":false,"schema":{"default":"unhandled","description":"unhandled (standard: nya och ändrade efter hantering), all, new, handled, ignored, changed eller info (uppföljning som inte väntar på bokföring, t.ex. annonskostnad; kan bokföras om användaren vill).","title":"Status","type":"string"},"description":"unhandled (standard: nya och ändrade efter hantering), all, new, handled, ignored, changed eller info (uppföljning som inte väntar på bokföring, t.ex. annonskostnad; kan bokföras om användaren vill)."},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: från och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-09-01.","title":"Start"},"description":"Valfritt: från och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-09-01."},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: till (inte med) datum, ÅÅÅÅ-MM-DD, t.ex. 2026-10-01.","title":"End"},"description":"Valfritt: till (inte med) datum, ÅÅÅÅ-MM-DD, t.ex. 2026-10-01."},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Antal poster per sida, 1 till 200.","title":"Limit","type":"integer"},"description":"Antal poster per sida, 1 till 200."},{"name":"offset","in":"query","required":false,"schema":{"default":0,"description":"Hoppa över så många poster (sidbläddring).","title":"Offset","type":"integer"},"description":"Hoppa över så många poster (sidbläddring)."}]}},"/api/v1/tools/list_integration_data":{"post":{"operationId":"tool_list_integration_data","tags":["Verktyg (som MCP)"],"summary":"Lista data från kopplingar","description":"Listar data som kommit in från bolagets kopplingar, till exempel Shopify-ordrar, Stripe-betalningar och utbetalningar, sorterad i fack per källa och sort. Kvickd bokför inte den här datan själv: den ligger kvar som ohanterad tills den bokförts eller sorterats bort. Använd när list_companies eller get_overview visar ohanterad kopplingsdata, eller när användaren vill bokföra försäljning och utbetalningar från en koppling; för all detalj om en post, använd get_integration_record, och när posten är bokförd, resolve_integration_records. Returnerar kopplingarna med antal per fack och status, samt poster (äldst först) med id, källa, sort, datum, rubrik, belopp i öre, status och en kort sammanfattning. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: källa, t.ex. shopify eller stripe. Utelämna för alla kopplingar.","title":"Provider"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: sort inom källan, t.ex. order eller payout för Shopify, charge eller payout för Stripe.","title":"Kind"},"status":{"default":"unhandled","description":"unhandled (standard: nya och ändrade efter hantering), all, new, handled, ignored, changed eller info (uppföljning som inte väntar på bokföring, t.ex. annonskostnad; kan bokföras om användaren vill).","title":"Status","type":"string"},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: från och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-09-01.","title":"Start"},"end":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: till (inte med) datum, ÅÅÅÅ-MM-DD, t.ex. 2026-10-01.","title":"End"},"limit":{"default":50,"description":"Antal poster per sida, 1 till 200.","title":"Limit","type":"integer"},"offset":{"default":0,"description":"Hoppa över så många poster (sidbläddring).","title":"Offset","type":"integer"}},"required":["orgnr"],"title":"list_integration_dataArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/list_kundportal":{"post":{"operationId":"tool_list_kundportal","tags":["Verktyg (som MCP)"],"summary":"Lista kundportalen","description":"Listar kundportalen för ett bolag som sköts av en redovisningsbyrå i Kvickd: byråns förfrågningar till kunden (status oppen = väntar på kunden, besvarad = kunden har svarat eller laddat upp, klar) och underlag som kunden skickat utan förfrågan. Använd för att se vad som saknas och vad kunden har skickat in; filerna ligger också i inkorgen (list_inbox, källa kundportal) och bokförs därifrån. Returnerar per förfrågan id, rubrik, beskrivning, förfallodatum, status, antal filer och senaste aktivitet, de senaste fristående uppladdningarna med avsändarens namn och e-post, samt inmejlade underlag (för en kund bara mejl från den egna adressen) med vilka förfrågningar de är kopplade till. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: oppen, besvarad eller klar (flera med komma). Utelämnat = alla.","title":"Status"}},"required":["orgnr"],"title":"list_kundportalArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/payroll-runs":{"get":{"operationId":"list_payroll_runs","tags":["Lön"],"summary":"Lista lönekörningar","description":"Listar lönekörningarna för ett år i ordning efter utbetalningsdag, och med en månad angiven även arbetsgivardeklarationens (AGI) sammanställning för månaden. Använd för att se vad som har betalats ut; för en anställds lönebesked, använd get_payslip, och för att räkna fram en ny lön, använd calc_payroll. Returnerar per körning id, period, utbetalningsdag, status (pending = utkast som väntar på godkännande i Kvickd och inte är bokfört, booked eller reversed), verifikat och rader per anställd med bruttolön, förmåner, skatteavdrag, arbetsgivaravgift och nettolön i öre. AGI-sammanställningens individuppgifter visar personnumret maskat till födelsedatum (ÅÅÅÅMMDD-XXXX); själva AGI-filen laddas ner i Kvickd under Lön > Löner. Läser bara, ändrar inget. Svaret innehåller personuppgifter (bankkonto); visa bara det användaren behöver.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_payroll_runs","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"query","required":true,"schema":{"description":"Kalenderår för lönekörningarna, t.ex. 2026.","title":"Year","type":"integer"},"description":"Kalenderår för lönekörningarna, t.ex. 2026."},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: månad 1 till 12. Anges den följer AGI-sammanställningen för månaden med.","title":"Month"},"description":"Valfritt: månad 1 till 12. Anges den följer AGI-sammanställningen för månaden med."}]},"post":{"operationId":"run_payroll","tags":["Lön"],"summary":"Kör lön","description":"Bokför en lönekörning (skapar PayrollRun och bokför löneverifikatet, serie L, i huvudboken). Beloppen räknas deterministiskt av koden. Kräver scope payroll. Ett bokföringstak kan valfritt sättas på nyckeln (0/tomt = ingen gräns); körningar vars totalkostnad överstiger ett satt tak avvisas. Argument: orgnr, year, month, pay_date, entries ([{employee_id, gross_cash_ore, benefit_ore?, extra_tax_ore?, components?, time_entry_ids?}]); components = lönearter (semester, övertid, sjuklön, sjukavdrag, förmån, utlägg, traktamente, milersättning, nettoavdrag; kind som i calc_payroll), med category för förmånstypen på FORMAN. time_entry_ids = attesterade tidposter som lönen bygger på (från get_payroll_time_basis); de märks som utbetalda och släpps om körningen backas. Valfritt note, net_pay_account (konto nettolönen krediteras, default 1930; löneskuldkonto om ej betald). Har månaden redan en bokförd lön, eller är körningen en exakt dubblett (samma period/datum och identiska rader), blockeras den; sätt allow_duplicate=true för att medvetet bokföra ytterligare en (t.ex. extra utbetalning). Svaret har warnings som calc_payroll (visa dem för användaren); lönebeskeden sparas som underlag på löneverifikatet. draft=true sparar körningen som utkast i stället: inget bokförs, den räknas inte i arbetsgivardeklarationen, och en människa godkänner den i Kvickd under Lön (då bokförs den med samma belopp). Använd när användaren vill granska lönen innan den bokförs. replace_run_id = ett väntande utkast som ska ersättas (t.ex. när ett utlägg kommit in sent): utkastet får de nya raderna men behåller sitt run_id och sin anteckning (om ingen ny note anges); med draft=true förblir det ett utkast, med draft=false bokförs det direkt. Ett nytt run_payroll utan replace_run_id skapar i stället ett utkast till för perioden. Ett utkast tas bort med delete_payroll_draft. Även ett utkast kräver att de anställda har personnummer (arbetsgivaravgiften beror på åldern); saknas det läggs det in av användaren i Kvickd under Lön > Anställda. Kontona följer bolagets val (get_payroll_accounts) och den anställdas lönekonto.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"run_payroll","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"},"pay_date":{"title":"Pay Date","type":"string"},"entries":{"items":{},"title":"Entries","type":"array"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"net_pay_account":{"default":1930,"title":"Net Pay Account","type":"integer"},"allow_duplicate":{"default":false,"title":"Allow Duplicate","type":"boolean"},"draft":{"default":false,"title":"Draft","type":"boolean"},"replace_run_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Replace Run Id"}},"required":["year","month","pay_date","entries"],"title":"run_payrollArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/list_payroll_runs":{"post":{"operationId":"tool_list_payroll_runs","tags":["Verktyg (som MCP)"],"summary":"Lista lönekörningar","description":"Listar lönekörningarna för ett år i ordning efter utbetalningsdag, och med en månad angiven även arbetsgivardeklarationens (AGI) sammanställning för månaden. Använd för att se vad som har betalats ut; för en anställds lönebesked, använd get_payslip, och för att räkna fram en ny lön, använd calc_payroll. Returnerar per körning id, period, utbetalningsdag, status (pending = utkast som väntar på godkännande i Kvickd och inte är bokfört, booked eller reversed), verifikat och rader per anställd med bruttolön, förmåner, skatteavdrag, arbetsgivaravgift och nettolön i öre. AGI-sammanställningens individuppgifter visar personnumret maskat till födelsedatum (ÅÅÅÅMMDD-XXXX); själva AGI-filen laddas ner i Kvickd under Lön > Löner. Läser bara, ändrar inget. Svaret innehåller personuppgifter (bankkonto); visa bara det användaren behöver.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"description":"Kalenderår för lönekörningarna, t.ex. 2026.","title":"Year","type":"integer"},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: månad 1 till 12. Anges den följer AGI-sammanställningen för månaden med.","title":"Month"}},"required":["orgnr","year"],"title":"list_payroll_runsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/policies":{"get":{"operationId":"list_policies","tags":["Instruktioner och policyer"],"summary":"Lista policyer","description":"Lista policydokument och uppladdade underlag (manualer, avtal, policyer, kontoutdrag, kvitton). Läs textinnehåll med read_policy. Poster med status 'image' (t.ex. kvitton som skärmdump/foto) läses i stället som bild med read_underlag_image. Valfritt orgnr filtrerar till ett bolag. Scope view.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_policies","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: bolagets organisationsnummer, t.ex. 559900-1004, för att bara visa det bolagets policyer. Utelämna för alla bolag du har åtkomst till.","title":"Orgnr"},"description":"Valfritt: bolagets organisationsnummer, t.ex. 559900-1004, för att bara visa det bolagets policyer. Utelämna för alla bolag du har åtkomst till."}]}},"/api/v1/tools/list_policies":{"post":{"operationId":"tool_list_policies","tags":["Verktyg (som MCP)"],"summary":"Lista policyer","description":"Lista policydokument och uppladdade underlag (manualer, avtal, policyer, kontoutdrag, kvitton). Läs textinnehåll med read_policy. Poster med status 'image' (t.ex. kvitton som skärmdump/foto) läses i stället som bild med read_underlag_image. Valfritt orgnr filtrerar till ett bolag. Scope view.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: bolagets organisationsnummer, t.ex. 559900-1004, för att bara visa det bolagets policyer. Utelämna för alla bolag du har åtkomst till.","title":"Orgnr"}},"title":"list_policiesArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/list_proposals":{"post":{"operationId":"tool_list_proposals","tags":["Verktyg (som MCP)"],"summary":"Lista förslag","description":"Listar förslag på justerande poster och bankmatchningar, nyast först, med status och motivering. Använd för att se vad som väntar på granskning eller redan har hanterats; verifikatförslag i kön Väntande verifikat listas med list_voucher_drafts. Returnerar per förslag id, typ, status, bilaga och konto, säkerhet (0 till 1), motivering, källhänvisning, föreslaget verifikat i öre, finding_ref, period och när det skapades. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: kalenderår för perioden förslaget gäller, t.ex. 2026.","title":"Year"},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: månad 1 till 12 för perioden förslaget gäller.","title":"Month"}},"required":["orgnr"],"title":"list_proposalsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/list_rot_rut":{"post":{"operationId":"tool_list_rot_rut","tags":["Verktyg (som MCP)"],"summary":"ROT/RUT-läget","description":"Visar läget för ROT- och RUT-avdrag: fakturor där utbetalning kan begäras nu, fakturor som väntar på kundens betalning, gjorda begäranden till Skatteverket och gällande regler. Använd innan du skapar en begäran med create_rot_rut_request; för filen till Skatteverket, använd check_rot_rut_request_file. Returnerar fakturorna med avdragsbelopp och deadline, begärandena med status (skapad, inskickad eller klar) och belopp, summor i öre, arbetstyper samt procentsatser och tak. Läser bara, ändrar inget. Köparnas personnummer visas bara maskerade (ÅÅÅÅMMDD-XXXX).","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"list_rot_rutArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/list_supplier_invoices":{"post":{"operationId":"tool_list_supplier_invoices","tags":["Verktyg (som MCP)"],"summary":"Lista leverantörsfakturor","description":"Listar bolagets leverantörsfakturor, nyast först, valfritt filtrerat på status. Använd för att se vad som ska betalas eller hitta en faktura; för en enskild faktura med alla detaljer, använd get_supplier_invoice. Returnerar fakturorna med samma fält som get_supplier_invoice samt summa totalt och summa kvarvarande saldo i öre. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt filter: ej_bokford, obetald (allt med saldo kvar, även förfallna och delbetalda), forfallen, under_betalning, slutbetald eller makulerad. Utelämna för alla.","title":"Status"}},"required":["orgnr"],"title":"list_supplier_invoicesArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/supplier-invoices/unregistered-documents":{"get":{"operationId":"list_supplier_underlag","tags":["Leverantörsfakturor"],"summary":"Underlag att registrera","description":"Lista dokument klassade som Leverantörsfaktura (uppladdade eller triage:ade från inkorgen) som ännu inte registrerats som en faktura — att registrera i reskontran. Skapa fakturan med create_supplier_invoice och koppla underlaget via document_id. Scope view. Argument: orgnr.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_supplier_underlag","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/list_supplier_underlag":{"post":{"operationId":"tool_list_supplier_underlag","tags":["Verktyg (som MCP)"],"summary":"Underlag att registrera","description":"Lista dokument klassade som Leverantörsfaktura (uppladdade eller triage:ade från inkorgen) som ännu inte registrerats som en faktura — att registrera i reskontran. Skapa fakturan med create_supplier_invoice och koppla underlaget via document_id. Scope view. Argument: orgnr.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"list_supplier_underlagArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/list_time_entries":{"post":{"operationId":"tool_list_time_entries","tags":["Verktyg (som MCP)"],"summary":"Lista tidposter","description":"Listar rapporterade tidposter, nyast först, valfritt filtrerade på datum, anställd och status. Använd för att granska tid (attesten görs i Kvickd); för en sammanställning inför lönen, använd get_payroll_time_basis, och för länk och koder, get_time_reporting. Returnerar per post id, datum, typ, minuter och timmar, projekt, notering, status, anställd, vem som attesterat och ev. lönekörning, samt minuter per status och totalt. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"date_from":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: från och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-10-01.","title":"Date From"},"date_to":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: till och med datum, ÅÅÅÅ-MM-DD, t.ex. 2026-10-31.","title":"Date To"},"employee_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: den anställdes id (heltal), från list_employees.","title":"Employee Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: rapporterad, attesterad, avvisad eller utbetald.","title":"Status"}},"required":["orgnr"],"title":"list_time_entriesArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/vat-periods":{"get":{"operationId":"list_vat_periods","tags":["Moms"],"summary":"Lista momsperioder","description":"Momsperioderna enligt bolagets momsperiod (månad/kvartal/år) med nyckel, datumintervall, netto och status. before_kvickd=true betyder att perioden hanterades innan bolaget lades in i Kvickd: påminn inte om den som försenad. Scope view. Argument: orgnr; valfritt year (default innevarande år).","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_vat_periods","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Year"}}]}},"/api/v1/tools/list_vat_periods":{"post":{"operationId":"tool_list_vat_periods","tags":["Verktyg (som MCP)"],"summary":"Lista momsperioder","description":"Momsperioderna enligt bolagets momsperiod (månad/kvartal/år) med nyckel, datumintervall, netto och status. before_kvickd=true betyder att perioden hanterades innan bolaget lades in i Kvickd: påminn inte om den som försenad. Scope view. Argument: orgnr; valfritt year (default innevarande år).","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Year"}},"required":["orgnr"],"title":"list_vat_periodsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/voucher-drafts":{"get":{"operationId":"list_voucher_drafts","tags":["Bokföring och huvudbok"],"summary":"Lista verifikatförslag","description":"Lista väntande verifikatförslag (drafts) som ännu inte godkänts eller avvisats. Varje rad har account, amount_ore (debet positivt, kredit negativt), debit_ore, credit_ore och text, så raderna kan läsas i samma format som de skickades in. Kräver behörigheten 'view'. Argument: orgnr.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"list_voucher_drafts","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]},"post":{"operationId":"propose_voucher","tags":["Bokföring och huvudbok"],"summary":"Föreslå verifikat för attest","description":"Lägger ett verifikatförslag i kön Väntande verifikat, där en människa godkänner eller avvisar det innan något bokförs. Använd när användaren vill granska först eller när konteringen är osäker. För att bokföra direkt, använd book_voucher eller create_voucher; för en justering som hör till en avstämning (bilaga), använd create_proposal. Returnerar draft_id, serie, datum och status pending. Bieffekt: inget bokförs. Förslaget godkänns med approve_voucher_draft, ändras med edit_voucher_draft och avvisas med reject_voucher_draft. Underlag i annan valuta än SEK: gissa aldrig växelkursen. Fråga användaren efter kursen (SEK per 1 enhet) eller SEK-beloppet (t.ex. det som drogs från kontot), räkna raderna i SEK och ange currency, foreign_amount_minor och fx_rate eller total_sek_ore, så dokumenteras kursen på verifikatet. Underlag: underlag_ids (underlagspoolen) och document_ids (inkorgen, dokumentarkivet eller en stor fil uppladdad med create_underlag_upload) kopplas till förslaget och följer med till verifikatet (document_ids kräver även behörigheten upload). Rader: [{account, debit_ore, credit_ore, text?}] i öre med exakt ett belopp skilt från noll per rad, eller [{account, amount_ore, text?}] med tecken (debet positivt, kredit negativt). Raderna kommer tillbaka med båda formaten från list_voucher_drafts och get_voucher. external_ref: valfri egen referens från ditt system (t.ex. \"bokning-812\", högst 200 tecken), unik per bolag. Finns referensen redan på ett verifikat eller ett väntande förslag med samma datum och rader skapas inget nytt; svaret är det befintliga med duplicate=true, så ett omförsök ger ingen dubblett. Samma referens med annat innehåll är ett fel och inget skapas. Ett avvisat förslag frigör referensen. Slå upp med find_voucher. Kräver behörigheten reconcile.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"propose_voucher","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"date":{"title":"Date","type":"string"},"lines":{"items":{},"title":"Lines","type":"array"},"text":{"title":"Text","type":"string"},"series":{"default":"A","title":"Series","type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"underlag_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Underlag Ids"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Currency"},"foreign_amount_minor":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Foreign Amount Minor"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"default":null,"title":"Fx Rate"},"total_sek_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Sek Ore"},"document_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Document Ids"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Ref"}},"required":["date","lines","text"],"title":"propose_voucherArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/list_voucher_drafts":{"post":{"operationId":"tool_list_voucher_drafts","tags":["Verktyg (som MCP)"],"summary":"Lista verifikatförslag","description":"Lista väntande verifikatförslag (drafts) som ännu inte godkänts eller avvisats. Varje rad har account, amount_ore (debet positivt, kredit negativt), debit_ore, credit_ore och text, så raderna kan läsas i samma format som de skickades in. Kräver behörigheten 'view'. Argument: orgnr.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"list_voucher_draftsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/list_vouchers":{"post":{"operationId":"tool_list_vouchers","tags":["Verktyg (som MCP)"],"summary":"Lista verifikat","description":"Listar bokförda verifikat för ett räkenskapsår, sorterade på serie och nummer, en sida i taget. Använd för att bläddra bland verifikat eller hitta ett id; för ett enskilt verifikat med momskoder, använd get_voucher, och för ett kontos rörelser, get_general_ledger. Returnerar totalt antal, limit och offset, och per verifikat id, serie, nummer, datum, text, källa, vem som skapade det, underlag och rader med konto och belopp i öre (debet positivt, kredit negativt). Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2026.","title":"Year","type":"integer"},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Valfritt: kalendermånad 1 till 12 för verifikatets datum.","title":"Month"},"limit":{"default":200,"description":"Antal verifikat per sida, standard 200.","title":"Limit","type":"integer"},"offset":{"default":0,"description":"Antal verifikat att hoppa över, för nästa sida. Standard 0.","title":"Offset","type":"integer"}},"required":["orgnr","year"],"title":"list_vouchersArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/fiscal-years/{year}/lock":{"post":{"operationId":"lock_fiscal_year","tags":["Bokslut och räkenskapsår"],"summary":"Lås räkenskapsår","description":"Lås (stäng) hela räkenskapsåret när årsbokslutets poster är klara (booked/skipped). Låset låser alla årets månader och gör att deklarationen (INK2 och årsredovisning, NE-bilaga eller INK4) blir klar att lämna i appen (samma som knappen 'Lås perioden' i Bokslutsposter). Höjer fel med vad som återstår om något steg inte är klart. Före räkenskapsårets slut avvisas låsningen; visa användaren close_warnings ur get_year_end_checklist och sätt before_year_end=true bara om hen godtar att året stängs i förväg. Finns det annat att se över (moms, obetalda fakturor, avskrivningar som inte är bokförda) avvisas låsningen med en lista; visa den för användaren och sätt confirm=true bara om hen vill stänga ändå. Scope book. Argument: orgnr, year; valfritt before_year_end, confirm (gäller båda).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"lock_fiscal_year","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"before_year_end":{"default":false,"title":"Before Year End","type":"boolean"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"title":"lock_fiscal_yearArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/lock_fiscal_year":{"post":{"operationId":"tool_lock_fiscal_year","tags":["Verktyg (som MCP)"],"summary":"Lås räkenskapsår","description":"Lås (stäng) hela räkenskapsåret när årsbokslutets poster är klara (booked/skipped). Låset låser alla årets månader och gör att deklarationen (INK2 och årsredovisning, NE-bilaga eller INK4) blir klar att lämna i appen (samma som knappen 'Lås perioden' i Bokslutsposter). Höjer fel med vad som återstår om något steg inte är klart. Före räkenskapsårets slut avvisas låsningen; visa användaren close_warnings ur get_year_end_checklist och sätt before_year_end=true bara om hen godtar att året stängs i förväg. Finns det annat att se över (moms, obetalda fakturor, avskrivningar som inte är bokförda) avvisas låsningen med en lista; visa den för användaren och sätt confirm=true bara om hen vill stänga ändå. Scope book. Argument: orgnr, year; valfritt before_year_end, confirm (gäller båda).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"before_year_end":{"default":false,"title":"Before Year End","type":"boolean"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"required":["orgnr","year"],"title":"lock_fiscal_yearArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/annual-closing/{year}/signed":{"post":{"operationId":"mark_arsbokslut_signed","tags":["Bokslut och räkenskapsår"],"summary":"Markera årsbokslutet undertecknat","description":"Markerar årsbokslutet som upprättat och undertecknat (eller ångrar). Internt; årsbokslutet lämnas inte in någonstans. Bekräfta med användaren först. Scope statutory. Argument: orgnr, year, signed (true eller false); valfritt confirm, som krävs för ett år som inte har tagit slut.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"mark_arsbokslut_signed","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"signed":{"title":"Signed","type":"boolean"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"required":["signed"],"title":"mark_arsbokslut_signedArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/mark_arsbokslut_signed":{"post":{"operationId":"tool_mark_arsbokslut_signed","tags":["Verktyg (som MCP)"],"summary":"Markera årsbokslutet undertecknat","description":"Markerar årsbokslutet som upprättat och undertecknat (eller ångrar). Internt; årsbokslutet lämnas inte in någonstans. Bekräfta med användaren först. Scope statutory. Argument: orgnr, year, signed (true eller false); valfritt confirm, som krävs för ett år som inte har tagit slut.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"signed":{"title":"Signed","type":"boolean"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"required":["orgnr","year","signed"],"title":"mark_arsbokslut_signedArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/ink4/{year}/submitted":{"post":{"operationId":"mark_ink4_submitted","tags":["Skatt, INK2 och årsredovisning"],"summary":"Markera INK4 inlämnad","description":"Markerar INK4 som inlämnad (eller inte inlämnad) för ett år. Internt; ingen inlämning till Skatteverket sker. Bekräfta med användaren först. Scope statutory. Argument: orgnr, year, submitted (true eller false); valfritt confirm, som krävs för att markera ett år som inte har tagit slut.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"mark_ink4_submitted","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"submitted":{"title":"Submitted","type":"boolean"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"required":["submitted"],"title":"mark_ink4_submittedArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/mark_ink4_submitted":{"post":{"operationId":"tool_mark_ink4_submitted","tags":["Verktyg (som MCP)"],"summary":"Markera INK4 inlämnad","description":"Markerar INK4 som inlämnad (eller inte inlämnad) för ett år. Internt; ingen inlämning till Skatteverket sker. Bekräfta med användaren först. Scope statutory. Argument: orgnr, year, submitted (true eller false); valfritt confirm, som krävs för att markera ett år som inte har tagit slut.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"submitted":{"title":"Submitted","type":"boolean"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"required":["orgnr","year","submitted"],"title":"mark_ink4_submittedArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/ne/{year}/submitted":{"post":{"operationId":"mark_ne_submitted","tags":["Skatt, INK2 och årsredovisning"],"summary":"Markera NE-bilagan inlämnad","description":"Markerar NE-bilagan som inlämnad (eller inte inlämnad) för ett år. Internt; ingen inlämning till Skatteverket sker. Bekräfta med användaren först. Scope statutory. Argument: orgnr, year, submitted (true eller false); valfritt confirm, som krävs för att markera ett år som inte har tagit slut.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"mark_ne_submitted","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"submitted":{"title":"Submitted","type":"boolean"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"required":["submitted"],"title":"mark_ne_submittedArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/mark_ne_submitted":{"post":{"operationId":"tool_mark_ne_submitted","tags":["Verktyg (som MCP)"],"summary":"Markera NE-bilagan inlämnad","description":"Markerar NE-bilagan som inlämnad (eller inte inlämnad) för ett år. Internt; ingen inlämning till Skatteverket sker. Bekräfta med användaren först. Scope statutory. Argument: orgnr, year, submitted (true eller false); valfritt confirm, som krävs för att markera ett år som inte har tagit slut.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"submitted":{"title":"Submitted","type":"boolean"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"required":["orgnr","year","submitted"],"title":"mark_ne_submittedArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/rot-rut/{request_id}/submitted":{"post":{"operationId":"mark_rot_rut_request_submitted","tags":["ROT och RUT"],"summary":"Markera ROT/RUT-begäran inskickad","description":"Markerar att en ROT/RUT-begäran har lämnats in till Skatteverket, eller tar bort markeringen. Använd efter att användaren själv har laddat ner filen i Kvickd (se check_rot_rut_request_file) och skickat in den; när Skatteverket har betalat ut, använd register_rot_rut_payout. Returnerar begäran med ny status och belopp. Bieffekt: bara en statusmarkering i Kvickd, inget skickas till Skatteverket. Kräver behörigheten reconcile.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"mark_rot_rut_request_submitted","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"submitted":{"default":true,"description":"true för inskickad (standard), false för att ta bort markeringen.","title":"Submitted","type":"boolean"}},"title":"mark_rot_rut_request_submittedArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"request_id","in":"path","required":true,"schema":{"description":"Begärans id (heltal), t.ex. 3. Hämta med list_rot_rut.","title":"Request Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/mark_rot_rut_request_submitted":{"post":{"operationId":"tool_mark_rot_rut_request_submitted","tags":["Verktyg (som MCP)"],"summary":"Markera ROT/RUT-begäran inskickad","description":"Markerar att en ROT/RUT-begäran har lämnats in till Skatteverket, eller tar bort markeringen. Använd efter att användaren själv har laddat ner filen i Kvickd (se check_rot_rut_request_file) och skickat in den; när Skatteverket har betalat ut, använd register_rot_rut_payout. Returnerar begäran med ny status och belopp. Bieffekt: bara en statusmarkering i Kvickd, inget skickas till Skatteverket. Kräver behörigheten reconcile.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"request_id":{"description":"Begärans id (heltal), t.ex. 3. Hämta med list_rot_rut.","title":"Request Id","type":"integer"},"submitted":{"default":true,"description":"true för inskickad (standard), false för att ta bort markeringen.","title":"Submitted","type":"boolean"}},"required":["orgnr","request_id"],"title":"mark_rot_rut_request_submittedArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/statutory/{year}/submitted":{"post":{"operationId":"mark_submitted","tags":["Skatt, INK2 och årsredovisning"],"summary":"Markera inlämnad","description":"Markera en bokslutsleverabel som inlämnad/godkänd. INTERNT (ingen extern transmission till Skatteverket/Bolagsverket sker). Bekräfta med användaren först. Scope statutory. Argument: orgnr, year, kind (ARSREDOVISNING|INK2), status (NOT_SUBMITTED|SUBMITTED|APPROVED); valfritt note och confirm, som krävs för att markera ett år som inte har tagit slut.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"mark_submitted","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"kind":{"title":"Kind","type":"string"},"status":{"title":"Status","type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"required":["kind","status"],"title":"mark_submittedArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/mark_submitted":{"post":{"operationId":"tool_mark_submitted","tags":["Verktyg (som MCP)"],"summary":"Markera inlämnad","description":"Markera en bokslutsleverabel som inlämnad/godkänd. INTERNT (ingen extern transmission till Skatteverket/Bolagsverket sker). Bekräfta med användaren först. Scope statutory. Argument: orgnr, year, kind (ARSREDOVISNING|INK2), status (NOT_SUBMITTED|SUBMITTED|APPROVED); valfritt note och confirm, som krävs för att markera ett år som inte har tagit slut.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"kind":{"title":"Kind","type":"string"},"status":{"title":"Status","type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"confirm":{"default":false,"title":"Confirm","type":"boolean"}},"required":["orgnr","year","kind","status"],"title":"mark_submittedArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/fixed-assets/depreciation":{"post":{"operationId":"post_depreciation","tags":["Anläggningstillgångar"],"summary":"Bokför avskrivning","description":"Bokför månadens linjära avskrivning (D avskrivningskostnad / K ackumulerad avskrivning), i bokslutsserien. Utan asset_id bokförs alla tillgångar; med asset_id bara den. Idempotent per period. Bara för en månad som har varit (sista dagen senast i dag), i ett befintligt räkenskapsår och en olåst period. Avyttrade tillgångar skrivs inte av. Förhandsgranska först med preview_depreciation. Kräver behörigheten 'book'. Argument: orgnr, year, month; valfritt asset_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"post_depreciation","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"},"asset_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Asset Id"}},"required":["year","month"],"title":"post_depreciationArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]},"get":{"operationId":"preview_depreciation","tags":["Anläggningstillgångar"],"summary":"Förhandsgranska avskrivning","description":"Förhandsgranska månadens avskrivning UTAN att bokföra: rader per tillgång (debit-/kreditkonto + belopp), summa, om perioden redan är bokförd (already_posted) och om den går att bokföra nu (can_post, blocked_reason: perioden har inte inträffat, räkenskapsåret finns inte eller perioden är låst). Med asset_id förhandsgranskas bara den tillgången. Kräver 'view'. Argument: orgnr, year, month; valfritt asset_id.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"preview_depreciation","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"query","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"month","in":"query","required":true,"schema":{"title":"Month","type":"integer"}},{"name":"asset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Asset Id"}}]}},"/api/v1/tools/post_depreciation":{"post":{"operationId":"tool_post_depreciation","tags":["Verktyg (som MCP)"],"summary":"Bokför avskrivning","description":"Bokför månadens linjära avskrivning (D avskrivningskostnad / K ackumulerad avskrivning), i bokslutsserien. Utan asset_id bokförs alla tillgångar; med asset_id bara den. Idempotent per period. Bara för en månad som har varit (sista dagen senast i dag), i ett befintligt räkenskapsår och en olåst period. Avyttrade tillgångar skrivs inte av. Förhandsgranska först med preview_depreciation. Kräver behörigheten 'book'. Argument: orgnr, year, month; valfritt asset_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"},"asset_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Asset Id"}},"required":["orgnr","year","month"],"title":"post_depreciationArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/reconciliations/prepare":{"post":{"operationId":"prepare_bilaga","tags":["Avstämning"],"summary":"Förbered bilaga","description":"Markera en bilaga som FÖRBEREDD (motsvarar knappen Förbered i appen). Kan ALDRIG attestera; attesten, som markerar att avstämningen är granskad och klar, görs i appen. Nekas om avstämt belopp saknas eller om differensen överstiger väsentlighetsgränsen (se can_prepare och prepare_blocker i get_reconciliation). Ett upprepat anrop mot oförändrat underlag ändrar inget. Kräver att nyckeln har behörigheten 'reconcile'. Argument: orgnr, bilaga_type (BANK/AR_CONTROL/AP_CONTROL/VAT/AGI/TAX_ACCOUNT/ASSET/GL_ACCOUNT), account (0 för aggregat som moms), year, month.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"prepare_bilaga","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"bilaga_type":{"title":"Bilaga Type","type":"string"},"account":{"title":"Account","type":"integer"},"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"}},"required":["bilaga_type","account","year","month"],"title":"prepare_bilagaArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/prepare_bilaga":{"post":{"operationId":"tool_prepare_bilaga","tags":["Verktyg (som MCP)"],"summary":"Förbered bilaga","description":"Markera en bilaga som FÖRBEREDD (motsvarar knappen Förbered i appen). Kan ALDRIG attestera; attesten, som markerar att avstämningen är granskad och klar, görs i appen. Nekas om avstämt belopp saknas eller om differensen överstiger väsentlighetsgränsen (se can_prepare och prepare_blocker i get_reconciliation). Ett upprepat anrop mot oförändrat underlag ändrar inget. Kräver att nyckeln har behörigheten 'reconcile'. Argument: orgnr, bilaga_type (BANK/AR_CONTROL/AP_CONTROL/VAT/AGI/TAX_ACCOUNT/ASSET/GL_ACCOUNT), account (0 för aggregat som moms), year, month.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"bilaga_type":{"title":"Bilaga Type","type":"string"},"account":{"title":"Account","type":"integer"},"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"}},"required":["orgnr","bilaga_type","account","year","month"],"title":"prepare_bilagaArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/preview_depreciation":{"post":{"operationId":"tool_preview_depreciation","tags":["Verktyg (som MCP)"],"summary":"Förhandsgranska avskrivning","description":"Förhandsgranska månadens avskrivning UTAN att bokföra: rader per tillgång (debit-/kreditkonto + belopp), summa, om perioden redan är bokförd (already_posted) och om den går att bokföra nu (can_post, blocked_reason: perioden har inte inträffat, räkenskapsåret finns inte eller perioden är låst). Med asset_id förhandsgranskas bara den tillgången. Kräver 'view'. Argument: orgnr, year, month; valfritt asset_id.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"},"asset_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Asset Id"}},"required":["orgnr","year","month"],"title":"preview_depreciationArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/proposals/bank-match":{"post":{"operationId":"propose_bank_match","tags":["Avstämning"],"summary":"Föreslå bankmatchning","description":"Föreslå en bankmatchning: koppla en omatchad bankrad till en eller flera BEFINTLIGA kandidater (huvudboks-/reskontraposter). Får bara peka på befintliga id:n, hittar aldrig på belopp. LLM föreslår, människa godkänner. Kräver 'reconcile'. Argument: orgnr, year, month, bank_txn_id, target_ids (lista käll-id); valfritt reasoning, confidence, model, finding_ref.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"propose_bank_match","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"},"bank_txn_id":{"title":"Bank Txn Id","type":"string"},"target_ids":{"items":{},"title":"Target Ids","type":"array"},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Reasoning"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Confidence"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Model"},"finding_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Finding Ref"}},"required":["year","month","bank_txn_id","target_ids"],"title":"propose_bank_matchArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/propose_bank_match":{"post":{"operationId":"tool_propose_bank_match","tags":["Verktyg (som MCP)"],"summary":"Föreslå bankmatchning","description":"Föreslå en bankmatchning: koppla en omatchad bankrad till en eller flera BEFINTLIGA kandidater (huvudboks-/reskontraposter). Får bara peka på befintliga id:n, hittar aldrig på belopp. LLM föreslår, människa godkänner. Kräver 'reconcile'. Argument: orgnr, year, month, bank_txn_id, target_ids (lista käll-id); valfritt reasoning, confidence, model, finding_ref.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"},"bank_txn_id":{"title":"Bank Txn Id","type":"string"},"target_ids":{"items":{},"title":"Target Ids","type":"array"},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Reasoning"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Confidence"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Model"},"finding_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Finding Ref"}},"required":["orgnr","year","month","bank_txn_id","target_ids"],"title":"propose_bank_matchArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/propose_voucher":{"post":{"operationId":"tool_propose_voucher","tags":["Verktyg (som MCP)"],"summary":"Föreslå verifikat för attest","description":"Lägger ett verifikatförslag i kön Väntande verifikat, där en människa godkänner eller avvisar det innan något bokförs. Använd när användaren vill granska först eller när konteringen är osäker. För att bokföra direkt, använd book_voucher eller create_voucher; för en justering som hör till en avstämning (bilaga), använd create_proposal. Returnerar draft_id, serie, datum och status pending. Bieffekt: inget bokförs. Förslaget godkänns med approve_voucher_draft, ändras med edit_voucher_draft och avvisas med reject_voucher_draft. Underlag i annan valuta än SEK: gissa aldrig växelkursen. Fråga användaren efter kursen (SEK per 1 enhet) eller SEK-beloppet (t.ex. det som drogs från kontot), räkna raderna i SEK och ange currency, foreign_amount_minor och fx_rate eller total_sek_ore, så dokumenteras kursen på verifikatet. Underlag: underlag_ids (underlagspoolen) och document_ids (inkorgen, dokumentarkivet eller en stor fil uppladdad med create_underlag_upload) kopplas till förslaget och följer med till verifikatet (document_ids kräver även behörigheten upload). Rader: [{account, debit_ore, credit_ore, text?}] i öre med exakt ett belopp skilt från noll per rad, eller [{account, amount_ore, text?}] med tecken (debet positivt, kredit negativt). Raderna kommer tillbaka med båda formaten från list_voucher_drafts och get_voucher. external_ref: valfri egen referens från ditt system (t.ex. \"bokning-812\", högst 200 tecken), unik per bolag. Finns referensen redan på ett verifikat eller ett väntande förslag med samma datum och rader skapas inget nytt; svaret är det befintliga med duplicate=true, så ett omförsök ger ingen dubblett. Samma referens med annat innehåll är ett fel och inget skapas. Ett avvisat förslag frigör referensen. Slå upp med find_voucher. Kräver behörigheten reconcile.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"date":{"title":"Date","type":"string"},"lines":{"items":{},"title":"Lines","type":"array"},"text":{"title":"Text","type":"string"},"series":{"default":"A","title":"Series","type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"underlag_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Underlag Ids"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Currency"},"foreign_amount_minor":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Foreign Amount Minor"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"default":null,"title":"Fx Rate"},"total_sek_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Sek Ore"},"document_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Document Ids"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Ref"}},"required":["orgnr","date","lines","text"],"title":"propose_voucherArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/annual-report":{"get":{"operationId":"read_annual_report","tags":["Skatt, INK2 och årsredovisning"],"summary":"Årsredovisningens siffror ur bokföringen","description":"Hämtar årsredovisningens siffror ur bokföringen för ett räkenskapsår: resultat- och balansräkning som K2-rader med jämförelseår, och bolagsuppgifter. Använd som utgångspunkt för årsredovisningen; för användarens sparade utkast i årsredovisningsguiden, använd read_annual_report_draft, för vad som saknas inför inlämning, get_arsredovisning_status, och för den färdiga filen, generate_ixbrl. Returnerar bolagsuppgifter med räkenskapsårets datum, raderna med belopp för året och jämförelseåret i kronor och om jämförelseår finns. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"read_annual_report","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025). Utelämna för det senaste räkenskapsåret med verifikat.","title":"Year"},"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025). Utelämna för det senaste räkenskapsåret med verifikat."}]}},"/api/v1/tools/read_annual_report":{"post":{"operationId":"tool_read_annual_report","tags":["Verktyg (som MCP)"],"summary":"Årsredovisningens siffror ur bokföringen","description":"Hämtar årsredovisningens siffror ur bokföringen för ett räkenskapsår: resultat- och balansräkning som K2-rader med jämförelseår, och bolagsuppgifter. Använd som utgångspunkt för årsredovisningen; för användarens sparade utkast i årsredovisningsguiden, använd read_annual_report_draft, för vad som saknas inför inlämning, get_arsredovisning_status, och för den färdiga filen, generate_ixbrl. Returnerar bolagsuppgifter med räkenskapsårets datum, raderna med belopp för året och jämförelseåret i kronor och om jämförelseår finns. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025). Utelämna för det senaste räkenskapsåret med verifikat.","title":"Year"}},"required":["orgnr"],"title":"read_annual_reportArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/read_annual_report_draft":{"post":{"operationId":"tool_read_annual_report_draft","tags":["Verktyg (som MCP)"],"summary":"Läs årsredovisningsutkast","description":"Läser det sparade utkastet till årsredovisningen för ett räkenskapsår, som det sparats i årsredovisningsguiden: belopp, noter, förvaltningsberättelse och undertecknare. Använd för att fortsätta på ett påbörjat utkast; för årsredovisningen härledd ur bokföringen, använd read_annual_report, och för vad som saknas inför inlämning, använd get_arsredovisning_status. Returnerar exists, utkastets innehåll (payload) och när det senast sparades. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025).","title":"Year","type":"integer"}},"required":["orgnr","year"],"title":"read_annual_report_draftArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/annual-closing/{year}":{"get":{"operationId":"read_arsbokslut","tags":["Bokslut och räkenskapsår"],"summary":"Läs årsbokslutet","description":"Läser årsbokslutet för enskild firma, handelsbolag, kommanditbolag, ideell förening eller stiftelse, och årsredovisningen (K2, PDF) för ekonomisk förening (doc=ar, med förvaltningsberättelse: flerårsöversikt, förändringar i eget kapital, resultatdisposition, medlemsinformation): regelverk (k1 förenklat årsbokslut eller k2) med förslag och skäl (eligibility), resultaträkningen och balansräkningen rad för rad i hela kronor med jämförelsetal och vilka konton varje post bygger på, upplysningar, underskrifter, kontroller (errors, warnings) och om årsbokslutet är markerat undertecknat. Aktiebolag och föreningar med årsredovisning svarar med fel. Scope view. Argument: orgnr, year.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"read_arsbokslut","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}}]},"put":{"operationId":"set_arsbokslut_inputs","tags":["Bokslut och räkenskapsår"],"summary":"Spara uppgifter till årsbokslutet","description":"Sparar uppgifter till årsbokslutet och returnerar det på nytt. regime: k1 eller k2 (k1 bara för enskild firma och ideell förening; för enskild firma är det samma val som NE-bilagans förenklade årsbokslut). account_overrides: {konto: post} när ett konto ska redovisas i en annan post (postnycklarna står i post_choices), null återställer. notes: principer (tillägg till texten om redovisningsprinciper), anlaggningar [{post, anskaffningsvarde (kr), nyttjandeperiod}], sakerheter [{slag, belopp}], eventualforpliktelser, ovrigt, obeskattade_reserver (K1 enskild firma). För ekonomisk förening även verksamhet, vasentliga_handelser, efter_balansdagen, forlagsinsatser, nyttjandeperioder (text), medelantal (antal), aterbetalning (kr), medlemmar {start, nya, avgaende}, disposition {utdelning, reservfond, aterbaring} (kr) och revisor {name, firm, date}. signers: [{name, role, date}] ersätter listan. decided_on (ÅÅÅÅ-MM-DD) och place: datering. Hitta aldrig på namn på undertecknare. Scope statutory. Argument: orgnr, year och de delar som ändras.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"set_arsbokslut_inputs","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"regime":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Regime"},"account_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Account Overrides"},"notes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Notes"},"signers":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"default":null,"title":"Signers"},"decided_on":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Decided On"},"place":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Place"}},"title":"set_arsbokslut_inputsArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/read_arsbokslut":{"post":{"operationId":"tool_read_arsbokslut","tags":["Verktyg (som MCP)"],"summary":"Läs årsbokslutet","description":"Läser årsbokslutet för enskild firma, handelsbolag, kommanditbolag, ideell förening eller stiftelse, och årsredovisningen (K2, PDF) för ekonomisk förening (doc=ar, med förvaltningsberättelse: flerårsöversikt, förändringar i eget kapital, resultatdisposition, medlemsinformation): regelverk (k1 förenklat årsbokslut eller k2) med förslag och skäl (eligibility), resultaträkningen och balansräkningen rad för rad i hela kronor med jämförelsetal och vilka konton varje post bygger på, upplysningar, underskrifter, kontroller (errors, warnings) och om årsbokslutet är markerat undertecknat. Aktiebolag och föreningar med årsredovisning svarar med fel. Scope view. Argument: orgnr, year.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"}},"required":["orgnr","year"],"title":"read_arsbokslutArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/checklist":{"get":{"operationId":"read_checklist","tags":["Bolag och översikt"],"summary":"Att göra just nu","description":"Visar bolagets att göra-lista per dagens datum, utifrån vad som faktiskt har gjorts: leverantörsfakturor att betala, momsavstämning och deklaration, månadsavstämning och, när ett räkenskapsår har stängts, bokslut och deklaration (INK2 och årsredovisning, NE-bilaga eller INK4). Använd för frågor som vad behöver jag göra nu; för årsbokslutets bokföringssteg i ett visst år, använd get_year_end_checklist. Returnerar poster med förfallodatum, allvarlighetsgrad och i förekommande fall ett action-verktyg som utför åtgärden efter användarens godkännande. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"read_checklist","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}}]}},"/api/v1/tools/read_checklist":{"post":{"operationId":"tool_read_checklist","tags":["Verktyg (som MCP)"],"summary":"Att göra just nu","description":"Visar bolagets att göra-lista per dagens datum, utifrån vad som faktiskt har gjorts: leverantörsfakturor att betala, momsavstämning och deklaration, månadsavstämning och, när ett räkenskapsår har stängts, bokslut och deklaration (INK2 och årsredovisning, NE-bilaga eller INK4). Använd för frågor som vad behöver jag göra nu; för årsbokslutets bokföringssteg i ett visst år, använd get_year_end_checklist. Returnerar poster med förfallodatum, allvarlighetsgrad och i förekommande fall ett action-verktyg som utför åtgärden efter användarens godkännande. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},"required":["orgnr"],"title":"read_checklistArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/ink4/{year}":{"get":{"operationId":"read_ink4","tags":["Skatt, INK2 och årsredovisning"],"summary":"Läs INK4","description":"Läser handelsbolagets eller kommanditbolagets INK4 för ett räkenskapsår: INK4R (räkenskapsschemat ur bokföringen), INK4S (skattemässiga justeringar, förslag på 4.3b och 4.5b), delägarna med andel, överskott eller underskott, uttag och tillskott, kontroller (errors, warnings) och om filen kan laddas ner. Scope view. Argument: orgnr, year.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"read_ink4","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}}]},"put":{"operationId":"set_ink4_inputs","tags":["Skatt, INK2 och årsredovisning"],"summary":"Spara uppgifter till INK4","description":"Sparar uppgifter till INK4 och returnerar blanketten på nytt. flags: uppdragstagare, revision (true/false), ovriga_upplysningar. adjustments: belopp i hela kronor per rad i INK4S som fylls i (4.3a-4.11b, 4.14-4.16), null tar bort. partners: {plats: {employer_fee_deduction}}. address: postnr, postort. Scope statutory. Argument: orgnr, year och de delar som ändras.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"set_ink4_inputs","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Flags"},"adjustments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Adjustments"},"partners":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Partners"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Address"}},"title":"set_ink4_inputsArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/read_ink4":{"post":{"operationId":"tool_read_ink4","tags":["Verktyg (som MCP)"],"summary":"Läs INK4","description":"Läser handelsbolagets eller kommanditbolagets INK4 för ett räkenskapsår: INK4R (räkenskapsschemat ur bokföringen), INK4S (skattemässiga justeringar, förslag på 4.3b och 4.5b), delägarna med andel, överskott eller underskott, uttag och tillskott, kontroller (errors, warnings) och om filen kan laddas ner. Scope view. Argument: orgnr, year.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"}},"required":["orgnr","year"],"title":"read_ink4Arguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/ne/{year}":{"get":{"operationId":"read_ne_bilaga","tags":["Skatt, INK2 och årsredovisning"],"summary":"Läs NE-bilagan","description":"Läser NE-bilagan (enskild firma) för ett räkenskapsår: blankettens rutor B1-B16 och R1-R48 med belopp i hela kronor, vilka konton varje ruta bygger på, förslag (R13, R14, R24, R40, R43), konton som saknar ruta, kontroller (errors, warnings) och om filen kan laddas ner. Gäller bara enskild firma. Scope view. Argument: orgnr, year.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"read_ne_bilaga","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}}]},"put":{"operationId":"set_ne_bilaga_inputs","tags":["Skatt, INK2 och årsredovisning"],"summary":"Spara uppgifter till NE-bilagan","description":"Sparar uppgifter till NE-bilagan (enskild firma) och returnerar blanketten på nytt. flags: verksamhetens_art (text), passiv, utanfor_ees, ej_forenklat, uppdragstagare (true/false). adjustments: belopp i hela kronor per ruta som fylls i (R13-R16, R18-R20, R22-R28, R30-R32, R34, R36-R41, R43-R46; nyckel 'R20+' och 'R20-' för medhjälpande make), null tar bort ett värde så att förslaget gäller. other: övriga uppgifter O1-O11. account_overrides: {konto: ruta} när ett konto ska redovisas i en annan ruta, null återställer. address: postnr, postort. flags.ej_forenklat=false betyder förenklat årsbokslut, null tar bort valet så att förvalet följer omsättningen (förenklat årsbokslut vid högst 3 miljoner kronor). nea: {enabled, andel (procent), R13-R16, R18-, R18+, R19-R21} när verksamheten redovisas separat på NEA. n7: {enabled, datum, arv, overlatare (bara organisationsnummer; ett personnummer skrivs in i appen), 1a-1g, 2, 3, 4} för övertagna fonder. Gissa aldrig belopp som användaren ska lämna, till exempel påförda egenavgifter (R41). Scope statutory. Argument: orgnr, year och de delar som ändras.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"set_ne_bilaga_inputs","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Flags"},"adjustments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Adjustments"},"other":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Other"},"account_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Account Overrides"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Address"},"nea":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Nea"},"n7":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"N7"}},"title":"set_ne_bilaga_inputsArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/read_ne_bilaga":{"post":{"operationId":"tool_read_ne_bilaga","tags":["Verktyg (som MCP)"],"summary":"Läs NE-bilagan","description":"Läser NE-bilagan (enskild firma) för ett räkenskapsår: blankettens rutor B1-B16 och R1-R48 med belopp i hela kronor, vilka konton varje ruta bygger på, förslag (R13, R14, R24, R40, R43), konton som saknar ruta, kontroller (errors, warnings) och om filen kan laddas ner. Gäller bara enskild firma. Scope view. Argument: orgnr, year.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"}},"required":["orgnr","year"],"title":"read_ne_bilagaArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/policies/{policy_id}":{"get":{"operationId":"read_policy","tags":["Instruktioner och policyer"],"summary":"Läs policy","description":"Hämta ett policydokuments/underlags innehåll som markdown (token-snålt). Argument: policy_id (från list_policies). Har posten status 'image' finns ingen text att läsa, använd read_underlag_image för att se bilden. Scope view.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"read_policy","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"title":"Policy Id","type":"integer"}}]}},"/api/v1/tools/read_policy":{"post":{"operationId":"tool_read_policy","tags":["Verktyg (som MCP)"],"summary":"Läs policy","description":"Hämta ett policydokuments/underlags innehåll som markdown (token-snålt). Argument: policy_id (från list_policies). Har posten status 'image' finns ingen text att läsa, använd read_underlag_image för att se bilden. Scope view.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"policy_id":{"title":"Policy Id","type":"integer"}},"required":["policy_id"],"title":"read_policyArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/statutory/{year}":{"get":{"operationId":"read_statutory_status","tags":["Skatt, INK2 och årsredovisning"],"summary":"Inlämningsstatus för årsredovisning och INK2","description":"Visar inlämningsstatus för ett räkenskapsår: om årsredovisningen och INK2 finns som utkast, om de är inlämnade (av vem och när) och vilken deadline som gäller. För enskild firma och handelsbolag gäller i stället NE-bilagan respektive INK4 (status, sista dag och om året är låst). För ekonomisk förening gäller INK2 som för aktiebolag, men årsredovisningens status kommer från read_arsbokslut. Övriga former får en förklaring. Använd för frågor som är årsredovisningen inlämnad; för en allmän lägesbild, använd get_overview, och för årsbokslutets bokföringssteg, använd get_year_end_checklist. Returnerar utkastläge, inlämningsstatus och deadline för årsredovisning och INK2. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"read_statutory_status","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025).","title":"Year","type":"integer"}}]}},"/api/v1/tools/read_statutory_status":{"post":{"operationId":"tool_read_statutory_status","tags":["Verktyg (som MCP)"],"summary":"Inlämningsstatus för årsredovisning och INK2","description":"Visar inlämningsstatus för ett räkenskapsår: om årsredovisningen och INK2 finns som utkast, om de är inlämnade (av vem och när) och vilken deadline som gäller. För enskild firma och handelsbolag gäller i stället NE-bilagan respektive INK4 (status, sista dag och om året är låst). För ekonomisk förening gäller INK2 som för aktiebolag, men årsredovisningens status kommer från read_arsbokslut. Övriga former får en förklaring. Använd för frågor som är årsredovisningen inlämnad; för en allmän lägesbild, använd get_overview, och för årsbokslutets bokföringssteg, använd get_year_end_checklist. Returnerar utkastläge, inlämningsstatus och deadline för årsredovisning och INK2. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025).","title":"Year","type":"integer"}},"required":["orgnr","year"],"title":"read_statutory_statusArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/tax":{"get":{"operationId":"read_tax","tags":["Skatt, INK2 och årsredovisning"],"summary":"Läs skatteberäkning","description":"Visar bolagets skatteberäkning och INK2 för ett räkenskapsår, härledd direkt ur bokslutet utan justeringar. Använd för frågor om skatt och skattemässigt resultat; för att pröva justeringar som INK2S och periodiseringsfond, använd compute_tax, och för SRU-filerna, använd download_ink2_sru. Returnerar årets resultat, periodiseringsfond, särskild löneskatt, skattemässigt resultat, beskattningsbar inkomst och skatt i kronor, INK2-raderna i kronor och bokföringsposterna för skatten i öre. Periodiseringsfonden bokas på BAS-kontot för beskattningsåret (t.ex. 2126 för 2026) och återförs från de konton där fonderna ligger (pf_avsattning_konto, pf_aterforing_konton). Beräkningen gäller alltid hela räkenskapsåret. Läser bara, ändrar inget.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"read_tax","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025). Utelämna för det senaste räkenskapsåret med verifikat.","title":"Year"},"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025). Utelämna för det senaste räkenskapsåret med verifikat."},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Används inte; beräkningen gäller alltid hela räkenskapsåret.","title":"Month"},"description":"Används inte; beräkningen gäller alltid hela räkenskapsåret."}]}},"/api/v1/tools/read_tax":{"post":{"operationId":"tool_read_tax","tags":["Verktyg (som MCP)"],"summary":"Läs skatteberäkning","description":"Visar bolagets skatteberäkning och INK2 för ett räkenskapsår, härledd direkt ur bokslutet utan justeringar. Använd för frågor om skatt och skattemässigt resultat; för att pröva justeringar som INK2S och periodiseringsfond, använd compute_tax, och för SRU-filerna, använd download_ink2_sru. Returnerar årets resultat, periodiseringsfond, särskild löneskatt, skattemässigt resultat, beskattningsbar inkomst och skatt i kronor, INK2-raderna i kronor och bokföringsposterna för skatten i öre. Periodiseringsfonden bokas på BAS-kontot för beskattningsåret (t.ex. 2126 för 2026) och återförs från de konton där fonderna ligger (pf_avsattning_konto, pf_aterforing_konton). Beräkningen gäller alltid hela räkenskapsåret. Läser bara, ändrar inget.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025). Utelämna för det senaste räkenskapsåret med verifikat.","title":"Year"},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Används inte; beräkningen gäller alltid hela räkenskapsåret.","title":"Month"}},"required":["orgnr"],"title":"read_taxArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/policies/{policy_id}/image":{"get":{"operationId":"read_underlag_image","tags":["Underlag, inkorg och dokument"],"summary":"Läs bildunderlag","description":"Läs ett bildunderlag (t.ex. ett kvitto som skärmdump eller foto) som en bild du kan titta på. Används för dokument/underlag med status 'image' (se list_policies/read_policy). Argument: policy_id. Scope view.","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"read_underlag_image","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"title":"Policy Id","type":"integer"}}]}},"/api/v1/tools/read_underlag_image":{"post":{"operationId":"tool_read_underlag_image","tags":["Verktyg (som MCP)"],"summary":"Läs bildunderlag","description":"Läs ett bildunderlag (t.ex. ett kvitto som skärmdump eller foto) som en bild du kan titta på. Används för dokument/underlag med status 'image' (se list_policies/read_policy). Argument: policy_id. Scope view.","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"policy_id":{"title":"Policy Id","type":"integer"}},"required":["policy_id"],"title":"read_underlag_imageArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/customer-invoices/{invoice_id}/payments":{"post":{"operationId":"register_customer_payment","tags":["Kundfakturor"],"summary":"Bokför kundinbetalning","description":"Bokför en INbetalning på en kundfaktura (D likvidkonto / K 1510). På en kreditfaktura bokförs i stället en återbetalning till kunden av det som inte kvittats mot originalet (D 1510 / K likvidkonto); amount_ore anges positivt. Betalar kunden mer än saldot går överskottet först till påminnelseavgift (3990) och dröjsmålsränta (8313) enligt den senaste påminnelsen, och resten blir en skuld till kunden (status_label Att återbetala). Den återbetalas med samma verktyg och ett POSITIVT amount_ore, som för en kreditfaktura (D 1510 / K likvidkonto). KODEN postar. Kräver scope book; bokföringstaket får inte överstigas. Argument: orgnr, invoice_id, pay_date (YYYY-MM-DD, inte före fakturadatumet), amount_ore; valfritt bank_account (likvidkonto 1900-1999 som debiteras, default 1930).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"register_customer_payment","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pay_date":{"title":"Pay Date","type":"string"},"amount_ore":{"title":"Amount Ore","type":"integer"},"bank_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Bank Account"}},"required":["pay_date","amount_ore"],"title":"register_customer_paymentArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/register_customer_payment":{"post":{"operationId":"tool_register_customer_payment","tags":["Verktyg (som MCP)"],"summary":"Bokför kundinbetalning","description":"Bokför en INbetalning på en kundfaktura (D likvidkonto / K 1510). På en kreditfaktura bokförs i stället en återbetalning till kunden av det som inte kvittats mot originalet (D 1510 / K likvidkonto); amount_ore anges positivt. Betalar kunden mer än saldot går överskottet först till påminnelseavgift (3990) och dröjsmålsränta (8313) enligt den senaste påminnelsen, och resten blir en skuld till kunden (status_label Att återbetala). Den återbetalas med samma verktyg och ett POSITIVT amount_ore, som för en kreditfaktura (D 1510 / K likvidkonto). KODEN postar. Kräver scope book; bokföringstaket får inte överstigas. Argument: orgnr, invoice_id, pay_date (YYYY-MM-DD, inte före fakturadatumet), amount_ore; valfritt bank_account (likvidkonto 1900-1999 som debiteras, default 1930).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"title":"Invoice Id","type":"integer"},"pay_date":{"title":"Pay Date","type":"string"},"amount_ore":{"title":"Amount Ore","type":"integer"},"bank_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Bank Account"}},"required":["orgnr","invoice_id","pay_date","amount_ore"],"title":"register_customer_paymentArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/rot-rut/{request_id}/payout":{"post":{"operationId":"register_rot_rut_payout","tags":["ROT och RUT"],"summary":"Bokför ROT/RUT-utbetalning","description":"Registrera Skatteverkets utbetalning för en ROT/RUT-begäran. KODEN postar: D likvidkonto / K 1513 för det utbetalda. Nekade Skatteverket hela eller delar av ett ärende, ange beviljat belopp i approved ([{item_id, approved_ore}]); skillnaden flyttas till kundens fordran (D 1510 / K 1513) och fakturan blir delbetald så att kunden kan faktureras resten. Utelämnade ärenden räknas som helt beviljade. Kräver scope book; bokföringstaket får inte överstigas. Argument: orgnr, request_id, pay_date (YYYY-MM-DD); valfritt approved, bank_account (likvidkonto 1900-1999 eller skattekontot 1630, default 1930).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"register_rot_rut_payout","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pay_date":{"title":"Pay Date","type":"string"},"approved":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Approved"},"bank_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Bank Account"}},"required":["pay_date"],"title":"register_rot_rut_payoutArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"request_id","in":"path","required":true,"schema":{"title":"Request Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/register_rot_rut_payout":{"post":{"operationId":"tool_register_rot_rut_payout","tags":["Verktyg (som MCP)"],"summary":"Bokför ROT/RUT-utbetalning","description":"Registrera Skatteverkets utbetalning för en ROT/RUT-begäran. KODEN postar: D likvidkonto / K 1513 för det utbetalda. Nekade Skatteverket hela eller delar av ett ärende, ange beviljat belopp i approved ([{item_id, approved_ore}]); skillnaden flyttas till kundens fordran (D 1510 / K 1513) och fakturan blir delbetald så att kunden kan faktureras resten. Utelämnade ärenden räknas som helt beviljade. Kräver scope book; bokföringstaket får inte överstigas. Argument: orgnr, request_id, pay_date (YYYY-MM-DD); valfritt approved, bank_account (likvidkonto 1900-1999 eller skattekontot 1630, default 1930).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"request_id":{"title":"Request Id","type":"integer"},"pay_date":{"title":"Pay Date","type":"string"},"approved":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Approved"},"bank_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Bank Account"}},"required":["orgnr","request_id","pay_date"],"title":"register_rot_rut_payoutArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/supplier-invoices/{invoice_id}/payments":{"post":{"operationId":"register_supplier_payment","tags":["Leverantörsfakturor"],"summary":"Bokför leverantörsbetalning","description":"Bokför en leverantörsbetalning på en faktura. KODEN postar. Kräver scope book; ett satt bokföringstak (0 = ingen gräns) får inte överstigas. Argument: orgnr, invoice_id, pay_date (YYYY-MM-DD), amount_ore; valfritt bank_account (likvidkonto 1900-1999 som krediteras, default 1930), settle (faktura i annan valuta: amount_ore = SEK som faktiskt betalades och settle=true slutreglerar fakturan; skillnaden mot den bokförda skulden bokförs som kursförlust 7960 eller kursvinst 3960).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"register_supplier_payment","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pay_date":{"title":"Pay Date","type":"string"},"amount_ore":{"title":"Amount Ore","type":"integer"},"bank_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Bank Account"},"settle":{"default":false,"title":"Settle","type":"boolean"}},"required":["pay_date","amount_ore"],"title":"register_supplier_paymentArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/register_supplier_payment":{"post":{"operationId":"tool_register_supplier_payment","tags":["Verktyg (som MCP)"],"summary":"Bokför leverantörsbetalning","description":"Bokför en leverantörsbetalning på en faktura. KODEN postar. Kräver scope book; ett satt bokföringstak (0 = ingen gräns) får inte överstigas. Argument: orgnr, invoice_id, pay_date (YYYY-MM-DD), amount_ore; valfritt bank_account (likvidkonto 1900-1999 som krediteras, default 1930), settle (faktura i annan valuta: amount_ore = SEK som faktiskt betalades och settle=true slutreglerar fakturan; skillnaden mot den bokförda skulden bokförs som kursförlust 7960 eller kursvinst 3960).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"title":"Invoice Id","type":"integer"},"pay_date":{"title":"Pay Date","type":"string"},"amount_ore":{"title":"Amount Ore","type":"integer"},"bank_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Bank Account"},"settle":{"default":false,"title":"Settle","type":"boolean"}},"required":["orgnr","invoice_id","pay_date","amount_ore"],"title":"register_supplier_paymentArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/voucher-drafts/{draft_id}/reject":{"post":{"operationId":"reject_voucher_draft","tags":["Bokföring och huvudbok"],"summary":"Avvisa verifikatförslag","description":"Avvisa (ta bort) ett väntande verifikatförslag (draft). Ev. bilagor går tillbaka till underlagspoolen. Gör bara detta när användaren instruerat dig att avvisa. Kräver behörigheten 'reconcile'. Argument: orgnr, draft_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"reject_voucher_draft","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"reject_voucher_draftArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"draft_id","in":"path","required":true,"schema":{"title":"Draft Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/reject_voucher_draft":{"post":{"operationId":"tool_reject_voucher_draft","tags":["Verktyg (som MCP)"],"summary":"Avvisa verifikatförslag","description":"Avvisa (ta bort) ett väntande verifikatförslag (draft). Ev. bilagor går tillbaka till underlagspoolen. Gör bara detta när användaren instruerat dig att avvisa. Kräver behörigheten 'reconcile'. Argument: orgnr, draft_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"draft_id":{"title":"Draft Id","type":"integer"}},"required":["orgnr","draft_id"],"title":"reject_voucher_draftArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/fiscal-years/{year}":{"delete":{"operationId":"remove_fiscal_year","tags":["Bokslut och räkenskapsår"],"summary":"Ta bort tomt räkenskapsår","description":"Ta bort ett tomt räkenskapsår som lagts till av misstag. Bara ett upplagt år utan verifikat, och bara det första eller sista året (aldrig en lucka) och inte innevarande år; samma regler som Ta bort under Räkenskapsår i appen (removable i list_fiscal_years). Ett år med verifikat tas aldrig bort, rätta i stället med motverifikat. Returnerar räkenskapsåren efter borttagningen. Scope book. Argument: orgnr, year (slutåret).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"remove_fiscal_year","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/remove_fiscal_year":{"post":{"operationId":"tool_remove_fiscal_year","tags":["Verktyg (som MCP)"],"summary":"Ta bort tomt räkenskapsår","description":"Ta bort ett tomt räkenskapsår som lagts till av misstag. Bara ett upplagt år utan verifikat, och bara det första eller sista året (aldrig en lucka) och inte innevarande år; samma regler som Ta bort under Räkenskapsår i appen (removable i list_fiscal_years). Ett år med verifikat tas aldrig bort, rätta i stället med motverifikat. Returnerar räkenskapsåren efter borttagningen. Scope book. Argument: orgnr, year (slutåret).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"}},"required":["orgnr","year"],"title":"remove_fiscal_yearArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/integration-records/resolve":{"post":{"operationId":"resolve_integration_records","tags":["Kopplingar (Shopify, Stripe m.fl.)"],"summary":"Markera kopplingsdata som hanterad","description":"Markerar poster från en koppling som hanterade (bokförda), ignorerade (ska inte bokföras, t.ex. dubbletter) eller som nya igen (ångra). Använd efter att du bokfört posterna med de vanliga verktygen, och ange då verifikatens id så att posten pekar på bokföringen; för att läsa posterna, använd list_integration_data. Bokför ingenting själv. Returnerar posterna med ny status. Bieffekt: posterna flyttas från ohanterade och flaggas inte längre. Kräver behörigheten book.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"resolve_integration_records","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"record_ids":{"description":"Postens eller posternas id, t.ex. [42, 43]. Högst 500 per anrop.","items":{"type":"integer"},"title":"Record Ids","type":"array"},"status":{"description":"handled (bokförd eller hanterad), ignored (ska inte bokföras) eller new (ångra).","title":"Status","type":"string"},"voucher_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"default":null,"description":"Valfritt: id för verifikaten som bokför posterna, t.ex. [118]. Kontrolleras mot bolagets huvudbok.","title":"Voucher Ids"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: kort anteckning, t.ex. varför posten ignoreras.","title":"Note"}},"required":["record_ids","status"],"title":"resolve_integration_recordsArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/resolve_integration_records":{"post":{"operationId":"tool_resolve_integration_records","tags":["Verktyg (som MCP)"],"summary":"Markera kopplingsdata som hanterad","description":"Markerar poster från en koppling som hanterade (bokförda), ignorerade (ska inte bokföras, t.ex. dubbletter) eller som nya igen (ångra). Använd efter att du bokfört posterna med de vanliga verktygen, och ange då verifikatens id så att posten pekar på bokföringen; för att läsa posterna, använd list_integration_data. Bokför ingenting själv. Returnerar posterna med ny status. Bieffekt: posterna flyttas från ohanterade och flaggas inte längre. Kräver behörigheten book.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"record_ids":{"description":"Postens eller posternas id, t.ex. [42, 43]. Högst 500 per anrop.","items":{"type":"integer"},"title":"Record Ids","type":"array"},"status":{"description":"handled (bokförd eller hanterad), ignored (ska inte bokföras) eller new (ångra).","title":"Status","type":"string"},"voucher_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"default":null,"description":"Valfritt: id för verifikaten som bokför posterna, t.ex. [118]. Kontrolleras mot bolagets huvudbok.","title":"Voucher Ids"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: kort anteckning, t.ex. varför posten ignoreras.","title":"Note"}},"required":["orgnr","record_ids","status"],"title":"resolve_integration_recordsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/customer-invoices/{invoice_id}/payments/reverse":{"post":{"operationId":"reverse_customer_payment","tags":["Kundfakturor"],"summary":"Backa kundinbetalning","description":"Backa den senaste registrerade inbetalningen på en kundfaktura (postar ett omvänt verifikat, K likvidkonto / D 1510, så fakturan blir obetald igen). KODEN postar. Scope book. Argument: orgnr, invoice_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"reverse_customer_payment","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"reverse_customer_paymentArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/reverse_customer_payment":{"post":{"operationId":"tool_reverse_customer_payment","tags":["Verktyg (som MCP)"],"summary":"Backa kundinbetalning","description":"Backa den senaste registrerade inbetalningen på en kundfaktura (postar ett omvänt verifikat, K likvidkonto / D 1510, så fakturan blir obetald igen). KODEN postar. Scope book. Argument: orgnr, invoice_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"title":"Invoice Id","type":"integer"}},"required":["orgnr","invoice_id"],"title":"reverse_customer_paymentArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/payroll-runs/{run_id}/reverse":{"post":{"operationId":"reverse_payroll_run","tags":["Lön"],"summary":"Backa lönekörning","description":"Backa en bokförd lönekörning: omför löneverifikatet (spegelverifikat) och utesluter körningen ur AGI. Historiken bevaras (status → reversed). Kräver scope payroll. Argument: orgnr, run_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"reverse_payroll_run","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"reverse_payroll_runArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"run_id","in":"path","required":true,"schema":{"title":"Run Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/reverse_payroll_run":{"post":{"operationId":"tool_reverse_payroll_run","tags":["Verktyg (som MCP)"],"summary":"Backa lönekörning","description":"Backa en bokförd lönekörning: omför löneverifikatet (spegelverifikat) och utesluter körningen ur AGI. Historiken bevaras (status → reversed). Kräver scope payroll. Argument: orgnr, run_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"run_id":{"title":"Run Id","type":"integer"}},"required":["orgnr","run_id"],"title":"reverse_payroll_runArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/rot-rut/{request_id}/payout/reverse":{"post":{"operationId":"reverse_rot_rut_payout","tags":["ROT och RUT"],"summary":"Backa ROT/RUT-utbetalning","description":"Backa en registrerad ROT/RUT-utbetalning (postar ett omvänt verifikat) så att Skatteverkets beslut kan registreras om. Går inte om kunden redan betalat ett nekat belopp. KODEN postar. Scope book. Argument: orgnr, request_id.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"reverse_rot_rut_payout","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"reverse_rot_rut_payoutArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"request_id","in":"path","required":true,"schema":{"title":"Request Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/reverse_rot_rut_payout":{"post":{"operationId":"tool_reverse_rot_rut_payout","tags":["Verktyg (som MCP)"],"summary":"Backa ROT/RUT-utbetalning","description":"Backa en registrerad ROT/RUT-utbetalning (postar ett omvänt verifikat) så att Skatteverkets beslut kan registreras om. Går inte om kunden redan betalat ett nekat belopp. KODEN postar. Scope book. Argument: orgnr, request_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"request_id":{"title":"Request Id","type":"integer"}},"required":["orgnr","request_id"],"title":"reverse_rot_rut_payoutArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/supplier-invoices/{invoice_id}/payments/reverse":{"post":{"operationId":"reverse_supplier_payment","tags":["Leverantörsfakturor"],"summary":"Backa leverantörsbetalning","description":"Backar den senast registrerade betalningen på en leverantörsfaktura med ett motverifikat, så att fakturan blir obetald igen. Använd när en betalning har registrerats fel eller inför makulering med cancel_supplier_invoice; för att registrera en betalning, använd register_supplier_payment. Returnerar fakturan med nytt saldo och status. Bieffekt: ett omvänt betalningsverifikat bokförs och originalet ligger kvar. Ger ett fel om fakturan saknar betalning. Kräver behörigheten book.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"reverse_supplier_payment","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"reverse_supplier_paymentArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"description":"Leverantörsfakturans id (heltal), t.ex. 42. Hämta med list_supplier_invoices.","title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/reverse_supplier_payment":{"post":{"operationId":"tool_reverse_supplier_payment","tags":["Verktyg (som MCP)"],"summary":"Backa leverantörsbetalning","description":"Backar den senast registrerade betalningen på en leverantörsfaktura med ett motverifikat, så att fakturan blir obetald igen. Använd när en betalning har registrerats fel eller inför makulering med cancel_supplier_invoice; för att registrera en betalning, använd register_supplier_payment. Returnerar fakturan med nytt saldo och status. Bieffekt: ett omvänt betalningsverifikat bokförs och originalet ligger kvar. Ger ett fel om fakturan saknar betalning. Kräver behörigheten book.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"description":"Leverantörsfakturans id (heltal), t.ex. 42. Hämta med list_supplier_invoices.","title":"Invoice Id","type":"integer"}},"required":["orgnr","invoice_id"],"title":"reverse_supplier_paymentArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/vouchers/{voucher_id}/reverse":{"post":{"operationId":"reverse_voucher","tags":["Bokföring och huvudbok"],"summary":"Omför verifikat","description":"Rätta ett verifikat genom att bokföra ett spegelverifikat (omvända tecken) i en öppen period, originalet lämnas orört (append-only). Använd t.ex. för att rätta en post vars period är låst. Koden bokför och validerar. Kräver scope book. Argument: orgnr, voucher_id; valfritt date (YYYY-MM-DD, default idag).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"reverse_voucher","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Date"}},"title":"reverse_voucherArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"voucher_id","in":"path","required":true,"schema":{"title":"Voucher Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/reverse_voucher":{"post":{"operationId":"tool_reverse_voucher","tags":["Verktyg (som MCP)"],"summary":"Omför verifikat","description":"Rätta ett verifikat genom att bokföra ett spegelverifikat (omvända tecken) i en öppen period, originalet lämnas orört (append-only). Använd t.ex. för att rätta en post vars period är låst. Koden bokför och validerar. Kräver scope book. Argument: orgnr, voucher_id; valfritt date (YYYY-MM-DD, default idag).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"voucher_id":{"title":"Voucher Id","type":"integer"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Date"}},"required":["orgnr","voucher_id"],"title":"reverse_voucherArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/reconciliations/unprepare":{"post":{"operationId":"revert_prepare_bilaga","tags":["Avstämning"],"summary":"Ångra förberedd bilaga","description":"Ångra en FÖRBEREDD-markering på en bilaga (tar bort PREPARER-steget, status → Ej startad). Är bilagan inaktuell (STALE, underlaget har ändrats efter förberedelse eller attest) återställs den helt, även en inaktuell attest. Nekas om bilagan har en giltig attest; den ångras i appen. Kräver 'reconcile'. Argument: orgnr, bilaga_type, account, year, month.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"revert_prepare_bilaga","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"bilaga_type":{"title":"Bilaga Type","type":"string"},"account":{"title":"Account","type":"integer"},"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"}},"required":["bilaga_type","account","year","month"],"title":"revert_prepare_bilagaArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/revert_prepare_bilaga":{"post":{"operationId":"tool_revert_prepare_bilaga","tags":["Verktyg (som MCP)"],"summary":"Ångra förberedd bilaga","description":"Ångra en FÖRBEREDD-markering på en bilaga (tar bort PREPARER-steget, status → Ej startad). Är bilagan inaktuell (STALE, underlaget har ändrats efter förberedelse eller attest) återställs den helt, även en inaktuell attest. Nekas om bilagan har en giltig attest; den ångras i appen. Kräver 'reconcile'. Argument: orgnr, bilaga_type, account, year, month.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"bilaga_type":{"title":"Bilaga Type","type":"string"},"account":{"title":"Account","type":"integer"},"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"}},"required":["orgnr","bilaga_type","account","year","month"],"title":"revert_prepare_bilagaArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/time-entries/review":{"post":{"operationId":"review_time_entries","tags":["Tidrapportering"],"summary":"Avvisa eller återställ tidposter","description":"Skicka tillbaka rapporterade tidposter till den anställde eller återställ avvisade. status = avvisad (en rapporterad post skickas tillbaka; den anställde ser note och kan rätta) eller rapporterad (en avvisad post återställs och väntar på attest igen). Attest görs inte här: tidrapporter attesteras, och en attest ändras, av en människa i Kvickd under Lön, Tidrapporter. Attesterade och utbetalda poster kan inte ändras här. Scope payroll. Argument: orgnr, entry_ids, status; valfritt note.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"review_time_entries","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"entry_ids":{"items":{},"title":"Entry Ids","type":"array"},"status":{"title":"Status","type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"}},"required":["entry_ids","status"],"title":"review_time_entriesArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/review_time_entries":{"post":{"operationId":"tool_review_time_entries","tags":["Verktyg (som MCP)"],"summary":"Avvisa eller återställ tidposter","description":"Skicka tillbaka rapporterade tidposter till den anställde eller återställ avvisade. status = avvisad (en rapporterad post skickas tillbaka; den anställde ser note och kan rätta) eller rapporterad (en avvisad post återställs och väntar på attest igen). Attest görs inte här: tidrapporter attesteras, och en attest ändras, av en människa i Kvickd under Lön, Tidrapporter. Attesterade och utbetalda poster kan inte ändras här. Scope payroll. Argument: orgnr, entry_ids, status; valfritt note.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"entry_ids":{"items":{},"title":"Entry Ids","type":"array"},"status":{"title":"Status","type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"}},"required":["orgnr","entry_ids","status"],"title":"review_time_entriesArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/run_payroll":{"post":{"operationId":"tool_run_payroll","tags":["Verktyg (som MCP)"],"summary":"Kör lön","description":"Bokför en lönekörning (skapar PayrollRun och bokför löneverifikatet, serie L, i huvudboken). Beloppen räknas deterministiskt av koden. Kräver scope payroll. Ett bokföringstak kan valfritt sättas på nyckeln (0/tomt = ingen gräns); körningar vars totalkostnad överstiger ett satt tak avvisas. Argument: orgnr, year, month, pay_date, entries ([{employee_id, gross_cash_ore, benefit_ore?, extra_tax_ore?, components?, time_entry_ids?}]); components = lönearter (semester, övertid, sjuklön, sjukavdrag, förmån, utlägg, traktamente, milersättning, nettoavdrag; kind som i calc_payroll), med category för förmånstypen på FORMAN. time_entry_ids = attesterade tidposter som lönen bygger på (från get_payroll_time_basis); de märks som utbetalda och släpps om körningen backas. Valfritt note, net_pay_account (konto nettolönen krediteras, default 1930; löneskuldkonto om ej betald). Har månaden redan en bokförd lön, eller är körningen en exakt dubblett (samma period/datum och identiska rader), blockeras den; sätt allow_duplicate=true för att medvetet bokföra ytterligare en (t.ex. extra utbetalning). Svaret har warnings som calc_payroll (visa dem för användaren); lönebeskeden sparas som underlag på löneverifikatet. draft=true sparar körningen som utkast i stället: inget bokförs, den räknas inte i arbetsgivardeklarationen, och en människa godkänner den i Kvickd under Lön (då bokförs den med samma belopp). Använd när användaren vill granska lönen innan den bokförs. replace_run_id = ett väntande utkast som ska ersättas (t.ex. när ett utlägg kommit in sent): utkastet får de nya raderna men behåller sitt run_id och sin anteckning (om ingen ny note anges); med draft=true förblir det ett utkast, med draft=false bokförs det direkt. Ett nytt run_payroll utan replace_run_id skapar i stället ett utkast till för perioden. Ett utkast tas bort med delete_payroll_draft. Även ett utkast kräver att de anställda har personnummer (arbetsgivaravgiften beror på åldern); saknas det läggs det in av användaren i Kvickd under Lön > Anställda. Kontona följer bolagets val (get_payroll_accounts) och den anställdas lönekonto.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"month":{"title":"Month","type":"integer"},"pay_date":{"title":"Pay Date","type":"string"},"entries":{"items":{},"title":"Entries","type":"array"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"net_pay_account":{"default":1930,"title":"Net Pay Account","type":"integer"},"allow_duplicate":{"default":false,"title":"Allow Duplicate","type":"boolean"},"draft":{"default":false,"title":"Draft","type":"boolean"},"replace_run_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Replace Run Id"}},"required":["orgnr","year","month","pay_date","entries"],"title":"run_payrollArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/company-registry/search":{"get":{"operationId":"search_company","tags":["Bolag och översikt"],"summary":"Sök bolag i registret","description":"Sök ett svenskt bolag i Bolagsverkets register på namn eller organisationsnummer (10 siffror ger exakt träff). Använd för att fylla i kundens namn, org.nr och adress innan create_customer_invoice (eller leverantörens vid create_supplier_invoice): varje träff har invoice_fields = {customer_name, customer_orgnr, customer_address} som kan skickas rakt in. Scope view. Argument: query; valfritt limit (1-10, default 5).","x-kvickd-read-only":true,"x-kvickd-mcp-tool":"search_company","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"query","in":"query","required":true,"schema":{"title":"Query","type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":5,"title":"Limit","type":"integer"}}]}},"/api/v1/tools/search_company":{"post":{"operationId":"tool_search_company","tags":["Verktyg (som MCP)"],"summary":"Sök bolag i registret","description":"Sök ett svenskt bolag i Bolagsverkets register på namn eller organisationsnummer (10 siffror ger exakt träff). Använd för att fylla i kundens namn, org.nr och adress innan create_customer_invoice (eller leverantörens vid create_supplier_invoice): varje träff har invoice_fields = {customer_name, customer_orgnr, customer_address} som kan skickas rakt in. Scope view. Argument: query; valfritt limit (1-10, default 5).","x-kvickd-read-only":true,"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"query":{"title":"Query","type":"string"},"limit":{"default":5,"title":"Limit","type":"integer"}},"required":["query"],"title":"search_companyArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/customer-invoices/{invoice_id}/send":{"post":{"operationId":"send_customer_invoice","tags":["Kundfakturor"],"summary":"Skicka kundfaktura med e-post","description":"Skickar en BOKFÖRD kundfaktura (eller kreditfaktura) som PDF med e-post till kunden. Avsändare är bolagets namn, och kundens svar går till bolagets e-post. Bekräfta alltid mottagarens adress och att fakturan ska skickas med användaren innan du anropar; ett mejl går inte att ta tillbaka. Adresser som studsat spärras, och det finns ett tak per dag. En faktura skickas bara när bolaget har betalningsuppgifter (bankgiro, plusgiro, bankkonto eller IBAN). Fakturan ändras inte av utskicket; PDF:en som skickades sparas på utskicket. Mottagaren sparas som kundens e-postadress bara med save_customer_email=true (fråga användaren). Scope book. Argument: orgnr, invoice_id, to (e-postadress); valfritt message (text i mejlet), save_customer_email.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"send_customer_invoice","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"to":{"title":"To","type":"string"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Message"},"save_customer_email":{"default":false,"title":"Save Customer Email","type":"boolean"}},"required":["to"],"title":"send_customer_invoiceArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/send_customer_invoice":{"post":{"operationId":"tool_send_customer_invoice","tags":["Verktyg (som MCP)"],"summary":"Skicka kundfaktura med e-post","description":"Skickar en BOKFÖRD kundfaktura (eller kreditfaktura) som PDF med e-post till kunden. Avsändare är bolagets namn, och kundens svar går till bolagets e-post. Bekräfta alltid mottagarens adress och att fakturan ska skickas med användaren innan du anropar; ett mejl går inte att ta tillbaka. Adresser som studsat spärras, och det finns ett tak per dag. En faktura skickas bara när bolaget har betalningsuppgifter (bankgiro, plusgiro, bankkonto eller IBAN). Fakturan ändras inte av utskicket; PDF:en som skickades sparas på utskicket. Mottagaren sparas som kundens e-postadress bara med save_customer_email=true (fråga användaren). Scope book. Argument: orgnr, invoice_id, to (e-postadress); valfritt message (text i mejlet), save_customer_email.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"title":"Invoice Id","type":"integer"},"to":{"title":"To","type":"string"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Message"},"save_customer_email":{"default":false,"title":"Save Customer Email","type":"boolean"}},"required":["orgnr","invoice_id","to"],"title":"send_customer_invoiceArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/customer-invoices/{invoice_id}/reminders":{"post":{"operationId":"send_payment_reminder","tags":["Kundfakturor"],"summary":"Skicka betalningspåminnelse","description":"Skickar en betalningspåminnelse med e-post för en förfallen, obetald kundfaktura: kvarvarande belopp, nytt sista betalningsdatum och PDF. include_fee lägger till påminnelseavgiften (bara om den stod på fakturan, högst 60 kr), include_interest dröjsmålsränta enligt fakturans villkor eller räntelagen. Högst en påminnelse per faktura och dag. Bekräfta mottagaren och avgift/ränta med användaren först. Svaret har reminder: mottagare, avgift, ränta, belopp att betala och nytt sista datum, och en note om fakturan aldrig skickats från Kvickd. Mottagaren sparas som kundens e-postadress bara med save_customer_email=true. Scope book. Argument: orgnr, invoice_id, to; valfritt include_fee, include_interest, message, save_customer_email.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"send_payment_reminder","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"to":{"title":"To","type":"string"},"include_fee":{"default":false,"title":"Include Fee","type":"boolean"},"include_interest":{"default":false,"title":"Include Interest","type":"boolean"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Message"},"save_customer_email":{"default":false,"title":"Save Customer Email","type":"boolean"}},"required":["to"],"title":"send_payment_reminderArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"invoice_id","in":"path","required":true,"schema":{"title":"Invoice Id","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/send_payment_reminder":{"post":{"operationId":"tool_send_payment_reminder","tags":["Verktyg (som MCP)"],"summary":"Skicka betalningspåminnelse","description":"Skickar en betalningspåminnelse med e-post för en förfallen, obetald kundfaktura: kvarvarande belopp, nytt sista betalningsdatum och PDF. include_fee lägger till påminnelseavgiften (bara om den stod på fakturan, högst 60 kr), include_interest dröjsmålsränta enligt fakturans villkor eller räntelagen. Högst en påminnelse per faktura och dag. Bekräfta mottagaren och avgift/ränta med användaren först. Svaret har reminder: mottagare, avgift, ränta, belopp att betala och nytt sista datum, och en note om fakturan aldrig skickats från Kvickd. Mottagaren sparas som kundens e-postadress bara med save_customer_email=true. Scope book. Argument: orgnr, invoice_id, to; valfritt include_fee, include_interest, message, save_customer_email.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"title":"Invoice Id","type":"integer"},"to":{"title":"To","type":"string"},"include_fee":{"default":false,"title":"Include Fee","type":"boolean"},"include_interest":{"default":false,"title":"Include Interest","type":"boolean"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Message"},"save_customer_email":{"default":false,"title":"Save Customer Email","type":"boolean"}},"required":["orgnr","invoice_id","to"],"title":"send_payment_reminderArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/set_arsbokslut_inputs":{"post":{"operationId":"tool_set_arsbokslut_inputs","tags":["Verktyg (som MCP)"],"summary":"Spara uppgifter till årsbokslutet","description":"Sparar uppgifter till årsbokslutet och returnerar det på nytt. regime: k1 eller k2 (k1 bara för enskild firma och ideell förening; för enskild firma är det samma val som NE-bilagans förenklade årsbokslut). account_overrides: {konto: post} när ett konto ska redovisas i en annan post (postnycklarna står i post_choices), null återställer. notes: principer (tillägg till texten om redovisningsprinciper), anlaggningar [{post, anskaffningsvarde (kr), nyttjandeperiod}], sakerheter [{slag, belopp}], eventualforpliktelser, ovrigt, obeskattade_reserver (K1 enskild firma). För ekonomisk förening även verksamhet, vasentliga_handelser, efter_balansdagen, forlagsinsatser, nyttjandeperioder (text), medelantal (antal), aterbetalning (kr), medlemmar {start, nya, avgaende}, disposition {utdelning, reservfond, aterbaring} (kr) och revisor {name, firm, date}. signers: [{name, role, date}] ersätter listan. decided_on (ÅÅÅÅ-MM-DD) och place: datering. Hitta aldrig på namn på undertecknare. Scope statutory. Argument: orgnr, year och de delar som ändras.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"regime":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Regime"},"account_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Account Overrides"},"notes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Notes"},"signers":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"default":null,"title":"Signers"},"decided_on":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Decided On"},"place":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Place"}},"required":["orgnr","year"],"title":"set_arsbokslut_inputsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/annual-report/{year}/inputs":{"put":{"operationId":"set_arsredovisning_inputs","tags":["Skatt, INK2 och årsredovisning"],"summary":"Spara årsredovisnings-inputs","description":"Skriv en delmängd av årsredovisningens user_inputs till utkastet (assistenten föreslår, användaren godkänner, sedan skriv) och få tillbaka det uppdaterade status-svaret (samma form som get_arsredovisning_status). Fältnamnen är exakt de i buildUserInputs/ixbrl_inputs (t.ex. sate, verksamhet, inkludera_utdelning); ett okänt fältnamn avvisas med förslag på giltiga fält. Belopp i HELA KRONOR. Personnummer tas inte emot (fastställelseintygets signerare anges av användaren i Kvickd under Årsredovisning > Underskrift). Scope statutory. Argument: orgnr, year, inputs (dict med delmängd av fälten).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"set_arsredovisning_inputs","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"inputs":{"additionalProperties":true,"title":"Inputs","type":"object"}},"required":["inputs"],"title":"set_arsredovisning_inputsArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/set_arsredovisning_inputs":{"post":{"operationId":"tool_set_arsredovisning_inputs","tags":["Verktyg (som MCP)"],"summary":"Spara årsredovisnings-inputs","description":"Skriv en delmängd av årsredovisningens user_inputs till utkastet (assistenten föreslår, användaren godkänner, sedan skriv) och få tillbaka det uppdaterade status-svaret (samma form som get_arsredovisning_status). Fältnamnen är exakt de i buildUserInputs/ixbrl_inputs (t.ex. sate, verksamhet, inkludera_utdelning); ett okänt fältnamn avvisas med förslag på giltiga fält. Belopp i HELA KRONOR. Personnummer tas inte emot (fastställelseintygets signerare anges av användaren i Kvickd under Årsredovisning > Underskrift). Scope statutory. Argument: orgnr, year, inputs (dict med delmängd av fälten).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"inputs":{"additionalProperties":true,"title":"Inputs","type":"object"}},"required":["orgnr","year","inputs"],"title":"set_arsredovisning_inputsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/reconciliations/spec":{"put":{"operationId":"set_bilaga_spec","tags":["Avstämning"],"summary":"Ersätt alla avstämningsrader","description":"Ersätter alla manuella specifikationsrader på en avstämning (bilaga), som radeditorn i appen. Använd när hela specifikationen ska sättas eller nollställas (skicka [] för att tömma); för att lägga till en enstaka rad och behålla resten, använd add_bilaga_row. Summan av raderna blir det avstämda beloppet; för att nolla differensen ska den matcha kontots slutsaldo (gl_balance_ore i get_reconciliation). Returnerar bilagan med rader, avstämt belopp och differens. Bieffekt: tidigare rader skrivs över; attesten ändras inte. Kräver behörigheten reconcile.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"set_bilaga_spec","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"bilaga_type":{"description":"Avstämningens typ som den visas i get_open_reconciliations, t.ex. BANK eller GL_ACCOUNT.","title":"Bilaga Type","type":"string"},"account":{"description":"Kontonummer i BAS-kontoplanen, t.ex. 1930.","title":"Account","type":"integer"},"year":{"description":"Kalenderår för avstämningsmånaden, t.ex. 2026.","title":"Year","type":"integer"},"month":{"description":"Avstämningsmånad 1 till 12, t.ex. 3 för mars.","title":"Month","type":"integer"},"rows":{"description":"Alla rader som ska gälla: [{description, amount_ore}], belopp i öre. Skicka [] för att tömma.","items":{},"title":"Rows","type":"array"}},"required":["bilaga_type","account","year","month","rows"],"title":"set_bilaga_specArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/set_bilaga_spec":{"post":{"operationId":"tool_set_bilaga_spec","tags":["Verktyg (som MCP)"],"summary":"Ersätt alla avstämningsrader","description":"Ersätter alla manuella specifikationsrader på en avstämning (bilaga), som radeditorn i appen. Använd när hela specifikationen ska sättas eller nollställas (skicka [] för att tömma); för att lägga till en enstaka rad och behålla resten, använd add_bilaga_row. Summan av raderna blir det avstämda beloppet; för att nolla differensen ska den matcha kontots slutsaldo (gl_balance_ore i get_reconciliation). Returnerar bilagan med rader, avstämt belopp och differens. Bieffekt: tidigare rader skrivs över; attesten ändras inte. Kräver behörigheten reconcile.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"bilaga_type":{"description":"Avstämningens typ som den visas i get_open_reconciliations, t.ex. BANK eller GL_ACCOUNT.","title":"Bilaga Type","type":"string"},"account":{"description":"Kontonummer i BAS-kontoplanen, t.ex. 1930.","title":"Account","type":"integer"},"year":{"description":"Kalenderår för avstämningsmånaden, t.ex. 2026.","title":"Year","type":"integer"},"month":{"description":"Avstämningsmånad 1 till 12, t.ex. 3 för mars.","title":"Month","type":"integer"},"rows":{"description":"Alla rader som ska gälla: [{description, amount_ore}], belopp i öre. Skicka [] för att tömma.","items":{},"title":"Rows","type":"array"}},"required":["orgnr","bilaga_type","account","year","month","rows"],"title":"set_bilaga_specArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/set_ink4_inputs":{"post":{"operationId":"tool_set_ink4_inputs","tags":["Verktyg (som MCP)"],"summary":"Spara uppgifter till INK4","description":"Sparar uppgifter till INK4 och returnerar blanketten på nytt. flags: uppdragstagare, revision (true/false), ovriga_upplysningar. adjustments: belopp i hela kronor per rad i INK4S som fylls i (4.3a-4.11b, 4.14-4.16), null tar bort. partners: {plats: {employer_fee_deduction}}. address: postnr, postort. Scope statutory. Argument: orgnr, year och de delar som ändras.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Flags"},"adjustments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Adjustments"},"partners":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Partners"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Address"}},"required":["orgnr","year"],"title":"set_ink4_inputsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/set_ne_bilaga_inputs":{"post":{"operationId":"tool_set_ne_bilaga_inputs","tags":["Verktyg (som MCP)"],"summary":"Spara uppgifter till NE-bilagan","description":"Sparar uppgifter till NE-bilagan (enskild firma) och returnerar blanketten på nytt. flags: verksamhetens_art (text), passiv, utanfor_ees, ej_forenklat, uppdragstagare (true/false). adjustments: belopp i hela kronor per ruta som fylls i (R13-R16, R18-R20, R22-R28, R30-R32, R34, R36-R41, R43-R46; nyckel 'R20+' och 'R20-' för medhjälpande make), null tar bort ett värde så att förslaget gäller. other: övriga uppgifter O1-O11. account_overrides: {konto: ruta} när ett konto ska redovisas i en annan ruta, null återställer. address: postnr, postort. flags.ej_forenklat=false betyder förenklat årsbokslut, null tar bort valet så att förvalet följer omsättningen (förenklat årsbokslut vid högst 3 miljoner kronor). nea: {enabled, andel (procent), R13-R16, R18-, R18+, R19-R21} när verksamheten redovisas separat på NEA. n7: {enabled, datum, arv, overlatare (bara organisationsnummer; ett personnummer skrivs in i appen), 1a-1g, 2, 3, 4} för övertagna fonder. Gissa aldrig belopp som användaren ska lämna, till exempel påförda egenavgifter (R41). Scope statutory. Argument: orgnr, year och de delar som ändras.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Flags"},"adjustments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Adjustments"},"other":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Other"},"account_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Account Overrides"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Address"},"nea":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Nea"},"n7":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"N7"}},"required":["orgnr","year"],"title":"set_ne_bilaga_inputsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/partners":{"put":{"operationId":"set_partners","tags":["Skatt, INK2 och årsredovisning"],"summary":"Ersätt delägarna","description":"Ersätter handelsbolagets eller kommanditbolagets delägare: lista med name, share_pct (andel i procent, tillsammans 100), kind (person eller company), orgnr (bara för en juridisk person; personnummer tas aldrig emot), limited (true för kommanditdelägare, bara i kommanditbolag) och insats_ore (kommanditdelägarens insats). Två till fyra delägare (BAS). slot (1-4) är delägarens konton: skicka med befintliga delägares slot så att ingen byter konton; nya delägare får en ledig plats. Andelarna fördelar årets resultat på delägarnas konton (2019, 2029 osv.). Låsta räkenskapsår behåller delägarna som de var när året låstes. Bekräfta med användaren först. Scope statutory. Argument: orgnr, partners.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"set_partners","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"partners":{"items":{"additionalProperties":true,"type":"object"},"title":"Partners","type":"array"}},"required":["partners"],"title":"set_partnersArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/set_partners":{"post":{"operationId":"tool_set_partners","tags":["Verktyg (som MCP)"],"summary":"Ersätt delägarna","description":"Ersätter handelsbolagets eller kommanditbolagets delägare: lista med name, share_pct (andel i procent, tillsammans 100), kind (person eller company), orgnr (bara för en juridisk person; personnummer tas aldrig emot), limited (true för kommanditdelägare, bara i kommanditbolag) och insats_ore (kommanditdelägarens insats). Två till fyra delägare (BAS). slot (1-4) är delägarens konton: skicka med befintliga delägares slot så att ingen byter konton; nya delägare får en ledig plats. Andelarna fördelar årets resultat på delägarnas konton (2019, 2029 osv.). Låsta räkenskapsår behåller delägarna som de var när året låstes. Bekräfta med användaren först. Scope statutory. Argument: orgnr, partners.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"partners":{"items":{"additionalProperties":true,"type":"object"},"title":"Partners","type":"array"}},"required":["orgnr","partners"],"title":"set_partnersArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/set_payroll_accounts":{"post":{"operationId":"tool_set_payroll_accounts","tags":["Verktyg (som MCP)"],"summary":"Välj lönekonton","description":"Väljer egna konton för lönekörningen, t.ex. {\"utlagg\": 2820} för utlägg mot Kortfristiga skulder till anställda, eller {\"salary\": 7210}. Nycklar: salary, employer_fee_expense, employer_fee_liability, withheld_tax, utlagg, net_deduction, traktamente, milersattning, traktamente_taxable, milersattning_taxable (det som överstiger schablonen, standard 7322 och 7332); null ger standardkontot igen. Gäller körningar som bokförs härefter, redan bokförda verifikat ändras inte. Ett konto som inte finns i kontoplanen läggs upp med BAS-namnet vid första lönekörningen. Returnerar kontona som get_payroll_accounts. Kräver behörigheten payroll.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"accounts":{"additionalProperties":true,"title":"Accounts","type":"object"}},"required":["orgnr","accounts"],"title":"set_payroll_accountsArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/tax-account-statements":{"post":{"operationId":"set_tax_account_statement","tags":["Avstämning"],"summary":"Registrera skattekontots saldo","description":"Registrerar saldot på bolagets skattekonto enligt Skatteverkets kontoutdrag per ett datum, så att avstämningen av skattekontot (bilagan TAX_ACCOUNT, konto 1630) kan stämmas av mot huvudboken. Använd när användaren har ett kontoutdrag från Skatteverket: ta saldot ur utdraget eller fråga användaren, gissa aldrig. Saldot gäller avstämningar per månadsslut från och med datumet tills ett senare saldo registreras; ett nytt saldo för samma datum ersätter det tidigare. Returnerar skattekontoavstämningen för datumets månad med huvudbokens saldo, kontoutdragets saldo och differens i öre. Bieffekt: saldot sparas; attesten ändras inte, den görs av en människa i appen. Kräver behörigheten reconcile.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"set_tax_account_statement","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"statement_date":{"description":"Kontoutdragets datum (YYYY-MM-DD), normalt månadens sista dag, t.ex. 2026-05-31.","title":"Statement Date","type":"string"},"balance_ore":{"description":"Saldot enligt kontoutdraget i öre (heltal), t.ex. 269400 för 2 694 kr. Positivt när bolaget har pengar till godo, negativt när bolaget är skyldigt (samma tecken som konto 1630 i huvudboken).","title":"Balance Ore","type":"integer"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfri anteckning, t.ex. Kontoutdrag från Skatteverket hämtat 2026-06-03.","title":"Note"}},"required":["statement_date","balance_ore"],"title":"set_tax_account_statementArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/set_tax_account_statement":{"post":{"operationId":"tool_set_tax_account_statement","tags":["Verktyg (som MCP)"],"summary":"Registrera skattekontots saldo","description":"Registrerar saldot på bolagets skattekonto enligt Skatteverkets kontoutdrag per ett datum, så att avstämningen av skattekontot (bilagan TAX_ACCOUNT, konto 1630) kan stämmas av mot huvudboken. Använd när användaren har ett kontoutdrag från Skatteverket: ta saldot ur utdraget eller fråga användaren, gissa aldrig. Saldot gäller avstämningar per månadsslut från och med datumet tills ett senare saldo registreras; ett nytt saldo för samma datum ersätter det tidigare. Returnerar skattekontoavstämningen för datumets månad med huvudbokens saldo, kontoutdragets saldo och differens i öre. Bieffekt: saldot sparas; attesten ändras inte, den görs av en människa i appen. Kräver behörigheten reconcile.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"statement_date":{"description":"Kontoutdragets datum (YYYY-MM-DD), normalt månadens sista dag, t.ex. 2026-05-31.","title":"Statement Date","type":"string"},"balance_ore":{"description":"Saldot enligt kontoutdraget i öre (heltal), t.ex. 269400 för 2 694 kr. Positivt när bolaget har pengar till godo, negativt när bolaget är skyldigt (samma tecken som konto 1630 i huvudboken).","title":"Balance Ore","type":"integer"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfri anteckning, t.ex. Kontoutdrag från Skatteverket hämtat 2026-06-03.","title":"Note"}},"required":["orgnr","statement_date","balance_ore"],"title":"set_tax_account_statementArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/year-end/{year}/steps/{step}/skip":{"post":{"operationId":"skip_year_end_step","tags":["Bokslut och räkenskapsår"],"summary":"Kvittera årsavslutssteg","description":"Kvittera ett årsavslutssteg som ej aktuellt (hoppa över, utan verifikat) — t.ex. inga periodiseringar eller belopp 0. Kvitteras aktuell_skatt låses skatteberäkningen för året, som när den bokförs; den låses upp under Skatt och deklaration. Året måste finnas bland bolagets räkenskapsår. Kräver scope book. Argument: orgnr, year (slutåret), step (periodiseringar|dispositioner|aktuell_skatt|arets_resultat).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"skip_year_end_step","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"skip_year_end_stepArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"step","in":"path","required":true,"schema":{"title":"Step","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/skip_year_end_step":{"post":{"operationId":"tool_skip_year_end_step","tags":["Verktyg (som MCP)"],"summary":"Kvittera årsavslutssteg","description":"Kvittera ett årsavslutssteg som ej aktuellt (hoppa över, utan verifikat) — t.ex. inga periodiseringar eller belopp 0. Kvitteras aktuell_skatt låses skatteberäkningen för året, som när den bokförs; den låses upp under Skatt och deklaration. Året måste finnas bland bolagets räkenskapsår. Kräver scope book. Argument: orgnr, year (slutåret), step (periodiseringar|dispositioner|aktuell_skatt|arets_resultat).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"step":{"title":"Step","type":"string"}},"required":["orgnr","year","step"],"title":"skip_year_end_stepArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/fiscal-years/{year}/transfer-result":{"post":{"operationId":"transfer_prior_year_result","tags":["Bokslut och räkenskapsår"],"summary":"För om föregående års resultat","description":"För om föregående års resultat till eget kapital på räkenskapsårets första dag (aktiebolag: Årets resultat 2099 till Balanserat resultat 2091; övriga bolagsformer enligt sina konton, se add_fiscal_year). Görs annars automatiskt när föregående år låses; använd när det inte skett (t.ex. äldre år). Kräver att föregående års resultat är bokfört. Bokför bara det som återstår (transfer=null om inget återstår). Scope book. Argument: orgnr, year (det NYA året).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"transfer_prior_year_result","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"transfer_prior_year_resultArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/transfer_prior_year_result":{"post":{"operationId":"tool_transfer_prior_year_result","tags":["Verktyg (som MCP)"],"summary":"För om föregående års resultat","description":"För om föregående års resultat till eget kapital på räkenskapsårets första dag (aktiebolag: Årets resultat 2099 till Balanserat resultat 2091; övriga bolagsformer enligt sina konton, se add_fiscal_year). Görs annars automatiskt när föregående år låses; använd när det inte skett (t.ex. äldre år). Kräver att föregående års resultat är bokfört. Bokför bara det som återstår (transfer=null om inget återstår). Scope book. Argument: orgnr, year (det NYA året).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"}},"required":["orgnr","year"],"title":"transfer_prior_year_resultArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/year-end/{year}/steps/{step}/undo":{"post":{"operationId":"undo_year_end_step","tags":["Bokslut och räkenskapsår"],"summary":"Ångra årsavslutssteg","description":"Ångra ett årsavslutssteg. Ett BOKFÖRT steg backas med en VÄNDANDE bokning (spegelverifikat i samma serie — originalet rörs aldrig) och steget återöppnas; ett KVITTERAT steg återställs till pending. Kräver scope book. Argument: orgnr, year, step (periodiseringar|dispositioner|aktuell_skatt|arets_resultat).","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"undo_year_end_step","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"undo_year_end_stepArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"title":"Year","type":"integer"}},{"name":"step","in":"path","required":true,"schema":{"title":"Step","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/undo_year_end_step":{"post":{"operationId":"tool_undo_year_end_step","tags":["Verktyg (som MCP)"],"summary":"Ångra årsavslutssteg","description":"Ångra ett årsavslutssteg. Ett BOKFÖRT steg backas med en VÄNDANDE bokning (spegelverifikat i samma serie — originalet rörs aldrig) och steget återöppnas; ett KVITTERAT steg återställs till pending. Kräver scope book. Argument: orgnr, year, step (periodiseringar|dispositioner|aktuell_skatt|arets_resultat).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"title":"Year","type":"integer"},"step":{"title":"Step","type":"string"}},"required":["orgnr","year","step"],"title":"undo_year_end_stepArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/fiscal-years/{year}/unlock":{"post":{"operationId":"unlock_fiscal_year","tags":["Bokslut och räkenskapsår"],"summary":"Lås upp räkenskapsår","description":"Låser upp ett räkenskapsår igen, alla dess månader, så att rättelser kan bokföras. Använd bara när användaren uttryckligen vill rätta i ett låst år; en rättelse kan ofta göras utan upplåsning med ett motverifikat i en öppen period (reverse_voucher), och för att låsa igen, använd lock_fiscal_year. Returnerar årets låsstatus. Bieffekt: årets perioder öppnas för bokföring. Kräver behörigheten book.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"unlock_fiscal_year","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{},"title":"unlock_fiscal_yearArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"year","in":"path","required":true,"schema":{"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025).","title":"Year","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/unlock_fiscal_year":{"post":{"operationId":"tool_unlock_fiscal_year","tags":["Verktyg (som MCP)"],"summary":"Lås upp räkenskapsår","description":"Låser upp ett räkenskapsår igen, alla dess månader, så att rättelser kan bokföras. Använd bara när användaren uttryckligen vill rätta i ett låst år; en rättelse kan ofta göras utan upplåsning med ett motverifikat i en öppen period (reverse_voucher), och för att låsa igen, använd lock_fiscal_year. Returnerar årets låsstatus. Bieffekt: årets perioder öppnas för bokföring. Kräver behörigheten book.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"year":{"description":"Räkenskapsåret, angivet som året då räkenskapsåret slutar, t.ex. 2025 (för 2024-07-01 till 2025-06-30 anges 2025).","title":"Year","type":"integer"}},"required":["orgnr","year"],"title":"unlock_fiscal_yearArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/update_company":{"post":{"operationId":"tool_update_company","tags":["Verktyg (som MCP)"],"summary":"Ändra bolag","description":"Ändra ett bolags inställningar (namn, ort, räkenskapsår, momsperiod). Scope book. Argument: orgnr (eller company_id från list_companies); valfritt name, city, fiscal_year, fiscal_year_end_month (slutmånad 1-12), vat_period, first_fy_start/first_fy_end (ISO-datum, avvikande första räkenskapsår för nystartat bolag, högst 18 månader) och clear_first_fy=true för att ta bort det. Ändrat räkenskapsår räknar om verifikatens år; nekas om bolaget har låsta perioder.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Company Id"},"orgnr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Bolagets organisationsnummer (i stället för company_id), t.ex. 559900-1004.","title":"Orgnr"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"City"},"fiscal_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Fiscal Year"},"fiscal_year_end_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Fiscal Year End Month"},"vat_period":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Vat Period"},"first_fy_start":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"First Fy Start"},"first_fy_end":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"First Fy End"},"clear_first_fy":{"default":false,"title":"Clear First Fy","type":"boolean"}},"title":"update_companyArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/update_customer_invoice":{"post":{"operationId":"tool_update_customer_invoice","tags":["Verktyg (som MCP)"],"summary":"Ändra kundfaktura","description":"Ändra en EJ bokförd kundfaktura (utkast). Bara medskickade fält ändras. Med lines ersätts raderna och total/moms räknas om (per momssats, se create_customer_invoice; skickade total_ore/vat_ore kontrolleras). Scope reconcile. Argument: orgnr, invoice_id; valfritt customer_name, invoice_number, ocr, invoice_date, due_date, total_ore, vat_ore, currency, income_account, rounding_ore, lines, customer_orgnr, customer_address, customer_email, customer_reference, payment_terms, service_description, seller_address, seller_bank, seller_iban, seller_bic, seller_bankgiro, seller_contact, customer_vat_number, customer_country, vat_mode (normal, eu_tjanster, eu_varor; se create_customer_invoice), husarbete (ROT/RUT, samma form som i create_customer_invoice; {type: \"\"} tar bort husarbetet). Köpare som redan finns på fakturan behåller sitt personnummer: utelämna buyers för att behålla dem (avdraget räknas då om), eller hänvisa till en köpare med namn eller det maskerade personnumret ur svaret (t.ex. 19850312-XXXX). Fullständiga personnummer tas inte emot; de läggs in i Kvickd under Kundfakturor (Redigera fakturan). Ändras raderna utan att husarbete skickas med behålls beloppen om de ryms, annars sänks avdraget till högsta möjliga.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"title":"Invoice Id","type":"integer"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Name"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Invoice Number"},"ocr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Ocr"},"invoice_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Invoice Date"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Due Date"},"total_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Ore"},"vat_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Vat Ore"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Currency"},"income_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Income Account"},"rounding_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Rounding Ore"},"lines":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Lines"},"customer_orgnr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Orgnr"},"customer_address":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Address"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Email"},"customer_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Reference"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Payment Terms"},"service_description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Service Description"},"seller_address":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Address"},"seller_bank":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Bank"},"seller_iban":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Iban"},"seller_bic":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Bic"},"seller_bankgiro":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Bankgiro"},"seller_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Seller Contact"},"husarbete":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Husarbete"},"customer_vat_number":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Vat Number"},"customer_country":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Customer Country"},"vat_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Vat Mode"}},"required":["orgnr","invoice_id"],"title":"update_customer_invoiceArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/update_fixed_asset":{"post":{"operationId":"tool_update_fixed_asset","tags":["Verktyg (som MCP)"],"summary":"Ändra anläggningstillgång","description":"Ändra en anläggningstillgång. Kräver behörigheten 'book'. Argument: orgnr, asset_id; valfritt name, acquired (YYYY-MM-DD), cost_ore, useful_life_months, residual_ore, gl_account (1000-1299), accum_depr_account (samma grupp, slutar på 9), depr_expense_account (7800-7899), asset_type, notes, depreciation_start (YYYY-MM-DD), opening_accumulated_ore, document_id.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"asset_id":{"title":"Asset Id","type":"integer"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Name"},"acquired":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Acquired"},"cost_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Cost Ore"},"useful_life_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Useful Life Months"},"residual_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Residual Ore"},"gl_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Gl Account"},"accum_depr_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Accum Depr Account"},"depr_expense_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Depr Expense Account"},"asset_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Asset Type"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Notes"},"depreciation_start":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Depreciation Start"},"opening_accumulated_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Opening Accumulated Ore"},"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Document Id"}},"required":["orgnr","asset_id"],"title":"update_fixed_assetArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/update_instruction":{"post":{"operationId":"tool_update_instruction","tags":["Verktyg (som MCP)"],"summary":"Ändra instruktion","description":"Ändrar en sparad instruktion: ny text och/eller vilka bolag den gäller. Använd när användaren ber dig ändra eller rätta en regel. Den gamla texten skrivs över. Argument: instruction_id (från list_instructions); valfritt text, orgnr för att låta den gälla ett bolag och all_companies=true för att låta den gälla alla bolag. Returnerar instruktionen som den ser ut efter ändringen. Kräver behörigheten manage_documents i bolaget; instruktioner för alla bolag ändras bara av kontots administratör.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"instruction_id":{"description":"Instruktionens id från list_instructions.","title":"Instruction Id","type":"integer"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: ny text, högst 2000 tecken. Utelämna för att behålla texten.","title":"Text"},"orgnr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: låt instruktionen gälla bara det här bolaget, t.ex. 559900-1004.","title":"Orgnr"},"all_companies":{"default":false,"description":"true för att låta instruktionen gälla alla bolag i kontot.","title":"All Companies","type":"boolean"}},"required":["instruction_id"],"title":"update_instructionArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/update_supplier_invoice":{"post":{"operationId":"tool_update_supplier_invoice","tags":["Verktyg (som MCP)"],"summary":"Ändra leverantörsfaktura","description":"Ändra en ännu ej bokförd leverantörsfaktura (bara medskickade fält ändras). Med lines ([{account, net_ore, vat_rate, description?}]) ersätts raderna och total/moms räknas om (skickade total_ore/vat_ore som i create_supplier_invoice); document_id kopplar/ändrar fakturans underlag (PDF) i efterhand. Scope reconcile. Argument: orgnr, invoice_id; valfritt supplier_name, invoice_number, ocr, invoice_date, due_date, total_ore, vat_ore, currency, expense_account, document_id, lines, rounding_ore, fx_rate, total_sek_ore (annan valuta: belopp i fakturans valuta, kurs eller SEK-belopp från ANVÄNDAREN).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"invoice_id":{"title":"Invoice Id","type":"integer"},"supplier_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Supplier Name"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Invoice Number"},"ocr":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Ocr"},"invoice_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Invoice Date"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Due Date"},"total_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Ore"},"vat_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Vat Ore"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Currency"},"expense_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Expense Account"},"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Document Id"},"lines":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"default":null,"title":"Lines"},"rounding_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Rounding Ore"},"fx_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"default":null,"title":"Fx Rate"},"total_sek_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Total Sek Ore"}},"required":["orgnr","invoice_id"],"title":"update_supplier_invoiceArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/reconciliation-attachments":{"post":{"operationId":"upload_underlag","tags":["Underlag, inkorg och dokument"],"summary":"Ladda upp underlag till avstämning","description":"Laddar upp ett underlag för en avstämning, t.ex. ett kontoutdrag, avtal eller protokoll, och kopplar det valfritt till en bilaga för ett konto och en månad. Använd för underlag som styrker ett saldo i en avstämning. Kvitton och fakturor till ett verifikat laddas upp med add_voucher_underlag, och stora filer (t.ex. foton) med create_underlag_upload. När en bilaga anges returneras dess aktuella saldo och differens, så att du kan bekräfta att underlaget matchar. Bieffekt: filen sparas bland bolagets underlag (base64, högst 15 MB). Kräver behörigheten upload.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"upload_underlag","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"title":"Name","type":"string"},"content_base64":{"title":"Content Base64","type":"string"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Content Type"},"bilaga_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Bilaga Type"},"account":{"default":0,"title":"Account","type":"integer"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Year"},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Month"}},"required":["name","content_base64"],"title":"upload_underlagArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/upload_underlag":{"post":{"operationId":"tool_upload_underlag","tags":["Verktyg (som MCP)"],"summary":"Ladda upp underlag till avstämning","description":"Laddar upp ett underlag för en avstämning, t.ex. ett kontoutdrag, avtal eller protokoll, och kopplar det valfritt till en bilaga för ett konto och en månad. Använd för underlag som styrker ett saldo i en avstämning. Kvitton och fakturor till ett verifikat laddas upp med add_voucher_underlag, och stora filer (t.ex. foton) med create_underlag_upload. När en bilaga anges returneras dess aktuella saldo och differens, så att du kan bekräfta att underlaget matchar. Bieffekt: filen sparas bland bolagets underlag (base64, högst 15 MB). Kräver behörigheten upload.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"name":{"title":"Name","type":"string"},"content_base64":{"title":"Content Base64","type":"string"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Content Type"},"bilaga_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Bilaga Type"},"account":{"default":0,"title":"Account","type":"integer"},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Year"},"month":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Month"}},"required":["orgnr","name","content_base64"],"title":"upload_underlagArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/companies/{orgnr}/accounts/{number}":{"put":{"operationId":"upsert_account","tags":["Bokföring och huvudbok"],"summary":"Skapa eller ändra konto","description":"Skapar ett konto i bolagets kontoplan eller ändrar namn, kontotyp, SRU-kod och momskod på ett befintligt konto. Använd när ett konto som behövs för en bokning saknas eller har fel uppgifter; slå först upp kontoplanen med list_accounts. Returnerar ok och kontonumret. Bieffekt: ändringen gäller kontot framöver; inga belopp i befintliga verifikat ändras. Kräver behörigheten book.","x-kvickd-read-only":false,"x-kvickd-mcp-tool":"upsert_account","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"description":"Kontots namn, t.ex. IT-tjänster.","title":"Name","type":"string"},"type":{"description":"Kontotyp: T (tillgång), S (skuld eller eget kapital), I (intäkt) eller K (kostnad).","title":"Type","type":"string"},"vat_code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: kontots momskod.","title":"Vat Code"},"sru":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: SRU-kod som kontot summeras på i deklarationen.","title":"Sru"}},"required":["name","type"],"title":"upsert_accountArguments","type":"object"}}}},"parameters":[{"name":"orgnr","in":"path","required":true,"schema":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"}},{"name":"number","in":"path","required":true,"schema":{"description":"Kontonummer i BAS-kontoplanen, minst fyrsiffrigt (1000 eller högre) och i klass 1 till 8, t.ex. 6540.","title":"Number","type":"integer"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}]}},"/api/v1/tools/upsert_account":{"post":{"operationId":"tool_upsert_account","tags":["Verktyg (som MCP)"],"summary":"Skapa eller ändra konto","description":"Skapar ett konto i bolagets kontoplan eller ändrar namn, kontotyp, SRU-kod och momskod på ett befintligt konto. Använd när ett konto som behövs för en bokning saknas eller har fel uppgifter; slå först upp kontoplanen med list_accounts. Returnerar ok och kontonumret. Bieffekt: ändringen gäller kontot framöver; inga belopp i befintliga verifikat ändras. Kräver behörigheten book.","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"number":{"description":"Kontonummer i BAS-kontoplanen, minst fyrsiffrigt (1000 eller högre) och i klass 1 till 8, t.ex. 6540.","title":"Number","type":"integer"},"name":{"description":"Kontots namn, t.ex. IT-tjänster.","title":"Name","type":"string"},"type":{"description":"Kontotyp: T (tillgång), S (skuld eller eget kapital), I (intäkt) eller K (kostnad).","title":"Type","type":"string"},"vat_code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: kontots momskod.","title":"Vat Code"},"sru":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Valfritt: SRU-kod som kontot summeras på i deklarationen.","title":"Sru"}},"required":["orgnr","number","name","type"],"title":"upsert_accountArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/upsert_employee":{"post":{"operationId":"tool_upsert_employee","tags":["Verktyg (som MCP)"],"summary":"Spara anställd","description":"Skapa eller uppdatera en anställd. Utan employee_id skapas en ny; med employee_id uppdateras den och BARA medskickade fält ändras. Personnummer tas inte emot här: användaren lägger in det i Kvickd under Lön > Anställda (det behövs innan lön kan köras), så be inte om det i chatten. Svaret visar personnumret maskerat och has_personnummer. Scope payroll. Argument: orgnr; valfritt employee_id, first_name, last_name, tax_table, tax_column, monthly_salary_ore, employer_fee_bps (standard 3142 = 31,42 %, som räknas om efter ålder ur personnumret vid lönekörningen; en annan sats används som den är), bank_account, active, note. Timanställda: hourly_rate_ore (timlön), overtime_rate_ore (ersättning per övertidstimme), ob_rate_ore (OB-tillägg per timme) och vacation_pay_bps (semesterersättning som betalas med varje lön, 1200 = 12 %); de används av get_payroll_time_basis. tax_percent_bps: skatteavdrag i procent enligt Skatteverkets jämkningsbeslut (3000 = 30 %), används i stället för skattetabellen; -1 tar bort procentsatsen så att tabellen gäller igen. salary_account: konto för den anställdas lön, t.ex. 7210 (tjänstemän) eller 7220 (företagsledare); 0 = bolagets konto för löner (get_payroll_accounts).","x-kvickd-read-only":false,"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Valfri. Samma nyckel inom ett dygn ger samma svar i stället för att anropet körs igen."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"orgnr":{"description":"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.","title":"Orgnr","type":"string"},"employee_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Employee Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Last Name"},"tax_table":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Tax Table"},"tax_column":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Tax Column"},"monthly_salary_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Monthly Salary Ore"},"employer_fee_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Employer Fee Bps"},"bank_account":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Bank Account"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Active"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"hourly_rate_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Hourly Rate Ore"},"overtime_rate_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Overtime Rate Ore"},"ob_rate_ore":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Ob Rate Ore"},"vacation_pay_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Vacation Pay Bps"},"tax_percent_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Tax Percent Bps"},"salary_account":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Salary Account"}},"required":["orgnr"],"title":"upsert_employeeArguments","type":"object"}}}},"responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools":{"get":{"operationId":"list_tools","tags":["Verktyg (som MCP)"],"summary":"Lista verktygen","description":"Verktygen med namn, beskrivning och argument, som i MCP.","responses":{"200":{"description":"Verktygets svar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"400":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Fel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}}}}},"Result":{"type":"object","properties":{"data":{}}}},"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key"},"Bearer":{"type":"http","scheme":"bearer","description":"Samma API-nyckel som Authorization: Bearer kvickd_key_..."}}}}