Migration guide
Collections are now a top-level resource (from 2025-01-01)
In 2025-01-01 an insurance collection lived under the product namespace: it was created at POST /insurance/collection and read under /insurance/collection/{collectionId}/... (wealth collections lived under /wealth/collection/...). In 2026-04-01 collections become a single shared, top-level resource. A collection is created at POST /collections regardless of product, and the insurance data is read from a product sub-path — GET /collections/{collectionId}/insurance/data, mirroring the Wealth API's /collections/{collectionId}/wealth/data.
Endpoint mapping
2025-01-01 (insurance) | 2026-04-01 |
|---|---|
POST /insurance/collection | POST /collections (shared across products) |
GET /insurance/collection/{collectionId}/status | GET /collections/{collectionId}/status |
GET /insurance/collection/{collectionId}/data | GET /collections/{collectionId}/insurance/data |
POST /insurance/collection/{collectionId}/supplement-info | POST /collections/{collectionId}/supplement-info |
DELETE /insurance/collection/{collectionId} | DELETE /collections/{collectionId} |
GET /insurance/collection/{collectionId}/policy/{policyId}/document/{documentId} | GET /collections/{collectionId}/insurance/policy/{policyId}/document/{documentId} |
Typed request parameters
POST /collections replaces the untyped 2025-01-01 request body — a loginMethod plus an input map keyed by uppercase strings, with separate top-level consents and filter fields — with a single typed parameters array. Each entry carries a type discriminator and its own named, lower-camelCase fields.
- Credentials become typed parameters (
SWEDISH_BANKID,EMAIL) instead of keys ininput. - Consents are explicit, typed parameters. The
2025-01-01consentsarray only ever accepted one value,TRADE_UNION_MEMBERSHIP; supply it as a TradeUnionConsentParameter (type: TRADE_UNION_CONSENT). Listing the consent type used to imply it had been granted — the new parameter carries an explicitvalueboolean, so a withheld consent can be stated rather than inferred from an omission, plus an optionalcollectedAttimestamp recording when it was obtained.value: trueis equivalent to the old array entry;value: falseand an omitted parameter both mean no consent. - Session identifiers move from inline
inputkeys into a SessionMetadataParameter (type: SESSION_METADATA), under itsattributesmap with the keyssessionId,advisorHandleandexternalReference.
// 2025-01-01
{
"company": "se-lansforsakringar",
"loginMethod": "SWEDISH_MOBILE_BANKID_OTHER_DEVICE",
"input": { "SWEDISH_PERSONAL_NUMBER": "199001011234" }
}
// 2026-04-01
{
"company": "se-lansforsakringar",
"loginMethod": "SWEDISH_MOBILE_BANKID_OTHER_DEVICE",
"parameters": [
{ "type": "SWEDISH_BANKID", "personalNumber": "199001011234" }
]
}Login methods (Sweden)
loginMethod stays a top-level field and the Swedish values are unchanged from 2025-01-01; read the methods a company accepts from loginMethods on GET /companies/availability. Only the shape of the credential payload changes — each method now carries its credential in a typed parameter rather than in the input map:
| Login method | 2025-01-01 input | 2026-04-01 parameter |
|---|---|---|
SWEDISH_MOBILE_BANKID_SAME_DEVICE / …_OTHER_DEVICE / …_SAME_DEVICE_CLIENT_SIDE_AUTHENTICATION / SWEDISH_SECURITY_TOKEN | { "SWEDISH_PERSONAL_NUMBER": "…" } | { "type": "SWEDISH_BANKID", "personalNumber": "…" } |
EMAIL | { "USERNAME": "…" } | { "type": "EMAIL", "email": "…" } |
All Swedish BankID variants — including the _TEST (BankID sandbox) and _MOCK (deterministic, short-circuited) flows — reuse the same SwedishBankIdParameter (type: SWEDISH_BANKID); switch environments by changing only the loginMethod.
Steps
- Repoint the base path. Replace
/insurance/collectionwith/collections, and read data from/collections/{collectionId}/insurance/datainstead of/insurance/collection/{collectionId}/data. Status, supplement-info and deletion keep the same suffixes under the new prefix. - Convert the request body. Move each
inputkey into a typed entry in theparametersarray (e.g.SWEDISH_PERSONAL_NUMBER→{ "type": "SWEDISH_BANKID", "personalNumber": … }). - Move consents and session data into parameters. Replace the
consentsarray with aTRADE_UNION_CONSENTparameter carrying an explicitvalue, and moveSESSION_ID/ADVISOR_HANDLE/EXTERNAL_REFERENCEinto aSESSION_METADATAparameter'sattributesassessionId/advisorHandle/externalReference.