{"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"}],"tags":[{"name":"Statistics","description":"Read-only errand statistics for the caseworker interface"},{"name":"Permits","description":"Permits issued on an errand: validity period, conditions and status. Revoking sets the status to REVOKED."},{"name":"Financial Assistance · Approvals","description":"Caseworker approval state of the three EB view sections (CALCULATION / PAYMENT / DECISION) — read all three, or set/withdraw one."},{"name":"Conversation","description":"Messages between caseworker and applicant on an errand"},{"name":"Notifications","description":"User-facing notifications raised against an errand. Recipients (`ownerId`) acknowledge them when seen; expired ones are purged by a daily background job."},{"name":"Financial Assistance · Errands","description":"Create, read and replace EB 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":"Status History","description":"Status transition log for an errand"},{"name":"RPA","description":"Enqueue UiPath RPA tasks (Lifecare write-backs / supplement fetches) for an errand"},{"name":"Financial Assistance · Warnings","description":"Acknowledgeable EB income warnings on an errand — create, list and set status (OPEN / ACKNOWLEDGED / CLOSED). The daily prepare step reconciles them."},{"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":"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 · Lifecare history","description":"Read the applicant's case history straight from Lifecare — the normberäkningar (calculations), beslut (decisions) and documents — plus a single document's PDF content. Keyed by partyId (resolved to a personnummer via the citizen service); the period defaults to the last 24 months. caremanagement only forwards the reads."},{"name":"Event Log","description":"Who/what/when activity log for an errand — every read and write, with the acting user"},{"name":"Journal","description":"Journalanteckningar (case-journal entries) attached to an errand"},{"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":"Documents","description":"Dokument (formal case documents) attached to an errand"},{"name":"Errands","description":"Errand operations"},{"name":"Financial Assistance · Payment","description":"Read whether the manual Lifecare payment for the applicant and application month has been effectuated. caremanagement makes no payment itself."},{"name":"Financial Assistance · Calculation","description":"The normberäkning: prepare the calculation each daily loop (no Lifecare write), commit it to Lifecare after a decision, and read or edit the draft header."},{"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"},{"name":"Financial Assistance · Monitorings","description":"Financial assistance (EB) monitorings — date-bound watch/reminder objects on an errand, with full CRUD. Unlike the income warnings they carry no acknowledge lifecycle."}],"paths":{"/{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}/monitorings/{monitoringId}":{"get":{"tags":["Financial Assistance · Monitorings"],"summary":"Read a monitoring on an errand","operationId":"getMonitoring","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":"monitoringId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitoring"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"tags":["Financial Assistance · Monitorings"],"summary":"Replace a monitoring on an errand","operationId":"updateMonitoring","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":"monitoringId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringRequest"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitoring"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Financial Assistance · Monitorings"],"summary":"Delete a monitoring on an errand","operationId":"deleteMonitoring","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":"monitoringId","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"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/data":{"put":{"tags":["Financial Assistance · Errands"],"summary":"Replace financial assistance data","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"}}}}}}},"/{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","DOCUMENT_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","DOCUMENT_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":"notificationOwnerId","in":"query","description":"Scopes the unacknowledged-notification filter to notifications addressed to this recipient (caseworker). Only applied when hasUnacknowledgedNotifications=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 (ärendeuppgifter), 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"}}}}}}},"/{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"}]}}}},"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"}]}}}},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/rpa-tasks":{"post":{"tags":["RPA"],"summary":"Enqueue an RPA task for an errand","operationId":"enqueue","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/RpaTaskRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/{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":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Referral"}}}}}}},"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"}}}}}}},"/{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":{"200":{"description":"OK"}}}},"/{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":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Permit"}}}}}}},"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"}}}}}}},"/{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":{"200":{"description":"OK"}}}},"/{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":{"200":{"description":"OK"}}}},"/{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":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Note"}}}}}}},"post":{"tags":["Notes"],"summary":"Add note to errand","operationId":"add","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":{"200":{"description":"OK"}}}},"/{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":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}}}}}},"post":{"tags":["Conversation"],"summary":"Post a message on the errand","description":"Multipart request. The 'message' part carries the message (JSON); the optional 'attachments' part carries the files to attach (any type).","operationId":"post","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"}}}}}}},"/{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"}}}},"/{municipalityId}/{namespace}/errands/{errandId}/journal-entries":{"get":{"tags":["Journal"],"summary":"List journal entries for an errand (most recent first)","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":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JournalEntry"}}}}}}},"post":{"tags":["Journal"],"summary":"Add a journal entry to an errand","operationId":"add_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"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJournalEntry"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/{municipalityId}/{namespace}/errands/{errandId}/journal-entries/{journalEntryId}/lock":{"post":{"tags":["Journal"],"summary":"Lock a journal entry (skrivskydd) — it becomes an immutable upprättad handling","operationId":"lock","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":"journalEntryId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockJournalEntry"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntry"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/documents":{"get":{"tags":["Documents"],"summary":"List documents for an errand (most recent first)","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"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Document"}}}}}}},"post":{"tags":["Documents"],"summary":"Add a document to an errand","operationId":"add_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"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocument"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/{municipalityId}/{namespace}/errands/{errandId}/documents/{documentId}/lock":{"post":{"tags":["Documents"],"summary":"Lock a document (skrivskydd) — it becomes an immutable upprättad handling","operationId":"lock_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":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockDocument"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}}}}},"/{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"}]}}}},"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"}]}}}},"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 origin 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":"origin","in":"query","description":"Only return attachments with this origin","required":false,"schema":{"type":"string","enum":["APPLICATION","CONVERSATION","GENERATED","ERRAND","CASE_DATA","DECISION"]}},{"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 origin tags what the file is: ERRAND (a plain manual upload, the default), CASE_DATA (ärendeuppgifter — a case-data document) or DECISION (beslut — 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":"origin","in":"query","description":"What the uploaded file is: ERRAND (a plain manual upload, the default), CASE_DATA (ärendeuppgifter — a case-data document) or DECISION (beslut — 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 EB 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"}}}}}},"post":{"tags":["Financial Assistance · Warnings"],"summary":"Create an EB 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"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/monitorings":{"get":{"tags":["Financial Assistance · Monitorings"],"summary":"List the monitorings on an errand","operationId":"listMonitorings","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/Monitoring"}}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Financial Assistance · Monitorings"],"summary":"Create a monitoring on an errand","description":"Creates a date-bound monitoring on the errand. Returns the created monitoring and its Location.","operationId":"createMonitoring","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/MonitoringRequest"}}},"required":true},"responses":{"201":{"description":"Successful operation","headers":{"Location":{"style":"simple","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitoring"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","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"}}}}}}},"/{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"}}}}}}},"/{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"}}}}}}},"/{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"}}}}}}},"/{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"}}}}}}},"/{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"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/payment-status":{"post":{"tags":["Financial Assistance · Payment"],"summary":"Read whether the Lifecare payment has been effectuated","description":"Reads whether the manual Lifecare payment for the applicant and application month has been registered, returning the effectuated flag and (when effectuated) the payment date. caremanagement makes no payment — payment is a manual caseworker step in Lifecare; 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"}}}}}}},"/{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"}}}}}}},"/{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). Does NOT create a calculation in Lifecare — the EB process calls this each daily loop. Use /commit after a decision to create it in Lifecare.","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"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/calculation/from-application":{"post":{"tags":["Financial Assistance · Calculation"],"summary":"Create the calculation in Lifecare straight from the application (nyansökan)","description":"Builds the calculation from the data the citizen declared in the application — incomes resolved to FC types by name, expenses and household from the same feeder the renewal path uses — and creates it in Lifecare FC in one shot, returning the created calculation id. No SSBTEK, no daily loop, no caseworker draft. Used by the nyansökan process.","operationId":"commitFromApplication","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"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/calculation/commit":{"post":{"tags":["Financial Assistance · Calculation"],"summary":"Create the calculation in Lifecare (after decision)","description":"Builds the calculation from the classified incomes and creates it in Lifecare FC, returning the created calculation id. Called once a decision is taken — never during the daily SSBTEK loop.","operationId":"commitCalculation","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"}}}}}}},"/{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 — tilläggsansökan) as an attachment to a specific Lifecare actualisation. 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"}}],"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"},"400":{"description":"Bad Request","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/actualisation":{"post":{"tags":["Financial Assistance · Intake"],"summary":"Create the Lifecare actualisation (case intake)","description":"Builds the actualisation against the applicant's Lifecare FC 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"}}}}}}},"/{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","DOCUMENT_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","DOCUMENT_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","DOCUMENT_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"}}}},"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 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"},"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":["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"},"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}/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`, `description`, `content`, `type`, and `subType` are honoured; other fields in the body are ignored.","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":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}}}},"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":{"200":{"description":"OK"}}},"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":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/journal-entries/{journalEntryId}":{"get":{"tags":["Journal"],"summary":"Read a journal entry","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":"journalEntryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntry"}}}}}},"delete":{"tags":["Journal"],"summary":"Delete a journal entry (only while WORKING; a LOCKED entry returns 409)","operationId":"delete_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":"journalEntryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}},"patch":{"tags":["Journal"],"summary":"Update a journal entry (only while WORKING; a LOCKED entry returns 409)","operationId":"update_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":"journalEntryId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateJournalEntry"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntry"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/documents/{documentId}":{"get":{"tags":["Documents"],"summary":"Read a document","operationId":"read_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"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}}}},"delete":{"tags":["Documents"],"summary":"Delete a document (only while WORKING; a LOCKED document returns 409)","operationId":"delete_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"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}},"patch":{"tags":["Documents"],"summary":"Update a document (only while WORKING; a LOCKED document returns 409)","operationId":"update_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"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDocument"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/warnings/{warningId}":{"patch":{"tags":["Financial Assistance · Warnings"],"summary":"Set the status of an EB 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"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/sections/{section}/approval":{"patch":{"tags":["Financial Assistance · Approvals"],"summary":"Set a section's approval (caseworker)","description":"A caseworker verifies one of the EB view sections (CALCULATION / PAYMENT / DECISION) as approved, or withdraws an earlier approval. Approving stamps who/when; withdrawing clears them.","operationId":"setSectionApproval","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 to approve","required":true,"schema":{"type":"string","enum":["CALCULATION","PAYMENT","DECISION"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionApprovalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionApproval"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","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"}}}}}},"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"}}}}}}},"/{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"}}}}}},"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"}}}}}}},"/{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"}}}}}}},"/{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"}}}}}},"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"}}}}}}},"/{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":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatisticsResponse"}}}}}}},"/{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}/errands/{errandId}/status-history":{"get":{"tags":["Status History"],"summary":"List status transitions for errand","operationId":"list_4","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":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StatusHistoryEntry"}}}}}}}},"/{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"}}}}}},"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":{"200":{"description":"OK"}}}},"/{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"}}}}}},"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":{"200":{"description":"OK"}}}},"/{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":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteCount"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/messages/{messageId}":{"get":{"tags":["Conversation"],"summary":"Read a message","operationId":"read_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":"messageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}}}},"/{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"}}}}}}},"/{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":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadCount"}}}}}}},"/{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_5","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":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ErrandEvent"}}}}}}}},"/{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":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrandEventCount"}}}}}}},"/{municipalityId}/{namespace}/errands/{errandId}/decisions/{decisionId}":{"get":{"tags":["Errand decisions"],"summary":"Read decision","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":"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"}}}},"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 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"},"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}":{"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":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntryMetadata"}}}}}}},"/{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"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/warnings/count":{"get":{"tags":["Financial Assistance · Warnings"],"summary":"Count the active EB 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"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/sections/approvals":{"get":{"tags":["Financial Assistance · Approvals"],"summary":"Read the section approvals on an errand","description":"The caseworker approval state of the three EB view sections (CALCULATION = calculation, PAYMENT = payment, DECISION = decision). Always returns all three — a section never approved is present with approved=false. The same object is embedded in the errand view.","operationId":"getSectionApprovals","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/SectionApprovals"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/monitorings/count":{"get":{"tags":["Financial Assistance · Monitorings"],"summary":"Count the monitorings on an errand","description":"How many monitorings are on the errand. Not recorded in the event log.","operationId":"countMonitorings","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/MonitoringCount"}}}},"404":{"description":"Not Found","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"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/{errandId}/calculation/draft":{"get":{"tags":["Financial Assistance · Calculation"],"summary":"Read the draft calculation","description":"The FC income rows the EB process prepared (not yet created in Lifecare) for the caseworker to review and edit before a decision. 404 when no draft exists yet.","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"}}}}}}},"/{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 an EB 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"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/metadata":{"get":{"tags":["Financial Assistance · Intake"],"summary":"Read EB type metadata (income / cost dropdowns)","description":"The complete income and cost type catalogue the frontend feeds its EB dropdowns from. Each type carries a code, the citizen Mina-sidor label (externalDisplayName), the matching Lifecare handläggare-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 handläggare-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"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/documents":{"get":{"tags":["Financial Assistance · Lifecare history"],"summary":"List the applicant's Lifecare documents (metadata)","description":"The applicant's Lifecare documents over the period — metadata only (id, title, date, type, owner). Fetch a single document's content via the /documents/{documentId}/content endpoint. 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":"listDocuments","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/LifecareDocument"}}}}},"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"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/documents/{documentId}/content":{"get":{"tags":["Financial Assistance · Lifecare history"],"summary":"Read a Lifecare document's content (PDF)","description":"Streams a single Lifecare document's content (the generated PDF) by its document id, straight from Lifecare. caremanagement only forwards the bytes. 502 when Lifecare is unreachable; Lifecare answers 404 when the document has no generated PDF (content exists only for PDF-backed document types).","operationId":"readDocumentContent","parameters":[{"name":"municipalityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","pattern":"[\\w|\\-]+"}},{"name":"documentId","in":"path","description":"The Lifecare document id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/decisions":{"get":{"tags":["Financial Assistance · Lifecare history"],"summary":"List the applicant's Lifecare decisions (beslut)","description":"The applicant's Lifecare beslut over the period — the decision header plus the persons each concerned — served straight from Lifecare. 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":"listDecisions","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/LifecareDecision"}}}}},"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"}}}}}}},"/{municipalityId}/{namespace}/errands/financial-assistance/calculations":{"get":{"tags":["Financial Assistance · Lifecare history"],"summary":"List the applicant's Lifecare calculations (normberäkningar)","description":"The applicant's Lifecare normberäkningar over the period — the full breakdown (header sums plus income, expense, special-expense and household-member rows) the frontend renders straight from Lifecare. 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":"listCalculations","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/LifecareCalculation"}}}}},"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"}}}}}}},"/{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 (tilläggsansökan) 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"}}}}}}},"/{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":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentMetadata"}}}}}}},"/{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"}}},"components":{"schemas":{"Problem":{"type":"object","properties":{"instance":{"type":"string","format":"uri"},"type":{"type":"string","format":"uri"},"title":{"type":"string"},"detail":{"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":{}}},"Violation":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}},"MonitoringRequest":{"type":"object","description":"Request to create or replace an EB monitoring on an errand.","properties":{"source":{"type":"string","description":"Provenance, defaults to CASEWORKER when omitted. RPA POSTs LIFECARE (with lifecareId) to surface a monitoring read out of Lifecare onto the errand.","enum":["CASEWORKER","LIFECARE"],"examples":["CASEWORKER"]},"lifecareId":{"type":"string","description":"The monitoring's id in Lifecare. Set by RPA when surfacing a LIFECARE-sourced monitoring (the idempotency key) or when stamping back the id of a mirrored caseworker monitoring.","examples":["987654"]},"title":{"type":"string","description":"Short headline for the monitoring","examples":["Follow up income details from CSN"],"minLength":1},"description":{"type":"string","description":"Free-text details of what to watch for","examples":["Awaiting supplementary documentation before a decision can be made."]},"startDate":{"type":"string","format":"date","description":"When the watch becomes relevant (monitoringsdatum)","examples":["2026-07-01"]},"endDate":{"type":"string","format":"date","description":"When the watch ends — open-ended when omitted. Must not be before the start date.","examples":["2026-07-31"]},"createdBy":{"type":"string","description":"The caseworker who created the monitoring","examples":["joe01doe"]}},"required":["startDate","title"]},"Monitoring":{"type":"object","description":"An EB monitoring (date-bound watch/reminder) on an errand.","properties":{"id":{"type":"string","description":"The monitoring id","examples":["f47ac10b-58cc-4372-a567-0e02b2c3d479"],"readOnly":true},"source":{"type":"string","description":"Provenance: CASEWORKER for one authored in Draken (RPA mirrors it onto the person in Lifecare), LIFECARE for one read out of Lifecare by RPA and surfaced here on the errand.","enum":["CASEWORKER","LIFECARE"],"examples":["CASEWORKER"]},"lifecareId":{"type":"string","description":"The monitoring's id in Lifecare once it exists there — null until RPA has mirrored a caseworker-authored monitoring; always set for a LIFECARE-sourced one.","examples":["987654"]},"title":{"type":"string","description":"Short headline for the monitoring","examples":["Follow up income details from CSN"]},"description":{"type":"string","description":"Free-text details of what to watch for","examples":["Awaiting supplementary documentation before a decision can be made."]},"startDate":{"type":"string","format":"date","description":"When the watch becomes relevant (monitoringsdatum)","examples":["2026-07-01"]},"endDate":{"type":"string","format":"date","description":"When the watch ends — open-ended when omitted","examples":["2026-07-31"]},"createdBy":{"type":"string","description":"The caseworker who created the monitoring","examples":["joe01doe"]},"created":{"type":"string","format":"date-time","description":"When the monitoring was created","readOnly":true},"updated":{"type":"string","format":"date-time","description":"When the monitoring was last updated","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 asset was purchased","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"]},"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"]},"purchaseDate":{"type":"string","format":"date","description":"The date the asset was purchased","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"]},"firstName":{"type":"string","description":"First name","examples":["Astrid"]},"lastName":{"type":"string","description":"Last name","examples":["Lindgren"]},"schoolName":{"type":"string","description":"Name of the child's school","examples":["Bredsands skola"]},"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","INTERNET","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"]}}},"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"]},"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"]},"employerAndPlace":{"type":"string","description":"Employer and place of work","examples":["PostNord, Sundsvall"]}}},"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"]},"applicantName":{"type":"string","description":"Name of the person who applied for the benefit","examples":["Anna Andersson"]}}},"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"]},"needsInterpreter":{"type":"boolean","description":"Whether the person needs an interpreter","examples":["true"]},"interpreterLanguage":{"type":"string","description":"Language the interpreter should use","examples":["Arabiska"]},"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"]},"accountNumber":{"type":"string","description":"Bank account number","examples":["123456789"]},"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"]},"phone":{"type":"string","description":"Phone number used for SMS notifications about the application","examples":["+46701234567"]},"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"]},"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"]}}},"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"]},"shortCode":{"type":"string","description":"Short code for the namespace","examples":["MY"]},"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"]},"displayName":{"type":"string","description":"Display name","examples":["New case"]},"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":"Registered errand type slug — validated against ErrandTypeRegistry","examples":["case-type-slug"]},"title":{"type":"string","description":"Title for the errand","examples":["Title of the errand"]},"status":{"type":"string","description":"Status of the errand","examples":["NEW"]},"description":{"type":"string","description":"Description of the errand","examples":["Long description text"]},"priority":{"type":"string","description":"Priority of the errand","examples":["HIGH"]},"reporterUserId":{"type":"string","description":"User id of the reporter","examples":["joe01doe"]},"assignedUserId":{"type":"string","description":"User id of the assignee","examples":["jane02doe"]},"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 to start when the errand is created","examples":["Handläggning av ärende"]},"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}}},"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"}}},"ContactChannel":{"type":"object","description":"ContactChannel model","properties":{"key":{"type":"string","description":"The key of the contact channel","examples":["Email"]},"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"]},"externalIdType":{"type":"string","description":"Type of external id","examples":["PRIVATE"]},"role":{"type":"string","description":"Role of the stakeholder — validated against StakeholderRoleRegistry for the errand's typeSlug","examples":["FOSTER_PARENT"]},"firstName":{"type":"string","description":"First name","examples":["Joe"]},"lastName":{"type":"string","description":"Last name","examples":["Doe"]},"organizationName":{"type":"string","description":"Organization name","examples":["Sundsvalls kommun"]},"address":{"type":"string","description":"Address","examples":["Storgatan 1"]},"careOf":{"type":"string","description":"Care of","examples":["c/o Doe"]},"zipCode":{"type":"string","description":"Zip code","examples":["85248"]},"city":{"type":"string","description":"City","examples":["Sundsvall"]},"country":{"type":"string","description":"Country","examples":["Sweden"]},"contactChannels":{"type":"array","description":"Contact channels for the stakeholder","items":{"$ref":"#/components/schemas/ContactChannel"}}}},"RpaTaskRequest":{"type":"object","description":"Request to enqueue a UiPath RPA task on an errand.","properties":{"action":{"type":"string","description":"The RPA action — selects the Lifecare flow the robot runs","enum":["FETCH_SUPPLEMENTS","WRITE_NORMBERAKNING","WRITE_DECISION","WRITE_JOURNAL","WRITE_DOCUMENT","WRITE_MONITORING","REGISTER_PAYMENT"],"examples":["FETCH_SUPPLEMENTS"],"minLength":1},"parameters":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional extra hints for the robot, merged into the queue item SpecificContent"}},"required":["action"]},"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; 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"]},"createdBy":{"type":"string","description":"User or system id that produced the notification. Automatically acknowledged if equal to ownerId.","examples":["john02doe"]},"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":["New errand assigned to you"]},"content":{"type":"string","description":"Optional longer content / body"},"acknowledged":{"type":"boolean","description":"Acknowledgement state. 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"]},"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"]},"CreateJournalEntry":{"type":"object","properties":{"type":{"type":"string","description":"Journal entry type (Lifecare 'Typ'/Journaltyp)","example":"Journalfört meddelande","maxLength":255,"minLength":0},"heading":{"type":"string","description":"Heading (Lifecare 'Rubrik')","example":"Journalfört meddelande: 2025-05-30 Info","maxLength":255,"minLength":0},"text":{"type":"string","description":"Free-text body of the journal entry; optional","example":"Hej! Vill bara informera att jag fått jobb på Mejeriet.","maxLength":1048576,"minLength":0},"entryDate":{"type":"string","format":"date","description":"Documented date (Lifecare 'Datum')","example":"2025-05-30"},"entryTime":{"type":"string","description":"Documented time (Lifecare 'Tid'); optional","example":"14:30"},"createdBy":{"type":"string","description":"User id of the author (Lifecare 'Upprättad av'); optional","example":"carola01winberg","maxLength":64,"minLength":0}},"required":["entryDate","heading","type"]},"LockJournalEntry":{"type":"object","properties":{"lockedBy":{"type":"string","description":"User id of whoever locks the entry; optional","example":"carola01winberg","maxLength":64,"minLength":0}}},"JournalEntry":{"type":"object","description":"A journalanteckning (case-journal entry) attached to an errand","properties":{"id":{"type":"string","description":"Unique identifier"},"errandId":{"type":"string","description":"Errand id this journal entry belongs to"},"type":{"type":"string","description":"Journal entry type (Lifecare 'Typ'/Journaltyp). A municipality-configured value; see the metadata catalogue for a provisional set.","example":"Journalfört meddelande"},"heading":{"type":"string","description":"Heading (Lifecare 'Rubrik')","example":"Journalfört meddelande: 2025-05-30 Info"},"text":{"type":"string","description":"Free-text body of the journal entry","example":"Hej! Vill bara informera att jag fått jobb på Mejeriet."},"entryDate":{"type":"string","format":"date","description":"Documented date (Lifecare 'Datum'), distinct from the system created timestamp","example":"2025-05-30"},"entryTime":{"type":"string","description":"Documented time (Lifecare 'Tid'); optional","example":"14:30"},"status":{"type":"string","description":"Skrivskydd status — WORKING is an editable arbetsanteckning, LOCKED is an upprättad handling","enum":["WORKING","LOCKED"],"example":"WORKING"},"createdBy":{"type":"string","description":"User id of the author (Lifecare 'Upprättad av'/'Ägare')","example":"carola01winberg"},"created":{"type":"string","format":"date-time","description":"Created timestamp"},"modifiedBy":{"type":"string","description":"User id of the last editor (Lifecare 'Ändrat av'); null until the entry has been edited","example":"ebb14eri"},"modified":{"type":"string","format":"date-time","description":"Last modified timestamp; null until the entry has been edited"},"lockedBy":{"type":"string","description":"User id of whoever locked the entry; null while WORKING","example":"carola01winberg"},"locked":{"type":"string","format":"date-time","description":"Timestamp when the entry was locked (became an upprättad handling); null while WORKING"}}},"CreateDocument":{"type":"object","properties":{"type":{"type":"string","description":"Document type (Lifecare 'Typ'/Dokumenttyp)","example":"Brev","maxLength":255,"minLength":0},"heading":{"type":"string","description":"Heading (Lifecare 'Rubrik')","example":"Beslut om ekonomiskt bistånd 2025-05","maxLength":255,"minLength":0},"text":{"type":"string","description":"Free-text body of the document; optional","example":"Beslut har fattats enligt nedan ...","maxLength":1048576,"minLength":0},"documentDate":{"type":"string","format":"date","description":"Documented date (Lifecare 'Datum')","example":"2025-05-30"},"documentTime":{"type":"string","description":"Documented time (Lifecare 'Tid'); optional","example":"14:30"},"createdBy":{"type":"string","description":"User id of the author (Lifecare 'Upprättad av'); optional","example":"carola01winberg","maxLength":64,"minLength":0}},"required":["documentDate","heading","type"]},"LockDocument":{"type":"object","properties":{"lockedBy":{"type":"string","description":"User id of whoever locks the document; optional","example":"carola01winberg","maxLength":64,"minLength":0}}},"Document":{"type":"object","description":"A Dokument (formal case document) attached to an errand","properties":{"id":{"type":"string","description":"Unique identifier"},"errandId":{"type":"string","description":"Errand id this document belongs to"},"type":{"type":"string","description":"Document type (Lifecare 'Typ'/Dokumenttyp). A municipality-configured value; see the metadata catalogue for a provisional set.","example":"Brev"},"heading":{"type":"string","description":"Heading (Lifecare 'Rubrik')","example":"Beslut om ekonomiskt bistånd 2025-05"},"text":{"type":"string","description":"Free-text body of the document","example":"Beslut har fattats enligt nedan ..."},"documentDate":{"type":"string","format":"date","description":"Documented date (Lifecare 'Datum'), distinct from the system created timestamp","example":"2025-05-30"},"documentTime":{"type":"string","description":"Documented time (Lifecare 'Tid'); optional","example":"14:30"},"status":{"type":"string","description":"Skrivskydd status — WORKING is an editable draft, LOCKED is an upprättad handling","enum":["WORKING","LOCKED"],"example":"WORKING"},"createdBy":{"type":"string","description":"User id of the author (Lifecare 'Upprättad av'/'Ägare')","example":"carola01winberg"},"created":{"type":"string","format":"date-time","description":"Created timestamp"},"modifiedBy":{"type":"string","description":"User id of the last editor (Lifecare 'Ändrat av'); null until the document has been edited","example":"ebb14eri"},"modified":{"type":"string","format":"date-time","description":"Last modified timestamp; null until the document has been edited"},"lockedBy":{"type":"string","description":"User id of whoever locked the document; null while WORKING","example":"carola01winberg"},"locked":{"type":"string","format":"date-time","description":"Timestamp when the document was locked (became an upprättad handling); null while WORKING"}}},"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"]},"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"]},"description":{"type":"string","description":"Optional human-readable description or motivation for the decision","examples":["Decision proposal per ruleset: 7900 kr, no warning"]},"amount":{"type":"number","description":"Optional decision amount, in SEK. For a financial-assistance beslut this is the granted belopp (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 (beslutsmeddelande) communicated to the applicant — the free-text justification shown on the decision letter, kept separate from the internal `description`.","examples":["Du beviljas financial assistance för juni 2026 enligt riksnorm."]},"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 beslut).","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"]},"created":{"type":"string","format":"date-time","description":"Timestamp the decision was recorded (server-assigned)","readOnly":true}}},"CreateWarningRequest":{"type":"object","description":"Request to create an EB 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"]}},"required":["message","type"]},"Warning":{"type":"object","description":"An EB 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","EXPENSE_CAPPED"],"examples":["EXPENSE_CAPPED"]},"typeDisplayName":{"type":"string","description":"Swedish display name for the warning type","examples":["Kapad kostnad"],"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}}},"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"},"role":{"type":"string","description":"The role of the household member","enum":["APPLICANT","CO_APPLICANT","CHILD"]},"name":{"type":"string","description":"The name of the household member"},"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"},"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"},"jobStimulusAmount":{"type":"number","description":"The job stimulus amount applied to the member","examples":[1000.0]},"note":{"type":"string","description":"Free-text note"}}},"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","enum":["APPLICANT","CO_APPLICANT","CHILD"],"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"},"jobStimulusAmount":{"type":"number","description":"The job stimulus amount applied to the member","examples":[1000.0]},"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 FC income-type id","examples":[20]},"typeName":{"type":"string","description":"The FC income-type name","examples":["Bostadsbidrag"]},"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"},"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"},"note":{"type":"string","description":"Free-text note"}}},"NormIncomeRow":{"type":"object","description":"One income row of the calculation draft (FC 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 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},"typeId":{"type":"integer","format":"int32","description":"The FC income-type id","examples":[20],"readOnly":true},"typeName":{"type":"string","description":"The FC 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"},"bucket":{"type":"string","description":"Which Lifecare bucket the expense posts to","enum":["EXPENSE","SPECIAL_EXPENSE"]},"otherSubType":{"type":"string","description":"The other sub-type (when the cost type is 'other')"},"specification":{"type":"string","description":"The cost specification"},"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"}}},"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","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":{"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 a Lifecare payment concerning the application month has been registered","examples":["true"]},"paymentDate":{"type":"string","description":"The date the payment was made (Lifecare PayDate), when effectuated","examples":["2026-05-27"]}}},"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 (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 (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":["Renewal for July 2026"]}}},"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","EXISTING_CASE","ALL_TYPES_TEST"],"examples":["EXISTING_CASE"]},"message":{"type":"string","description":"Human-readable Swedish explanation of the suggestion","examples":["Open errand without a decision for the current month. Suggesting a renewal."]},"existsInCm":{"type":"boolean","description":"True when the applicant already has an EB errand in caremanagement","examples":["true"]},"existsInLc":{"type":"boolean","description":"True when the applicant has an EB footprint in Lifecare (actualisation/decision/calculation)","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 duplicate-application window in days that was applied to the per-month check","examples":[90]},"applicationExistsThisMonth":{"type":"boolean","description":"True when an application/decision already exists for the current month","examples":["false"]},"applicationExistsNextMonth":{"type":"boolean","description":"True when an application/decision already exists for next month","examples":["false"]},"currentMonthDecided":{"type":"boolean","description":"True when Lifecare shows a decision for the current month (the current month is decided/closed)","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. When present, a Decision(RECOMMENDATION) summarising the income warnings is recorded on the errand for the caseworker to review; when omitted, the calculation is built without recording a recommendation.","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 FC 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":"The period-over-period change warnings from the operaton rules, recorded on the errand recommendation","items":{"type":"string"}}},"required":["applicant","applicationMonth"]},"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 FC","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":"Benefits whose net income changed beyond the threshold between the periods","examples":[["Bostadsbidrag: -23% (comparison 2400 -> control 1850)"]],"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 code for the document. Server default when omitted.","examples":["ANSOKAN"]},"documentSenderType":{"type":"string","description":"The Lifecare InsertDocumentSenderType code for the document. Server default when omitted.","examples":["ENSKILD"]},"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 is 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 FC","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"]},"status":{"type":"string","description":"Status of the errand","examples":["NEW"]},"description":{"type":"string","description":"Description of the errand"},"priority":{"type":"string","description":"Priority of the errand","examples":["HIGH"]},"reporterUserId":{"type":"string","description":"User id of the reporter","examples":["joe01doe"]},"assignedUserId":{"type":"string","description":"User id of the assignee","examples":["jane02doe"]}}},"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","example":"Spoke to family today, awaiting docs."},"author":{"type":"string","description":"Author user id","example":"jane01doe"},"created":{"type":"string","format":"date-time","description":"Created timestamp"},"modifiedBy":{"type":"string","description":"User id of the last editor","example":"jane01doe"},"modified":{"type":"string","format":"date-time","description":"Last modified timestamp; null until the note has been edited"}}},"UpdateJournalEntry":{"type":"object","properties":{"type":{"type":"string","description":"Journal entry type (Lifecare 'Typ'/Journaltyp)","example":"Journalfört meddelande","maxLength":255,"minLength":0},"heading":{"type":"string","description":"Heading (Lifecare 'Rubrik')","example":"Journalfört meddelande: 2025-05-30 Info","maxLength":255,"minLength":0},"text":{"type":"string","description":"Free-text body of the journal entry; optional","example":"Hej! Vill bara informera att jag fått jobb på Mejeriet.","maxLength":1048576,"minLength":0},"entryDate":{"type":"string","format":"date","description":"Documented date (Lifecare 'Datum')","example":"2025-05-30"},"entryTime":{"type":"string","description":"Documented time (Lifecare 'Tid'); optional","example":"14:30"},"modifiedBy":{"type":"string","description":"User id of the editor (Lifecare 'Ändrat av'); optional","example":"ebb14eri","maxLength":64,"minLength":0}},"required":["entryDate","heading","type"]},"UpdateDocument":{"type":"object","properties":{"type":{"type":"string","description":"Document type (Lifecare 'Typ'/Dokumenttyp)","example":"Brev","maxLength":255,"minLength":0},"heading":{"type":"string","description":"Heading (Lifecare 'Rubrik')","example":"Beslut om ekonomiskt bistånd 2025-05","maxLength":255,"minLength":0},"text":{"type":"string","description":"Free-text body of the document; optional","example":"Beslut har fattats enligt nedan ...","maxLength":1048576,"minLength":0},"documentDate":{"type":"string","format":"date","description":"Documented date (Lifecare 'Datum')","example":"2025-05-30"},"documentTime":{"type":"string","description":"Documented time (Lifecare 'Tid'); optional","example":"14:30"},"modifiedBy":{"type":"string","description":"User id of the editor (Lifecare 'Ändrat av'); optional","example":"ebb14eri","maxLength":64,"minLength":0}},"required":["documentDate","heading","type"]},"SectionApprovalRequest":{"type":"object","description":"Set the approval state of an EB view section.","properties":{"approved":{"type":"boolean","description":"Whether the section is approved (true) or its approval withdrawn (false)","examples":["true"]},"approvedBy":{"type":"string","description":"The caseworker approving the section (stored when approving, ignored when withdrawing)","examples":["jane02doe"]}},"required":["approved"]},"SectionApproval":{"type":"object","description":"A caseworker's approval of one section of the EB view (calculation / payment / decision).","properties":{"section":{"type":"string","description":"The section this approval concerns","enum":["CALCULATION","PAYMENT","DECISION"],"examples":["CALCULATION"]},"approved":{"type":"boolean","description":"Whether the section has been verified as approved by a caseworker","examples":["true"]},"approvedBy":{"type":"string","description":"The caseworker who approved the section (null while not approved)","examples":["jane02doe"],"readOnly":true},"approvedAt":{"type":"string","format":"date-time","description":"When the section was approved (null while not approved)","readOnly":true}}},"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 FC norm id (Norm)","examples":[5]},"normType":{"type":"array","items":{"type":"string","description":"The norm type","enum":["NATIONAL_NORM","OTHER_NORM"]}},"calculationFromDate":{"type":"string","format":"date","description":"Calculation period start (from)"},"calculationToDate":{"type":"string","format":"date","description":"Calculation period end (to)"},"calculationDate":{"type":"string","format":"date","description":"Calculation date (calculation date)"},"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","items":{"type":"string"}},"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]}}},"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]}}},"ErrandEvent":{"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"},"actor":{"type":"string"},"actorType":{"type":"string"},"requestId":{"type":"string"},"statusCode":{"type":"integer","format":"int32"},"created":{"type":"string","format":"date-time"}}},"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]}}},"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},"origin":{"type":"string","description":"Where the file came from: 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 (ärendeuppgifter — a case-data document for the errand), DECISION (beslut — a decision document for the errand) or MESSAGE_HISTORY (meddelandehistorik — 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","example":"JOURNALED_MESSAGE"},"displayName":{"type":"string","description":"Human-readable Swedish label (the Lifecare 'Typ' value)","example":"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 EB process last ran its daily loop for this errand (the calculation /prepare step). Null until the first loop has run.","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},"sectionApprovals":{"$ref":"#/components/schemas/SectionApprovals","description":"The caseworker approval state of the three EB view sections (calculation, payment, decision) — whether each has been verified as approved. Always present with all three sections.","readOnly":true}}},"SectionApprovals":{"type":"object","description":"The caseworker approval state of the three EB view sections (calculation, payment, decision).","properties":{"calculation":{"$ref":"#/components/schemas/SectionApproval","description":"Approval of the calculation (calculation) section"},"payment":{"$ref":"#/components/schemas/SectionApproval","description":"Approval of the payment (payment) section"},"decision":{"$ref":"#/components/schemas/SectionApproval","description":"Approval of the decision (decision) section"}}},"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]}}},"MonitoringCount":{"type":"object","description":"The number of monitorings on the errand","properties":{"count":{"type":"integer","format":"int64","description":"Number of monitorings on the errand","examples":[2]}}},"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; each is the list of nested fields","items":{"type":"array","items":{"$ref":"#/components/schemas/FormSnapshotField"}}},"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"]}}},"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"}}}},"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":"EB 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 (inkomster)","items":{"$ref":"#/components/schemas/TypeOption"}},"costTypes":{"type":"array","description":"The cost types (kostnader), grouped by their Mina-sidor form section","items":{"$ref":"#/components/schemas/TypeOption"}}}},"TypeOption":{"type":"object","description":"A selectable EB 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 handläggare-only types not on the citizen form","examples":["Hyra (inte parkering/garage)"]},"internalDisplayName":{"type":"string","description":"The matching Lifecare handläggare-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 the type is offered on the citizen Mina-sidor form","examples":["true"]}}},"LifecareDocument":{"type":"object","description":"A Lifecare document, metadata only.","properties":{"id":{"type":"string","description":"The Lifecare document id","examples":["a3f1c2..."]},"title":{"type":"string","description":"The document title","examples":["Beslut försörjningsstöd juni"]},"date":{"type":"string","description":"The document date as Lifecare reports it","examples":["2026-06-01"]},"documentType":{"type":"string","description":"The document type","examples":["Beslut"]},"ownerId":{"type":"string","description":"The id of the entity the document belongs to","examples":["9900"]},"ownerType":{"type":"string","description":"The type of the entity the document belongs to","examples":["Decision"]}}},"LifecareDecision":{"type":"object","description":"A Lifecare beslut, full breakdown.","properties":{"id":{"type":"integer","format":"int32","description":"The Lifecare decision id","examples":[9900]},"date":{"type":"string","description":"The decision date as Lifecare reports it","examples":["2026-06-02"]},"type":{"type":"string","description":"The decision type","examples":["Bifall"]},"fromDate":{"type":"string","description":"The start date of the decision period","examples":["2026-06-01"]},"toDate":{"type":"string","description":"The end date of the decision period","examples":["2026-06-30"]},"reason":{"type":"string","description":"The reason for the decision","examples":["Beviljas enligt norm"]},"decisionMaker":{"type":"string","description":"The decision maker","examples":["Anna Andersson"]},"organization":{"type":"string","description":"The organization the decision belongs to","examples":["IFO"]},"amount":{"type":"number","format":"double","description":"The decided amount","examples":[8500.0]},"coApplicant":{"type":"string","description":"The co-applicant the decision covers, when any","examples":["198001019999"]},"reasonCoApplicant":{"type":"string","description":"The reason concerning the co-applicant, when any","examples":["Sammanboende"]},"persons":{"type":"array","items":{"$ref":"#/components/schemas/LifecareDecisionPerson"}}}},"LifecareDecisionPerson":{"type":"object","description":"A person on a Lifecare decision.","properties":{"personId":{"type":"string","description":"The Lifecare person id","examples":["200001011234"]},"name":{"type":"string","description":"The person name","examples":["Anna Andersson"]},"coApplicant":{"type":"boolean","description":"Whether the person is the co-applicant","examples":["false"]}}},"LifecareCalculation":{"type":"object","description":"A Lifecare normberäkning, full breakdown.","properties":{"id":{"type":"integer","format":"int32","description":"The Lifecare calculation id","examples":[7001]},"norm":{"type":"string","description":"The norm the calculation is based on","examples":["Riksnorm 2026"]},"fromDate":{"type":"string","description":"The start date of the calculation period","examples":["2026-06-01"]},"toDate":{"type":"string","description":"The end date of the calculation period","examples":["2026-06-30"]},"incomeSum":{"type":"number","format":"double","description":"The sum of all incomes","examples":[12000.0]},"expenseSum":{"type":"number","format":"double","description":"The sum of all regular expenses","examples":[9500.0]},"specialExpenseSum":{"type":"number","format":"double","description":"The sum of all special expenses","examples":[500.0]},"normSum":{"type":"number","format":"double","description":"The sum of the norm","examples":[10500.0]},"commonHouseholdCost":{"type":"number","format":"double","description":"The common household cost","examples":[1200.0]},"familyCost":{"type":"number","format":"double","description":"The family cost","examples":[800.0]},"balance":{"type":"number","format":"double","description":"The balance of the calculation","examples":[-2000.0]},"totalSum":{"type":"number","format":"double","description":"The total sum of the calculation","examples":[8500.0]},"isFinal":{"type":"boolean","description":"Whether the calculation is final","examples":["true"]},"persons":{"type":"array","items":{"$ref":"#/components/schemas/LifecareCalculationPerson"}},"incomes":{"type":"array","items":{"$ref":"#/components/schemas/LifecareCalculationIncome"}},"expenses":{"type":"array","items":{"$ref":"#/components/schemas/LifecareCalculationExpense"}},"specialExpenses":{"type":"array","items":{"$ref":"#/components/schemas/LifecareCalculationExpense"}}}},"LifecareCalculationExpense":{"type":"object","description":"An expense row on a Lifecare calculation.","properties":{"type":{"type":"string","description":"The expense type","examples":["Hyra"]},"appliedAmount":{"type":"number","format":"double","description":"The applied amount","examples":[7500.0]},"approvedAmount":{"type":"number","format":"double","description":"The approved amount","examples":[7000.0]}}},"LifecareCalculationIncome":{"type":"object","description":"An income row on a Lifecare calculation.","properties":{"type":{"type":"string","description":"The income type","examples":["Lön"]},"amountApplicant":{"type":"number","format":"double","description":"The income amount for the applicant","examples":[12000.0]},"applicantSearchDate":{"type":"string","description":"The search date Lifecare used for the applicant","examples":["2026-05-15"]},"amountCoApplicant":{"type":"number","format":"double","description":"The income amount for the co-applicant","examples":[0.0]},"coApplicantSearchDate":{"type":"string","description":"The search date Lifecare used for the co-applicant","examples":["2026-05-15"]}}},"LifecareCalculationPerson":{"type":"object","description":"A household member on a Lifecare calculation.","properties":{"personId":{"type":"string","description":"The Lifecare person id","examples":["200001011234"]},"name":{"type":"string","description":"The person name","examples":["Anna Andersson"]},"amount":{"type":"number","format":"double","description":"The amount the person contributes to the norm","examples":[4500.0]},"deviationFromDate":{"type":"string","description":"The start date of the deviation period, when any","examples":["2026-06-01"]},"deviationToDate":{"type":"string","description":"The end date of the deviation period, when any","examples":["2026-06-30"]}}},"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","example":"LETTER"},"displayName":{"type":"string","description":"Human-readable Swedish label (the Lifecare 'Typ' value)","example":"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]}}},"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 a belopp — true for outcomes that grant an amount, false for ones that imply 0 (e.g. avslag)","examples":["true"]}}},"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":["Financial assistance – å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":{}}}