{"openapi":"3.1.0","info":{"title":"care-management","contact":{},"license":{"name":"MIT License","url":"https://opensource.org/licenses/MIT"},"version":"1.0"},"servers":[{"url":"https://cm.drakel.sundsvall.dev","description":"Generated server url"}],"security":[{"sentBy":[]}],"tags":[{"name":"Financial Assistance · Proposals","description":"The decision proposal (beslutsförslag) — derived on every read from the calculation draft and the applicant's Lifecare history; only the section warnings it raises are stored. Recomputed when the CALCULATION section is approved."},{"name":"Statistics","description":"Read-only errand statistics for the caseworker interface"},{"name":"Co-caseworkers","description":"Co-caseworkers (medhandläggare) added to an errand alongside its ordinary caseworker. Both the caseworker and every co-caseworker receive the errand's notifications as one shared, logical message."},{"name":"Permits","description":"Permits issued on an errand: validity period, conditions and status. Revoking sets the status to REVOKED."},{"name":"Financial Assistance · Finalize","description":"Besluta och utbetala: record the caseworker's decision and resume the process. The Lifecare writes (beslut, payments, bevakningar, journal, documents, and the normberäkning beyond the daily prepare's proposal) are made by careM through the errand's /lifecare routes, on the caseworker's action in Draken, before the decision; the errand only carries the references (lifecareCalculationId, lifecareDecisionId, lifecarePaymentIds). The decision is sent to the applicant by the frontend."},{"name":"Conversation","description":"Messages between caseworker and applicant on an errand"},{"name":"Financial Assistance · Household identifiers","description":"The errand number and the household's personal numbers, served on demand to the process's beredning step (prepare-income-basis) so they never become process variables. Every read lands in the errand's event log."},{"name":"User settings","description":"Per-user (AD account) settings"},{"name":"Notifications","description":"User-facing notifications raised against an errand. Recipients (`ownerId`) acknowledge them when seen and mark them handled when acted on; expired ones are purged by a daily background job."},{"name":"Status History","description":"Status transition log for an errand"},{"name":"Financial Assistance · SSBTEK","description":"Read the applicant's SSBTEK basis live so a caseworker can see the source behind the classified incomes — the payments per responding agency (fk and so), reduced to the fields the caseworker's payment view needs; identity fields never leave caremanagement. Keyed by partyId (resolved to a personnummer via the citizen service); the period defaults to the three rule periods (M−2 through M). caremanagement reads and reduces the answer and stores nothing."},{"name":"Metadata","description":"Metadata (lookup) operations"},{"name":"Namespace config","description":"Namespace configuration operations"},{"name":"Process messages","description":"Send BPMN message correlation events to the process instance currently running for an errand"},{"name":"Financial Assistance · Intake","description":"Pre-application and case-intake calls: eligibility routing (common entry point), renewal pre-fill from Lifecare, the income/cost type metadata catalogue, and Lifecare actualisation (case intake)."},{"name":"Journal","description":"The catalogue of Lifecare journal types (Typ/Journaltyp)"},{"name":"Financial Assistance · Warnings","description":"Acknowledgeable financial assistance income warnings on an errand — create, list and set status (OPEN / ACKNOWLEDGED / CLOSED). The daily prepare step reconciles them."},{"name":"Notes","description":"Notes attached to an errand"},{"name":"Errand stakeholders","description":"Errand stakeholder operations"},{"name":"Errand Types","description":"Describes the errand types: their statuses, stakeholder roles and the fields a type's data payload should carry, as form guidance for clients."},{"name":"Referrals","description":"Referrals/consultations on an errand: receiving authority, due date, free-text response and status (SENT → RESPONDED)."},{"name":"Financial Assistance · Calculation","description":"The calculation: prepare the calculation draft each daily loop (the first run also creates the normberäkning proposal in Lifecare and links it on the errand), and read or edit the draft header."},{"name":"Event Log","description":"Who/what/when activity log for an errand — every read and write, with the acting user"},{"name":"Financial Assistance · Lifecare","description":"The applicant's case in Lifecare. The errand-scoped routes under /{errandId}/lifecare read and write Lifecare ProfessionalWeb on the caseworker's behalf: normberäkning, beslut, utbetalningar, betalningsmottagare, bevakningar, journal, dokument and jobbstimulans. careM derives every Lifecare key from the errand, logs each access on the errand and links what it creates back onto it."},{"name":"Errand decisions","description":"Decision audit trail on an errand. Stores both system-generated decisions (e.g. DMN-evaluated recommendations from a BPMN process) and human decisions (e.g. caseworker APPROVE/REJECT), distinguished by `decisionType`."},{"name":"Financial Assistance · Payment","description":"Read from Lifecare whether the payments a bifall is linked to have been paid out. caremanagement makes no payment and stores no payment status."},{"name":"Financial Assistance · Errands","description":"Create, read and replace financial assistance errands. Create against one of the three application-type slugs (financial-assistance-new / -renewal / -supplementary); read and replace the typed data via the shared financial-assistance path."},{"name":"Errands","description":"Errand operations"},{"name":"Documents","description":"The catalogue of Lifecare document types (Typ/Dokumenttyp)"},{"name":"Financial Assistance · Draft rows","description":"Caseworker edits to the draft calculation rows — add, edit, soft-delete and restore income, expense and person rows. Each touches only the caseworker value / note / soft-delete; the process columns are owned by the daily prepare."},{"name":"Errand attachments","description":"Errand attachment operations"}],"paths":{"/{municipalityId}/{namespace}/errands/{errandId}/notifications/handled":{"put":{"tags":["Notifications"],"summary":"Mark all notifications on an errand handled","description":"Sets `handled=true` (and with it `acknowledged=true`) on every notification belonging to the errand that is not already handled.","operationId":"handleAll","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful operation"},"404":{"description":"Errand not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/notifications/acknowledged":{"put":{"tags":["Notifications"],"summary":"Acknowledge all notifications on an errand","description":"Sets `acknowledged=true` on every unacknowledged notification belonging to the errand.","operationId":"acknowledgeAll","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful operation"},"404":{"description":"Errand not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/reminders/{reminderId}":{"put":{"tags":["Financial Assistance · Lifecare"],"summary":"Change a bevakning on the errand's insats","description":"Changes the date, text, priority or status of a bevakning (also how it is marked done). A changed date may not be in the past; an unchanged one may. 404 when Lifecare does not list the bevakning on this errand's insats.","operationId":"updateReminder","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"reminderId","in":"path","description":"The Lifecare reminder id","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareReminderRequest"}}},"required":true},"responses":{"204":{"description":"Successful Operation"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict - the errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Financial Assistance · Lifecare"],"summary":"Remove a bevakning from the errand's insats","description":"Removes a bevakning in Lifecare. 404 when Lifecare does not list the bevakning on this errand's insats.","operationId":"removeReminder","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"reminderId","in":"path","description":"The Lifecare reminder id","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}}],"responses":{"204":{"description":"Successful Operation"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict - the errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/documents/journal-notes/{id}":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"Read a journalanteckning with its body","description":"One of the applicant's journalanteckningar with its body and whether it may still be edited. 404 when the record is not in the applicant's Lifecare record.","operationId":"readJournalNote","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The Lifecare record id","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareRecordContent"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"tags":["Financial Assistance · Lifecare"],"summary":"Save an edit to a journalanteckning","description":"Saves the body, date, time and optionally skrivskydd onto Lifecare's own record. 404 when the record is not in the applicant's Lifecare record; 409 when it is finalised or locked in Lifecare.","operationId":"updateJournalNote","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The Lifecare record id","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLifecareRecordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareRecordContent"}}}},"409":{"description":"Conflict - the record is finalised in Lifecare","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Lifecare refused the edit","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/documents/documents/{id}":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"Read a document with its body","description":"One of the applicant's documents with its body and whether it may still be edited. 404 when the record is not in the applicant's Lifecare record.","operationId":"readDocument","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The Lifecare record id","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareRecordContent"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"tags":["Financial Assistance · Lifecare"],"summary":"Save an edit to a document","description":"Saves the body, date, time and optionally skrivskydd onto Lifecare's own record. 404 when the record is not in the applicant's Lifecare record; 409 when it is finalised or locked in Lifecare.","operationId":"updateDocument","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The Lifecare record id","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLifecareRecordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareRecordContent"}}}},"409":{"description":"Conflict - the record is finalised in Lifecare","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Lifecare refused the edit","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/decision":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"Read the errand's beslut as it stands in Lifecare","description":"The beslut the errand is linked to in Lifecare (lifecareDecisionId), read from Lifecare. 204 while no beslut has been saved. The read is logged in the errand's Lifecare access log.","operationId":"readDecision","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"FINANCIAL_ASSISTANCE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareDecisionView"}}}},"204":{"description":"No beslut saved in Lifecare yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareDecisionView"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway - Lifecare could not be reached or answered with an error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"tags":["Financial Assistance · Lifecare"],"summary":"Save the errand's beslut in Lifecare - created the first time, changed after that","description":"Writes the beslut to Lifecare: Decision/Create the first time, after which the errand is linked to it (lifecareDecisionId) in the same call, and Decision/Update of that same beslut every time after. With a normberäkning linked (lifecareCalculationId) the underlag is read with it, and an amount or period left out comes from it when it is saved as final (see the proposal route); the access log records the normberäkning and an amount that differs from it. The beslutsfattare is the caller (X-Sent-By), who must be one of Lifecare's beslutsfattare for the insats. Refused with 422, worded for the caseworker, when the beslutstyp is not active on the insats or cannot be registered from careM, the household has a medsökande and the beslut an orsak but no orsak for the medsökande (coApplicantReasonCode), the caller is not a beslutsfattare, a period the beslutstyp requires is missing, the beslut is locked in Lifecare, or an existing beslut would change beslutstyp; Lifecare's own refusals are 422 with Lifecare's message. 502 when Lifecare did not answer the create (check Lifecare before saving again) or when the beslut was created but could not be linked to the errand (do not save again). Answers with the beslut as it stands in Lifecare after the save.","operationId":"saveDecision","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"FINANCIAL_ASSISTANCE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareDecisionSaveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareDecisionView"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict - the errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Unprocessable - the beslut cannot be saved as it stands","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway - Lifecare could not be reached or answered with an error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/user-settings/{adAccount}":{"get":{"tags":["User settings"],"summary":"Read user settings","description":"Returns the defaults for a user who has never saved any settings — never 404.","operationId":"readUserSettings","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"adAccount","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,64}$"},"example":"joe01doe"}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettings"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"tags":["User settings"],"summary":"Create or replace user settings","operationId":"saveUserSettings","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"adAccount","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,64}$"},"example":"joe01doe"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettings"}}},"required":true},"responses":{"204":{"description":"Successful operation"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["User settings"],"summary":"Reset user settings to the defaults","operationId":"deleteUserSettings","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"adAccount","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,64}$"},"example":"joe01doe"}],"responses":{"204":{"description":"Successful operation"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/namespace-config":{"get":{"tags":["Namespace config"],"summary":"Read namespace config","operationId":"readNamespaceConfig","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamespaceConfig"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Namespace config"],"summary":"Create namespace config","operationId":"createNamespaceConfig","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamespaceConfig"}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Namespace config"],"summary":"Delete namespace config","operationId":"deleteNamespaceConfig","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"}],"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Namespace config"],"summary":"Update namespace config","operationId":"updateNamespaceConfig","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamespaceConfig"}}},"required":true},"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/metadata":{"get":{"tags":["Metadata"],"summary":"List lookups","operationId":"readLookups","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"kind","in":"query","description":"Lookup kind","required":true,"schema":{"type":"string","enum":["CATEGORY","STATUS","TYPE","ROLE","CONTACT_REASON","JOURNAL_ENTRY_TYPE"]}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Lookup"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Metadata"],"summary":"Create lookup","operationId":"createLookup","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"kind","in":"query","description":"Lookup kind","required":true,"schema":{"type":"string","enum":["CATEGORY","STATUS","TYPE","ROLE","CONTACT_REASON","JOURNAL_ENTRY_TYPE"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lookup"}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands":{"get":{"tags":["Errands"],"summary":"Find errands","description":"Query for errands with optional spring-filter expression","operationId":"findErrands","parameters":[{"name":"municipalityId","in":"path","description":"Municipality id","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","description":"Namespace","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"filter","in":"query","description":"Syntax description: [spring-filter](https://github.com/turkraft/spring-filter/blob/85730f950a5f8623159cc0eb4d737555f9382bb7/README.md#syntax)","required":false,"schema":{"type":"string"},"example":"status:'NEW' and created>'2024-01-01T00:00:00.000+01:00'"},{"name":"hasUnacknowledgedNotifications","in":"query","description":"When true, only errands that have at least one unacknowledged notification are returned. Combine with notificationOwnerId to scope to a single recipient.","required":false,"schema":{"type":"boolean","default":false},"example":true},{"name":"hasUnhandledNotifications","in":"query","description":"When true, only errands that have at least one notification not yet marked handled are returned. Handled is a state of its own: a message may have been read without having been dealt with. Combine with notificationOwnerId to scope to a single recipient.","required":false,"schema":{"type":"boolean","default":false},"example":true},{"name":"notificationOwnerId","in":"query","description":"Scopes the notification filters to notifications addressed to this recipient (caseworker). Only applied when hasUnacknowledgedNotifications=true or hasUnhandledNotifications=true.","required":false,"schema":{"type":["string","null"]},"example":"jane01doe"},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":10,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","default":["touched,DESC"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindErrandsResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Errands"],"summary":"Create errand","description":"Creates a new errand","operationId":"createErrand","parameters":[{"name":"municipalityId","in":"path","description":"Municipality id","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","description":"Namespace","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Errand"}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{typeSlug}":{"post":{"tags":["Financial Assistance · Errands"],"summary":"Create financial assistance errand","description":"Multipart request. The 'request' part carries the application (JSON); the optional 'attachments' part carries the citizen's supporting files (any type); the optional 'caseData' part carries the application snapshot (case data), stored as a single CASE_DATA attachment renamed to {errandNumber}.pdf; the optional 'formSnapshot' part carries the self-describing JSON snapshot of the form exactly as the applicant saw it (every question, help/info/notice text, option label and answer), captured write-once for the legal record and readable back via GET .../form-snapshot. typeSlug is one of financial-assistance-new, financial-assistance-renewal, financial-assistance-supplementary. Each attachment is stored on the errand, and a single combined PDF merging them all is generated and stored alongside.","operationId":"createErrand_1","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"typeSlug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/CreateFinancialAssistanceRequest"},"attachments":{"type":"array","items":{"type":"string","format":"binary"}},"caseData":{"type":"string","format":"binary"},"formSnapshot":{"type":"string"}},"required":["request"]}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/stakeholders":{"get":{"tags":["Errand stakeholders"],"summary":"List stakeholders","operationId":"readStakeholders","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Stakeholder"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Errand stakeholders"],"summary":"Create stakeholder","description":"Creates a new stakeholder on the errand","operationId":"createStakeholder","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stakeholder"}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/referrals":{"get":{"tags":["Referrals"],"summary":"List referrals","operationId":"readReferrals","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Referral"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Referrals"],"summary":"Send referral","operationId":"createReferral","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Referral"}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/referrals/{referralId}/response":{"post":{"tags":["Referrals"],"summary":"Register response on referral","operationId":"registerResponse","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"referralId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralResponseRequest"}}},"required":true},"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/process-messages":{"post":{"tags":["Process messages"],"summary":"Send a BPMN message to the running process for an errand","description":"Correlates a BPMN message (e.g. a caseworker's APPROVE/REJECT decision, an external event) to the process instance whose business key equals this errand id. The matching receive task or message catch event resumes with the supplied process variables.","operationId":"sendProcessMessage","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessMessageRequest"}}},"required":true},"responses":{"204":{"description":"Message correlated"},"404":{"description":"No process instance is waiting for this message on this errand","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/permits":{"get":{"tags":["Permits"],"summary":"List permits","operationId":"readPermits","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Permit"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Permits"],"summary":"Issue permit","operationId":"issuePermit","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Permit"}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/permits/{permitId}/revoke":{"post":{"tags":["Permits"],"summary":"Revoke permit","operationId":"revokePermit","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"permitId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/permits/revoke":{"post":{"tags":["Permits"],"summary":"Revoke all permits on the errand","operationId":"revokeAllPermits","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful operation"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/notifications":{"get":{"tags":["Notifications"],"summary":"List notifications for an errand","operationId":"readNotificationsByErrand","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}}}}},"404":{"description":"Errand not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Notifications"],"summary":"Create notification","operationId":"createNotification","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}}},"404":{"description":"Errand not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/notes":{"get":{"tags":["Notes"],"summary":"List notes for errand","operationId":"list","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Note"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Notes"],"summary":"Add note to errand","operationId":"createNote","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNote"}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/messages":{"get":{"tags":["Conversation"],"summary":"List the errand's messages (chronological)","operationId":"list_1","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Conversation"],"summary":"Post a message on the errand","description":"Multipart request. The 'message' part carries the message (JSON) including the sender ('direction' and 'author'); the optional 'attachments' part carries the files to attach (any type).","operationId":"createMessage","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/CreateMessage"},"attachments":{"type":"array","items":{"type":"string","format":"binary"}}},"required":["message"]}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/messages/read":{"post":{"tags":["Conversation"],"summary":"Mark messages as read for the calling side","description":"Marks the given messages as read for the caller's side (derived from the 'X-Sent-By' header). Idempotent, and not recorded in the event log.","operationId":"markRead","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkMessagesRead"}}},"required":true},"responses":{"204":{"description":"Successful operation"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/decisions":{"get":{"tags":["Errand decisions"],"summary":"List decisions","operationId":"readDecisions","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Decision"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Errand decisions"],"summary":"Create decision","operationId":"createDecision","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/co-caseworkers":{"get":{"tags":["Co-caseworkers"],"summary":"List co-caseworkers on an errand","operationId":"readCoCaseworkers","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CoCaseworker"}}}}},"404":{"description":"Errand not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Co-caseworkers"],"summary":"Add a co-caseworker to an errand","operationId":"addCoCaseworker","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCoCaseworker"}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}}},"404":{"description":"Errand not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"User is already a co-caseworker on the errand","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/attachments":{"get":{"tags":["Errand attachments"],"summary":"List attachments","description":"Fetches all attachment metadata for the errand (application files, generated PDFs, manual uploads and conversation attachments), oldest first. Optionally filtered by documentType and/or sender role.","operationId":"readAttachments","parameters":[{"name":"municipalityId","in":"path","description":"Municipality id","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","description":"Namespace","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","description":"Errand id","required":true,"schema":{"type":"string"}},{"name":"documentType","in":"query","description":"Only return attachments with this documentType","required":false,"schema":{"type":"string","enum":["APPLICATION","CONVERSATION","GENERATED","ERRAND","CASE_DATA","DECISION","MESSAGE_HISTORY"]}},{"name":"senderRole","in":"query","description":"Only return attachments from this sender","required":false,"schema":{"type":"string","enum":["CLIENT","CASEWORKER"]}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Errand attachments"],"summary":"Create attachment","description":"Uploads a new attachment for the errand. The optional documentType tags what the file is: ERRAND (a plain manual upload, the default), CASE_DATA (a case-data document) or DECISION (a decision document). A CASE_DATA attachment is renamed to {errandNumber}.pdf and only one is allowed per errand — uploading a second returns 400.","operationId":"createAttachment","parameters":[{"name":"municipalityId","in":"path","description":"Municipality id","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","description":"Namespace","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","description":"Errand id","required":true,"schema":{"type":"string"}},{"name":"documentType","in":"query","description":"What the uploaded file is: ERRAND (a plain manual upload, the default), CASE_DATA (a case-data document) or DECISION (a decision document). Defaults to ERRAND when omitted.","required":false,"schema":{"type":"string","enum":["ERRAND","CASE_DATA","DECISION"]}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/warnings":{"get":{"tags":["Financial Assistance · Warnings"],"summary":"List the financial assistance income warnings on an errand","description":"The acknowledgeable income warnings the caseworker reviews — unhandled incomes, significant changes, and income types still missing from SSBTEK. The daily prepare step reconciles them.","operationId":"listWarnings","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Warning"}}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Financial Assistance · Warnings"],"summary":"Create a financial assistance income warning on an errand","description":"Creates an acknowledgeable income warning directly on the errand — the careM temp stage, with no Lifecare round-trip. The warning is created OPEN; use the PATCH endpoint to acknowledge or close it.","operationId":"createWarning","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWarningRequest"}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Warning"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/reminders":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"List the bevakningar on the errand's insats","description":"The bevakningar on the errand's Lifecare insats (and on the beslut and aktualiseringar under it), read live from Lifecare, soonest first. The personnummer on the Lifecare rows is left out. The read is logged in the errand's access log.","operationId":"listReminders","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LifecareReminder"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict - the errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Financial Assistance · Lifecare"],"summary":"Add a bevakning on the errand's insats","description":"Creates a manual bevakning on the errand's Lifecare insats, for the applicant, bevakad av the insats's caseworker. The date may not be in the past (Swedish time). Not idempotent. 400 when Lifecare offers no manual insats bevakning, the insats has no caseworker, or the priority or status is not one of Lifecare's.","operationId":"createReminder","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareReminderRequest"}}},"required":true},"responses":{"201":{"description":"Created"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict - the errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/payments":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"The utbetalningar registered on the errand's insats, read from Lifecare","description":"Lifecare's latest utbetalningar on the insats, newest payment date first. The read is logged on the errand.","operationId":"readPayments","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LifecareRegisteredPayment"}}}}},"409":{"description":"The errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Financial Assistance · Lifecare"],"summary":"Register an utbetalning on the errand's insats in Lifecare","description":"Registers the utbetalning with Lifecare's Payment/Create and links it to the errand. Refused with the reason (422) when it cannot be made safely: no amount, a betalsätt or month Lifecare does not offer, no ändamål among several konteringsrader, other than one saldo, a saldo that does not cover the amount, a blocking maximum amount, a payee Lifecare does not have, or no hushåll on the payment date. 409 when an identical standing utbetalning (amount, month, date and account) is already registered. 502 when Lifecare did not answer: whether it paid is then unknown, so the caseworker checks Lifecare before trying again. Never retried.","operationId":"registerPayment","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecarePaymentRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecarePaymentCreated"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Unprocessable Content","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/payees":{"post":{"tags":["Financial Assistance · Lifecare"],"summary":"Add a betalningsmottagare in Lifecare","description":"Adds a betalningsmottagare for the person the errand's insats belongs to. An active payee with the same betalsätt, account and clearing is returned instead of being created a second time. 400 when the betalsätt is not in use on the insats.","operationId":"createPayee","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecarePayeeRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecarePayee"}}}},"409":{"description":"The errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/normberakning/{section}":{"post":{"tags":["Financial Assistance · Lifecare"],"summary":"Add a caseworker row to a normberäkning section","description":"In careM's draft any section. In Lifecare an income (a type already on the beräkning is refused) or an utgift / levnadskostnad i övrigt by Lifecare code; persons are added in Lifecare itself (422).","operationId":"addNormberakningRow","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"section","in":"path","description":"The section","required":true,"schema":{"type":"string","enum":["persons","incomes","expenses"],"pattern":"^(persons|incomes|expenses)$"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormberakningRowInput"}}},"required":true},"responses":{"204":{"description":"Successful Operation"},"422":{"description":"Unprocessable Content","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/normberakning/{section}/{rowId}/restore":{"post":{"tags":["Financial Assistance · Lifecare"],"summary":"Restore a soft-deleted row of careM's draft","description":"careM's draft only: a beräkning in Lifecare has no soft delete (422).","operationId":"restoreNormberakningRow","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"section","in":"path","description":"The section","required":true,"schema":{"type":"string","enum":["persons","incomes","expenses"],"pattern":"^(persons|incomes|expenses)$"}},{"name":"rowId","in":"path","description":"The row","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9-]{1,64}$"}}],"responses":{"204":{"description":"Successful Operation"},"422":{"description":"Unprocessable Content","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/job-stimulus-periods":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"The jobbstimulans periods on the errand's insats, read from Lifecare","description":"The sökandes and the medsökandes periods, each marked with whose it is. Periods marked for removal are left out. The read is logged on the errand.","operationId":"readJobStimulusPeriods","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LifecareJobStimulusPeriod"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Financial Assistance · Lifecare"],"summary":"Add a jobbstimulans period for the sökande or the medsökande on the errand's insats in Lifecare","description":"Lifecare's save replaces both persons' periods, so the current sets are sent back whole with the new one, as Lifecare's web app does. role picks whose period it is (the sökande's when left out); a medsökande the insats does not have in Lifecare is refused (422). The end defaults to Lifecare's two-year rule. Lifecare gives every period a new id on save. Answers with every period after the save.","operationId":"addJobStimulusPeriod","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareJobStimulusPeriodRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LifecareJobStimulusPeriod"}}}}},"422":{"description":"Unprocessable Content","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/documents/journal-notes":{"post":{"tags":["Financial Assistance · Lifecare"],"summary":"Write a new journalanteckning on the errand's insats","description":"Writes a journalanteckning on the errand's Lifecare insats, filling in Lifecare's own proposal. The rubrik defaults to the note type's name, skrivskydd to the note type's default. 400 when the note type is not an active one in Lifecare.","operationId":"createJournalNote","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLifecareJournalNoteRequest"}}},"required":true},"responses":{"201":{"description":"Created","headers":{"Location":{"style":"simple","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareRecord"}}}},"409":{"description":"Conflict - the errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Lifecare refused the note","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/documents/documents":{"post":{"tags":["Financial Assistance · Lifecare"],"summary":"Write a new document on the errand's insats","description":"Writes a document on the errand's Lifecare insats, filling in Lifecare's own proposal. The rubrik defaults to the document type's name, skrivskydd to the type's default; the date is only taken when the type allows it. 400 when the document type is not a writable one in Lifecare.","operationId":"createDocument","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLifecareDocumentRequest"}}},"required":true},"responses":{"201":{"description":"Created","headers":{"Location":{"style":"simple","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareRecord"}}}},"409":{"description":"Conflict - the errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Lifecare refused the document","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/calculation":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"Read the errand's normberäkning as it stands in Lifecare","description":"Lifecare's own beräkning linked to the errand (lifecareCalculationId) with Lifecare's summering. 204 while none is saved in Lifecare. The read is logged in the errand's access log.","operationId":"readCalculation","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareCalculationView"}}}},"204":{"description":"No beräkning saved in Lifecare yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareCalculationView"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Financial Assistance · Lifecare"],"summary":"Save the errand's normberäkning in Lifecare","description":"The first save creates the beräkning in Lifecare from careM's draft (Calculation/Create) and links it to the errand; after that it saves Lifecare's own beräkning (Calculation/Update). finalize saves it as slutlig, after which Lifecare allows no change. 422 when the draft cannot be sent as it stands (no period, an included co-applicant, no one included, a type Lifecare does not know) or when Lifecare refuses. A create Lifecare did not answer is never retried: 502 then tells the caseworker to check Lifecare before saving again.","operationId":"saveCalculation","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareCalculationSaveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareCalculationView"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Unprocessable Content","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/finalize":{"post":{"tags":["Financial Assistance · Finalize"],"summary":"Besluta och utbetala — finalize the errand (caseworker)","description":"Records the caseworker's decision as a PAYMENT decision on the errand, stores the chosen communication channels and household-size flag, and correlates PaymentDecisionReceived to the process (paymentDecision APPROVED for BIFALL/DELAVSLAG, REJECTED otherwise) — which sets GRANTED/REJECTED and, for a bifall, reads the payments from Lifecare until they are paid out. Leave out decision to have careM read the beslut the errand is linked to in Lifecare (lifecareDecisionId) and record that: its outcome from the beslutstyp's category, orsak, period, amount and beslutsmeddelande; 400 when no beslut is saved or its beslutstyp cannot be finalized, 422 when the beslut breaks the decision's rules. The recorded decision is receipted against the Lifecare beslut in the same call (marked SYNCED with lifecareId, reported as lifecareDecision). Creates no payments: they are registered in Lifecare beforehand through the errand's /lifecare/payments route. Every outcome requires the beslut to be saved in Lifecare and linked as lifecareDecisionId; a BIFALL/DELAVSLAG also requires the normberäkning saved in Lifecare and linked as lifecareCalculationId, otherwise 409. An AVSLAG linked to Lifecare payments (lifecarePaymentIds) is refused with 409. A decision on a normberäkning linked as lifecareCalculationId purges careM's calculation draft: the decided calculation is Lifecare's, and the draft read answers 404 from then on. Does not send anything to the applicant: the response echoes the communication channels for the frontend to act on. Requires the errand in AWAITING_DECISION or SUPPLEMENT_REQUESTED and an identified caller (X-Sent-By); a second finalize is rejected with 409. A process that could not be reached is reported in the response, not as an error.","operationId":"finalizeErrand","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeResponse"}}}},"409":{"description":"Conflict - wrong status, already finalized, no lifecareDecisionId, a granting decision without lifecareCalculationId, or an avslag linked to Lifecare payments","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Unprocessable - the beslut read from Lifecare breaks the decision's rules","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway - Lifecare could not be read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/ssbtek-changes/applied":{"post":{"tags":["Financial Assistance · Calculation"],"summary":"Acknowledge SSBTEK changes written into the normberäkning in Lifecare","description":"Draken reports the incomes it had written into the linked normberäkning through careM's /lifecare calculation route (amount null = taken out). careM records them as what the system last wrote, so the next SSBTEK change to the same income is again recognised as untouched by a caseworker, and brings the SSBTEK_CALCULATION_DIFF warnings up to date (best-effort). 409 when calculationId is not the errand's lifecareCalculationId.","operationId":"applied","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppliedSsbtekChanges"}}},"required":true},"responses":{"204":{"description":"Successful Operation"},"409":{"description":"Conflict - not the linked calculation","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/draft/persons":{"post":{"tags":["Financial Assistance · Draft rows"],"summary":"Add a person row to the draft (caseworker)","operationId":"addDraftPerson","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormPersonInput"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormPersonRow"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/draft/persons/{rowId}/restore":{"post":{"tags":["Financial Assistance · Draft rows"],"summary":"Restore a soft-deleted person row","operationId":"restoreDraftPerson","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"rowId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormPersonRow"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/draft/incomes":{"post":{"tags":["Financial Assistance · Draft rows"],"summary":"Add an income row to the draft (caseworker)","operationId":"addDraftIncome","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormIncomeInput"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormIncomeRow"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/draft/incomes/{rowId}/restore":{"post":{"tags":["Financial Assistance · Draft rows"],"summary":"Restore a soft-deleted income row","operationId":"restoreDraftIncome","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"rowId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormIncomeRow"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/draft/expenses":{"post":{"tags":["Financial Assistance · Draft rows"],"summary":"Add an expense row to the draft (caseworker)","operationId":"addDraftExpense","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormExpenseInput"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormExpenseRow"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/draft/expenses/{rowId}/restore":{"post":{"tags":["Financial Assistance · Draft rows"],"summary":"Restore a soft-deleted expense row","operationId":"restoreDraftExpense","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"rowId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormExpenseRow"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/payment-status":{"post":{"tags":["Financial Assistance · Payment"],"summary":"Read whether the Lifecare payment has been effectuated","description":"Reads from Lifecare whether the payments of a bifall have been paid out, returning the effectuated flag, the payment date when effectuated, the reason when not, and the working-day deadline with an overdue flag. With errandId the check is errand-specific: the Lifecare payments linked to the errand (lifecarePaymentIds) must all be reported paid; otherwise the applicant's Lifecare payments on the errand's own insats for the application month are used, never one another errand references, and once they are all paid they are linked to the errand. Overdue only after the deadline of three working days from the decision. Without errandId, any payment for the applicant and application month counts. caremanagement makes no payment; the process polls this to detect when it is done.","operationId":"checkPaymentStatus","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentStatusResponse"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/eligibility":{"post":{"tags":["Financial Assistance · Intake"],"summary":"Check application eligibility (common entry point)","description":"Given an applicant (and an optional co-applicant) suggests which application — new application / renewal / supplementary application — to offer, checking this system and Lifecare (best-effort).","operationId":"checkEligibility","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EligibilityRequest"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EligibilityResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/calculation/prepare":{"post":{"tags":["Financial Assistance · Calculation"],"summary":"Prepare the calculation (no Lifecare write)","description":"Reports whether this month's classified incomes cover every income type the previous calculation had (informationComplete + missingIncomeTypes), records the income warnings on the errand as a single Decision(RECOMMENDATION), and reflects completeness in the errand status (SUPPLEMENT_REQUESTED ⇄ AWAITING_DECISION). The first run that finds the information complete, on an errand without lifecareCalculationId, creates the draft in Lifecare as the normberäkning proposal and sets lifecareCalculationId (best-effort: a failed create is retried by the next run, and Draken may create the calculation itself meanwhile). Once lifecareCalculationId is set, the draft is no longer refreshed and its warnings stay as they were; the SSBTEK warnings, recommendation and status still update. An errand that has ended (WITHDRAWN, REJECTED or CLOSED) is left untouched: nothing is read from or written to Lifecare, no status or warning is written, and the answer is 200 with informationComplete=false and empty lists. The financial assistance process calls this each daily loop.","operationId":"prepareCalculation","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculationResponse"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/actualisations/{actualisationId}/archive":{"post":{"tags":["Financial Assistance · Intake"],"summary":"Archive a document to a Lifecare actualisation","description":"Binds an uploaded document (e.g. a supplementary application) as an attachment to a specific Lifecare actualisation. The target actualisation must belong to the given applicant (partyId) — a foreign actualisation id yields 404 before anything is uploaded. Multipart request: the 'file' part carries the document; the optional 'request' part carries the metadata (errandId, title, documentType, documentSenderType, senderName) — title/documentType/documentSenderType/senderName each fall back to a server default, and the title defaults to the uploaded file name. caremanagement only forwards the bytes to Lifecare. When 'request.errandId' is set, the target actualisation id is recorded on that errand as a Decision(ACTUALISATION), setting the errand's Lifecare actualisation to the one archived to.","operationId":"archiveToActualisation","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"actualisationId","in":"path","description":"The target Lifecare actualisation id","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"partyId","in":"query","description":"The applicant's partyId (personId GUID) that owns the target actualisation","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"request":{"$ref":"#/components/schemas/ArchiveActualisationRequest"}},"required":["file"]}}}},"responses":{"204":{"description":"Successful operation"},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/actualisation":{"post":{"tags":["Financial Assistance · Intake"],"summary":"Create the Lifecare actualisation (case intake)","description":"Builds the actualisation against the applicant's Lifecare FamilyCare actualisation proposal and creates it in Lifecare, returning the created actualisation id. When the request carries an errandId, the creation is recorded on the errand as a Decision(ACTUALISATION) for the audit trail.","operationId":"createActualisation","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActualisationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActualisationResponse"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/metadata/{name}":{"get":{"tags":["Metadata"],"summary":"Read lookup","operationId":"readLookup","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"kind","in":"query","description":"Lookup kind","required":true,"schema":{"type":"string","enum":["CATEGORY","STATUS","TYPE","ROLE","CONTACT_REASON","JOURNAL_ENTRY_TYPE"]}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lookup"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Metadata"],"summary":"Delete lookup","operationId":"deleteLookup","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"kind","in":"query","description":"Lookup kind","required":true,"schema":{"type":"string","enum":["CATEGORY","STATUS","TYPE","ROLE","CONTACT_REASON","JOURNAL_ENTRY_TYPE"]}}],"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Metadata"],"summary":"Update lookup","operationId":"updateLookup","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"kind","in":"query","description":"Lookup kind","required":true,"schema":{"type":"string","enum":["CATEGORY","STATUS","TYPE","ROLE","CONTACT_REASON","JOURNAL_ENTRY_TYPE"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lookup"}}},"required":true},"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}":{"get":{"tags":["Errands"],"summary":"Read errand","description":"Fetches the errand that matches the provided id","operationId":"readErrand","parameters":[{"name":"municipalityId","in":"path","description":"Municipality id","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","description":"Namespace","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","description":"Errand id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Errand"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Errands"],"summary":"Delete errand","description":"Deletes the errand","operationId":"deleteErrand","parameters":[{"name":"municipalityId","in":"path","description":"Municipality id","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","description":"Namespace","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","description":"Errand id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Errands"],"summary":"Update errand","description":"Patches the errand with the supplied attributes","operationId":"updateErrand","parameters":[{"name":"municipalityId","in":"path","description":"Municipality id","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","description":"Namespace","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","description":"Errand id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchErrand"}}},"required":true},"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/stakeholders/{stakeholderId}":{"get":{"tags":["Errand stakeholders"],"summary":"Read stakeholder","operationId":"readStakeholder","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"stakeholderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stakeholder"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Errand stakeholders"],"summary":"Delete stakeholder","operationId":"deleteStakeholder","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"stakeholderId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful operation"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Errand stakeholders"],"summary":"Update stakeholder","operationId":"updateStakeholder","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"stakeholderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stakeholder"}}},"required":true},"responses":{"204":{"description":"Successful operation"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/notifications/{notificationId}":{"get":{"tags":["Notifications"],"summary":"Read notification","operationId":"readNotification","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"notificationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Notifications"],"summary":"Delete notification","operationId":"deleteNotification","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"notificationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Notifications"],"summary":"Update notification","description":"Partial update. Only `acknowledged`, `handled`, `description`, `content`, `type`, and `subType` are honoured; other fields in the body are ignored. Setting `handled=true` also sets `acknowledged=true`.","operationId":"updateNotification","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"notificationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}},"required":true},"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/notes/{noteId}":{"get":{"tags":["Notes"],"summary":"Read note","operationId":"read","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"noteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Notes"],"summary":"Delete note","operationId":"delete","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"noteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Notes"],"summary":"Update note","operationId":"update","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"noteId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNote"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/warnings/{warningId}":{"patch":{"tags":["Financial Assistance · Warnings"],"summary":"Set the status of a financial assistance income warning","description":"A caseworker acknowledges (seen, kept on record), closes (dismisses), or re-opens a warning to OPEN (undoing an earlier acknowledge/close).","operationId":"updateWarning","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"warningId","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","description":"The target status","required":true,"schema":{"type":"string","enum":["OPEN","ACKNOWLEDGED","CLOSED"]}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Warning"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/normberakning/{section}/{rowId}":{"delete":{"tags":["Financial Assistance · Lifecare"],"summary":"Remove a normberäkning row","description":"A soft delete in careM's draft; in Lifecare the row's amounts go to 0 and Lifecare drops it. Members are not removed from a beräkning in Lifecare (422).","operationId":"deleteNormberakningRow","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"section","in":"path","description":"The section","required":true,"schema":{"type":"string","enum":["persons","incomes","expenses"],"pattern":"^(persons|incomes|expenses)$"}},{"name":"rowId","in":"path","description":"The row","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9-]{1,64}$"}}],"responses":{"204":{"description":"Successful Operation"},"422":{"description":"Unprocessable Content","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Financial Assistance · Lifecare"],"summary":"Set the caseworker's values on a normberäkning row","description":"rowId is careM's row id in the draft, and in Lifecare the income code, the expense id (E-3, S-7, E-3-2) or the member's personKey. A member's days and normintervall make Lifecare count its amount again.","operationId":"updateNormberakningRow","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"section","in":"path","description":"The section","required":true,"schema":{"type":"string","enum":["persons","incomes","expenses"],"pattern":"^(persons|incomes|expenses)$"}},{"name":"rowId","in":"path","description":"The row","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9-]{1,64}$"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormberakningRowInput"}}},"required":true},"responses":{"204":{"description":"Successful Operation"},"422":{"description":"Unprocessable Content","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/normberakning/header":{"patch":{"tags":["Financial Assistance · Lifecare"],"summary":"Change the normberäkning header","description":"In careM's draft: norm, dates and household size. In Lifecare: the norm and the household size (Annan hushållsstorlek, saved for the household's coming beräkningar); the period is Lifecare's and is refused with 422.","operationId":"updateNormberakningHeader","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormHeaderInput"}}},"required":true},"responses":{"204":{"description":"Successful Operation"},"422":{"description":"Unprocessable Content","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/data":{"patch":{"tags":["Financial Assistance · Errands"],"summary":"Update financial assistance data","description":"PATCH semantics: non-null fields replace the stored values, null fields are left untouched. Server-owned fields (applicationType, lastDailyRunAt, timestamps) are never written from client data. lifecareCalculationId is write-once: sending the linked id again is a no-op, sending another one is refused with 409 (the daily prepare or an earlier save has already linked a normberäkning — read the errand again instead of creating another calculation).","operationId":"updateData","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialAssistanceData"}}},"required":true},"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict - another normberäkning is already linked","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/draft/persons/{rowId}":{"delete":{"tags":["Financial Assistance · Draft rows"],"summary":"Soft-delete a person row","operationId":"deleteDraftPerson","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"rowId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormPersonRow"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Financial Assistance · Draft rows"],"summary":"Set the caseworker days / note on a person row","operationId":"patchDraftPerson","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"rowId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormPersonInput"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormPersonRow"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/draft/incomes/{rowId}":{"delete":{"tags":["Financial Assistance · Draft rows"],"summary":"Soft-delete an income row (excluded from the calculation, survives the daily refresh)","operationId":"deleteDraftIncome","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"rowId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormIncomeRow"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Financial Assistance · Draft rows"],"summary":"Set the caseworker value / note on an income row","operationId":"patchDraftIncome","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"rowId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormIncomeInput"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormIncomeRow"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/draft/header":{"patch":{"tags":["Financial Assistance · Calculation"],"summary":"Edit the draft header (caseworker)","description":"Set the norm, the calculation date window (from/to/date) and the custom household size (common costs). 404 when no draft exists.","operationId":"patchDraftHeader","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormHeaderInput"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculationDraft"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/draft/expenses/{rowId}":{"delete":{"tags":["Financial Assistance · Draft rows"],"summary":"Soft-delete an expense row","operationId":"deleteDraftExpense","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"rowId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormExpenseRow"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Financial Assistance · Draft rows"],"summary":"Set the caseworker value / note on an expense row","operationId":"patchDraftExpense","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"rowId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormExpenseInput"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormExpenseRow"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/statistics":{"get":{"tags":["Statistics"],"summary":"Errand statistics","description":"Aggregates the number of errands per status and per assigned user, optionally filtered by errand type and creation date.","operationId":"getStatistics","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"typeSlug","in":"query","description":"Filter on errand type (module). Omit for statistics across all types.","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","description":"Count only errands created at or after this point in time (ISO-8601).","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","description":"Count only errands created at or before this point in time (ISO-8601).","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatisticsResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/notifications":{"get":{"tags":["Notifications"],"summary":"List notifications for a recipient across errands","operationId":"readNotificationsByOwner","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"ownerId","in":"query","description":"Recipient user id","required":true,"schema":{"type":"string","minLength":1},"example":"jane01doe"},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/events":{"get":{"tags":["Event Log"],"summary":"List one actor's activity across all errands (newest first)","description":"Logguppföljning for a single user: every errand they read or changed in this namespace, newest first. Optionally filter by action (READ/CREATE/UPDATE/DELETE), source (HTTP access log or EVENT change log) and a [from, to) time window. Reads are included — a follow-up is mostly about what someone looked at. The listing is capped; compare the returned events against 'total' to see whether it was truncated.","operationId":"listForActor","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"actor","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"action","in":"query","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActorEventLog"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/status-history":{"get":{"tags":["Status History"],"summary":"List status transitions for errand","operationId":"list_2","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StatusHistoryEntry"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/referrals/{referralId}":{"get":{"tags":["Referrals"],"summary":"Read referral","operationId":"readReferral","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"referralId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Referral"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Referrals"],"summary":"Delete referral","operationId":"deleteReferral","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"referralId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/permits/{permitId}":{"get":{"tags":["Permits"],"summary":"Read permit","operationId":"readPermit","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"permitId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Permit"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Permits"],"summary":"Delete permit","operationId":"deletePermit","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"permitId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/notes/count":{"get":{"tags":["Notes"],"summary":"Count the notes on an errand","description":"How many notes are attached to the errand. Not recorded in the event log.","operationId":"count","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteCount"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/messages/{messageId}":{"get":{"tags":["Conversation"],"summary":"Read a message","operationId":"read_1","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/messages/{messageId}/attachments/{attachmentId}/file":{"get":{"tags":["Conversation"],"summary":"Download a message attachment","description":"Streams the attachment file content","operationId":"streamAttachmentFile","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}},{"name":"attachmentId","in":"path","description":"Attachment id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/messages/unread-count":{"get":{"tags":["Conversation"],"summary":"Count unread messages for the calling side","description":"Returns how many messages addressed to the caller are unread. The caller's side is derived from the 'X-Sent-By' header (type=adAccount → caseworker, type=partyId → applicant). A read-only poll that is not recorded in the event log.","operationId":"unreadCount","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadCount"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/events":{"get":{"tags":["Event Log"],"summary":"List activity events for an errand (newest first)","description":"Optionally filter by action (READ/CREATE/UPDATE/DELETE), actor (the X-Sent-By value, e.g. an AD account) and source (HTTP access log or EVENT change log). Set includeReads=false for a clean 'what changed' timeline without the read noise.","operationId":"list_3","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"action","in":"query","required":false,"schema":{"type":"string"}},{"name":"actor","in":"query","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeReads","in":"query","required":false,"schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ErrandEventEntry"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/events/count":{"get":{"tags":["Event Log"],"summary":"Count activity events for an errand","description":"Honours the same filters as the list. With the defaults this is the total event count; set includeReads=false for the 'what changed' count without the read noise. Not recorded in the event log.","operationId":"count_1","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"action","in":"query","required":false,"schema":{"type":"string"}},{"name":"actor","in":"query","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeReads","in":"query","required":false,"schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrandEventCount"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/decisions/{decisionId}":{"get":{"tags":["Errand decisions"],"summary":"Read decision","operationId":"readDecision_1","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"decisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Errand decisions"],"summary":"Delete decision","operationId":"deleteDecision","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"decisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful operation"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/attachments/{attachmentId}":{"get":{"tags":["Errand attachments"],"summary":"Read attachment metadata","description":"Fetches the attachment metadata","operationId":"readAttachment","parameters":[{"name":"municipalityId","in":"path","description":"Municipality id","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","description":"Namespace","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","description":"Errand id","required":true,"schema":{"type":"string"}},{"name":"attachmentId","in":"path","description":"Attachment id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Errand attachments"],"summary":"Delete attachment","description":"Deletes the attachment","operationId":"deleteAttachment","parameters":[{"name":"municipalityId","in":"path","description":"Municipality id","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","description":"Namespace","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","description":"Errand id","required":true,"schema":{"type":"string"}},{"name":"attachmentId","in":"path","description":"Attachment id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/attachments/{attachmentId}/file":{"get":{"tags":["Errand attachments"],"summary":"Download attachment file","description":"Streams the attachment file content","operationId":"streamAttachmentFile_1","parameters":[{"name":"municipalityId","in":"path","description":"Municipality id","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","description":"Namespace","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","description":"Errand id","required":true,"schema":{"type":"string"}},{"name":"attachmentId","in":"path","description":"Attachment id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/journal-entries/metadata":{"get":{"tags":["Journal"],"summary":"Read the journal metadata — the catalogue of selectable journal entry types (seeded JOURNAL_ENTRY_TYPE lookups for the namespace, or a built-in provisional set as fallback)","operationId":"metadata","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntryMetadata"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}":{"get":{"tags":["Financial Assistance · Errands"],"summary":"Read financial assistance errand","operationId":"readErrand_1","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialAssistanceView"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/warnings/count":{"get":{"tags":["Financial Assistance · Warnings"],"summary":"Count the active financial assistance income warnings on an errand","description":"How many warnings are still active (OPEN or ACKNOWLEDGED) — closed ones are not counted. Not recorded in the event log.","operationId":"countWarnings","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarningCount"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/ssbtek":{"get":{"tags":["Financial Assistance · SSBTEK"],"summary":"Read the SSBTEK basis of an errand's applicant, co-applicant or child","description":"The SSBTEK basis of the errand's applicant (or, with person=CO_APPLICANT, co-applicant; with person=CHILD and childPartyId, one of the household children named on the application), fetched live via api-service-financial-aid, so a caseworker can see what the composite service said rather than only the classified result. careM returns only the payment fields the caseworker's payment view needs: the payments Försäkringskassan and Pensionsmyndigheten report (fk) and the a-kassor's payments (so) — förmån, betalningsdag, type, amounts, periods and delförmåner — in the agencies' own shape. Everything else in the agency answers, such as personnummer, names, addresses and the other agencies' answers, is dropped by careM before the answer is returned (dataminimering). The person is resolved from the errand, never taken from the caller, and the read is recorded in the errand's access log like every other errand-scoped request. No personnummer is accepted, and nothing is stored. The period is resolved in whole months and echoed on the response: it defaults to the three SSBTEK rule periods (jämförelseperiod M−2 through ansökningsperiod M), the same window the process asks for. Agency payload shapes are heterogeneous and follow the SSBTEK contract, so they are not modelled here.","operationId":"getBasis","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"person","in":"query","description":"Whose basis: the errand's APPLICANT (default), CO_APPLICANT or a CHILD (then childPartyId is required)","required":false,"schema":{"type":"string","default":"APPLICANT"}},{"name":"childPartyId","in":"query","description":"The partyId of the household child to read. Required with person=CHILD, rejected otherwise.","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","description":"Inclusive start of the period (ISO date). Defaults to the first day of month M−2.","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Inclusive end of the period (ISO date). Defaults to the last day of the current month.","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsbtekBasis"}}}},"404":{"description":"Not Found — no such errand, no household member in that role, no such child in the household, or an unknown citizen","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/section-status":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"Read which of the errand's sections Lifecare has as done","description":"The checks on the Normberäkning, Beslut and Utbetalning tabs, from their state in Lifecare: the linked beräkning is slutlig (ListCalculations of the insats), a beslut is saved (lifecareDecisionId is set), and an utbetalning that is not makulerad concerns the errand's month (GetLatestPayments of the insats). Each check is read on its own: one Lifecare read failing leaves that check false, not the others.","operationId":"readSectionStatus","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"FINANCIAL_ASSISTANCE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareSectionStatus"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/reminders/options":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"The priorities and statuses a bevakning can have","description":"Lifecare's own priority and status lists for a bevakning on the errand's insats, and the ones Lifecare proposes for a new one.","operationId":"readReminderOptions","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareReminderOptions"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict - the errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/payment-status":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"Whether the utbetalning for the errand's application month has been registered, read from Lifecare","description":"Looks for a standing (not makulerad) utbetalning on the errand's insats concerning the errand's application month. Never fails on Lifecare: unavailable is true when the errand has no application month or insats, or Lifecare could not be read.","operationId":"readPaymentStatus","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecarePaymentStatus"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/payment-options":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"The betalsätt, betalningsmottagare, ändamål, saldon and months an utbetalning on the errand's insats can use, read from Lifecare","description":"Everything the utbetalning form needs, read from Lifecare's underlag for a new utbetalning on the errand's insats, plus a proposal to start from (Lifecare's date and first open month, what is left on the saldon, and the payee the latest standing utbetalning went to). The read is logged on the errand.","operationId":"readPaymentOptions","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecarePaymentOptions"}}}},"409":{"description":"The errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/normberakning":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"Read the Normberäkning tab's rows","description":"careM's draft (source CAREM, persons with their personnummer) until the beräkning is saved in Lifecare, and Lifecare's beräkning (source LIFECARE) after that. 404 when neither exists.","operationId":"readNormberakning","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormberakningDraft"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/normberakning/types":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"Read the norms, income and cost types a new row can have","description":"Lifecare's own catalogues once the beräkning is saved there; careM's catalogue before, with Lifecare's norms for the insats (best-effort).","operationId":"readNormberakningTypes","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormberakningTypes"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/normberakning/previous":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"Read the beräkning preceding the errand's own period from Lifecare","description":"Picked from the insats's beräkningar in Lifecare: the latest period before the errand's own (its saved beräkning's, or the draft's), a slutlig one first. Read-only; members go without personnummer. 204 when there is none.","operationId":"readPreviousCalculation","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormberakningPreviousCalculation"}}}},"204":{"description":"No previous beräkning","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormberakningPreviousCalculation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/journal-note-bodies":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"The bodies of the applicant's journalanteckningar","description":"Each journalanteckning's body, read in view mode, so the list can show its text without opening it. A body Lifecare will not hand over is returned without content rather than failing the rest.","operationId":"listJournalNoteBodies","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LifecareRecordBody"}}}}},"409":{"description":"Conflict - the applicant's personnummer could not be resolved","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/documents":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"List the applicant's journalanteckningar and documents in Lifecare","description":"The applicant's Lifecare record, split into journalanteckningar and documents, read live from Lifecare. Lifecare's list is person-wide, so it spans all of the applicant's akter, not only this errand. The applicant is resolved from the errand. The read is logged in the errand's access log.","operationId":"listRecords","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareRecords"}}}},"409":{"description":"Conflict - the applicant's personnummer could not be resolved","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/documents/journal-note-types":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"The note types a new journalanteckning can have","description":"The active note types Lifecare offers for a new journalanteckning on the errand's insats, in Lifecare's order.","operationId":"listJournalNoteTypes","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LifecareNoteType"}}}}},"409":{"description":"Conflict - the errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/documents/documents/{id}/pdf":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"Read a document as a PDF file","description":"One of the applicant's documents as a PDF file, for sending it on as a bilaga. A written document or a blankett is printed by Lifecare with the configured print template, the way Lifecare's own Skriv ut does, and nothing is saved in Lifecare. Any other document is the file Lifecare's FC API holds for it, matched on the document's title and date. 404 when the record is not in the applicant's Lifecare record or Lifecare holds no PDF for it; 409 when several Lifecare documents share its title and date; 502 when Lifecare refuses the print, for example because the print template is not available for the document's owner. The read is logged.","operationId":"readDocumentPdf","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The Lifecare record id","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}}],"responses":{"200":{"description":"Successful Operation","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"409":{"description":"Conflict - the document cannot be told apart from another in Lifecare","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/documents/document-types":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"The document types a new document can have","description":"The active document types Lifecare offers for a new document on the errand's insats, in Lifecare's order. Blanketter are left out: they are filled in field by field in Lifecare's own editor.","operationId":"listDocumentTypes","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LifecareDocumentType"}}}}},"409":{"description":"Conflict - the errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/document-bodies":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"The bodies of the applicant's documents","description":"Each written document's body (blanketter and PDF files have none), read in view mode. A body Lifecare will not hand over is returned without content rather than failing the rest.","operationId":"listDocumentBodies","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LifecareRecordBody"}}}}},"409":{"description":"Conflict - the applicant's personnummer could not be resolved","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/decision/types":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"List the beslutstyper the errand's insats offers in Lifecare","description":"The active beslutstyper of the errand's insats, read from Lifecare's underlag for a new beslut, each with careM's outcome (BIFALL or AVSLAG; absent for a beslutstyp that cannot be registered from careM).","operationId":"readDecisionTypes","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"FINANCIAL_ASSISTANCE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LifecareDecisionType"}}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict - the errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway - Lifecare could not be reached or answered with an error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/decision/proposal":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"Read what a new beslut gets from the errand's normberäkning in Lifecare","description":"Lifecare's underlag for a new beslut read with the errand's normberäkning (lifecareCalculationId), as Lifecare's calculation view reads it for Besluta: the normberäkning's result (TotalSum, without sign) as amount, and its period. Lifecare fills them in only when the normberäkning is saved as final (prefilled). Saving the beslut with amount or period left out takes them from here; a value the caseworker gives wins. Lifecare keeps no link between the beslut and the normberäkning, so compare the amounts here. Without a linked normberäkning nothing is read from Lifecare and calculationId is absent. The read is logged in the errand's Lifecare access log.","operationId":"readDecisionProposal","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"FINANCIAL_ASSISTANCE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecareDecisionProposal"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict - the errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway - Lifecare could not be reached or answered with an error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/decision/pdf":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"Read the errand's beslut as Lifecare prints it (PDF)","description":"The beslut the errand is linked to, rendered by Lifecare's own decision print template - for the preview and for what is sent to the applicant. 404 while no beslut is saved in Lifecare. The read is logged in the errand's Lifecare access log.","operationId":"readDecisionPdf","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"FINANCIAL_ASSISTANCE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway - Lifecare could not be reached or answered with an error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/calculation/pdf":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"Read the errand's normberäkning as Lifecare prints it (PDF)","description":"Lifecare's print of the linked beräkning (RenderPdf/PrintContainer). 404 while none is saved in Lifecare. The read is logged.","operationId":"readCalculationPdf","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/household-identifiers":{"get":{"tags":["Financial Assistance · Household identifiers"],"summary":"Read the errand number and the household's personal numbers","description":"Read per run by the process's prepare-income-basis worker: resolves the errand number and the applicant's (and any co-applicant's) personal number for the lookups.","operationId":"getHouseholdIdentifiers","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HouseholdIdentifiers"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/form-snapshot":{"get":{"tags":["Financial Assistance · Errands"],"summary":"Read the application form snapshot","description":"The immutable, self-describing snapshot of the citizen-facing application form exactly as the applicant saw and answered it — every section, question label, help/info/notice text, option label and answer — captured at submission for the legal record. A generic renderer can walk it without the frontend that produced it. 404 when no snapshot was captured for the errand.","operationId":"readFormSnapshot","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSnapshot"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/decision-proposal":{"get":{"tags":["Financial Assistance · Proposals"],"summary":"Read the decision proposal (beslutsförslag)","description":"The proposed decision for the DECISION tab, derived on every read from the calculation draft and the applicant's most recent Lifecare decision — never stored. Outcome rule: estimatedAmount <= 0 → AVSLAG; > 0 and every expense fully approved → BIFALL; > 0 and any expense approved below its applied amount → DELAVSLAG. The amount is an estimate: normSum (the applicant's previous Lifecare calculation's norm) + expenseSum + specialExpenseSum − incomeSum from the draft; when no previous norm is known the outcome and amount are null and 'explanation' says why. Period = the calculation's period; reason = the previous decision's orsak and coApplicantReason the co-applicant's own orsak on that same decision (both picked from the one 'reasonOptions' catalogue). Reading also reconciles the DECISION-section warnings (previous decision was förskott på förmån; one per expense not approved in full) and returns them. 404 when the errand has no calculation draft.","operationId":"getDecisionProposal","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionProposal"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/ssbtek-changes":{"get":{"tags":["Financial Assistance · Calculation"],"summary":"Read where the normberäkning in Lifecare no longer matches SSBTEK","description":"Compares the latest SSBTEK amounts the daily prepare recorded with the errand's linked normberäkning, read live from Lifecare. Each change says whether it may be written without asking (AUTO: the calculation still holds what the system last wrote there) or must show it to the caseworker (CONFIRM, with a reason). Nothing is written, in Lifecare or in careM. 404 when no normberäkning is linked (lifecareCalculationId), after finalize, or when the calculation is not found in the calculation period; 502 when Lifecare cannot be read.","operationId":"getChanges","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsbtekChanges"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/draft":{"get":{"tags":["Financial Assistance · Calculation"],"summary":"Read the draft calculation","description":"The FamilyCare income rows the financial assistance process prepared (not yet created in Lifecare) for the caseworker to review and edit before a decision. 404 when no draft exists yet, and after a decision on a normberäkning saved in Lifecare (lifecareCalculationId), when finalize has purged it.","operationId":"getDraft","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculationDraft"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/prefill":{"get":{"tags":["Financial Assistance · Intake"],"summary":"Renewal pre-fill from Lifecare","description":"Returns the household children from the applicant's most recent Lifecare calculation to pre-fill a financial assistance renewal. The applicant is identified by partyId (resolved to a personnummer via the citizen service). Only children are pre-filled — the applicant is the logged-in citizen and the co-applicant comes from the portal. Best-effort — degrades to an empty result (lifecareChecked=false) when the partyId cannot be resolved or Lifecare is unreachable.","operationId":"prefill","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"partyId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenewalPrefill"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/metadata":{"get":{"tags":["Financial Assistance · Intake"],"summary":"Read financial assistance type metadata (income / cost dropdowns)","description":"The complete income and cost type catalogue the frontend feeds its financial assistance dropdowns from. Each type carries a code, the citizen Mina-sidor label (externalDisplayName), the matching Lifecare caseworker dropdown label (internalDisplayName), the Mina-sidor form group as a stable code (HOUSING / WORK_AND_STUDIES / HEALTH / OTHER — null for income) and citizenReportable. citizenReportable=true types are the Mina-sidor form (code = the Income.incomeType / Cost.costType value, externalDisplayName set); citizenReportable=false types are caseworker-only Lifecare dropdowns (internalDisplayName only, externalDisplayName null, their codes are NOT citizen payload values). Static; a label/grouping layer that never changes the payload codes.","operationId":"getMetadata","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialAssistanceMetadata"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/lifecare/decision-types/{decisionCode}/reasons":{"get":{"tags":["Financial Assistance · Lifecare"],"summary":"List the orsaker a beslut of a Lifecare beslutstyp can carry","description":"Lifecare's orsak catalogue for the beslutstyp, flattened to its choosable orsaker, each with the heading it sits under. The catalogue belongs to the beslutstyp, not to an applicant, so it is not errand-scoped and not logged in an access log.","operationId":"readDecisionReasons","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"FINANCIAL_ASSISTANCE"},{"name":"decisionCode","in":"path","description":"Lifecare's beslutstyp code","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0},"example":153}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LifecareDecisionReason"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway - Lifecare could not be reached or answered with an error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/actualisations":{"get":{"tags":["Financial Assistance · Intake"],"summary":"List the applicant's Lifecare actualisations","description":"The Lifecare actualisations (case intakes) registered on the applicant — what the frontend lists so a caseworker can pick which actualisation to archive a supplementary application to. The applicant is identified by partyId (resolved to a personnummer via the citizen service). The period defaults to the last 24 months up to today when from/to are omitted.","operationId":"listActualisations","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"partyId","in":"query","description":"The applicant's partyId (personId GUID)","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","description":"Inclusive start of the listing period (ISO date). Defaults to 24 months before 'to'.","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Inclusive end of the listing period (ISO date). Defaults to today.","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Actualisation"}}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/documents/metadata":{"get":{"tags":["Documents"],"summary":"Read the document metadata — the catalogue of selectable document types (seeded DOCUMENT_TYPE lookups for the namespace, or a built-in provisional set as fallback)","operationId":"metadata_1","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentMetadata"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/count":{"get":{"tags":["Errands"],"summary":"Count errands","description":"Counts errands matching the optional spring-filter expression","operationId":"countErrands","parameters":[{"name":"municipalityId","in":"path","description":"Municipality id","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","description":"Namespace","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"filter","in":"query","description":"Syntax description: [spring-filter](https://github.com/turkraft/spring-filter/blob/85730f950a5f8623159cc0eb4d737555f9382bb7/README.md#syntax)","required":false,"schema":{"type":"string"},"example":"status:'NEW' and created>'2024-01-01T00:00:00.000+01:00'"}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errand-types":{"get":{"tags":["Errand Types"],"summary":"List errand types","description":"Returns the descriptor for every registered errand type.","operationId":"findErrandTypes","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ErrandTypeSchema"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errand-types/{typeSlug}":{"get":{"tags":["Errand Types"],"summary":"Read errand type","description":"Returns the descriptor for a single errand type slug, e.g. financial-assistance-renewal.","operationId":"readErrandType","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"typeSlug","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrandTypeSchema"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api-docs":{"get":{"tags":["API"],"summary":"OpenAPI","operationId":"getApiDocs","responses":{"200":{"description":"OK","content":{"application/yaml":{"schema":{"type":"string"}}}}},"x-auth-type":"None","x-throttling-tier":"Unlimited","x-wso2-mutual-ssl":"Optional"}},"/{municipalityId}/{namespace}/errands/{errandId}/co-caseworkers/{userId}":{"delete":{"tags":["Co-caseworkers"],"summary":"Remove a co-caseworker from an errand","operationId":"removeCoCaseworker","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"},"example":2281},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"},"example":"MY_NAMESPACE"},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","description":"User id of the co-caseworker to remove","required":true,"schema":{"type":"string"},"example":"jane01doe"}],"responses":{"204":{"description":"Successful operation"},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/lifecare/job-stimulus-periods/{periodId}":{"delete":{"tags":["Financial Assistance · Lifecare"],"summary":"Remove one of the sökandes or the medsökandes jobbstimulans periods on the errand's insats in Lifecare","description":"Lifecare has no remove call of its own: its web app saves the set without the period, and so does this. Lifecare gives every period that is saved a new id, so use the ids in the answer from now on and never a cached one; an id an earlier save replaced answers 404. Both persons' periods go back together. Answers with every period after the save.","operationId":"removeJobStimulusPeriod","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w\\-]+"}},{"name":"errandId","in":"path","required":true,"schema":{"type":"string"}},{"name":"periodId","in":"path","required":true,"schema":{"type":"integer","format":"int32","exclusiveMinimum":0}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LifecareJobStimulusPeriod"}}}}},"422":{"description":"Unprocessable Content","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/ConstraintViolationProblem"}]}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The errand has no Lifecare insats yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"schemas":{"Problem":{"type":"object","properties":{"instance":{"type":"string","format":"uri"},"type":{"type":"string","format":"uri"},"detail":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","format":"int32"}}},"ConstraintViolationProblem":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"status":{"type":"integer","format":"int32"},"violations":{"type":"array","items":{"$ref":"#/components/schemas/Violation"}},"title":{"type":"string"},"instance":{"type":"string","format":"uri"},"detail":{"type":"string"},"causeAsProblem":{"$ref":"#/components/schemas/ThrowableProblem"}}},"ThrowableProblem":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer","format":"int32"},"detail":{"type":"string"},"instance":{"type":"string","format":"uri"},"causeAsProblem":{"$ref":"#/components/schemas/ThrowableProblem"}}},"Violation":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}},"LifecareReminderRequest":{"type":"object","description":"A bevakning as the caseworker fills it in, new or changed. It is always bevakad av the insats's caseworker in Lifecare.","properties":{"reminderDate":{"type":"string","description":"Bevakningsdatum, YYYY-MM-DD. Not before today (Swedish time); on a change only checked when the date changes.","examples":["2026-09-30"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"text":{"type":"string","description":"The bevakning text","examples":["Kontrollera hyran"],"maxLength":4000,"minLength":0},"priority":{"type":"integer","format":"int32","description":"Lifecare's priority code, from the options endpoint","examples":[2]},"status":{"type":"integer","format":"int32","description":"Lifecare's status code, from the options endpoint","examples":[3]}},"required":["priority","reminderDate","status","text"]},"UpdateLifecareRecordRequest":{"type":"object","description":"The edits a caseworker makes to a Lifecare journalanteckning or document. Everything else on the Lifecare record is kept as Lifecare has it.","properties":{"content":{"type":"string","description":"The record body as HTML","examples":["<p>Hej</p>"],"maxLength":1048576,"minLength":0},"occurenceDate":{"type":"string","description":"Documented date, YYYY-MM-DD","examples":["2026-09-23"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"time":{"type":"string","description":"Documented time, HH:mm","examples":["09:02"],"pattern":"^\\d{2}:\\d{2}$"},"protected":{"type":"boolean","description":"Write-protects the record with this save; Lifecare then allows no further change","examples":[false]}},"required":["content"]},"LifecareRecordContent":{"type":"object","description":"A Lifecare record with its body, as shown when a record is opened.","properties":{"id":{"type":"string","description":"The Lifecare record id","examples":["135"]},"category":{"type":"string","description":"Which group the record belongs to","enum":["JOURNAL_NOTE","DOCUMENT"],"examples":["JOURNAL_NOTE"]},"title":{"type":"string","description":"The rubrik","examples":["Journalanteckning"]},"content":{"type":"string","description":"The body as HTML","examples":["<p>Hej</p>"]},"occurenceDate":{"type":"string","description":"Documented date, YYYY-MM-DD","examples":["2026-09-23"]},"time":{"type":"string","description":"Documented time, HH:mm (empty when the record has none)","examples":["09:02"]},"editable":{"type":"boolean","description":"Whether the record may still be edited in Lifecare","examples":[true]}}},"LifecareDecisionSaveRequest":{"type":"object","description":"A beslut as the caseworker saves it on the Beslut tab - written straight to Lifecare, created the first time and changed after that.","properties":{"decisionCode":{"type":"integer","format":"int32","description":"Lifecare's beslutstyp code, from the beslutstyper the insats offers","examples":[153]},"date":{"type":"string","format":"date","description":"The beslutsdatum; Lifecare's proposal (today) when left out","examples":["2026-09-23"]},"periodFrom":{"type":"string","format":"date","description":"Start of the period the beslut covers; the normberäkning's when left out and the errand's normberäkning is saved as final","examples":["2026-09-01"]},"periodTo":{"type":"string","format":"date","description":"End of the period the beslut covers; the normberäkning's when left out and the errand's normberäkning is saved as final","examples":["2026-09-30"]},"amount":{"type":"number","description":"The amount; when left out, the result of the errand's normberäkning if it is saved as final, otherwise 0","examples":[3000]},"reasonCode":{"type":"integer","format":"int32","description":"Lifecare's code for the applicant's orsak, from the orsaker of the beslutstyp","examples":[19]},"decisionMessage":{"type":"string","description":"The beslutsmeddelande as HTML","examples":["<p>Beslut</p>"],"maxLength":1048576,"minLength":0},"writeProtect":{"type":"boolean","description":"Spara och skrivskydda beslut: saves the beslut write-protected in Lifecare (its meddelande locked), after which it can no longer be changed from careM. Refused with 422 when the beslutsmeddelande has no text, as Lifecare's web app offers it only then.","examples":[false]},"coApplicantReasonCode":{"type":"integer","format":"int32","description":"Lifecare's code for the medsökande's orsak, from the same orsaker as the sökande's. Required when the household has a medsökande in Lifecare and the beslut carries an orsak; ignored without a medsökande.","examples":[1]}},"required":["decisionCode"]},"LifecareDecisionView":{"type":"object","description":"The errand's beslut as it stands in Lifecare - what the Beslut tab shows and what finalize records.","properties":{"id":{"type":"integer","format":"int32","description":"Lifecare's decisionId","examples":[98]},"decisionCode":{"type":"integer","format":"int32","description":"Lifecare's beslutstyp code","examples":[153]},"outcome":{"type":"string","description":"careM's outcome for the beslutstyp, BIFALL or AVSLAG; absent for a beslutstyp that cannot be registered from careM","enum":["BIFALL","AVSLAG"],"examples":["BIFALL"]},"date":{"type":"string","description":"The beslutsdatum, yyyy-MM-dd; empty when Lifecare has none","examples":["2026-09-23"]},"periodFrom":{"type":"string","description":"Start of the period the beslut covers, yyyy-MM-dd","examples":["2026-09-01"]},"periodTo":{"type":"string","description":"End of the period the beslut covers, yyyy-MM-dd","examples":["2026-09-30"]},"amount":{"type":"number","description":"The amount, 0 when none","examples":[3000]},"reasonCode":{"type":"integer","format":"int32","description":"Lifecare's code for the orsak; absent when the beslut has none","examples":[19]},"reason":{"type":"string","description":"The orsak as Lifecare words it","examples":["Arbetar deltid ofrivilligt, otillräcklig inkomst"]},"message":{"type":"string","description":"The beslutsmeddelande as HTML","examples":["<p>Beslut</p>"]},"locked":{"type":"boolean","description":"Lifecare has locked the beslutsmeddelande; the beslut can no longer be changed from careM","examples":[false]},"decisionMaker":{"type":"string","description":"The beslutsfattare, by name when Lifecare gives one, otherwise by signature","examples":["Test Handläggare"]},"coApplicantReasonCode":{"type":"integer","format":"int32","description":"Lifecare's code for the medsökande's orsak; absent without a medsökande or orsak","examples":[2]},"coApplicantReason":{"type":"string","description":"The medsökande's orsak as Lifecare words it; what finalize takes as coApplicantReason","examples":["Arbetslös, väntar på ersättning/stöd"]}},"readOnly":true},"UserSettings":{"type":"object","description":"Settings for one user (AD account). A user who has never saved any settings gets the defaults.","properties":{"adAccount":{"type":"string","description":"The user's AD account (lower case)","examples":["joe01doe"],"readOnly":true},"ssbtekOpenInNewWindow":{"type":"boolean","description":"Whether the SSBTEK view opens in a new window. Defaults to true.","examples":[true]},"created":{"type":"string","format":"date-time","description":"Created timestamp, null while the user runs on defaults","readOnly":true},"modified":{"type":"string","format":"date-time","description":"Modified timestamp, null while the user runs on defaults","readOnly":true}},"required":["ssbtekOpenInNewWindow"]},"NamespaceConfig":{"type":"object","description":"NamespaceConfig model","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier","examples":[1],"readOnly":true},"displayName":{"type":"string","description":"Display name of the namespace","examples":["My namespace"],"maxLength":255,"minLength":0},"shortCode":{"type":"string","description":"Short code for the namespace","examples":["MY"],"maxLength":16,"minLength":0},"created":{"type":"string","format":"date-time","description":"Created timestamp","readOnly":true},"modified":{"type":"string","format":"date-time","description":"Modified timestamp","readOnly":true}}},"Lookup":{"type":"object","description":"Lookup model - metadata entry (category, status, type, role, contact reason)","properties":{"name":{"type":"string","description":"Name (machine-friendly key) of the lookup","examples":["NEW"],"maxLength":255,"minLength":0},"displayName":{"type":"string","description":"Display name","examples":["New case"],"maxLength":255,"minLength":0},"created":{"type":"string","format":"date-time","description":"Created timestamp","readOnly":true},"modified":{"type":"string","format":"date-time","description":"Modified timestamp","readOnly":true}}},"Errand":{"type":"object","description":"Errand envelope","properties":{"id":{"type":"string","description":"Unique identifier of the errand","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"],"readOnly":true},"municipalityId":{"type":"string","description":"Municipality id","examples":["2281"],"readOnly":true},"namespace":{"type":"string","description":"Namespace","examples":["MY_NAMESPACE"],"readOnly":true},"errandNumber":{"type":"string","description":"Human-readable errand number","examples":["EB-26060071"],"readOnly":true},"typeSlug":{"type":"string","description":"Errand type slug. Types whose module owns a dedicated create endpoint (e.g. financial-assistance) are rejected on this generic endpoint and must be created through that endpoint; any other slug is accepted as-is.","examples":["case-type-slug"],"maxLength":64,"minLength":0},"title":{"type":"string","description":"Title for the errand","examples":["Title of the errand"],"maxLength":255,"minLength":0},"status":{"type":"string","description":"Status of the errand","examples":["NEW"],"maxLength":64,"minLength":0},"description":{"type":"string","description":"Description of the errand","examples":["Long description text"]},"priority":{"type":"string","description":"Priority of the errand","examples":["HIGH"],"maxLength":16,"minLength":0},"reporterUserId":{"type":"string","description":"User id of the reporter","examples":["joe01doe"],"maxLength":64,"minLength":0},"assignedUserId":{"type":"string","description":"User id of the assignee","examples":["jane02doe"],"maxLength":64,"minLength":0},"applicantName":{"type":"string","description":"Denormalized display name of the errand's applicant, maintained from the APPLICANT stakeholder. Sortable and searchable on the errand list (e.g. ?sort=applicantName,asc). Null for errand types with no applicant.","examples":["Anna Andersson"],"readOnly":true},"processDefinitionName":{"type":"string","description":"Name of the Operaton process definition associated with the errand. Recorded on the errand; the core create endpoint does not itself start a process — process start, when applicable, is handled per errand type by a type module reacting to the errand-created domain event.","examples":["Handläggning av ärende"],"maxLength":128,"minLength":0},"processInstanceId":{"type":"string","description":"Id of the Operaton process instance started for this errand","examples":["a-process-instance-id"],"readOnly":true},"created":{"type":"string","format":"date-time","description":"Created timestamp","readOnly":true},"modified":{"type":"string","format":"date-time","description":"Modified timestamp","readOnly":true},"touched":{"type":"string","format":"date-time","description":"Touched timestamp","readOnly":true}}},"Asset":{"type":"object","description":"An asset owned by the applicant or co-applicant.","properties":{"assetCategory":{"type":"string","description":"The category of asset","enum":["BANK_SAVINGS","REAL_ESTATE","COMPANY","VEHICLE","OTHER"],"examples":["VEHICLE"]},"description":{"type":"string","description":"Free text description of the asset","examples":["Savings account at Swedbank"]},"value":{"type":"number","description":"Estimated value of the asset","examples":[120000.0]},"propertyType":{"type":"string","description":"Type of real estate property","enum":["CONDOMINIUM","HOUSE","PROPERTY","HOLIDAY_HOME"],"examples":["HOUSE"]},"purchaseYear":{"type":"integer","format":"int32","description":"Year the property was purchased (REAL_ESTATE only — the form asks for a year, not a full date, for property). Vehicles carry purchaseDate instead.","examples":[2018]},"purchasePrice":{"type":"number","description":"Price paid when the asset was purchased","examples":[2200000.0]},"companyName":{"type":"string","description":"Name of the company asset","examples":["Andersson Bygg AB"],"maxLength":255,"minLength":0},"companyAssetSum":{"type":"number","description":"Total sum of the company's assets","examples":[350000.0]},"vehicleType":{"type":"string","description":"Type of vehicle","enum":["CAR","BOAT","MOTORCYCLE","CARAVAN","MOPED","SNOWMOBILE","OTHER"],"examples":["CAR"]},"registrationNumber":{"type":"string","description":"Vehicle registration number","examples":["ABC123"],"maxLength":16,"minLength":0},"purchaseDate":{"type":"string","format":"date","description":"The date the vehicle was purchased (VEHICLE only — the form asks for a full date here). Property carries purchaseYear instead.","examples":["2018-04-12"]}}},"Child":{"type":"object","description":"A child included in the financial assistance application.","properties":{"partyId":{"type":"string","description":"Party id (personId GUID) of the child","examples":["f47ac10b-58cc-4372-a567-0e02b2c3d479"],"maxLength":36,"minLength":0},"firstName":{"type":"string","description":"First name","examples":["Astrid"],"maxLength":100,"minLength":0},"lastName":{"type":"string","description":"Last name","examples":["Lindgren"],"maxLength":100,"minLength":0},"schoolName":{"type":"string","description":"Name of the child's school","examples":["Bredsands skola"],"maxLength":255,"minLength":0},"residenceExtent":{"type":"string","description":"Extent of residence in the home","enum":["FULL_TIME","HALF_TIME","OTHER"],"examples":["FULL_TIME"]},"daysInHome":{"type":"integer","format":"int32","description":"Number of days per month the child lives in the home","examples":[15]}}},"Cost":{"type":"object","description":"A cost the applicant is applying for assistance with.","properties":{"costType":{"type":"string","description":"The type of cost","enum":["RENT","ELECTRICITY","HOME_INSURANCE","UNEMPLOYMENT_FUND","UNION_FEE","TRAVEL_APPROVED","TRAVEL_MEDICAL_TRANSPORT","MEDICAL_CARE","MEDICINE","OTHER"],"examples":["RENT"]},"appliedAmount":{"type":"number","description":"The amount applied for","examples":[5400.0]},"otherSubType":{"type":"string","description":"Sub type when the cost type is OTHER","enum":["OTHER","MUNICIPAL_FEES","ACUTE_DENTAL"],"examples":["MUNICIPAL_FEES"]},"specification":{"type":"string","description":"Free text specification of the cost","examples":["Dental care at the public dental service"]},"recipientOrPeriod":{"type":"string","description":"Recipient of the cost or the period it covers","examples":["Mitt Bostads AB, juni 2026"]}}},"CreateFinancialAssistanceRequest":{"type":"object","description":"Request to create a financial assistance errand.","properties":{"title":{"type":"string","description":"Title of the errand","examples":["Application for financial assistance"]},"description":{"type":"string","description":"Description of the errand","examples":["Renewal of rent for June 2026"]},"priority":{"type":"string","description":"Priority of the errand","examples":["HIGH"]},"reporterUserId":{"type":"string","description":"Id of the reporting user","examples":["joe01doe"]},"assignedUserId":{"type":"string","description":"Id of the assigned user","examples":["jane02doe"]},"data":{"$ref":"#/components/schemas/FinancialAssistanceData","description":"The typed financial assistance application payload"}}},"FinancialAssistanceData":{"type":"object","description":"The typed financial assistance application payload.","properties":{"applicationType":{"type":"string","description":"The type of application","enum":["NEW","RENEWAL","SUPPLEMENTARY"],"examples":["NEW"]},"maritalStatus":{"type":"string","description":"Marital status of the applicant","enum":["SINGLE","COHABITING"],"examples":["SINGLE"]},"periodMonth":{"type":"integer","format":"int32","description":"The month the application period concerns","examples":[6]},"periodYear":{"type":"integer","format":"int32","description":"The year the application period concerns","examples":[2026]},"periodChoice":{"type":"string","description":"Choice of application period","enum":["CURRENT_MONTH","NEXT_MONTH","OTHER_BENEFIT"],"examples":["CURRENT_MONTH"]},"normType":{"type":"array","items":{"type":"string","description":"The norm types used for the calculation","enum":["NATIONAL_NORM","OTHER_NORM"],"examples":["NATIONAL_NORM"]}},"otherBenefitDescription":{"type":"string","description":"Description of the other benefit","examples":["Establishment benefit"]},"livelihoodDescription":{"type":"string","description":"Description of the applicant's livelihood","examples":["Job-seeking via the employment agency"]},"hasChildrenUnder21":{"type":"boolean","description":"Whether the household has children under 21","examples":[true]},"childrenResidenceChanged":{"type":"boolean","description":"Whether the children's residence situation has changed","examples":[false]},"childrenResidenceChangeDescription":{"type":"string","description":"Description of the change in children's residence","examples":["The children now live in shared custody"]},"housingForm":{"type":"string","description":"The household's housing form","enum":["NO_HOUSING_OR_INSTITUTION","RENTAL","SUBLET","LODGER","CONDOMINIUM","OWNED_HOUSE","RENTED_HOUSE","LIVING_WITH_PARENTS"],"examples":["RENTAL"]},"housingPersonCount":{"type":"integer","format":"int32","description":"Total number of persons (adults and children) living in the housing","examples":[3]},"housingRoomsPlusKitchen":{"type":"integer","format":"int32","description":"Number of rooms plus kitchen","examples":[3]},"housingDescription":{"type":"string","description":"Free text description of the housing","examples":["Three-room rental apartment"]},"housingChanged":{"type":"boolean","description":"Whether the housing situation has changed","examples":[false]},"housingChangeDescription":{"type":"string","description":"Description of the housing change","examples":["Moved to a smaller apartment in May"]},"hasIncomes":{"type":"boolean","description":"Whether the household has incomes","examples":[true]},"hasPendingBenefits":{"type":"boolean","description":"Whether the household has pending benefits","examples":[false]},"hasAssets":{"type":"boolean","description":"Whether the household has assets","examples":[false]},"staysInMunicipality":{"type":"boolean","description":"Whether the applicant stays in the municipality","examples":[true]},"stayDescription":{"type":"string","description":"Description of the applicant's stay","examples":["Lives at the registered address"]},"attestation":{"type":"boolean","description":"Whether the applicant has attested the application","examples":[true]},"attestedAt":{"type":"string","format":"date-time","description":"When the application was attested","examples":["2026-06-01T09:30:00Z"]},"lifecareDecisionId":{"type":"integer","format":"int32","description":"Reference to the Lifecare decision (beslut) the errand concerns, set by careM when it saves the beslut in Lifecare through the errand's /lifecare/decision route. A reference only: whether the beslut is locked (skrivskyddat) is Lifecare's status and is never stored here. finalize requires it for every outcome. Server-owned: ignored on create and PATCH.","examples":[4711],"readOnly":true},"lifecareCalculationId":{"type":"integer","format":"int32","description":"Reference to the Lifecare normberäkning (calculation) the errand concerns. Set by the daily prepare when it creates the proposal in Lifecare, or by careM's /lifecare calculation route when the caseworker saves a calculation for an errand that has none; once set it is not replaced. Later saves update this calculation rather than creating another. A reference only: whether the calculation is final (slutlig) is Lifecare's status and is never stored here. finalize requires it for a granting outcome (BIFALL/DELAVSLAG). Server-owned: ignored on create and PATCH.","examples":[4242],"readOnly":true},"lifecarePaymentIds":{"type":"array","description":"References to the Lifecare payments (utbetalningar) a bifall pays with. Set by careM when it registers a payment in Lifecare through the errand's /lifecare/payments route, or once payment-status has found the errand's payments paid in Lifecare on the errand's own insats. Server-owned: ignored on create and PATCH. References only: whether a payment is registered or paid out is read from Lifecare, never stored here. When set, payment-status verifies exactly these ids against Lifecare, and no other errand can take them; finalize refuses an AVSLAG that carries any.","items":{"type":"string","examples":["90210"],"maxLength":64,"minLength":0},"readOnly":true},"children":{"type":"array","description":"Children included in the application","items":{"$ref":"#/components/schemas/Child"}},"costs":{"type":"array","description":"Costs applied for","items":{"$ref":"#/components/schemas/Cost"}},"incomes":{"type":"array","description":"Incomes reported","items":{"$ref":"#/components/schemas/Income"}},"pendingBenefits":{"type":"array","description":"Pending benefits","items":{"$ref":"#/components/schemas/PendingBenefit"}},"assets":{"type":"array","description":"Assets owned","items":{"$ref":"#/components/schemas/Asset"}},"persons":{"type":"array","description":"Persons on the application","items":{"$ref":"#/components/schemas/Person"}},"plannings":{"type":"array","description":"Plannings towards self-sufficiency","items":{"$ref":"#/components/schemas/Planning"}},"plannedActivities":{"type":"array","description":"Planned activities","items":{"$ref":"#/components/schemas/PlannedActivity"}},"jobApplications":{"type":"array","description":"Job applications","items":{"$ref":"#/components/schemas/JobApplication"}}}},"Income":{"type":"object","description":"An income reported by the applicant or co-applicant.","properties":{"incomeType":{"type":"string","description":"The type of income","enum":["OTHER_INCOME","FINANCIAL_AID_OTHER_MUNICIPALITY","SALARY","SWISH_DEPOSITS","OCCUPATIONAL_PENSION_INSURANCE","CHILD_SUPPORT","RENT_SHARE_FROM_CHILD"],"examples":["SALARY"]},"amount":{"type":"number","description":"The income amount","examples":[18500.0]},"incomeDate":{"type":"string","format":"date","description":"The date the income was received","examples":["2026-05-25"]},"recipient":{"type":"string","description":"Who received the income","enum":["APPLICANT","CO_APPLICANT"],"examples":["APPLICANT"]}}},"JobApplication":{"type":"object","description":"A job application reported by the applicant or co-applicant.","properties":{"person":{"type":"string","description":"Which person submitted the job application","examples":["APPLICANT"]},"applicationDate":{"type":"string","format":"date","description":"The date the job application was submitted","examples":["2026-05-20"]},"jobTitle":{"type":"string","description":"The job title applied for","examples":["Lagerarbetare"],"maxLength":255,"minLength":0},"employerAndPlace":{"type":"string","description":"Employer and place of work","examples":["PostNord, Sundsvall"],"maxLength":255,"minLength":0}}},"PendingBenefit":{"type":"object","description":"A benefit the applicant has applied for but not yet received a decision on.","properties":{"benefitName":{"type":"string","description":"Name of the pending benefit","examples":["Bostadsbidrag"],"maxLength":255,"minLength":0},"applicantName":{"type":"string","description":"Name of the person who applied for the benefit","examples":["Anna Andersson"],"maxLength":255,"minLength":0}}},"Person":{"type":"object","description":"A person (applicant or co-applicant) on the financial assistance application.","properties":{"role":{"type":"string","description":"Role of the person","enum":["APPLICANT","CO_APPLICANT"],"examples":["APPLICANT"]},"partyId":{"type":"string","description":"Party id (personId GUID) of the person","examples":["f47ac10b-58cc-4372-a567-0e02b2c3d479"],"maxLength":36,"minLength":0},"needsInterpreter":{"type":"boolean","description":"Whether the person needs an interpreter","examples":[true]},"interpreterLanguage":{"type":"string","description":"Language the interpreter should use","examples":["Arabiska"],"maxLength":64,"minLength":0},"hadWorkLast12Months":{"type":"boolean","description":"Whether the person had work during the last 12 months","examples":[false]},"hadWorkDescription":{"type":"string","description":"Description of the work the person had","examples":["Substitute in home care services"]},"paymentMethod":{"type":"string","description":"Payment method","enum":["BANK_ACCOUNT","OTHER"],"examples":["BANK_ACCOUNT"]},"clearingNumber":{"type":"string","description":"Clearing number of the bank account","examples":["8327-9"],"maxLength":16,"minLength":0},"accountNumber":{"type":"string","description":"Bank account number","examples":["123456789"],"maxLength":32,"minLength":0},"otherPaymentDescription":{"type":"string","description":"Description of the payment method when OTHER","examples":["Paymentskort"]},"paymentSameAsPrevious":{"type":"boolean","description":"Whether the payment details are the same as previously used","examples":[true]},"email":{"type":"string","description":"Email address used for notifications about the application","examples":["anna.andersson@example.com"],"maxLength":128,"minLength":0},"phone":{"type":"string","description":"Phone number used for SMS notifications about the application","examples":["+46701234567"],"maxLength":32,"minLength":0},"notifyByEmail":{"type":"boolean","description":"Whether the person wants notifications about the application by email","examples":[true]},"notifyBySms":{"type":"boolean","description":"Whether the person wants notifications about the application by SMS","examples":[true]}}},"PlannedActivity":{"type":"object","description":"A planned activity for the applicant or co-applicant.","properties":{"person":{"type":"string","description":"Which person the activity concerns","examples":["APPLICANT"]},"activity":{"type":"string","description":"Description of the activity","examples":["Work training placement"]},"periodFrom":{"type":"string","format":"date","description":"Period from date","examples":["2026-06-01"]},"periodTo":{"type":"string","format":"date","description":"Period to date","examples":["2026-08-31"]}}},"Planning":{"type":"object","description":"The applicant's or co-applicant's planning towards self-sufficiency.","properties":{"person":{"type":"string","description":"Which person the planning concerns","enum":["APPLICANT","CO_APPLICANT"],"examples":["APPLICANT"]},"planningType":{"type":"string","description":"The type of planning","enum":["WORK","JOBSEEKING","SICK_LEAVE","SFI","OTHER"],"examples":["WORK"]},"workExtent":{"type":"string","description":"Extent of work","enum":["FULL","PART"],"examples":["FULL"]},"workDescription":{"type":"string","description":"Description of the work","examples":["Permanent employment as an assistant nurse"]},"sickLeaveLevel":{"type":"string","description":"Level of sick leave (percent)","enum":["100","75","50","25"],"examples":["100"]},"sickLeaveFrom":{"type":"string","format":"date","description":"First day of the sick-leave period stated on the medical certificate","examples":["2026-09-01"]},"sickLeaveTo":{"type":"string","format":"date","description":"Last day of the sick-leave period stated on the medical certificate","examples":["2026-09-30"]},"sfiStudyPath":{"type":"string","description":"SFI study path","enum":["1","2","3"],"examples":["1"]},"sfiCourse":{"type":"string","description":"SFI course","enum":["A","B","C","D"],"examples":["B"]},"otherDescription":{"type":"string","description":"Description of other planning","examples":["Internship via the employment agency"]}}},"ContactChannel":{"type":"object","description":"ContactChannel model","properties":{"key":{"type":"string","description":"The key of the contact channel","examples":["Email"],"maxLength":64,"minLength":0},"value":{"type":"string","description":"The value of the contact channel","examples":["joe.doe@example.com"]}}},"Stakeholder":{"type":"object","description":"Stakeholder","properties":{"id":{"type":"string","description":"Unique identifier","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"],"readOnly":true},"externalId":{"type":"string","description":"External id for the stakeholder","examples":["81471222-5798-11e9-ae24-57fa13b361e1"],"maxLength":255,"minLength":0},"externalIdType":{"type":"string","description":"Type of external id","examples":["PRIVATE"],"maxLength":32,"minLength":0},"role":{"type":"string","description":"Role of the stakeholder on the errand","examples":["FOSTER_PARENT"]},"firstName":{"type":"string","description":"First name","examples":["Joe"],"maxLength":100,"minLength":0},"lastName":{"type":"string","description":"Last name","examples":["Doe"],"maxLength":100,"minLength":0},"organizationName":{"type":"string","description":"Organization name","examples":["Sundsvalls kommun"],"maxLength":255,"minLength":0},"address":{"type":"string","description":"Address","examples":["Storgatan 1"],"maxLength":255,"minLength":0},"careOf":{"type":"string","description":"Care of","examples":["c/o Doe"],"maxLength":255,"minLength":0},"zipCode":{"type":"string","description":"Zip code","examples":["85248"],"maxLength":10,"minLength":0},"city":{"type":"string","description":"City","examples":["Sundsvall"],"maxLength":100,"minLength":0},"country":{"type":"string","description":"Country","examples":["Sweden"],"maxLength":100,"minLength":0},"contactChannels":{"type":"array","description":"Contact channels for the stakeholder","items":{"$ref":"#/components/schemas/ContactChannel"}}}},"Referral":{"type":"object","description":"A referral/consultation on an errand, with the receiving authority, due date and status.","properties":{"id":{"type":"string","description":"Unique id","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"],"readOnly":true},"authority":{"type":"string","description":"The receiving authority (namespace-defined)","examples":["ENVIRONMENTAL_OFFICE"],"maxLength":64,"minLength":0},"recipient":{"type":"string","description":"Recipient (name/unit)","examples":["Environmental Office, Sundsvall"],"maxLength":255,"minLength":0},"sentAt":{"type":"string","format":"date","description":"Date the referral was sent. Defaults to today when omitted.","examples":["2026-06-03"]},"dueAt":{"type":"string","format":"date","description":"Response due date","examples":["2026-07-01"]},"responseText":{"type":"string","description":"Response to the referral","examples":["The authority has no objection."],"maxLength":4096,"minLength":0},"status":{"type":"string","description":"Status","enum":["SENT","RESPONDED"],"examples":["SENT"]},"created":{"type":"string","format":"date-time","description":"Created","readOnly":true},"modified":{"type":"string","format":"date-time","description":"Modified","readOnly":true}}},"ReferralResponseRequest":{"type":"object","description":"Response to a referral.","properties":{"responseText":{"type":"string","description":"Response to the referral","examples":["The authority has no objection."],"maxLength":4096,"minLength":0}},"required":["responseText"]},"ProcessMessageRequest":{"type":"object","description":"Request body for correlating a BPMN message to the process instance currently running for an errand. The errand id is used as the process business key, so the message is delivered to that specific process. Use this whenever something outside the process (a caseworker action, an external event, an admin override) needs to resume or interact with a running process instance.","properties":{"messageName":{"type":"string","description":"BPMN message name, matching the `name` attribute on the `<bpmn:message>` element the receive task references","examples":["PaymentDecisionReceived"],"minLength":1},"variables":{"type":"object","additionalProperties":{},"description":"Process variables to set when correlating the message"}},"required":["messageName"]},"Permit":{"type":"object","description":"An issued permit with a validity period, conditions and status.","properties":{"id":{"type":"string","description":"Unique id","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"],"readOnly":true},"permitType":{"type":"string","description":"The type of permit (namespace-defined)","examples":["PARKING_PERMIT"],"maxLength":64,"minLength":0},"validFrom":{"type":"string","format":"date","description":"Valid from (decision date). Defaults to today when omitted.","examples":["2026-06-03"]},"validUntil":{"type":"string","format":"date","description":"Valid until and including. Open-ended when omitted.","examples":["2031-09-01"]},"conditions":{"type":"string","description":"Conditions for the permit","examples":["Unloading may only take place during daytime."],"maxLength":4096,"minLength":0},"status":{"type":"string","description":"Status","enum":["ACTIVE","REVOKED"],"examples":["ACTIVE"]},"created":{"type":"string","format":"date-time","description":"Created","readOnly":true},"modified":{"type":"string","format":"date-time","description":"Modified","readOnly":true}}},"Notification":{"type":"object","description":"User-facing notification raised against an errand. Mutable: callers acknowledge (acknowledged=true) when the recipient has seen it and mark it handled (handled=true) when the recipient has acted on it; expired notifications are purged by a background job.","properties":{"id":{"type":"string","description":"Unique identifier","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"],"readOnly":true},"errandId":{"type":"string","description":"Id of the errand the notification belongs to (server-assigned from path)","examples":["b82bd8ac-1507-4d9a-958d-369261eecc15"],"readOnly":true},"ownerId":{"type":"string","description":"User id of the recipient (the user who should see this notification)","examples":["jane01doe"],"maxLength":64,"minLength":0},"createdBy":{"type":"string","description":"User or system id that produced the notification. Automatically acknowledged if equal to ownerId.","examples":["john02doe"],"maxLength":64,"minLength":0},"type":{"type":"string","description":"Notification type","enum":["CREATE","UPDATE","DELETE"],"examples":["CREATE"]},"typeDisplayName":{"type":"string","description":"Swedish display name for the notification type","examples":["Skapad"],"readOnly":true},"subType":{"type":"string","description":"Notification sub-type","enum":["ERRAND","DECISION","ATTACHMENT","STAKEHOLDER","PARAMETER","MESSAGE","SYSTEM"],"examples":["ERRAND"]},"subTypeDisplayName":{"type":"string","description":"Swedish display name for the notification sub-type","examples":["Ärende"],"readOnly":true},"description":{"type":"string","description":"Short human-readable description","examples":["Nytt ärende har tilldelats dig"]},"content":{"type":"string","description":"Optional longer content / body","examples":["You have been assigned a new errand regarding financial assistance."]},"acknowledged":{"type":"boolean","description":"Acknowledgement state - the recipient has seen the notification. On PATCH, null leaves the value unchanged; true/false sets it. The bulk-acknowledge endpoint flips this to true for every notification on an errand.","examples":[false]},"handled":{"type":"boolean","description":"Handled state - the recipient has acted on the notification, not merely seen it. On PATCH, null leaves the value unchanged; true/false sets it, and setting it to true also acknowledges the notification. The bulk-handle endpoint flips this to true for every notification on an errand.","examples":[false]},"expires":{"type":"string","format":"date-time","description":"Timestamp after which the notification is eligible for cleanup (server-assigned)","readOnly":true},"created":{"type":"string","format":"date-time","description":"Creation timestamp (server-assigned)","readOnly":true},"modified":{"type":"string","format":"date-time","description":"Last-modified timestamp (server-assigned)","readOnly":true}}},"CreateNote":{"type":"object","properties":{"body":{"type":"string","maxLength":8192,"minLength":0},"author":{"type":"string","maxLength":64,"minLength":0}},"required":["body"]},"CreateMessage":{"type":"object","description":"A new message in the errand's conversation","properties":{"direction":{"type":"string","description":"Direction: OUTBOUND = caseworker → applicant, INBOUND = applicant → caseworker","enum":["INBOUND","OUTBOUND"],"examples":["OUTBOUND"],"minLength":1},"body":{"type":"string","description":"Message text","examples":["Please complete your application with a valid certificate."],"maxLength":8192,"minLength":0},"author":{"type":"string","description":"Author id (the caseworker's user id or the applicant's identifier)","examples":["joe01doe"],"maxLength":64,"minLength":0},"inReplyToId":{"type":"string","description":"Id of the message this one replies to. Optional; when set it must reference a message on the same errand.","examples":["f47ac10b-58cc-4372-a567-0e02b2c3d479"]}},"required":["body","direction"]},"MarkMessagesRead":{"type":"object","description":"The messages the caller has read, to be marked as read for the calling side","properties":{"messageIds":{"type":"array","description":"Ids of the read messages. Must reference messages on the same errand.","examples":[["f47ac10b-58cc-4372-a567-0e02b2c3d479"]],"items":{"type":"string"},"minItems":1}},"required":["messageIds"]},"Decision":{"type":"object","description":"Decision recorded against an errand. Both system-generated decisions (e.g. a DMN-evaluated recommendation produced by a BPMN process) and human decisions (e.g. a caseworker approving a payment) are stored here, distinguished by `decisionType`. The list on the errand grows over time and is the audit trail of every decision made on the case.","properties":{"id":{"type":"string","description":"Unique identifier","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"],"readOnly":true},"decisionType":{"type":"string","description":"Decision category. Free-form string; conventionally `RECOMMENDATION` for DMN-produced suggestions and `PAYMENT` for caseworker APPROVE/REJECT decisions, but namespaces are encouraged to define their own.","examples":["PAYMENT"],"maxLength":32,"minLength":0},"value":{"type":"string","description":"Decision value. For binary outcomes use `APPROVED`/`REJECTED`; for richer outputs (e.g. a calculated amount) use the value itself or a short label.","examples":["APPROVED"],"maxLength":255,"minLength":0},"description":{"type":"string","description":"Optional human-readable description or motivation for the decision","examples":["Decision proposal per ruleset: 7900 kr, no warning"],"maxLength":4096,"minLength":0},"coApplicantReason":{"type":"string","description":"The co-applicant's orsak, when the household has a co-applicant and the decision carries one; description carries the applicant's.","examples":["Beviljad"],"maxLength":255,"minLength":0},"amount":{"type":"number","description":"Optional decision amount, in SEK. For a financial-assistance decision this is the granted amount (0 for a rejection); for a recommendation it is the recommended amount when the pipeline has computed one.","examples":[7900.0]},"decisionMessage":{"type":"string","description":"Optional decision message communicated to the applicant — the free-text justification shown on the decision letter, kept separate from the internal `description`.","examples":["Du beviljas ekonomiskt bistånd för juni 2026 enligt riksnorm."],"maxLength":8192,"minLength":0},"decisionDate":{"type":"string","format":"date","description":"Optional date the decision applies (the caseworker-chosen decision date), distinct from the server-assigned `created` audit timestamp.","examples":["2026-06-18"]},"periodFrom":{"type":"string","format":"date","description":"Optional start of the period the decision covers (the month applied for, for a financial-assistance decision).","examples":["2026-06-01"]},"periodTo":{"type":"string","format":"date","description":"Optional end of the period the decision covers.","examples":["2026-06-30"]},"createdBy":{"type":"string","description":"Identifier of the actor that produced the decision. Use the caseworker userId for human decisions or a system identifier (e.g. `operaton`, `dmn-engine`) for automated ones.","examples":["jane01doe"],"maxLength":64,"minLength":0},"lifecareStatus":{"type":"string","description":"Where the decision stands in Lifecare: SYNCED once it is receipted against the beslut careM saved there. Null for a decision that is never written to Lifecare.","enum":["PENDING","SYNCED"],"examples":["SYNCED"],"readOnly":true},"lifecareId":{"type":"string","description":"The decision's id in Lifecare, once written there","examples":["88123"],"readOnly":true},"created":{"type":"string","format":"date-time","description":"Timestamp the decision was recorded (server-assigned)","readOnly":true}}},"AddCoCaseworker":{"type":"object","description":"Request to add a co-caseworker (medhandläggare) to an errand","properties":{"userId":{"type":"string","description":"User id of the co-caseworker to add","examples":["jane01doe"],"maxLength":64,"minLength":0}},"required":["userId"]},"CreateWarningRequest":{"type":"object","description":"Request to create a financial assistance income warning on an errand (no Lifecare round-trip).","properties":{"type":{"type":"string","description":"The warning type","enum":["UNHANDLED_INCOME","INCOME_CHANGE","MISSING_SSBTEK","NEW_INCOME","NEW_EXPENSE","NEW_PERSON","INCOME_DROPPED","HOUSEHOLD_CHANGE"],"examples":["UNHANDLED_INCOME"],"minLength":1},"message":{"type":"string","description":"Human-readable warning text","examples":["Swish deposits: 2 400 kr - not transferred, requires manual assessment"],"minLength":1},"sourceKey":{"type":"string","description":"A stable key for the income the warning concerns (benefit/incomeType) — the dedup key. Derived from the message when omitted.","examples":["Swish deposits"],"maxLength":255,"minLength":0}},"required":["message","type"]},"Warning":{"type":"object","description":"A financial assistance income warning the caseworker can acknowledge or close.","properties":{"id":{"type":"string","description":"The warning id","examples":["f47ac10b-58cc-4372-a567-0e02b2c3d479"],"readOnly":true},"type":{"type":"string","description":"The warning type (machine code; use typeDisplayName for the label)","enum":["UNHANDLED_INCOME","INCOME_CHANGE","MISSING_SSBTEK","NEW_INCOME","NEW_EXPENSE","NEW_PERSON","INCOME_DROPPED","HOUSEHOLD_CHANGE","HOUSING_COST_CHANGE","EXPENSE_REVIEW","INCOME_DUPLICATED","CHILD_NOT_FULL_TIME","CHILDREN_RESIDENCE_CHANGED","HOUSING_SITUATION_CHANGED","SALARY_JOB_STIMULUS","PENDING_BENEFIT","NEW_ASSETS","PLANNING_REVIEW","PAYMENT_METHOD_CHANGED","ATTACHMENTS_PRESENT","STAY_OUTSIDE_MUNICIPALITY","APPLICATION_REVIEW","INCOME_MISSING_VS_PREVIOUS_CALCULATION","INCOME_AMOUNT_MISMATCH_PREVIOUS_CALCULATION","CHILDREN_MISMATCH_PREVIOUS_CALCULATION","HOUSEHOLD_COUNT_MISMATCH_PREVIOUS_CALCULATION","NORM_MISMATCH_PREVIOUS_CALCULATION","SSBTEK_DAY_CHECK","PARENTAL_BENEFIT_PERIOD_CHECK","PREVIOUS_DECISION_ADVANCE_ON_BENEFIT","EXPENSE_PARTIALLY_REJECTED","CO_APPLICANT_SPLIT_PAYMENT","SSBTEK_READ_FAILED","INCOME_MISSING_PREVIOUS_PERIOD","INCOME_TRANSFERRED_LATE","INCOME_NOT_TRANSFERABLE","FAMILY_DIFFERS_FROM_APPLICATION","FAMILY_DEVIATING_PERIOD","COMMON_HOUSEHOLD_COST_CHECK","PREVIOUS_NORM_NOT_AVAILABLE","RECOVERY_CLAIM","LIFECARE_READ_FAILED","SSBTEK_CALCULATION_DIFF"],"examples":["EXPENSE_REVIEW"]},"typeDisplayName":{"type":"string","description":"Swedish display name for the warning type","examples":["Kapad kostnad"],"readOnly":true},"section":{"type":"string","description":"The Draken view section (tab) the warning belongs to — derived from the type: the decision proposal's types are DECISION, the payment warnings' are PAYMENT, a LIFECARE_READ_FAILED is on the tab whose warnings depend on the failed read (its sourceKey), everything else is CALCULATION","enum":["CALCULATION","DECISION","PAYMENT"],"examples":["CALCULATION"],"readOnly":true},"sourceKey":{"type":"string","description":"A stable key for the income the warning concerns (benefit/incomeType) — the dedup key","examples":["Bostadsbidrag"]},"message":{"type":"string","description":"Human-readable warning text (Swedish)","examples":["Saknas fortfarande i SSBTEK: Dagersättning"]},"status":{"type":"string","description":"The warning status (machine code; use statusDisplayName for the label)","enum":["OPEN","ACKNOWLEDGED","CLOSED"],"examples":["OPEN"]},"statusDisplayName":{"type":"string","description":"Swedish display name for the warning status","examples":["Öppen"],"readOnly":true},"autoResolved":{"type":"boolean","description":"Whether the warning was closed automatically (its cause resolved) rather than by a caseworker","examples":[false]},"created":{"type":"string","format":"date-time","description":"When the warning was created","readOnly":true},"updated":{"type":"string","format":"date-time","description":"When the warning was last updated","readOnly":true}}},"LifecarePaymentRequest":{"type":"object","description":"An utbetalning to register on the errand's insats in Lifecare","properties":{"paymentDate":{"type":"string","description":"Utbetalningsdatum, yyyy-MM-dd; Lifecare's proposed date when left out","examples":["2026-09-21"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amount":{"type":"number","description":"The amount; must be above 0","examples":[3000]},"applicationMonth":{"type":"string","description":"The month the utbetalning concerns, yyyy-MM","examples":["2026-09"],"pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"paymentMethod":{"type":"string","description":"The betalsätt's name, matched against Lifecare's betalsätt on the insats","examples":["Bankgiro via Plusgiro"],"maxLength":255,"minLength":0},"payeeName":{"type":"string","description":"The payee's name","examples":["Kontoinnehavare A"],"maxLength":255,"minLength":0},"payeeAddress":{"type":"string","description":"The payee's street address","examples":["Storgatan 1"],"maxLength":255,"minLength":0},"payeeCareOf":{"type":"string","description":"The payee's c/o address","examples":[""],"maxLength":255,"minLength":0},"payeeZipCode":{"type":"string","description":"The payee's postal code","examples":["85230"],"maxLength":16,"minLength":0},"payeeCity":{"type":"string","description":"The payee's postal town","examples":["Sundsvall"],"maxLength":255,"minLength":0},"clearingNumber":{"type":"string","description":"Clearing number","examples":["6000"],"maxLength":16,"minLength":0},"accountNumber":{"type":"string","description":"Account number; left out for the registered-address payee","examples":["11111111"],"maxLength":64,"minLength":0},"accountingCode":{"type":"string","description":"Kontering: the ändamål (Lifecare purpose) among the insats's konteringsrader","examples":["1"],"maxLength":64,"minLength":0},"localPaymentNumber":{"type":"string","description":"Lokalbetalningsnummer","examples":[""],"maxLength":64,"minLength":0},"invoiceNumber":{"type":"string","description":"Invoice number (Lifecare billingNumber)","examples":["123"],"maxLength":64,"minLength":0},"usesOcr":{"type":"boolean","description":"Whether the invoice number is an OCR number","examples":[false]},"messageLines":{"type":"array","description":"Message rows, at most seven","items":{"type":"string","maxLength":255,"minLength":0},"maxItems":7,"minItems":0}}},"LifecarePaymentCreated":{"type":"object","description":"An utbetalning registered in Lifecare (not the same as paid out)","properties":{"lifecareId":{"type":"string","description":"Lifecare's id for the new utbetalning","examples":["4"]},"linkedToErrand":{"type":"boolean","description":"Whether the utbetalning was linked to the errand (lifecarePaymentIds). False means it is registered in Lifecare but the errand does not point at it; it must not be registered again","examples":[true]}}},"LifecarePayeeRequest":{"type":"object","description":"A new betalningsmottagare to add in Lifecare","properties":{"name":{"type":"string","description":"The account holder","examples":["Kontoinnehavare B"],"maxLength":255,"minLength":0},"payeeName":{"type":"string","description":"The label in Lifecare's list; the account holder's name when left out","examples":["Konto B"],"maxLength":255,"minLength":0},"paymentMethod":{"type":"integer","format":"int32","description":"Lifecare's betalsätt code","examples":[14]},"clearing":{"type":"string","description":"Clearing number","examples":["6000"],"maxLength":16,"minLength":0},"accountNumber":{"type":"string","description":"Account, bankgiro or plusgiro number","examples":["22222222"],"maxLength":64,"minLength":0}},"required":["name","paymentMethod"]},"LifecarePayee":{"type":"object","description":"A betalningsmottagare in Lifecare, with the account and address an utbetalning to it copies","properties":{"id":{"type":"integer","format":"int32","description":"Lifecare's payee id","examples":[2]},"label":{"type":"string","description":"The label the payee has in Lifecare's list","examples":["Konto A"]},"name":{"type":"string","description":"The account holder","examples":["Kontoinnehavare A"]},"paymentMethodCode":{"type":"integer","format":"int32","description":"Lifecare's betalsätt code","examples":[14]},"paymentMethod":{"type":"string","description":"The betalsätt's name, as the utbetalning stores it","examples":["Bankgiro via Plusgiro"]},"clearing":{"type":"string","description":"Clearing number; empty when the betalsätt has none","examples":["6000"]},"accountNumber":{"type":"string","description":"Account, bankgiro or plusgiro number; empty for the registered-address entry","examples":["1111-1111"]},"streetAddress":{"type":"string","description":"Street address","examples":["Storgatan 1"]},"careOfAddress":{"type":"string","description":"c/o address","examples":[""]},"postalCode":{"type":"string","description":"Postal code","examples":["85230"]},"postalAddress":{"type":"string","description":"Postal town","examples":["Sundsvall"]},"toRegisteredAddress":{"type":"boolean","description":"Lifecare's Adress entry: pays to the client's registered address rather than an account","examples":[false]}}},"NormberakningRowInput":{"type":"object","description":"A normberäkning row as a caseworker adds or changes it.","properties":{"typeId":{"type":"integer","format":"int32","description":"Income: the income type id","examples":[19]},"typeName":{"type":"string","description":"Income: the income type name","examples":["Aktivitetsstöd"],"maxLength":255,"minLength":0},"applicantCaseworkerAmount":{"type":"number","description":"Income: the applicant amount","examples":[5000]},"applicantAmountDate":{"type":"string","description":"Income: the date the applicant amount is attributed to (ISO date or date-time)","examples":["2026-09-02T00:00:00+02:00"],"pattern":"^\\d{4}-\\d{2}-\\d{2}.*$"},"coapplicantCaseworkerAmount":{"type":"number","description":"Income: the co-applicant amount","examples":[0]},"coapplicantAmountDate":{"type":"string","description":"Income: the date the co-applicant amount is attributed to (ISO date or date-time)","examples":["2026-09-02T00:00:00+02:00"],"pattern":"^\\d{4}-\\d{2}-\\d{2}.*$"},"costType":{"type":"string","description":"Expense: the cost type; careM's code in the draft, Lifecare's expense code once in Lifecare","examples":["3"],"maxLength":64,"minLength":0},"bucket":{"type":"string","description":"Expense: the bucket","enum":["EXPENSE","SPECIAL_EXPENSE"],"examples":["EXPENSE"]},"otherSubType":{"type":"string","description":"Expense: the other sub-type (careM draft only)","maxLength":32,"minLength":0},"specification":{"type":"string","description":"Expense: the specification (careM draft only)"},"caseworkerAmount":{"type":"number","description":"Expense: the approved amount","examples":[4500]},"appliedAmount":{"type":"number","description":"Expense: the amount applied for","examples":[5000]},"partyId":{"type":"string","description":"Person: the party id (careM draft only)","maxLength":36,"minLength":0},"role":{"type":"string","description":"Person: the role (careM draft only)","enum":["APPLICANT","CO_APPLICANT","CHILD","VISITATION_CHILD"]},"name":{"type":"string","description":"Person: the name (careM draft only)","maxLength":255,"minLength":0},"caseworkerDays":{"type":"integer","format":"int32","description":"Person: the days in the household; none means the whole period","examples":[10]},"included":{"type":"boolean","description":"Person: whether the member is included (careM draft only)"},"deviationFromDate":{"type":"string","description":"Person: the start of the deviation, ISO date (careM draft only)","examples":["2026-09-01"],"pattern":"^\\d{4}-\\d{2}-\\d{2}.*$"},"deviationToDate":{"type":"string","description":"Person: the end of the deviation, ISO date (careM draft only)","examples":["2026-09-30"],"pattern":"^\\d{4}-\\d{2}-\\d{2}.*$"},"normInterval":{"type":"string","description":"Person: the norm interval (careM draft only)","maxLength":64,"minLength":0},"normRowId":{"type":"integer","format":"int32","description":"Person: the Lifecare norm row the member is put on (Lifecare only)","examples":[12]},"note":{"type":"string","description":"Free-text note; Lifecare takes at most 80 characters","maxLength":80,"minLength":0}}},"LifecareJobStimulusPeriodRequest":{"type":"object","description":"A new jobbstimulans period for the sökande or the medsökande","properties":{"fromDate":{"type":"string","description":"Period start, yyyy-MM-dd","examples":["2028-01-15"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"toDate":{"type":"string","description":"Period end, yyyy-MM-dd; left out, Lifecare's two-year rule sets it","examples":["2030-01-14"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"role":{"type":"string","description":"Whose period it is; the sökande's when left out","enum":["APPLICANT","CO_APPLICANT"],"examples":["CO_APPLICANT"]}},"required":["fromDate"]},"LifecareJobStimulusPeriod":{"type":"object","description":"A jobbstimulans period on the errand's insats, as Lifecare holds it","properties":{"id":{"type":"integer","format":"int32","description":"Lifecare's jobStimulusId. Lifecare gives every period a new one each time the set is saved, so it is only good until the next change","examples":[101]},"role":{"type":"string","description":"Whose period it is","enum":["APPLICANT","CO_APPLICANT"],"examples":["APPLICANT"]},"fromDate":{"type":"string","description":"Period start (yyyy-MM-dd)","examples":["2026-01-01"]},"toDate":{"type":"string","description":"Period end (yyyy-MM-dd); absent for an open-ended period","examples":["2027-12-31"]}}},"CreateLifecareJournalNoteRequest":{"type":"object","description":"A new journalanteckning, written straight to the errand's insats in Lifecare.","properties":{"content":{"type":"string","description":"The note body as HTML","examples":["<p>Hej</p>"],"maxLength":1048576,"minLength":0},"noteTypeCode":{"type":"integer","format":"int32","description":"Lifecare's noteTypeCode, from the journal-note-types endpoint","examples":[1]},"title":{"type":"string","description":"The rubrik; the note type's name when left out","examples":["Telefonsamtal"],"maxLength":255,"minLength":0},"occurenceTime":{"type":"string","description":"Documented time, HH:mm; Lifecare stamps the time of saving when left out","examples":["11:50"],"pattern":"^\\d{2}:\\d{2}$"},"occurenceDate":{"type":"string","description":"Documented date, YYYY-MM-DD; Lifecare's proposal (today) when left out","examples":["2026-09-23"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"protected":{"type":"boolean","description":"Saved skrivskyddad, after which it can no longer be changed. The note type's own default when left out.","examples":[false]}},"required":["content","noteTypeCode"]},"LifecareRecord":{"type":"object","description":"A Lifecare journalanteckning or document row, cleaned up for the UI.","properties":{"id":{"type":"string","description":"The Lifecare record id","examples":["138"]},"category":{"type":"string","description":"Which group the record is shown under","enum":["JOURNAL_NOTE","DOCUMENT"],"examples":["JOURNAL_NOTE"]},"title":{"type":"string","description":"The rubrik","examples":["Journalanteckning"]},"dateTime":{"type":"string","description":"Documented date and time, date and time joined (YYYY-MM-DDTHH:mm, or just the date)","examples":["2026-09-23T12:11"]},"type":{"type":"string","description":"Lifecare's type label","examples":["Journalanteckning"]},"ownerTypeText":{"type":"string","description":"The akt or utredning the row sits under","examples":["EK Ekonomiskt bistånd"]},"responsibleCaseworker":{"type":"string","description":"The responsible caseworker, when Lifecare names one","examples":["RPA_031DEV"]},"modifiedBy":{"type":"string","description":"Who last changed it and when, as Lifecare presents it","examples":["RPA_031DEV 2026-09-23"]},"locked":{"type":"boolean","description":"Whether Lifecare has locked the record","examples":[false]},"documentKind":{"type":"string","description":"What kind of record Lifecare says it is: Regular (a written document), Form (a blankett), Pdf (a stored file, e.g. an inkommen handling) or JournalNote","examples":["Pdf"]},"protected":{"type":"boolean","description":"Whether the record is skrivskyddad (finalised) in Lifecare","examples":[false]}}},"CreateLifecareDocumentRequest":{"type":"object","description":"A new document, written straight to the errand's insats in Lifecare.","properties":{"content":{"type":"string","description":"The document body as HTML","examples":["<p>Hej</p>"],"maxLength":1048576,"minLength":0},"documentTypeCode":{"type":"integer","format":"int32","description":"Lifecare's documentTypeCode, from the document-types endpoint","examples":[1]},"title":{"type":"string","description":"The rubrik; the document type's name when left out","examples":["Beslut om bistånd"],"maxLength":255,"minLength":0},"occurenceDate":{"type":"string","description":"Documented date, YYYY-MM-DD; Lifecare's proposal (today) when left out or when the type fixes it","examples":["2026-09-23"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"protected":{"type":"boolean","description":"Saved skrivskyddad, after which it can no longer be changed. The document type's own default when left out.","examples":[false]}},"required":["content","documentTypeCode"]},"LifecareCalculationSaveRequest":{"type":"object","description":"How the errand's normberäkning is saved in Lifecare.","properties":{"finalize":{"type":"boolean","description":"Save it as slutlig: Lifecare then allows no further change","examples":[false]}}},"LifecareCalculationSummary":{"type":"object","description":"Lifecare's summering of a beräkning.","properties":{"income":{"type":"number","description":"The incomes"},"jobStimulus":{"type":"number","description":"Jobbstimulans gross: the income it is counted on"},"jobStimulusDeduction":{"type":"number","description":"The part of the income jobbstimulans leaves out"},"norm":{"type":"number","description":"The norm"},"familyCost":{"type":"number","description":"The norm part for the members"},"commonHouseholdCost":{"type":"number","description":"The norm part for the gemensamma kostnader"},"expenses":{"type":"number","description":"The utgifter"},"sum":{"type":"number","description":"Incomes minus norm minus utgifter"},"specialExpenses":{"type":"number","description":"The levnadskostnader i övrigt"},"result":{"type":"number","description":"The överskott (positive) or underskott (negative)"}}},"LifecareCalculationView":{"type":"object","description":"The errand's beräkning as it stands in Lifecare.","properties":{"id":{"type":"integer","format":"int32","description":"Lifecare's calculation id","examples":[31]},"normName":{"type":"string","description":"The norm","examples":["Riksnorm 2026"]},"date":{"type":"string","description":"The calculation date","examples":["2026-09-24"]},"startDate":{"type":"string","description":"The start of the period","examples":["2026-09-01"]},"endDate":{"type":"string","description":"The end of the period","examples":["2026-09-30"]},"finalized":{"type":"boolean","description":"Saved as slutlig in Lifecare; it can no longer be changed then"},"updated":{"type":"string","description":"When Lifecare last saved it"},"summary":{"$ref":"#/components/schemas/LifecareCalculationSummary","description":"Lifecare's summering, absent before Lifecare has counted it"}}},"CommunicationChannels":{"type":"object","description":"The channels chosen for communicating the calculation and decision to the applicant.","properties":{"minaSidor":{"type":"boolean","description":"Send as a message in Mina sidor","examples":[true]},"digitalMailbox":{"type":"boolean","description":"Send to the applicant's digital mailbox (digital brevlåda)","examples":[false]},"letter":{"type":"boolean","description":"Send as a physical letter","examples":[false]}},"required":["digitalMailbox","letter","minaSidor"]},"FinalizeDecision":{"type":"object","description":"The caseworker's decision on the application — outcome, period, amount and what is communicated to the applicant.","properties":{"outcome":{"type":"string","description":"Decision outcome code. BIFALL/DELAVSLAG grant an amount (and require payments); AVSLAG grants nothing. DELAVSLAG is labelled \"Delvis bifall\" in the dropdown (see the errand type's decision options). AVVISNING was dropped 2026-09-21 and is no longer accepted.","enum":["BIFALL","DELAVSLAG","AVSLAG"],"examples":["BIFALL"]},"reason":{"type":"string","description":"Internal motivation for the decision — stored as the decision's description, not shown to the applicant","examples":["Inkomster enligt SSBTEK, hyra styrkt"],"maxLength":4096,"minLength":0},"coApplicantReason":{"type":"string","description":"The co-applicant's orsak, when the household has a co-applicant — picked from the same reasonOptions as reason. Stored on the decision as coApplicantReason.","examples":["Beviljad"],"maxLength":255,"minLength":0},"periodFrom":{"type":"string","format":"date","description":"Start of the period the decision covers (the month applied for)","examples":["2026-06-01"]},"periodTo":{"type":"string","format":"date","description":"End of the period the decision covers","examples":["2026-06-30"]},"amount":{"type":"number","description":"The granted amount in SEK. Required when the outcome carries an amount (BIFALL/DELAVSLAG); ignored and recorded as 0 otherwise.","examples":[7900.0],"minimum":0},"decisionMessage":{"type":"string","description":"The underrättelse — the free-text decision message communicated to the applicant on the decision letter","examples":["Du beviljas ekonomiskt bistånd för juni 2026 enligt riksnorm."],"maxLength":8192,"minLength":0}},"required":["outcome"]},"FinalizeRequest":{"type":"object","description":"Finalize a financial assistance errand: record the decision and resume the process. Carries no payments - they are registered in Lifecare beforehand through the errand's /lifecare/payments route, and the process reads them from there. A payments field from an older client is ignored. Leave out decision to have careM read the beslut saved in Lifecare.","properties":{"decision":{"$ref":"#/components/schemas/FinalizeDecision","description":"The decision. Optional: when left out, careM reads the beslut the errand is linked to in Lifecare (lifecareDecisionId) and records that - its outcome from the beslutstyp, orsak, period, amount (0 for an avslag) and beslutsmeddelande."},"communication":{"$ref":"#/components/schemas/CommunicationChannels","description":"The channels chosen for sending the calculation and decision to the applicant"},"householdSizeChanged":{"type":"boolean","description":"Whether the caseworker changed the household size (gemensamma kostnader) in the calculation draft. Recorded on the errand and served on the view. Defaults to false.","examples":[false]}},"required":["communication"]},"FinalizeResponse":{"type":"object","description":"The receipt of a finalize — decision id, process correlation and the communication channels to act on.","properties":{"decisionId":{"type":"string","description":"Id of the PAYMENT decision recorded on the errand","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"]},"processMessageCorrelated":{"type":"boolean","description":"Whether the PaymentDecisionReceived message reached the process. False means it did not reach it now — the errand stays AWAITING_DECISION and the message is queued and re-sent automatically (at most an hour apart, for three days). Draken should say so; correlating by hand through the process-messages endpoint is only needed if the retry gives up.","examples":[true]},"communication":{"$ref":"#/components/schemas/CommunicationChannels","description":"The communication channels chosen — the frontend sends the decision through these"},"lifecareDecision":{"$ref":"#/components/schemas/LifecareDecisionRegistration","description":"How the recorded decision was tied to the errand's beslut in Lifecare (lifecareDecisionId), receipted by careM in the same call.","readOnly":true}},"readOnly":true},"LifecareDecisionRegistration":{"type":"object","description":"How the finalized decision was tied to its beslut in Lifecare.","properties":{"decisionId":{"type":"string","description":"The PAYMENT decision careM recorded","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"]},"outcome":{"type":"string","description":"REGISTERED: the beslut is in Lifecare and the decision is marked SYNCED with its id","enum":["REGISTERED","FAILED","NOT_SENT"],"examples":["REGISTERED"]},"lifecareId":{"type":"string","description":"Lifecare's decisionId","examples":["98"]},"detail":{"type":"string","description":"What went wrong, when something did"}},"readOnly":true},"AppliedSsbtekChange":{"type":"object","description":"One income written into the Lifecare calculation from SSBTEK","properties":{"role":{"type":"string","description":"Whose income","enum":["APPLICANT","CO_APPLICANT"],"examples":["APPLICANT"]},"incomeType":{"type":"string","description":"The Lifecare income type name, as the change named it","examples":["Lön"],"minLength":1},"amount":{"type":"number","description":"The amount now in the calculation; null when the income was removed from it","examples":[12400.0]}},"required":["incomeType","role"]},"AppliedSsbtekChanges":{"type":"object","description":"What was written into the Lifecare calculation from SSBTEK","properties":{"calculationId":{"type":"integer","format":"int32","description":"The Lifecare calculation written to — must be the errand's lifecareCalculationId","examples":[48213]},"applied":{"type":"array","description":"The incomes written","items":{"$ref":"#/components/schemas/AppliedSsbtekChange"},"minItems":1}},"required":["applied","calculationId"]},"NormPersonInput":{"type":"object","description":"What a caseworker sends to add or patch a person row (identity + caseworker-writable fields only).","properties":{"partyId":{"type":"string","description":"The party id of the household member","examples":["f47ac10b-58cc-4372-a567-0e02b2c3d479"],"maxLength":36,"minLength":0},"role":{"type":"string","description":"The role of the household member","enum":["APPLICANT","CO_APPLICANT","CHILD"],"examples":["APPLICANT"]},"name":{"type":"string","description":"The name of the household member","examples":["Anna Andersson"],"maxLength":255,"minLength":0},"caseworkerDays":{"type":"integer","format":"int32","description":"The number of days the caseworker decided","examples":[15]},"included":{"type":"boolean","description":"Whether the household member is included in the norm","examples":[true]},"deviationFromDate":{"type":"string","format":"date","description":"The start date of the member's deviation from the household","examples":["2026-06-01"]},"deviationToDate":{"type":"string","format":"date","description":"The end date of the member's deviation from the household","examples":["2026-06-30"]},"normInterval":{"type":"string","description":"The norm interval applied to the member","examples":["4-6 år"],"maxLength":64,"minLength":0},"note":{"type":"string","description":"Free-text note","examples":["Justerat efter inlämnat underlag"]}}},"NormPersonRow":{"type":"object","description":"One person row of the calculation draft (household member, process vs caseworker days).","properties":{"id":{"type":"string","description":"The row id","readOnly":true},"origin":{"type":"string","description":"Who created the row: the process or a caseworker","enum":["SYSTEM","CASEWORKER"],"readOnly":true},"position":{"type":"integer","format":"int32","description":"Stable 0-based position of the row within its section; assigned on creation and kept across refreshes so the row stays in place","examples":[0],"readOnly":true},"partyId":{"type":"string","description":"The party id of the household member","readOnly":true},"role":{"type":"string","description":"The role of the household member (machine code; use roleDisplayName for the label)","enum":["APPLICANT","CO_APPLICANT","CHILD","VISITATION_CHILD"],"readOnly":true},"roleDisplayName":{"type":"string","description":"Swedish display name for the role","examples":["Medsökande"],"readOnly":true},"name":{"type":"string","description":"The name of the household member","readOnly":true},"processDays":{"type":"integer","format":"int32","description":"The number of days in the home the process derived","examples":[30],"readOnly":true},"caseworkerDays":{"type":"integer","format":"int32","description":"The number of days a caseworker decided; overrides the process value when set","examples":[15]},"effectiveDays":{"type":"integer","format":"int32","description":"The number of days actually used (caseworker value when set, otherwise process value)","readOnly":true},"included":{"type":"boolean","description":"Whether the household member is included in the norm"},"deviationFromDate":{"type":"string","format":"date","description":"The start date of the member's deviation from the household"},"deviationToDate":{"type":"string","format":"date","description":"The end date of the member's deviation from the household"},"normInterval":{"type":"string","description":"The norm interval applied to the member"},"amount":{"type":"number","description":"The member's own share of the norm (the Belopp column of Lifecare's Beräkning view); carried over from the previous calculation, the norm itself is computed in Lifecare","examples":[1431.0],"readOnly":true},"deleted":{"type":"boolean","description":"Whether the row is soft-deleted (excluded from the calculation, not resurrected by the daily refresh)","readOnly":true},"note":{"type":"string","description":"Free-text note"},"created":{"type":"string","format":"date-time","description":"When the row was created","readOnly":true},"updated":{"type":"string","format":"date-time","description":"When the row was last updated","readOnly":true}}},"NormIncomeInput":{"type":"object","description":"What a caseworker sends to add or patch an income row (identity + caseworker-writable fields only).","properties":{"typeId":{"type":"integer","format":"int32","description":"The FamilyCare income-type id","examples":[20]},"typeName":{"type":"string","description":"The FamilyCare income-type name","examples":["Bostadsbidrag"],"maxLength":255,"minLength":0},"applicantCaseworkerAmount":{"type":"number","description":"The amount the caseworker decided for the applicant","examples":[1900.0]},"applicantAmountDate":{"type":"string","format":"date-time","description":"The date the applicant amount is attributed to","examples":["2026-06-01T00:00:00Z"]},"coapplicantCaseworkerAmount":{"type":"number","description":"The amount the caseworker decided for the co-applicant","examples":[1900.0]},"coapplicantAmountDate":{"type":"string","format":"date-time","description":"The date the co-applicant amount is attributed to","examples":["2026-06-01T00:00:00Z"]},"note":{"type":"string","description":"Free-text note","examples":["Justerat belopp enligt underlag"]}}},"NormIncomeRow":{"type":"object","description":"One income row of the calculation draft (FamilyCare income type with applicant/co-applicant sides, process vs caseworker amounts).","properties":{"id":{"type":"string","description":"The row id","readOnly":true},"origin":{"type":"string","description":"Who created the row: the process from SSBTEK (SYSTEM), the process from the application's declared incomes (APPLICATION) or a caseworker","enum":["SYSTEM","APPLICATION","CASEWORKER"],"readOnly":true},"position":{"type":"integer","format":"int32","description":"Stable 0-based position of the row within its section; assigned on creation and kept across refreshes so the row stays in place","examples":[0],"readOnly":true},"typeId":{"type":"integer","format":"int32","description":"The FamilyCare income-type id","examples":[20],"readOnly":true},"typeName":{"type":"string","description":"The FamilyCare income-type name","examples":["Bostadsbidrag"],"readOnly":true},"applicantProcessAmount":{"type":"number","description":"The amount the process decided for the applicant (from the classified SSBTEK income)","examples":[1850.0],"readOnly":true},"applicantCaseworkerAmount":{"type":"number","description":"The amount a caseworker decided for the applicant; overrides the process amount when set","examples":[1900.0]},"applicantEffectiveAmount":{"type":"number","description":"The amount actually used for the applicant (caseworker amount when set, otherwise process amount)","readOnly":true},"applicantAmountDate":{"type":"string","format":"date-time","description":"The date the applicant amount is attributed to"},"coapplicantProcessAmount":{"type":"number","description":"The amount the process decided for the co-applicant (from the classified SSBTEK income)","examples":[1850.0],"readOnly":true},"coapplicantCaseworkerAmount":{"type":"number","description":"The amount a caseworker decided for the co-applicant; overrides the process amount when set","examples":[1900.0]},"coapplicantEffectiveAmount":{"type":"number","description":"The amount actually used for the co-applicant (caseworker amount when set, otherwise process amount)","readOnly":true},"coapplicantAmountDate":{"type":"string","format":"date-time","description":"The date the co-applicant amount is attributed to"},"deleted":{"type":"boolean","description":"Whether the row is soft-deleted (excluded from the calculation, not resurrected by the daily refresh)","readOnly":true},"note":{"type":"string","description":"Free-text note","examples":["SSBTEK: Bostadsbidrag"]},"created":{"type":"string","format":"date-time","description":"When the row was created","readOnly":true},"updated":{"type":"string","format":"date-time","description":"When the row was last updated","readOnly":true}}},"NormExpenseInput":{"type":"object","description":"What a caseworker sends to add or patch an expense row (identity + caseworker-writable fields only).","properties":{"costType":{"type":"string","description":"The cost type","examples":["Hyra"],"maxLength":64,"minLength":0},"bucket":{"type":"string","description":"Which Lifecare bucket the expense posts to","enum":["EXPENSE","SPECIAL_EXPENSE"],"examples":["EXPENSE"]},"otherSubType":{"type":"string","description":"The other sub-type (when the cost type is 'other')","examples":["Övrigt"],"maxLength":32,"minLength":0},"specification":{"type":"string","description":"The cost specification","examples":["Hyra för juni 2026"]},"appliedAmount":{"type":"number","description":"The amount applied for (ansökt). Honoured on both create and patch.","examples":[1100.0]},"caseworkerAmount":{"type":"number","description":"The amount the caseworker decided","examples":[1100.0]},"note":{"type":"string","description":"Free-text note","examples":["Godkänd enligt underlag"]}}},"NormExpenseRow":{"type":"object","description":"One expense row of the calculation draft (applied cost, process vs caseworker amount).","properties":{"id":{"type":"string","description":"The row id","readOnly":true},"origin":{"type":"string","description":"Who created the row: the process or a caseworker","enum":["SYSTEM","CASEWORKER"],"readOnly":true},"position":{"type":"integer","format":"int32","description":"Stable 0-based position of the row within its section; assigned on creation and kept across refreshes so the row stays in place","examples":[0],"readOnly":true},"bucket":{"type":"string","description":"Which Lifecare bucket the expense posts to","enum":["EXPENSE","SPECIAL_EXPENSE"],"readOnly":true},"costType":{"type":"string","description":"The cost type (machine code; use costTypeDisplayName for the label)","examples":["RENT"],"readOnly":true},"costTypeDisplayName":{"type":"string","description":"Swedish display name for the cost type — the Lifecare label from the type catalogue","examples":["Boendekostnad"],"readOnly":true},"otherSubType":{"type":"string","description":"The other sub-type (when the cost type is 'other')","readOnly":true},"specification":{"type":"string","description":"The cost specification","readOnly":true},"appliedAmount":{"type":"number","description":"The amount the citizen applied for (ansökt); editable by a caseworker","examples":[1200.0]},"processAmount":{"type":"number","description":"The amount the rules allowed (the process amount)","examples":[1000.0],"readOnly":true},"caseworkerAmount":{"type":"number","description":"The amount a caseworker decided; overrides the process amount when set","examples":[1100.0]},"effectiveAmount":{"type":"number","description":"The amount actually used (caseworker amount when set, otherwise process amount)","readOnly":true},"deleted":{"type":"boolean","description":"Whether the row is soft-deleted (excluded from the calculation, not resurrected by the daily refresh)","readOnly":true},"note":{"type":"string","description":"Free-text note"},"created":{"type":"string","format":"date-time","description":"When the row was created","readOnly":true},"updated":{"type":"string","format":"date-time","description":"When the row was last updated","readOnly":true}}},"PaymentStatusRequest":{"type":"object","description":"Request to read whether the Lifecare payment for an application month has been effectuated.","properties":{"errandId":{"type":"string","description":"The errand whose payments to verify. When given, the check is errand-specific: the Lifecare payments linked to the\nerrand (lifecarePaymentIds), else the applicant's Lifecare payments on the errand's own insats for the application month that no other errand references. Without it, any\nLifecare payment for the applicant and application month counts — kept only for callers that predate the field.","examples":["a3c1f4de-2b6a-4c1e-9d3f-7e8a9b0c1d2e"]},"applicant":{"type":"string","description":"The applicant's partyId (personId GUID)","examples":["f47ac10b-58cc-4372-a567-0e02b2c3d479"]},"applicationMonth":{"type":"string","description":"The application month (ISO year-month, yyyy-MM) the payment concerns","examples":["2026-06"],"pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["applicant","applicationMonth"]},"PaymentStatusResponse":{"type":"object","description":"Whether the Lifecare payment for the application month has been effectuated.","properties":{"effectuated":{"type":"boolean","description":"True when Lifecare reports the errand's payments paid (or, without an errand, a payment for the application month)","examples":[true]},"paymentDate":{"type":"string","description":"The date the payment was made (Lifecare PayDate), when effectuated","examples":["2026-05-27"]},"detail":{"type":"string","description":"Why the status is not effectuated, in words a caseworker can act on; empty when effectuated","examples":["1 av 2 kopplade utbetalningar är inte utbetalda i Lifecare ännu"]},"deadline":{"type":"string","description":"The last working day the errand's payments may wait, counted from the decision (ISO date); absent without an errand","examples":["2026-09-28"]},"overdue":{"type":"boolean","description":"True when the payments are still not effectuated after the deadline — the process then notifies the caseworker. Never closes anything.","examples":[false]}}},"EligibilityRequest":{"type":"object","description":"Request to evaluate which financial assistance application a citizen should be offered.","properties":{"applicant":{"type":"string","description":"The applicant's partyId (personId GUID)","examples":["f47ac10b-58cc-4372-a567-0e02b2c3d479"]},"coApplicant":{"type":"string","description":"The co-applicant's (co-applicant) partyId (personId GUID), when applying together with a partner","examples":["a1b2c3d4-e5f6-7890-abcd-ef1234567890"]}},"required":["applicant"]},"ApplicationSuggestion":{"type":"object","description":"A suggested application the citizen can submit, with its target period.","properties":{"typeSlug":{"type":"string","description":"The errand type slug to create the application against","enum":["financial-assistance-new","financial-assistance-renewal","financial-assistance-supplementary"],"examples":["financial-assistance-renewal"]},"applicationType":{"type":"string","description":"The application type the slug maps to","enum":["NEW","RENEWAL","SUPPLEMENTARY"],"examples":["RENEWAL"]},"periodMonth":{"type":"integer","format":"int32","description":"Month (1-12) the suggested application concerns. Null for a new application, which has no prior period.","examples":[7]},"periodYear":{"type":"integer","format":"int32","description":"Year the suggested application concerns. Null for a new application.","examples":[2026]},"recommended":{"type":"boolean","description":"True for the primary suggestion the citizen should be guided towards","examples":[true]},"label":{"type":"string","description":"Human-readable Swedish label for the suggestion","examples":["Återansökan för juli 2026"]},"description":{"type":"string","description":"Swedish explanation of when this application type applies, shown to the citizen next to the label. Null when no wording has been agreed for the type.","examples":["du har ansökt tidigare och inte haft ett längre uppehåll"]}}},"EligibilityResponse":{"type":"object","description":"Eligibility result: which application(s) the citizen should be offered, plus the supporting facts.","properties":{"suggestions":{"type":"array","description":"Suggested applications, ordered with the recommended one first.","items":{"$ref":"#/components/schemas/ApplicationSuggestion"}},"reasonCode":{"type":"string","description":"Machine-readable code for the gate that drove the suggestion","enum":["NO_EXISTING_CASE","MARITAL_STATUS_CHANGED","RECENTLY_CLOSED","NO_RECENT_DECISION","ONGOING_APPLICATION","EXISTING_CASE","ALL_TYPES_TEST"],"examples":["EXISTING_CASE"]},"message":{"type":"string","description":"Human-readable Swedish explanation of the suggestion","examples":["Befintligt ärende utan beslut för aktuell månad. Föreslår en återansökan för aktuell månad."]},"introText":{"type":"string","description":"Swedish introduction shown to the citizen above the suggestion list, phrased for one or two applicants. Null when no application can be offered.","examples":["Utifrån dina uppgifter kan du göra någon av följande ansökningar:"]},"existsInCm":{"type":"boolean","description":"True when the applicant already has a financial assistance errand in caremanagement","examples":[true]},"existsInLc":{"type":"boolean","description":"True when the applicant has a financial assistance footprint in Lifecare (actualisation/decision/calculation)","examples":[true]},"hasOpenCase":{"type":"boolean","description":"True when Lifecare shows an actualisation with an open status, false when the statuses were readable but none is open, null when no actualisation carried a readable status (or Lifecare was not reached).","examples":[true]},"maritalStatusMatches":{"type":"boolean","description":"Whether the requested marital status (alone vs with a partner) matches the previous application. Null when not evaluated (no existing case).","examples":[true]},"windowDays":{"type":"integer","format":"int32","description":"The staleness bound in days applied to ongoing caremanagement applications in the per-month check","examples":[90]},"applicationExistsThisMonth":{"type":"boolean","description":"True when the current month is already taken — an ongoing application in caremanagement, or a decision in Lifecare","examples":[false]},"applicationExistsNextMonth":{"type":"boolean","description":"True when next month is already taken — an ongoing application in caremanagement, or a decision in Lifecare","examples":[false]},"currentMonthDecided":{"type":"boolean","description":"True when Lifecare shows a decision for the current month (the current month is decided/closed)","examples":[false]},"previousMonthDecided":{"type":"boolean","description":"True when Lifecare shows a decision for the previous month","examples":[true]},"monthBeforePreviousDecided":{"type":"boolean","description":"True when Lifecare shows a decision for the month before the previous one","examples":[false]},"latestDecisionPeriodMonth":{"type":"integer","format":"int32","description":"Month (1-12) of the most recent Lifecare decision, when one exists","examples":[5]},"latestDecisionPeriodYear":{"type":"integer","format":"int32","description":"Year of the most recent Lifecare decision, when one exists","examples":[2026]},"hasPreviousCalculation":{"type":"boolean","description":"True when Lifecare shows a previous calculation","examples":[true]},"lifecareChecked":{"type":"boolean","description":"True when the Lifecare lookup succeeded. False means the answer is degraded (CM-only).","examples":[true]},"hasCoApplicant":{"type":"boolean","description":"True when the request included a co-applicant (co-applicant)","examples":[false]},"reopenableErrandId":{"type":"string","description":"When reasonCode is RECENTLY_CLOSED: the id of the recently closed errand a caseworker can reopen (in Lifecare) and release. Null otherwise.","examples":["a1b2c3d4-e5f6-7890-abcd-ef1234567890"]},"closedAt":{"type":"string","format":"date-time","description":"When reasonCode is RECENTLY_CLOSED: when the reopenable errand was closed. Null otherwise.","examples":["2026-06-20T10:15:30Z"]}}},"CalculationRequest":{"type":"object","description":"Request to build and post the SSBTEK-driven calculation for an application month.","properties":{"applicant":{"type":"string","description":"The applicant's partyId (personId GUID)","examples":["f47ac10b-58cc-4372-a567-0e02b2c3d479"]},"coApplicant":{"type":"string","description":"The co-applicant's (co-applicant) partyId (personId GUID), when applying together with a partner","examples":["a1b2c3d4-e5f6-7890-abcd-ef1234567890"]},"applicationMonth":{"type":"string","description":"The application month (ISO year-month, yyyy-MM)","examples":["2026-06"],"pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"errandId":{"type":"string","description":"The id of the caremanagement errand the calculation concerns — used to load the errand and, on the daily prepare, to record the Decision(RECOMMENDATION) the caseworker reviews.","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"]},"classifiedIncomes":{"type":"string","description":"The incomes classified by the operaton rules (the evaluate-income-rules worker output), as JSON. When present, caremanagement maps these to FamilyCare income rows instead of fetching SSBTEK and evaluating the raw list itself."},"unhandledIncomes":{"type":"array","description":"The unhandled-income warnings from the operaton rules, recorded on the errand recommendation","items":{"type":"string"}},"changeWarnings":{"type":"array","description":"Ignored. The period-over-period change warnings the operaton rules still send; caremanagement compares against the previous normberäkning itself","items":{"type":"string"}},"ssbtekError":{"type":"boolean","description":"Whether SSBTEK could not be read for this run. True means the rules were deliberately not evaluated: the calculation is left exactly as it stands and the errand carries the read-failure warning until a later run succeeds. Absent is read as false, so a caller that does not know about the flag behaves as before.","examples":[false]},"dayCheckBasis":{"$ref":"#/components/schemas/DayCheckBasis","description":"The SSBTEK facts that gate the dagersättning day check (AF economic decision, FK consumed days). Absent means the caller did not read them, and the day check is then not made at all."}},"required":["applicant","applicationMonth","errandId"]},"DayCheckBasis":{"type":"object","description":"The SSBTEK facts that gate the dagersättning day check: Arbetsförmedlingen's economic-decision periods and Försäkringskassan's consumed jobb- och utvecklingsgaranti days. A null field means the caller did not read it, and the day check is then not made at all.","properties":{"economicDecisionPeriods":{"type":"array","description":"Arbetsförmedlingen's economic-decision periods (af BeslutInfo.EkonomiskaBeslut.Beslut). An empty list means AF answered and reports no decision; null means AF was not read or could not answer.","items":{"$ref":"#/components/schemas/EconomicDecisionPeriod"}},"consumedDays":{"type":"integer","format":"int32","description":"Försäkringskassan's consumed days in the jobb- och utvecklingsgaranti (fk formansinformation.programjobdagar antalForbrukade, 'Förbrukade dagar'); null when not read","examples":[212]},"allDaysConsumed":{"type":"boolean","description":"Whether Försäkringskassan reports all days used up (fk formansinformation.programjobdagar harForbrukatMaxAntal, 'Alla dagar förbrukade'). False when FK answered without any programjobdagar; null when FK was not read.","examples":[false]}}},"EconomicDecisionPeriod":{"type":"object","description":"A period Arbetsförmedlingen reports an economic decision (ekonomiskt beslut) for, as read from SSBTEK.","properties":{"fromDate":{"type":"string","format":"date","description":"Decision period start (BeslutFrom)","examples":["2026-08-01"]},"toDate":{"type":"string","format":"date","description":"Decision period end (BeslutTom); null for an open period","examples":["2026-12-31"]}}},"CalculationResponse":{"type":"object","description":"The created Lifecare calculation id plus the income warnings to review.","properties":{"calculationId":{"type":"integer","format":"int32","description":"The id of the calculation created in Lifecare FamilyCare","examples":[4711]},"unhandledIncomes":{"type":"array","description":"SSBTEK incomes that could not be auto-transferred and must be reviewed","examples":[["Bostadstillägg (NOT_ON_WHITELIST)"]],"items":{"type":"string"}},"changeWarnings":{"type":"array","description":"Income types whose amount this month differs from the previous normberäkning beyond the threshold, or that are new since it","examples":[["Bostadsbidrag: 1250 kr i föregående normberäkning → 1300 kr nu"]],"items":{"type":"string"}},"informationComplete":{"type":"boolean","description":"Whether this month's calculation covers every income type the previous month's did — false means SSBTEK data is still missing and the process should poll again","examples":[true]},"missingIncomeTypes":{"type":"array","description":"Previous-month income types not yet present this month (the SSBTEK data still being awaited)","examples":[["Bostadsbidrag"]],"items":{"type":"string"}}}},"ArchiveActualisationRequest":{"type":"object","description":"Optional metadata for archiving a document to a Lifecare actualisation.","properties":{"errandId":{"type":"string","description":"The id of the caremanagement errand the archive concerns. When present, the target actualisation id is recorded on the errand as a Decision(ACTUALISATION) — setting the errand's Lifecare actualisation to the one archived to.","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"]},"title":{"type":"string","description":"The document title shown in Lifecare. Defaults to the uploaded file name when omitted.","examples":["Tilläggsansökan"]},"documentType":{"type":"string","description":"The Lifecare InsertDocumentType id, from the actualisation proposal's attachmentTypes. Server default when omitted.","examples":["1"]},"documentSenderType":{"type":"string","description":"The Lifecare InsertDocumentSenderType id, from the chosen attachment type's senderTypes. Server default when omitted.","examples":["1"]},"senderName":{"type":"string","description":"The sender name shown in Lifecare. Server default when omitted.","examples":["Draken"]}}},"ActualisationRequest":{"type":"object","description":"Request to create the Lifecare actualisation (case intake) for an application month.","properties":{"applicant":{"type":"string","description":"The applicant's partyId (personId GUID)","examples":["f47ac10b-58cc-4372-a567-0e02b2c3d479"]},"applicationMonth":{"type":"string","description":"The application month (ISO year-month, yyyy-MM). The actualisation's intake date (Ansökningsdatum) is the day the application was submitted, read from the errand's created stamp; when no errandId is given, or the errand is unknown, it falls back to the first day of this month.","examples":["2026-06"],"pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"errandId":{"type":"string","description":"The id of the caremanagement errand the actualisation concerns. When present, a Decision(ACTUALISATION) recording the created Lifecare actualisation id is added to the errand's audit trail; when omitted, the actualisation is created without recording anything on an errand.","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"]}},"required":["applicant","applicationMonth"]},"ActualisationResponse":{"type":"object","description":"The created Lifecare actualisation id.","properties":{"actualisationId":{"type":"integer","format":"int32","description":"The id of the actualisation created in Lifecare FamilyCare","examples":[5012]}}},"PatchErrand":{"type":"object","description":"PatchErrand model — patchable envelope fields only","properties":{"title":{"type":"string","description":"Title for the errand","examples":["Title of the errand"],"maxLength":255,"minLength":0},"status":{"type":"string","description":"Status of the errand","examples":["NEW"],"maxLength":64,"minLength":0},"description":{"type":"string","description":"Description of the errand","examples":["Long description text"]},"priority":{"type":"string","description":"Priority of the errand","examples":["HIGH"],"maxLength":16,"minLength":0},"reporterUserId":{"type":"string","description":"User id of the reporter","examples":["joe01doe"],"maxLength":64,"minLength":0},"assignedUserId":{"type":"string","description":"User id of the assignee","examples":["jane02doe"],"maxLength":64,"minLength":0}}},"UpdateNote":{"type":"object","properties":{"body":{"type":"string","maxLength":8192,"minLength":0},"modifiedBy":{"type":"string","maxLength":64,"minLength":0}},"required":["body"]},"Note":{"type":"object","description":"Note attached to an errand","properties":{"id":{"type":"string","description":"Unique identifier"},"errandId":{"type":"string","description":"Errand id this note belongs to"},"body":{"type":"string","description":"Note body","examples":["Spoke to family today, awaiting docs."]},"author":{"type":"string","description":"Author user id","examples":["jane01doe"]},"created":{"type":"string","format":"date-time","description":"Created timestamp"},"modifiedBy":{"type":"string","description":"User id of the last editor","examples":["jane01doe"]},"modified":{"type":"string","format":"date-time","description":"Last modified timestamp; null until the note has been edited"}}},"NormHeaderInput":{"type":"object","description":"Caseworker edit of the calculation header — norm, calculation dates and custom household size.","properties":{"normId":{"type":"integer","format":"int32","description":"The selected FamilyCare norm id (Norm)","examples":[5]},"normType":{"type":"array","items":{"type":"string","description":"The norm type","enum":["NATIONAL_NORM","OTHER_NORM"],"examples":["NATIONAL_NORM"]}},"calculationFromDate":{"type":"string","format":"date","description":"Calculation period start (from)","examples":["2026-06-01"]},"calculationToDate":{"type":"string","format":"date","description":"Calculation period end (to)","examples":["2026-06-30"]},"calculationDate":{"type":"string","format":"date","description":"Calculation date (calculation date)","examples":["2026-06-15"]},"hasCustomHouseholdSize":{"type":"boolean","description":"Whether a custom household size is used","examples":[true]},"householdSize":{"type":"integer","format":"int32","description":"The custom household size","examples":[1]}}},"CalculationDraft":{"type":"object","description":"The full draft calculation — header, the three sections (persons, incomes, expenses) and the section sums.","properties":{"errandId":{"type":"string","description":"The errand id","readOnly":true},"applicationMonth":{"type":"string","description":"The application month (ISO yyyy-MM)","examples":["2026-06"]},"normId":{"type":"integer","format":"int32","description":"The selected norm id"},"normType":{"type":"array","description":"The selected norm types (machine codes; use normTypeDisplayNames for the labels)","items":{"type":"string","enum":["NATIONAL_NORM","OTHER_NORM"],"examples":["NATIONAL_NORM"]}},"normTypeDisplayNames":{"type":"array","description":"Swedish display names for the selected norm types, in the same order as normType","items":{"type":"string","examples":["Riksnorm"],"readOnly":true}},"calculationFromDate":{"type":"string","format":"date","description":"The start date of the calculation period"},"calculationToDate":{"type":"string","format":"date","description":"The end date of the calculation period"},"calculationDate":{"type":"string","format":"date","description":"The date the calculation is performed"},"hasCustomHouseholdSize":{"type":"boolean","description":"Whether the household size has been overridden by a caseworker"},"householdSize":{"type":"integer","format":"int32","description":"The household size used for the norm","examples":[3]},"persons":{"type":"array","description":"The person rows (persons)","items":{"$ref":"#/components/schemas/NormPersonRow"}},"incomes":{"type":"array","description":"The income rows (incomes)","items":{"$ref":"#/components/schemas/NormIncomeRow"}},"expenses":{"type":"array","description":"The expense rows (expenses)","items":{"$ref":"#/components/schemas/NormExpenseRow"}},"specialExpenses":{"type":"array","description":"The special expense rows","items":{"$ref":"#/components/schemas/NormExpenseRow"}},"incomeSum":{"type":"number","description":"The sum of the effective income amounts","readOnly":true},"expenseSum":{"type":"number","description":"The sum of the effective expense amounts","readOnly":true},"specialExpenseSum":{"type":"number","description":"The sum of the effective special expense amounts","readOnly":true},"created":{"type":"string","format":"date-time","description":"When the draft was created","readOnly":true},"updated":{"type":"string","format":"date-time","description":"When the draft was last updated","readOnly":true}}},"AssigneeCount":{"type":"object","description":"Number of errands assigned to a given user","properties":{"assignedUserId":{"type":"string","description":"The assigned user id","examples":["joe01doe"]},"count":{"type":"integer","format":"int64","description":"Number of errands assigned to the user","examples":[5]}}},"StatisticsResponse":{"type":"object","description":"Aggregated errand statistics for the caseworker interface","properties":{"total":{"type":"integer","format":"int64","description":"Total number of errands in the selection","examples":[42]},"byStatus":{"type":"array","description":"Number of errands per status","items":{"$ref":"#/components/schemas/StatusCount"}},"byAssignee":{"type":"array","description":"Number of errands per assigned user","items":{"$ref":"#/components/schemas/AssigneeCount"}},"unassigned":{"type":"integer","format":"int64","description":"Number of errands without an assigned user","examples":[7]}}},"StatusCount":{"type":"object","description":"Number of errands in a given status","properties":{"status":{"type":"string","description":"Status","examples":["DECIDED"]},"count":{"type":"integer","format":"int64","description":"Number of errands in the status","examples":[12]}}},"ActorEventLog":{"type":"object","description":"One actor's activity across every errand in the namespace, newest first. The listing is capped; compare 'events' against 'total' to see whether it was truncated, and narrow with from/to to see the rest.","properties":{"events":{"type":"array","description":"The matching events, newest first, up to the listing cap","items":{"$ref":"#/components/schemas/ErrandEventEntry"}},"total":{"type":"integer","format":"int64","description":"How many events match the filters in total, ignoring the cap","examples":[4213]}}},"ErrandEventEntry":{"type":"object","properties":{"id":{"type":"string"},"errandId":{"type":"string"},"municipalityId":{"type":"string"},"namespace":{"type":"string"},"source":{"type":"string"},"action":{"type":"string"},"target":{"type":"string"},"description":{"type":"string"},"httpMethod":{"type":"string"},"requestPath":{"type":"string"},"lifecareId":{"type":"string"},"actor":{"type":"string"},"actorType":{"type":"string"},"requestId":{"type":"string"},"statusCode":{"type":"integer","format":"int32"},"created":{"type":"string","format":"date-time"}}},"Direction":{"type":"string","enum":["ASC","DESC"]},"FindErrandsResponse":{"type":"object","description":"Paged errand response","properties":{"errands":{"type":"array","items":{"$ref":"#/components/schemas/Errand","readOnly":true}},"_meta":{"$ref":"#/components/schemas/PagingAndSortingMetaData","readOnly":true}}},"PagingAndSortingMetaData":{"type":"object","description":"PagingAndSortingMetaData model","properties":{"page":{"type":"integer","format":"int32","description":"Current page","examples":[5],"readOnly":true},"limit":{"type":"integer","format":"int32","description":"Displayed objects per page","examples":[20],"readOnly":true},"count":{"type":"integer","format":"int32","description":"Displayed objects on current page","examples":[13],"readOnly":true},"totalRecords":{"type":"integer","format":"int64","description":"Total amount of hits based on provided search parameters","examples":[98],"readOnly":true},"totalPages":{"type":"integer","format":"int32","description":"Total amount of pages based on provided search parameters","examples":[23],"readOnly":true},"sortBy":{"type":"array","items":{"type":"string","description":"The properties to sort by","examples":["property"],"readOnly":true}},"sortDirection":{"$ref":"#/components/schemas/Direction","description":"The sort order direction","examples":["ASC"]}}},"StatusHistoryEntry":{"type":"object","properties":{"id":{"type":"string"},"errandId":{"type":"string"},"fromStatus":{"type":"string"},"toStatus":{"type":"string"},"changedBy":{"type":"string"},"changedAt":{"type":"string","format":"date-time"}}},"NoteCount":{"type":"object","description":"The number of notes on the errand","properties":{"count":{"type":"integer","format":"int64","description":"Number of notes attached to the errand","examples":[4]}}},"Message":{"type":"object","description":"A message in the errand's conversation","properties":{"id":{"type":"string","description":"Unique identifier"},"errandId":{"type":"string","description":"The errand the message belongs to"},"direction":{"type":"string","description":"Direction","enum":["INBOUND","OUTBOUND"],"examples":["OUTBOUND"]},"body":{"type":"string","description":"Message text","examples":["Please complete your application with a valid certificate."]},"author":{"type":"string","description":"Author id","examples":["joe01doe"]},"inReplyToId":{"type":"string","description":"Id of the message this one replies to, when it is a reply (same errand)","examples":["f47ac10b-58cc-4372-a567-0e02b2c3d479"]},"created":{"type":"string","format":"date-time","description":"Created timestamp"},"attachments":{"type":"array","description":"Files attached to the message","items":{"$ref":"#/components/schemas/MessageAttachment"},"readOnly":true}}},"MessageAttachment":{"type":"object","description":"Metadata of a file attached to a message. Download the content via GET .../messages/{messageId}/attachments/{id}/file","properties":{"id":{"type":"string","description":"Unique identifier","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"],"readOnly":true},"fileName":{"type":"string","description":"File name","examples":["certificate.pdf"]},"mimeType":{"type":"string","description":"Mime type","examples":["application/pdf"]},"fileSize":{"type":"integer","format":"int32","description":"File size in bytes","examples":[1024],"readOnly":true},"senderRole":{"type":"string","description":"Who sent the file, derived from the message direction: CLIENT (applicant, INBOUND) or CASEWORKER (caseworker, OUTBOUND)","enum":["CLIENT","CASEWORKER"],"examples":["CLIENT"],"readOnly":true},"created":{"type":"string","format":"date-time","description":"Created timestamp","readOnly":true}}},"UnreadCount":{"type":"object","description":"The number of unread messages in the errand's conversation for the calling side","properties":{"unreadCount":{"type":"integer","format":"int64","description":"Number of messages addressed to the caller that the caller has not yet marked as read","examples":[3]}}},"ErrandEventCount":{"type":"object","description":"The number of activity events on the errand matching the given filters","properties":{"count":{"type":"integer","format":"int64","description":"Number of matching events","examples":[12]}}},"CoCaseworker":{"type":"object","description":"A co-caseworker (medhandläggare) on an errand. Both the errand's ordinary caseworker and every co-caseworker receive the errand's notifications as one shared, logical message","properties":{"id":{"type":"string","description":"Unique identifier","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"]},"errandId":{"type":"string","description":"Errand id this co-caseworker is added to"},"userId":{"type":"string","description":"User id of the co-caseworker","examples":["jane01doe"]},"created":{"type":"string","format":"date-time","description":"When the co-caseworker was added"}}},"Attachment":{"type":"object","description":"Attachment model","properties":{"id":{"type":"string","description":"Unique identifier","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"],"readOnly":true},"fileName":{"type":"string","description":"File name","examples":["my-file.pdf"]},"mimeType":{"type":"string","description":"Mime type","examples":["application/pdf"]},"fileSize":{"type":"integer","format":"int32","description":"File size in bytes","examples":[1024],"readOnly":true},"documentType":{"type":"string","description":"What kind of document this is: APPLICATION (citizen's application files), CONVERSATION (sent in a message thread), GENERATED (a consolidated PDF produced by the platform), ERRAND (uploaded directly to the errand), CASE_DATA (a case-data document for the errand), DECISION (a decision document for the errand) or MESSAGE_HISTORY (the archived conversation PDF for a closed errand)","enum":["APPLICATION","CONVERSATION","GENERATED","ERRAND","CASE_DATA","DECISION","MESSAGE_HISTORY"],"examples":["CONVERSATION"],"readOnly":true},"senderRole":{"type":"string","description":"Who the file came from: CLIENT (applicant) or CASEWORKER (caseworker). May be null for files predating the distinction or with no clear sender.","enum":["CLIENT","CASEWORKER"],"examples":["CLIENT"],"readOnly":true},"messageId":{"type":"string","description":"For CONVERSATION attachments, the id of the message the file is attached to — download it via .../messages/{messageId}/attachments/{id}/file. Null for non-conversation attachments, which download via .../attachments/{id}/file.","readOnly":true},"created":{"type":"string","format":"date-time","description":"Created timestamp","readOnly":true},"modified":{"type":"string","format":"date-time","description":"Modified timestamp","readOnly":true}}},"JournalEntryMetadata":{"type":"object","description":"Journal metadata — the provisional catalogue of selectable journal entry types.","properties":{"types":{"type":"array","description":"Selectable journal entry types","items":{"$ref":"#/components/schemas/JournalEntryType"}}}},"JournalEntryType":{"type":"object","description":"A selectable journal entry type — the code and the Swedish Lifecare label.","properties":{"code":{"type":"string","description":"The type code","examples":["JOURNALED_MESSAGE"]},"displayName":{"type":"string","description":"Human-readable Swedish label (the Lifecare 'Typ' value)","examples":["Journalfört meddelande"]}}},"FinancialAssistanceView":{"type":"object","description":"A financial assistance errand with its typed application payload.","properties":{"id":{"type":"string","description":"Unique id","examples":["cb20c51f-fcf3-42c0-b613-de563634a8ec"],"readOnly":true},"errandNumber":{"type":"string","description":"Errand number","examples":["EB-26060071"],"readOnly":true},"municipalityId":{"type":"string","description":"Municipality id","examples":["2281"],"readOnly":true},"namespace":{"type":"string","description":"Namespace","examples":["FINANCIAL_ASSISTANCE"],"readOnly":true},"typeSlug":{"type":"string","description":"Type slug","examples":["financial-assistance"],"readOnly":true},"title":{"type":"string","description":"Title of the errand","examples":["Application for financial assistance"]},"status":{"type":"string","description":"Status of the errand","examples":["ONGOING"]},"priority":{"type":"string","description":"Priority of the errand","examples":["HIGH"]},"reporterUserId":{"type":"string","description":"Id of the reporting user","examples":["joe01doe"]},"assignedUserId":{"type":"string","description":"Id of the assigned user","examples":["jane02doe"]},"processInstanceId":{"type":"string","description":"Id of the started process instance","examples":["8d2e1c3a-4f56-7890-abcd-ef1234567890"],"readOnly":true},"created":{"type":"string","format":"date-time","description":"Created","readOnly":true},"modified":{"type":"string","format":"date-time","description":"Modified","readOnly":true},"touched":{"type":"string","format":"date-time","description":"Touched","readOnly":true},"lastDailyRunAt":{"type":"string","format":"date-time","description":"When the financial assistance process last ran its daily loop for this errand (the calculation /prepare step). Null until the first loop has run.","readOnly":true},"lifecareServiceId":{"type":"integer","format":"int32","description":"The applicant's open financial-assistance service (insats) id in Lifecare — the key Lifecare's own case reads (journal, documents, reminders, jobbstimulans) take. Null while the applicant has no open EB insats, or when the Lifecare lookup could not be made; a later read tries again.","examples":[7700],"readOnly":true},"data":{"$ref":"#/components/schemas/FinancialAssistanceData","description":"The typed financial assistance application payload"},"recommendation":{"$ref":"#/components/schemas/Decision","description":"The most recent automated recommendation on the errand (the latest RECOMMENDATION decision the caseworker reviews), or null when none has been produced. Carries the recommended value and, when the pipeline has computed it, the recommended amount/period to prefill the Decision form.","readOnly":true},"communication":{"$ref":"#/components/schemas/CommunicationChannels","description":"The communication channels the caseworker chose when finalizing the errand (Besluta och utbetala), or null until then. The Draken BFF sends the decision through these; caremanagement only records the choice.","readOnly":true},"householdSizeChanged":{"type":"boolean","description":"Whether the caseworker changed the household size (gemensamma kostnader) when finalizing. Null until the errand has been finalized.","readOnly":true}}},"WarningCount":{"type":"object","description":"The number of active (OPEN/ACKNOWLEDGED) income warnings on the errand","properties":{"count":{"type":"integer","format":"int64","description":"Number of active warnings — closed ones are not counted","examples":[3]}}},"SsbtekBasis":{"type":"object","description":"A person's SSBTEK basis for a period, as the composite service answered it, reduced to the payment fields the caseworker's payment view needs.","properties":{"from":{"type":"string","format":"date","description":"Inclusive start of the period the basis covers","examples":["2026-07-01"]},"to":{"type":"string","format":"date","description":"Inclusive end of the period the basis covers","examples":["2026-09-30"]},"agencies":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{}},"description":"The answer per responding agency, reduced to the payment fields the caseworker's payment view needs: the payments of fk (Försäkringskassan and Pensionsmyndigheten) and so (the a-kassor), in the agency's own shape. Everything else in the answers — personnummer, names, addresses and the other agencies (af, csn, skv, tns, miv) — is dropped by caremanagement. Shapes differ per agency and are not modelled; an agency that did not answer, or has nothing to show, may be absent or empty."}}},"LifecareSectionStatus":{"type":"object","description":"Which of the errand's sections Lifecare has as done - the checks on the Normberäkning, Beslut and Utbetalning tabs.","properties":{"calculationFinalized":{"type":"boolean","description":"The errand's beräkning is saved as slutlig in Lifecare","examples":[true]},"decisionSaved":{"type":"boolean","description":"The errand's beslut is saved in Lifecare","examples":[true]},"paymentRegistered":{"type":"boolean","description":"An utbetalning for the errand's month is registered in Lifecare","examples":[false]}},"readOnly":true},"LifecareReminder":{"type":"object","description":"A bevakning on the errand's insats in Lifecare, as the sidebar shows it. The personnummer on the Lifecare row is left out.","properties":{"id":{"type":"integer","format":"int32","description":"The Lifecare reminder id","examples":[40]},"date":{"type":"string","description":"Bevakningsdatum, YYYY-MM-DD","examples":["2026-09-30"]},"status":{"type":"string","description":"The status text","examples":["Ej påbörjad"]},"statusCode":{"type":"integer","format":"int32","description":"Lifecare's status code","examples":[3]},"priority":{"type":"string","description":"The priority text","examples":["Normal"]},"priorityCode":{"type":"integer","format":"int32","description":"Lifecare's priority code","examples":[2]},"type":{"type":"string","description":"The kind of bevakning","examples":["Manuell bevakning insats"]},"objectType":{"type":"string","description":"What the bevakning hangs on","examples":["IFO.Insats"]},"text":{"type":"string","description":"The bevakning text","examples":["Kontrollera hyran"]},"caseworker":{"type":"string","description":"The caseworker it is bevakad av, by name (the id when Lifecare gives no name)","examples":["Test Handläggare"]},"caseworkerId":{"type":"string","description":"The caseworker's Lifecare id","examples":["TEST"]}}},"LifecareReminderChoice":{"type":"object","description":"A coded choice in the bevakning form.","properties":{"code":{"type":"integer","format":"int32","description":"Lifecare's code","examples":[2]},"text":{"type":"string","description":"The text Lifecare gives the code","examples":["Normal"]}}},"LifecareReminderOptions":{"type":"object","description":"The priorities and statuses a bevakning can have, as Lifecare lists them, and what Lifecare proposes for a new one.","properties":{"priorities":{"type":"array","description":"The active priorities","items":{"$ref":"#/components/schemas/LifecareReminderChoice"}},"statuses":{"type":"array","description":"The active statuses","items":{"$ref":"#/components/schemas/LifecareReminderChoice"}},"defaultPriority":{"type":"integer","format":"int32","description":"The priority Lifecare proposes for a new bevakning","examples":[2]},"defaultStatus":{"type":"integer","format":"int32","description":"The status Lifecare proposes for a new bevakning","examples":[3]}}},"LifecareRegisteredPayment":{"type":"object","description":"An utbetalning registered on the insats in Lifecare","properties":{"id":{"type":"integer","format":"int32","description":"Lifecare's paymentId","examples":[4]},"payDate":{"type":"string","description":"The payment date","examples":["2026-09-21"]},"concernedMonth":{"type":"string","description":"Avser månad, yyyy-MM","examples":["2026-09"]},"amount":{"type":"number","description":"The amount","examples":[3000]},"paymentMethod":{"type":"string","description":"The betalsätt's name","examples":["Bankgiro via Plusgiro"]},"recipient":{"type":"string","description":"Who it goes to","examples":["Kontoinnehavare A"]},"status":{"type":"string","description":"Lifecare's own status","examples":["Utbetald"]},"cancelled":{"type":"boolean","description":"Makulerad in Lifecare","examples":[false]}}},"LifecarePaymentStatus":{"type":"object","description":"Whether the Lifecare utbetalning for the errand's application month has been registered","properties":{"applicationMonth":{"type":"string","description":"The application month (yyyy-MM) the status concerns","examples":["2026-09"]},"effectuated":{"type":"boolean","description":"True when a standing Lifecare utbetalning concerning the application month is registered","examples":[true]},"paymentDate":{"type":"string","description":"The date of that utbetalning (Lifecare PayDate), when effectuated","examples":["2026-09-21"]},"amount":{"type":"number","description":"The amount of that utbetalning, when effectuated","examples":[3000]},"status":{"type":"string","description":"Lifecare's own status for that utbetalning, when effectuated","examples":["Utbetald"]},"unavailable":{"type":"boolean","description":"True when the status could not be determined (no application month, no insats, or Lifecare unavailable)","examples":[false]}}},"LifecarePaymentBalance":{"type":"object","description":"A saldo on the insats: what the beslut granted, what is already booked and what is left","properties":{"name":{"type":"string","description":"The saldo's name","examples":["Ek. Bistånd"]},"approvedAmount":{"type":"number","description":"What the beslut granted","examples":[4000]},"bookedAmount":{"type":"number","description":"What is already booked","examples":[1000]},"balanceAmount":{"type":"number","description":"What is left to pay out","examples":[3000]}}},"LifecarePaymentConcernMonth":{"type":"object","description":"A month an utbetalning on the insats may concern, as Lifecare offers it","properties":{"month":{"type":"string","description":"The month, yyyy-MM","examples":["2026-09"]},"label":{"type":"string","description":"Lifecare's own wording","examples":["September 2026"]}}},"LifecarePaymentMethod":{"type":"object","description":"A betalsätt the insats offers, as Lifecare lists it","properties":{"code":{"type":"integer","format":"int32","description":"Lifecare's betalsätt code","examples":[14]},"name":{"type":"string","description":"The betalsätt's name","examples":["Bankgiro via Plusgiro"]},"localNumberEnabled":{"type":"boolean","description":"Whether Lokalbetalningsnummer is open for this betalsätt","examples":[false]},"localNumberMandatory":{"type":"boolean","description":"Whether Lokalbetalningsnummer must be filled in for this betalsätt","examples":[false]}}},"LifecarePaymentOptions":{"type":"object","description":"The betalsätt, betalningsmottagare, ändamål, saldon and months an utbetalning on the insats can use, read from Lifecare","properties":{"paymentMethods":{"type":"array","description":"The betalsätt in use on the insats","items":{"$ref":"#/components/schemas/LifecarePaymentMethod"}},"payees":{"type":"array","description":"The active betalningsmottagare","items":{"$ref":"#/components/schemas/LifecarePayee"}},"postings":{"type":"array","description":"The insats's konteringsrader","items":{"$ref":"#/components/schemas/LifecarePaymentPosting"}},"balances":{"type":"array","description":"The insats's saldon: what is left to pay out, as Lifecare counts it","items":{"$ref":"#/components/schemas/LifecarePaymentBalance"}},"concernMonths":{"type":"array","description":"The months an utbetalning may concern","items":{"$ref":"#/components/schemas/LifecarePaymentConcernMonth"}},"proposal":{"$ref":"#/components/schemas/LifecarePaymentProposal","description":"What the utbetalning form starts from"}}},"LifecarePaymentPosting":{"type":"object","description":"A konteringsrad on the insats: an ändamål an utbetalning can be booked on","properties":{"purpose":{"type":"integer","format":"int32","description":"Lifecare's ändamål code, which the utbetalning keeps as its kontering","examples":[1]},"text":{"type":"string","description":"The ändamål's text","examples":["Försörjningsstöd exklusive tillfälligt boende"]}}},"LifecarePaymentProposal":{"type":"object","description":"What the utbetalning form starts from: Lifecare's own figures, all changeable","properties":{"paymentDate":{"type":"string","description":"Lifecare's proposed utbetalningsdatum","examples":["2026-09-23"]},"concernedMonth":{"type":"string","description":"The first month Lifecare lets an utbetalning concern, yyyy-MM","examples":["2026-09"]},"amount":{"type":"number","description":"What is left on the insats's saldon; absent when nothing is left","examples":[3000]},"payeeId":{"type":"integer","format":"int32","description":"The payee the latest standing utbetalning on the insats went to, when it is still an active payee","examples":[2]}}},"NormberakningDraft":{"type":"object","description":"The normberäkning, careM's draft or the beräkning saved in Lifecare.","properties":{"errandId":{"type":"string","description":"The errand id (careM draft only)"},"applicationMonth":{"type":"string","description":"The application month (yyyy-MM)","examples":["2026-09"]},"normId":{"type":"integer","format":"int32","description":"The selected norm id","examples":[1]},"normType":{"type":"array","items":{"type":"string","description":"The selected norm types (careM draft only)"}},"normTypeDisplayNames":{"type":"array","items":{"type":"string","description":"The labels of the selected norm types, or the Lifecare norm name"}},"calculationFromDate":{"type":"string","description":"The start date of the calculation period (ISO date)","examples":["2026-09-01"]},"calculationToDate":{"type":"string","description":"The end date of the calculation period (ISO date)","examples":["2026-09-30"]},"calculationDate":{"type":"string","description":"The date the calculation is performed (ISO date)","examples":["2026-09-24"]},"hasCustomHouseholdSize":{"type":"boolean","description":"Whether the household has an own size (Annan hushållsstorlek)"},"householdSize":{"type":"integer","format":"int32","description":"The household size","examples":[3]},"persons":{"type":"array","items":{"$ref":"#/components/schemas/NormberakningPersonRow","description":"The household members"}},"incomes":{"type":"array","items":{"$ref":"#/components/schemas/NormberakningIncomeRow","description":"The incomes"}},"expenses":{"type":"array","items":{"$ref":"#/components/schemas/NormberakningExpenseRow","description":"The utgifter"}},"specialExpenses":{"type":"array","items":{"$ref":"#/components/schemas/NormberakningExpenseRow","description":"The levnadskostnader i övrigt"}},"incomeSum":{"type":"number","description":"The sum of the incomes"},"expenseSum":{"type":"number","description":"The sum of the utgifter"},"specialExpenseSum":{"type":"number","description":"The sum of the levnadskostnader i övrigt"},"created":{"type":"string","description":"When the draft was created (careM draft only)"},"updated":{"type":"string","description":"When the draft or the Lifecare beräkning was last saved"},"source":{"type":"string","description":"Where the rows come from: careM's draft, or the beräkning saved in Lifecare (every change is then made there)","enum":["CAREM","LIFECARE"]},"finalized":{"type":"boolean","description":"Whether Lifecare holds the beräkning as slutlig (Lifecare only)"},"amountForHouseholdSize":{"type":"number","description":"The gemensamma kostnader of a household of the household size, before the members share is taken (Lifecare only)"},"commonHouseholdCost":{"type":"number","description":"The members share of the gemensamma kostnader (Lifecare only)"},"familyMembers":{"type":"integer","format":"int32","description":"How many members the beräkning includes (Lifecare only)"},"applicantJobStimulus":{"type":"boolean","description":"Whether the applicant has jobbstimulans in the period (Lifecare only)"},"coapplicantJobStimulus":{"type":"boolean","description":"Whether the co-applicant (medsökande) has jobbstimulans in the period (Lifecare only)"},"normRows":{"type":"array","items":{"$ref":"#/components/schemas/NormberakningNormRow","description":"The norm rows a member can be placed on (Lifecare only)"}}}},"NormberakningExpenseRow":{"type":"object","description":"An expense row of the normberäkning.","properties":{"id":{"type":"string","description":"The row id: careM's row id, or the Lifecare bucket and code (E-3, S-7, E-3-2 for a repeated code)"},"position":{"type":"integer","format":"int32","description":"Stable 0-based position of the row within its section","examples":[0]},"origin":{"type":"string","description":"Who created the row: the process or a caseworker (always CASEWORKER in Lifecare)","enum":["SYSTEM","CASEWORKER"],"readOnly":true},"bucket":{"type":"string","description":"Which Lifecare bucket the expense posts to","enum":["EXPENSE","SPECIAL_EXPENSE"]},"costType":{"type":"string","description":"The cost type: careM's code, or Lifecare's expense code"},"costTypeDisplayName":{"type":"string","description":"The Lifecare label of the cost type","examples":["Boendekostnad"]},"otherSubType":{"type":"string","description":"The other sub-type (careM draft only)"},"specification":{"type":"string","description":"The cost specification (careM draft only)"},"appliedAmount":{"type":"number","description":"The amount applied for (ansökt)"},"processAmount":{"type":"number","description":"The amount the rules allowed (careM draft only)"},"caseworkerAmount":{"type":"number","description":"The amount a caseworker decided"},"effectiveAmount":{"type":"number","description":"The amount actually used"},"deleted":{"type":"boolean","description":"Whether the row is soft-deleted (careM draft only)"},"note":{"type":"string","description":"Free-text note"}}},"NormberakningIncomeRow":{"type":"object","description":"An income row of the normberäkning.","properties":{"id":{"type":"string","description":"The row id: careM's row id, or Lifecare's income code"},"position":{"type":"integer","format":"int32","description":"Stable 0-based position of the row within its section","examples":[0]},"origin":{"type":"string","description":"Who created the row: the process from SSBTEK (SYSTEM), the process from the application's declared incomes (APPLICATION) or a caseworker (always CASEWORKER in Lifecare)","enum":["SYSTEM","APPLICATION","CASEWORKER"],"readOnly":true},"typeId":{"type":"integer","format":"int32","description":"The income type id","examples":[19]},"typeName":{"type":"string","description":"The income type name","examples":["Aktivitetsstöd"]},"applicantProcessAmount":{"type":"number","description":"The amount the process decided for the applicant (careM draft only)"},"applicantCaseworkerAmount":{"type":"number","description":"The amount a caseworker decided for the applicant; the gross when jobbstimulans applies"},"applicantEffectiveAmount":{"type":"number","description":"The amount actually used for the applicant"},"applicantAmountDate":{"type":"string","description":"The date the applicant amount is attributed to"},"applicantJobStimulus":{"type":"boolean","description":"Whether jobbstimulans applies to the applicant side of this income (Lifecare only)"},"applicantCountedAmount":{"type":"number","description":"The applicant amount Lifecare counts once jobbstimulans is taken off (Lifecare only)"},"coapplicantProcessAmount":{"type":"number","description":"The amount the process decided for the co-applicant (careM draft only)"},"coapplicantCaseworkerAmount":{"type":"number","description":"The amount a caseworker decided for the co-applicant"},"coapplicantEffectiveAmount":{"type":"number","description":"The amount actually used for the co-applicant"},"coapplicantAmountDate":{"type":"string","description":"The date the co-applicant amount is attributed to"},"coapplicantJobStimulus":{"type":"boolean","description":"Whether jobbstimulans applies to the co-applicant side of this income (Lifecare only)"},"coapplicantCountedAmount":{"type":"number","description":"The co-applicant amount Lifecare counts once jobbstimulans is taken off (Lifecare only)"},"deleted":{"type":"boolean","description":"Whether the row is soft-deleted (careM draft only)"},"note":{"type":"string","description":"Free-text note"}}},"NormberakningNormRow":{"type":"object","description":"A normintervall of the norm.","properties":{"id":{"type":"integer","format":"int32","description":"The Lifecare norm row id","examples":[2]},"name":{"type":"string","description":"The name and monthly amount","examples":["Ensamstående 3940.00"]}}},"NormberakningPersonRow":{"type":"object","description":"A household member row of the normberäkning.","properties":{"id":{"type":"string","description":"The row id: careM's row id, or Lifecare's personKey (new-N for a member not saved yet)"},"position":{"type":"integer","format":"int32","description":"Stable 0-based position of the row within its section","examples":[0]},"origin":{"type":"string","description":"Who created the row: the process or a caseworker (always CASEWORKER in Lifecare)","enum":["SYSTEM","CASEWORKER"],"readOnly":true},"partyId":{"type":"string","description":"The party id of the household member (careM draft only)"},"personalNumber":{"type":"string","description":"The personnummer of the household member; best-effort, can be absent"},"role":{"type":"string","description":"The role of the household member","enum":["APPLICANT","CO_APPLICANT","CHILD","VISITATION_CHILD"]},"roleDisplayName":{"type":"string","description":"Swedish display name for the role (careM draft only)","examples":["Medsökande"]},"name":{"type":"string","description":"The name of the household member"},"processDays":{"type":"integer","format":"int32","description":"The number of days in the home the process derived (careM draft only)","examples":[30]},"caseworkerDays":{"type":"integer","format":"int32","description":"The number of days a caseworker decided","examples":[15]},"effectiveDays":{"type":"integer","format":"int32","description":"The number of days actually used","examples":[15]},"included":{"type":"boolean","description":"Whether the household member is included in the norm"},"deviationFromDate":{"type":"string","description":"The start date of the member's deviation from the household (ISO date)","examples":["2026-09-05"]},"deviationToDate":{"type":"string","description":"The end date of the member's deviation from the household (ISO date)","examples":["2026-09-30"]},"normInterval":{"type":"string","description":"The normintervall the member is placed on","examples":["Ensamstående"]},"normRowId":{"type":"integer","format":"int32","description":"The Lifecare norm row the member is placed on (Lifecare only)","examples":[2]},"amount":{"type":"number","description":"The member's own share of the norm (the Belopp column)","examples":[3940]},"deleted":{"type":"boolean","description":"Whether the row is soft-deleted (careM draft only)"},"note":{"type":"string","description":"Free-text note"}}},"NormberakningTypeOption":{"type":"object","description":"A selectable norm, income or cost type.","properties":{"code":{"type":"string","description":"The code: a Lifecare id once the beräkning is in Lifecare, careM's code before","examples":["3"]},"displayName":{"type":"string","description":"The label","examples":["Boendekostnad"]}}},"NormberakningTypes":{"type":"object","description":"The type catalogues of the normberäkning.","properties":{"norms":{"type":"array","items":{"$ref":"#/components/schemas/NormberakningTypeOption","description":"Lifecare's norms for the insats; the code is the normId"}},"incomeTypes":{"type":"array","items":{"$ref":"#/components/schemas/NormberakningTypeOption","description":"The income types"}},"costTypes":{"type":"array","items":{"$ref":"#/components/schemas/NormberakningTypeOption","description":"The utgift types"}},"livingCostTypes":{"type":"array","items":{"$ref":"#/components/schemas/NormberakningTypeOption","description":"The levnadskostnad i övrigt types"}}}},"NormberakningPreviousCalculation":{"type":"object","description":"The beräkning preceding the errand's own period, read from Lifecare.","properties":{"id":{"type":"integer","format":"int32","description":"Lifecare's calculation id","examples":[1]},"norm":{"type":"string","description":"The norm","examples":["Riksnorm 2026"]},"fromDate":{"type":"string","description":"The start of the period","examples":["2026-01-01"]},"toDate":{"type":"string","description":"The end of the period","examples":["2026-06-30"]},"incomeSum":{"type":"number","description":"The sum of the incomes"},"expenseSum":{"type":"number","description":"The sum of the utgifter"},"specialExpenseSum":{"type":"number","description":"The sum of the levnadskostnader i övrigt"},"normSum":{"type":"number","description":"The sum of the norm"},"commonHouseholdCost":{"type":"number","description":"The gemensamma kostnader"},"familyCost":{"type":"number","description":"The norm part for the members"},"balance":{"type":"number","description":"The result, an underskott negative"},"totalSum":{"type":"number","description":"The total sum"},"isFinal":{"type":"boolean","description":"Whether the beräkning is slutlig"},"persons":{"type":"array","items":{"$ref":"#/components/schemas/NormberakningPreviousPerson","description":"The members included"}},"incomes":{"type":"array","items":{"$ref":"#/components/schemas/NormberakningPreviousIncome","description":"The incomes"}},"expenses":{"type":"array","items":{"$ref":"#/components/schemas/NormberakningPreviousExpense","description":"The utgifter"}},"specialExpenses":{"type":"array","items":{"$ref":"#/components/schemas/NormberakningPreviousExpense","description":"The levnadskostnader i övrigt"}}}},"NormberakningPreviousExpense":{"type":"object","description":"An expense row of a previous Lifecare beräkning.","properties":{"type":{"type":"string","description":"The expense type","examples":["Boendekostnad"]},"appliedAmount":{"type":"number","description":"The applied amount"},"approvedAmount":{"type":"number","description":"The approved amount"}}},"NormberakningPreviousIncome":{"type":"object","description":"An income row of a previous Lifecare beräkning.","properties":{"type":{"type":"string","description":"The income type","examples":["Aktivitetsstöd"]},"amountApplicant":{"type":"number","description":"The applicant amount"},"applicantSearchDate":{"type":"string","description":"The date the applicant amount was looked up"},"amountCoApplicant":{"type":"number","description":"The co-applicant amount"},"coApplicantSearchDate":{"type":"string","description":"The date the co-applicant amount was looked up"}}},"NormberakningPreviousPerson":{"type":"object","description":"A household member of a previous Lifecare beräkning.","properties":{"name":{"type":"string","description":"The name"},"amount":{"type":"number","description":"The member's share of the norm"},"deviationFromDate":{"type":"string","description":"The start of the deviation"},"deviationToDate":{"type":"string","description":"The end of the deviation"},"deviationDays":{"type":"integer","format":"int32","description":"The member's days in the household; absent for the whole period","examples":[15]},"relationType":{"type":"string","description":"The member's place in the household as Lifecare recorded it for this beräkning: SINGLE (ensamstående), COUPLE (sammanboende par) or OTHER; absent when Lifecare gave none","enum":["SINGLE","COUPLE","OTHER"],"examples":["SINGLE"]}}},"LifecareRecordBody":{"type":"object","description":"A record's body, shown in the list without opening the record.","properties":{"id":{"type":"string","description":"The Lifecare record id","examples":["135"]},"content":{"type":"string","description":"The body as HTML; left out when Lifecare would not hand it over","examples":["<p>Hej</p>"]}}},"LifecareRecords":{"type":"object","description":"The applicant's Lifecare records, split into the two groups the tab shows.","properties":{"journalNotes":{"type":"array","description":"The journalanteckningar, in Lifecare's order","items":{"$ref":"#/components/schemas/LifecareRecord"}},"documents":{"type":"array","description":"The documents, in Lifecare's order","items":{"$ref":"#/components/schemas/LifecareRecord"}}}},"LifecareNoteType":{"type":"object","description":"A note type a caseworker can pick for a new journalanteckning.","properties":{"code":{"type":"integer","format":"int32","description":"Lifecare's noteTypeCode","examples":[1]},"name":{"type":"string","description":"The note type's name","examples":["Journalanteckning"]},"protectedByDefault":{"type":"boolean","description":"Whether a new note of this type is saved skrivskyddad unless the caseworker says otherwise","examples":[false]}}},"LifecareDocumentType":{"type":"object","description":"A document type a caseworker can pick for a new document.","properties":{"code":{"type":"integer","format":"int32","description":"Lifecare's documentTypeCode","examples":[1]},"name":{"type":"string","description":"The document type's name","examples":["EK Brev"]},"canChangeOccurenceDate":{"type":"boolean","description":"Whether the documented date may differ from the one Lifecare proposes (today)","examples":[true]},"protectedByDefault":{"type":"boolean","description":"Whether a new document of this type is saved skrivskyddad unless the caseworker says otherwise","examples":[false]}}},"LifecareDecisionType":{"type":"object","description":"A beslutstyp the errand's insats offers in Lifecare, as the Beslut tab lists it.","properties":{"code":{"type":"integer","format":"int32","description":"Lifecare's beslutstyp code","examples":[153]},"name":{"type":"string","description":"The beslutstyp's name","examples":["Ek Ekonomiskt bistånd 12 kap 1, 7 §§ SoL, bifall"]},"outcome":{"type":"string","description":"careM's outcome for the type, BIFALL or AVSLAG; absent for a type that cannot be registered from careM yet","enum":["BIFALL","AVSLAG"],"examples":["BIFALL"]},"requiresFromDate":{"type":"boolean","description":"Whether a beslut of the type requires a from date","examples":[true]},"requiresToDate":{"type":"boolean","description":"Whether a beslut of the type requires a to date","examples":[true]}},"readOnly":true},"LifecareDecisionProposal":{"type":"object","description":"What a new beslut gets from the errand's normberäkning, as Lifecare's calculation view fills it in for Besluta. Lifecare keeps no link between a beslut and a normberäkning; the beslut may carry another amount.","properties":{"calculationId":{"type":"integer","format":"int32","description":"Lifecare's calculationId of the errand's normberäkning; absent when the errand has none linked","examples":[25]},"prefilled":{"type":"boolean","description":"Lifecare filled amount and period in, which it does only for a normberäkning saved as final","examples":[true]},"amount":{"type":"number","description":"The normberäkning's result (TotalSum) as the beslut's amount, without sign; absent unless prefilled","examples":[2068]},"periodFrom":{"type":"string","description":"Start of the normberäkning's period, yyyy-MM-dd; absent unless prefilled","examples":["2026-09-01"]},"periodTo":{"type":"string","description":"End of the normberäkning's period, yyyy-MM-dd; absent unless prefilled","examples":["2026-09-30"]}},"readOnly":true},"HouseholdChild":{"type":"object","description":"A household child named on the application: the partyId the beredning tags the child's SSBTEK incomes with, and the personal number SSBTEK is read with.","properties":{"partyId":{"type":"string","description":"The child's partyId, as on the errand's children","examples":["5b1e7c3a-9d2f-4e8b-a6c4-1f0d2e3c4b5a"]},"personId":{"type":"string","description":"The child's personal number (12 characters, may contain letters); null when it could not be resolved","examples":["20100101T003"]}}},"HouseholdIdentifiers":{"type":"object","description":"The errand number and the household's personal numbers. Fetched per process run so the personal numbers never become process variables; every read is recorded in the errand's event log.","properties":{"errandNumber":{"type":"string","description":"The errand's human-readable number — what a person searches for in Draken","examples":["EB-2026-000123"]},"applicantPersonId":{"type":"string","description":"The applicant's personal number (12 characters, may contain letters). Null when it could not be resolved — treat as an error on the caller's side.","examples":["19800101T001"]},"coApplicantPersonId":{"type":"string","description":"The co-applicant's personal number; null when there is no co-applicant or it could not be resolved","examples":["19850505T002"]},"children":{"type":"array","description":"The household children named on the application that have a partyId; empty when there are none","items":{"$ref":"#/components/schemas/HouseholdChild"}}}},"FormSnapshot":{"type":"object","description":"Self-describing snapshot of the form as it was rendered and answered.","properties":{"schemaVersion":{"type":"string","description":"The snapshot envelope contract version (server-owned)","examples":["form-snapshot/1"],"minLength":1},"formDefinitionVersion":{"type":"string","description":"The frontend form / i18n bundle version that produced this snapshot","examples":["eb-2026.06-r3"]},"typeSlug":{"type":"string","description":"The errand type slug the form belongs to","examples":["financial-assistance-new"]},"locale":{"type":"string","description":"The locale the form was rendered in","examples":["sv-SE"]},"capturedAt":{"type":"string","format":"date-time","description":"When the form was rendered/submitted, per the client clock","examples":["2026-06-24T10:15:30+02:00"]},"title":{"type":"string","description":"The form title the applicant saw","examples":["Ansökan om ekonomiskt bistånd"]},"sections":{"type":"array","description":"The sections of the form, in render order","items":{"$ref":"#/components/schemas/FormSnapshotSection"},"minItems":1},"attestation":{"$ref":"#/components/schemas/FormSnapshotAttestation","description":"The attestation the applicant accepted, if any"}},"required":["schemaVersion","sections"]},"FormSnapshotAnswer":{"type":"object","description":"The answer given to a field, as it was presented to the applicant.","properties":{"code":{"type":"string","description":"The option code, when the answer is an enum/option value; null otherwise","examples":["SINGLE"]},"value":{"type":"string","description":"The raw value, when the answer is free text / number / boolean; null otherwise","examples":["12000"]},"display":{"type":"string","description":"The human-readable answer text the applicant saw","examples":["Ensamstående"]}}},"FormSnapshotAttestation":{"type":"object","description":"The attestation the applicant accepted at submission.","properties":{"label":{"type":"string","description":"The attestation text the applicant accepted","examples":["Jag intygar på heder och samvete att uppgifterna är riktiga."]},"answer":{"$ref":"#/components/schemas/FormSnapshotAnswer","description":"The answer given to the attestation"}}},"FormSnapshotField":{"type":"object","description":"A single form field as it was rendered and answered.","properties":{"name":{"type":"string","description":"The field name (matches the typed application data field)","examples":["maritalStatus"]},"label":{"type":"string","description":"The field label the applicant saw","examples":["Civilstånd"]},"inputType":{"type":"string","description":"The input kind as rendered","enum":["RADIO","CHECKBOX","SELECT","TEXT","TEXTAREA","NUMBER","DATE","BOOLEAN_TOGGLE","REPEATING_GROUP","STATIC"],"examples":["RADIO"]},"helpText":{"type":"string","description":"The help text shown for the field, if any","examples":["Ange ditt civilstånd vid ansökningstillfället."]},"infoTexts":{"type":"array","description":"Info texts shown for the field, in order","items":{"type":"string"}},"notices":{"type":"array","description":"Info / warning / error notices rendered for the field, in order","items":{"$ref":"#/components/schemas/FormSnapshotNotice"}},"options":{"type":"array","description":"All options as presented (for RADIO/CHECKBOX/SELECT), in order","items":{"$ref":"#/components/schemas/FormSnapshotOption"}},"answer":{"$ref":"#/components/schemas/FormSnapshotAnswer","description":"The answer given, when the field has a single answer"},"items":{"type":"array","description":"For REPEATING_GROUP fields, one entry per repeated instance","items":{"$ref":"#/components/schemas/FormSnapshotGroup"}},"required":{"type":"boolean","description":"Whether the field was required as rendered","examples":[true]},"visible":{"type":"boolean","description":"Whether the field was visible to the applicant","examples":[true]},"condition":{"type":"string","description":"The visibility rule that was active, human-readable","examples":["always"]}}},"FormSnapshotGroup":{"type":"object","description":"One repeated instance of a REPEATING_GROUP field — its nested fields, in render order.","properties":{"fields":{"type":"array","description":"The nested fields for this repeated instance, in render order","items":{"$ref":"#/components/schemas/FormSnapshotField"}}}},"FormSnapshotNotice":{"type":"object","description":"An info / warning / error notice shown to the applicant.","properties":{"level":{"type":"string","description":"The notice level","enum":["INFO","WARNING","ERROR"],"examples":["WARNING"]},"text":{"type":"string","description":"The notice text the applicant saw","examples":["Felaktiga uppgifter kan vara bidragsbrott."]}}},"FormSnapshotOption":{"type":"object","description":"An option as presented to the applicant.","properties":{"code":{"type":"string","description":"The option code (machine value)","examples":["SINGLE"]},"label":{"type":"string","description":"The option label the applicant saw","examples":["Ensamstående"]},"selected":{"type":"boolean","description":"Whether the applicant selected this option","examples":[true]}}},"FormSnapshotSection":{"type":"object","description":"A section of the form as it was rendered.","properties":{"id":{"type":"string","description":"A stable section id","examples":["household"]},"title":{"type":"string","description":"The section title the applicant saw","examples":["Hushåll"]},"description":{"type":"string","description":"The section-level description / info text, if any","examples":["Uppgifter om din familj"]},"visible":{"type":"boolean","description":"Whether the section was visible to the applicant","examples":[true]},"fields":{"type":"array","description":"The fields in the section, in render order","items":{"$ref":"#/components/schemas/FormSnapshotField"}}}},"DecisionOption":{"type":"object","description":"An allowed decision outcome (decision alternatives) for an errand type.","properties":{"code":{"type":"string","description":"The decision outcome code, stored on the Decision row's value","examples":["BIFALL"]},"displayName":{"type":"string","description":"Human-readable label for the outcome","examples":["Bifall"]},"carriesAmount":{"type":"boolean","description":"Whether the outcome carries an amount — true for outcomes that grant an amount, false for ones that imply 0 (e.g. a rejection)","examples":[true]}}},"DecisionProposal":{"type":"object","description":"The decision proposal (beslutsförslag) — derived data, recomputed on every read.","properties":{"outcome":{"type":"string","description":"The proposed decision outcome. Rule: estimatedAmount <= 0 → AVSLAG; estimatedAmount > 0 and every expense fully approved → BIFALL; estimatedAmount > 0 and any expense approved below the applied amount → DELAVSLAG. Null when no amount could be estimated (see explanation)","enum":["BIFALL","DELAVSLAG","AVSLAG"],"examples":["BIFALL"]},"outcomeOptions":{"type":"array","description":"Every outcome the caseworker can pick instead — the errand type's decision catalogue","items":{"$ref":"#/components/schemas/DecisionOption"}},"periodFrom":{"type":"string","format":"date","description":"The proposed decision period start — the calculation's period","examples":["2026-06-01"]},"periodTo":{"type":"string","format":"date","description":"The proposed decision period end — the calculation's period","examples":["2026-06-30"]},"concernedMonth":{"type":"string","description":"The calculation's application month (YYYY-MM)","examples":["2026-06"]},"estimatedAmount":{"type":"number","description":"The bistånd the outcome is decided on; positive is an underskott, zero or negative an överskott. When the normberäkning is saved in Lifecare (lifecareCalculationId) this is its result as Lifecare computed it (-balance) — amountBasis LIFECARE_CALCULATION. Before that, or when the saved calculation cannot be read, it is estimated: normSum + expenseSum + specialExpenseSum − incomeSum, all from the calculation draft except the norm, which is taken from the applicant's most recent Lifecare calculation before the application month — amountBasis ESTIMATE. Null when no previous norm is known (see explanation)","examples":[4250]},"amountBasis":{"type":"string","description":"Where estimatedAmount (and thereby outcome) comes from: LIFECARE_CALCULATION = the normberäkning saved in Lifecare, ESTIMATE = the draft plus the previous calculation's norm. Null when there is no amount","enum":["LIFECARE_CALCULATION","ESTIMATE"],"examples":["LIFECARE_CALCULATION"]},"normSum":{"type":"number","description":"The norm sum: the saved Lifecare calculation's norm (LIFECARE_CALCULATION), or the previous Lifecare calculation's norm the estimate is based on (ESTIMATE). Null when unknown","examples":[6200]},"incomeSum":{"type":"number","description":"The draft's income sum (effective amounts)","examples":[3000]},"expenseSum":{"type":"number","description":"The draft's expense sum (effective = approved amounts)","examples":[800]},"specialExpenseSum":{"type":"number","description":"The draft's special-expense sum (effective = approved amounts)","examples":[250]},"explanation":{"type":"string","description":"Why the proposal is incomplete (Swedish) — e.g. no previous norm could be read so no amount/outcome was proposed. Null when the proposal is complete","examples":["Ingen norm kunde läsas från Lifecare – beloppet kunde inte beräknas."]},"reason":{"type":"string","description":"The proposed orsak: the previous Lifecare decision's reason, or null when there is none","examples":["Arbetslös, ingen ersättning/stöd"]},"reasonOptions":{"type":"array","description":"Every orsak the caseworker can pick instead — Lifecare's orsak-catalogue (försörjningshinder) in Lifecare's order, plus the previous decision's reason(s) when those are not in the catalogue (FamilyCare exposes no reason catalogue over the API). The same catalogue applies to the applicant and the co-applicant","items":{"type":"string"}},"coApplicantReason":{"type":"string","description":"The proposed orsak for the co-applicant (medsökande): the previous Lifecare decision's co-applicant reason, or null when there is none. Picked from the same reasonOptions catalogue as the applicant's","examples":["Sjukskriven m läkarintyg, otillräcklig sjukpenning"]},"previousDecision":{"$ref":"#/components/schemas/PreviousDecision","description":"The applicant's most recent Lifecare decision, or null when none was found (or Lifecare could not be read)"},"warnings":{"type":"array","description":"The DECISION-section warnings this proposal raised (reconciled on every read)","items":{"$ref":"#/components/schemas/Warning"}}}},"PreviousDecision":{"type":"object","description":"The applicant's most recent Lifecare decision.","properties":{"type":{"type":"string","description":"The Lifecare decision type (free text as Lifecare names it)","examples":["Bifall"]},"reason":{"type":"string","description":"The Lifecare decision reason / orsak (free text)","examples":["Arbetslös, ingen ersättning/stöd"]},"coApplicant":{"type":"string","description":"The co-applicant (medsökande) the decision also concerned, as Lifecare names them. Null when the decision had none","examples":["Astrid Testsson"]},"coApplicantReason":{"type":"string","description":"The co-applicant's own reason / orsak on the decision (free text). Null when the decision had no co-applicant","examples":["Sjukskriven m läkarintyg, otillräcklig sjukpenning"]},"periodFrom":{"type":"string","description":"The decision period start (raw Lifecare string)","examples":["2026-05-01"]},"periodTo":{"type":"string","description":"The decision period end (raw Lifecare string)","examples":["2026-05-31"]},"amount":{"type":"number","description":"The decided amount","examples":[8500]},"date":{"type":"string","description":"The decision date (raw Lifecare string)","examples":["2026-04-28"]}}},"SsbtekChange":{"type":"object","description":"One income on which the latest SSBTEK answer and the normberäkning saved in Lifecare disagree","properties":{"kind":{"type":"string","description":"ADD = SSBTEK reports an income the calculation lacks; CHANGE = the calculation has the income at another amount; GONE = an income the system wrote to the calculation is no longer reported by SSBTEK","enum":["ADD","CHANGE","GONE"],"examples":["CHANGE"]},"mode":{"type":"string","description":"AUTO = the calculation still holds what the system last wrote there (no caseworker has touched the income), so the SSBTEK amount may be written without asking; CONFIRM = show it to the caseworker and write only on their say-so","enum":["AUTO","CONFIRM"],"examples":["AUTO"]},"reason":{"type":"string","description":"Why the change needs confirming; null for AUTO. FINAL = the calculation is final and takes no change; NO_BASELINE = careM has no record of what the system wrote to this calculation; EDITED = a caseworker has changed the amount; REMOVED = the income was taken out of the calculation (or never put in) on purpose; MULTIPLE_ROWS = the type has several rows; GONE_FROM_SSBTEK = SSBTEK no longer reports it, which does not prove it has stopped","enum":["FINAL","NO_BASELINE","EDITED","REMOVED","MULTIPLE_ROWS","GONE_FROM_SSBTEK"],"examples":["EDITED"]},"role":{"type":"string","description":"Whose income: the applicant (Lifecare's S column) or the co-applicant (M)","enum":["APPLICANT","CO_APPLICANT"],"examples":["APPLICANT"]},"incomeTypeId":{"type":"integer","format":"int32","description":"The Lifecare income type id, when careM knows it (always for ADD)","examples":[12]},"incomeType":{"type":"string","description":"The Lifecare income type name — what the calculation row is matched on","examples":["Lön"]},"ssbtekAmount":{"type":"number","description":"The amount SSBTEK gives; null for GONE","examples":[12400.0]},"lifecareAmount":{"type":"number","description":"The amount in the calculation (all rows of the type summed); null for ADD","examples":[11900.0]}}},"SsbtekChanges":{"type":"object","description":"Where the normberäkning saved in Lifecare no longer matches the latest SSBTEK answer","properties":{"calculationId":{"type":"integer","format":"int32","description":"The Lifecare calculation compared (the errand's lifecareCalculationId)","examples":[48213]},"isFinal":{"type":"boolean","description":"Whether the calculation is saved as final in Lifecare; if so nothing may be written and every change is CONFIRM","examples":[false]},"comparedAt":{"type":"string","format":"date-time","description":"When the calculation was read from Lifecare for this comparison","examples":["2026-09-25T09:30:00+02:00"]},"ssbtekReadAt":{"type":"string","format":"date-time","description":"When SSBTEK was last read for the errand; null when it has not been read since the calculation was linked","examples":["2026-09-25T03:00:00+02:00"]},"changes":{"type":"array","description":"The disagreements, empty when the calculation matches SSBTEK","items":{"$ref":"#/components/schemas/SsbtekChange"}}}},"PrefilledChild":{"type":"object","description":"A child pre-filled from Lifecare for a financial assistance renewal. Carries only what Lifecare provides — personnummer and name; the citizen completes residence, school etc. on the form.","properties":{"partyId":{"type":"string","description":"Party id (personId GUID) of the child","examples":["f47ac10b-58cc-4372-a567-0e02b2c3d479"]},"name":{"type":"string","description":"Name as registered in Lifecare","examples":["Kid Andersson"]}}},"RenewalPrefill":{"type":"object","description":"Pre-fill data for a financial assistance renewal (renewal): household children read from Lifecare.","properties":{"children":{"type":"array","description":"Children in the household from the most recent calculation","items":{"$ref":"#/components/schemas/PrefilledChild"}},"lifecareChecked":{"type":"boolean","description":"True when the Lifecare lookup succeeded. False means the answer is degraded (empty children).","examples":[true]}}},"FinancialAssistanceMetadata":{"type":"object","description":"Financial assistance type catalogue for the frontend dropdowns: income and cost types with labels, groups and the citizen flag.","properties":{"incomeTypes":{"type":"array","description":"The income types","items":{"$ref":"#/components/schemas/TypeOption"}},"costTypes":{"type":"array","description":"The cost types, grouped by their Mina-sidor form section","items":{"$ref":"#/components/schemas/TypeOption"}},"moneyTypes":{"type":"array","description":"The payment money types (Payment.moneyType allowed values). Placeholder — the real catalogue comes from Lifecare and isn't known yet.","items":{"$ref":"#/components/schemas/TypeOption"}},"paymentMethods":{"type":"array","description":"The payment methods (Payment.paymentMethod allowed values). Placeholder — the real catalogue comes from Lifecare and isn't known yet.","items":{"$ref":"#/components/schemas/TypeOption"}}}},"TypeOption":{"type":"object","description":"A selectable financial assistance income/cost type — the payload code plus its Mina-sidor + Lifecare labels, form group and citizen flag.","properties":{"code":{"type":"string","description":"The type code, as stored on the payload (incomeType / costType)","examples":["RENT"]},"externalDisplayName":{"type":"string","description":"The citizen Mina-sidor label; null for caseworker-only types not on the citizen form","examples":["Hyra (inte parkering/garage)"]},"internalDisplayName":{"type":"string","description":"The matching Lifecare caseworker dropdown label, or null when there is no Lifecare counterpart","examples":["Boendekostnad"]},"group":{"type":"string","description":"Stable code for the Mina-sidor form section the type is shown under; null for income","enum":["HOUSING","WORK_AND_STUDIES","HEALTH","OTHER"],"examples":["HOUSING"]},"citizenReportable":{"type":"boolean","description":"Whether an applicant may report the type, i.e. whether the code is accepted on the citizen payload. Does not control what the Mina-sidor form renders — that list is maintained in the frontend.","examples":[true]}}},"LifecareDecisionReason":{"type":"object","description":"An orsak a beslut of the beslutstyp can carry, as Lifecare words it, under the heading it sits in.","properties":{"code":{"type":"integer","format":"int32","description":"Lifecare's reasonCode","examples":[19]},"name":{"type":"string","description":"The orsak as Lifecare words it","examples":["Arbetar deltid ofrivilligt, otillräcklig inkomst"]},"header":{"type":"string","description":"The heading the orsak sits under","examples":["Arbetar deltid, ofrivilligt"]}},"readOnly":true},"Actualisation":{"type":"object","description":"A Lifecare actualisation (case intake) registered on a person.","properties":{"id":{"type":"integer","format":"int32","description":"The Lifecare actualisation id","examples":[5012]},"type":{"type":"string","description":"The actualisation type","examples":["Ansökan"]},"name":{"type":"string","description":"The actualisation name","examples":["Ekonomiskt bistånd"]},"date":{"type":"string","description":"The actualisation date as Lifecare reports it","examples":["2026-06-01"]},"reason":{"type":"string","description":"The reason for the actualisation","examples":["Nyansökan"]},"regards":{"type":"string","description":"What the actualisation regards","examples":["Försörjningsstöd"]},"fromWho":{"type":"string","description":"Who the actualisation came from","examples":["Den enskilde"]},"caseworker":{"type":"string","description":"The caseworker the actualisation is registered on","examples":["Anna Andersson"]},"organization":{"type":"string","description":"The organization the actualisation belongs to","examples":["IFO"]},"status":{"type":"string","description":"The actualisation status","examples":["Pågående"]},"investigationId":{"type":"integer","format":"int32","description":"The linked investigation id, when any","examples":[8801]},"serviceId":{"type":"integer","format":"int32","description":"The linked service id, when any","examples":[7700]},"decisionId":{"type":"integer","format":"int32","description":"The linked decision id, when any","examples":[9900]}}},"DocumentMetadata":{"type":"object","description":"Document metadata — the catalogue of selectable document types.","properties":{"types":{"type":"array","description":"Selectable document types","items":{"$ref":"#/components/schemas/DocumentType"}}}},"DocumentType":{"type":"object","description":"A selectable document type — the code and the Swedish Lifecare label.","properties":{"code":{"type":"string","description":"The type code","examples":["LETTER"]},"displayName":{"type":"string","description":"Human-readable Swedish label (the Lifecare 'Typ' value)","examples":["Brev"]}}},"CountResponse":{"type":"object","description":"Count of errands matching the supplied filter","properties":{"count":{"type":"integer","format":"int64","description":"Number of matching errands","examples":[42]}}},"ErrandTypeSchema":{"type":"object","description":"Form descriptor for an errand type slug — statuses, roles and the fields its data payload should carry.","properties":{"typeSlug":{"type":"string","description":"The errand type slug","examples":["financial-assistance-renewal"]},"applicationType":{"type":"string","description":"The application-type variant the slug maps to, when the type exposes one; null otherwise","examples":["RENEWAL"]},"displayName":{"type":"string","description":"Human-readable display name of the type","examples":["Ekonomiskt bistånd – återansökan"]},"statuses":{"type":"array","description":"Allowed statuses for the type — code plus human-readable display name, in lifecycle order","items":{"$ref":"#/components/schemas/StatusDefinition"}},"roles":{"type":"array","description":"Stakeholder roles valid for the type","items":{"$ref":"#/components/schemas/RoleDefinition"}},"fields":{"type":"array","description":"The fields the type's data payload should carry, as form guidance","items":{"$ref":"#/components/schemas/FieldDescriptor"}},"decisionOptions":{"type":"array","description":"The allowed decision outcomes (decision alternatives) a caseworker may record on the type; empty when the type defines none","items":{"$ref":"#/components/schemas/DecisionOption"}}}},"FieldDescriptor":{"type":"object","description":"Form-guidance descriptor for a single data field of an errand type.","properties":{"name":{"type":"string","description":"The data field name","examples":["maritalStatus"]},"type":{"type":"string","description":"The field kind","enum":["STRING","BOOLEAN","INTEGER","DECIMAL","DATE_TIME","ENUM","ARRAY"],"examples":["ENUM"]},"required":{"type":"boolean","description":"True when the field is unconditionally required for the application types it applies to","examples":[true]},"options":{"type":"array","description":"Allowable values when type is ENUM, otherwise null","examples":[["SINGLE","COHABITING"]],"items":{"type":"string"}},"itemsRef":{"type":"string","description":"For ARRAY fields, the OpenAPI component name of the element shape (resolve via /api-docs); null otherwise","examples":["Cost"]},"appliesTo":{"type":"array","description":"The application types that collect this field","examples":[["NEW","RENEWAL"]],"items":{"type":"string"}},"condition":{"type":"string","description":"Human-readable gate describing when the field is collected, when conditional; null when always collected","examples":["periodChoice == OTHER_BENEFIT"]},"description":{"type":"string","description":"Short description of the field","examples":["Marital status of the applicant"]}}},"RoleDefinition":{"type":"object","properties":{"code":{"type":"string"},"displayName":{"type":"string"},"maxOccurrences":{"type":"integer","format":"int32"},"required":{"type":"boolean"}}},"StatusDefinition":{"type":"object","description":"An allowed status for an errand type — the stored code plus its human-readable label.","properties":{"code":{"type":"string","description":"The status code stored on the errand","examples":["UNDER_REVIEW"]},"displayName":{"type":"string","description":"Human-readable label for the status","examples":["Under utredning"]}}}},"securitySchemes":{"sentBy":{"type":"apiKey","description":"Caller identity, e.g. 'joe001doe; type=adAccount' or '<uuid>; type=partyId'. Not authentication - it is the actor recorded in the errand event log.","name":"X-Sent-By","in":"header"}}}}