From d7d9c23a5a6927e42a2b1bc270a615b48df8fb32 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 20 Oct 2025 16:36:46 +0200 Subject: [PATCH 01/16] first version of swagger, WIP --- src/openapi/customers/SE-notifications.yaml | 630 ++++++++++++++++++++ 1 file changed, 630 insertions(+) create mode 100644 src/openapi/customers/SE-notifications.yaml diff --git a/src/openapi/customers/SE-notifications.yaml b/src/openapi/customers/SE-notifications.yaml new file mode 100644 index 0000000..545058d --- /dev/null +++ b/src/openapi/customers/SE-notifications.yaml @@ -0,0 +1,630 @@ +openapi: 3.0.1 +info: + title: Service Engine APIs for Notifications + description: >- + Service Engine APIs for all HTM Notifications. These are NOT the CRUD APIs to access raw data in the database. + version: "1.0" +servers: + - url: https://services.acc.api.htm.nl/abt/touchpoint/2.0 +tags: + - name: Notifications + description: >- + Service Engine APIs for all HTM Notifications. These are NOT the CRUD APIs to access raw data in the database. +paths: + /notificationcategories: + get: + tags: + - Notifications + summary: Get notification categories that a person can opt in for, can also be accessed anonymously + description: | + Get notification categories that a person can opt in for, can also be accessed anonymously. If accessed anonymously, it only returns the categories for which a user does not need to have an account. + parameters: + - name: X-HTM-JWT-AUTH-HEADER + in: header + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + required: false + description: The JWT of a customer in case of touchpoint were customer logs in themselves + - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER + in: header + schema: + type: string + example: feaaef83-a551-4283-8419-340b1ada3b55 + required: false + description: The customerProfileId of a customer in the case of the SMP + - name: X-HTM-ROLE-HEADER + in: header + schema: + type: string + example: Customer + required: false + description: The role of the HTM employee in the case of the SMP + responses: + "200": + description: OK + content: + application/json: + examples: + getNotifactionCategoriesWithAccount: + summary: Return all the notification categories when the user has an account + value: + { + "notificationCategories":[ + { + "notificationCategoryId": 1, + "name": "Nieuwsbrief", + "optinRequired": False, + "eventTypes": [ + { + "eventTypeId": 1, + "eventOrigin": { + "eventOriginId": 6, + "name": "Maileon" + }, + "name": "HTM nieuwsbrief", + "subName": "", + "prettyName": "HTM nieuwsbrief", + "optinRequired": False, + "eventTypeChannels":[ + { + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "channel":{ + "channelId": 2, + "name": "email" + }, + "isDefault": True, + "isMandatory": False + } + ] + } + ] + }, + { + "notificationCategoryId": 2, + "name": "Mijn Reizen", + "optinRequired": False, + "eventTypes": [ + { + "eventTypeId": 1, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, TRAVEL_SCHEME", + "subName": "CI", + "prettyName": "Check In", + "optinRequired": False, + "eventTypeChannels":[ + { + "eventTypeChannelId": "ccc8c025-06b5-4928-a632-23e1c55cd173", + "channel":{ + "channelId": 1, + "name": "push" + }, + "isDefault": True, + "isMandatory": False + }, + { + "eventTypeChannelId": "da2deb4c-ce77-4b5f-aecc-ddebfd14349d", + "channel":{ + "channelId": 2, + "name": "email" + }, + "isDefault": False, + "isMandatory": False + } + ] + }, + { + "eventTypeId": 2, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, PAD", + "subName": null, + "prettyName": "Profielgegevens op de pas", + "optinRequired": False, + "eventTypeChannels":[ + { + "eventTypeChannelId": "8e7df8f1-7e50-482f-8301-d399e75fd432", + "channel":{ + "channelId": 1, + "name": "push" + }, + "isDefault": True, + "isMandatory": False + }, + { + "eventTypeChannelId": "72960a92-1855-469f-9cfd-5d72f57106f2", + "channel":{ + "channelId": 2, + "name": "email" + }, + "isDefault": False, + "isMandatory": False + } + ] + } + ] + }, + { + "notificationCategoryId": 3, + "name": "Mijn Passen", + "optinRequired": False, + "eventTypes": [ + { + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, CARD", + "subName": null, + "prettyName": "Mijn passen", + "optinRequired": False, + "eventTypeChannels":[ + { + "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", + "channel":{ + "channelId": 1, + "name": "push" + }, + "isDefault": True, + "isMandatory": False + }, + { + "eventTypeChannelId": "0c797b5a-ed34-494b-8c64-0a832830d392", + "channel":{ + "channelId": 2, + "name": "email" + }, + "isDefault": False, + "isMandatory": False + } + ] + }, + { + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, PAD", + "subName": null, + "prettyName": "Profielgegevens op de pas", + "optinRequired": False, + "eventTypeChannels":[ + { + "eventTypeChannelId": "b910368f-c045-4e8e-b01d-bcbc78708bac", + "channel":{ + "channelId": 1, + "name": "push" + }, + "isDefault": True, + "isMandatory": False + }, + { + "eventTypeChannelId": "93e773da-ba3b-48da-9a0e-ee478eaa752f", + "channel":{ + "channelId": 2, + "name": "email" + }, + "isDefault": False, + "isMandatory": False + } + ] + } + ] + } + ] + } + getNotifactionCategoriesWithoutAccount: + summary: Return the anonymous notification categories when the user does not have an account / is not logged in + value: + { + "notificationCategories":[ + { + "notificationCategoryId": 1, + "name": "Nieuwsbrief", + "optinRequired": False, + "eventTypes": [ + { + "eventTypeId": 1, + "eventOrigin": { + "eventOriginId": 6, + "name": "Maileon" + }, + "name": "HTM nieuwsbrief", + "subName": "", + "prettyName": "HTM nieuwsbrief", + "optinRequired": False, + "eventTypeChannels":[ + { + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "channel":{ + "channelId": 2, + "name": "email" + }, + "isDefault": True, + "isMandatory": False + } + ] + } + ] + } + ] + } + "404": + description: No notification category found + content: + application/json: + example: + { + "type": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers", + "apiErrorCode": "400.1", + "title": "Niet gevonden", + "detail": "Notificatiecategorie niet gevonden", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", + "errors": [{ "subApiErrorCode": "0017" }], + } + /notificationsubscriptions: + get: + tags: + - Notifications + summary: Get a notificationSubscription for a customer (account or private). + description: | + Get a notificationSubscription for a customer (account or private). + parameters: + - name: X-HTM-JWT-AUTH-HEADER + in: header + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + required: false + description: The JWT of a customer in case of touchpoint were customer logs in themselves + - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER + in: header + schema: + type: string + example: feaaef83-a551-4283-8419-340b1ada3b55 + required: false + description: The customerProfileId of a customer in the case of the SMP + - name: X-HTM-ROLE-HEADER + in: header + schema: + type: string + example: Customer + required: false + description: The role of the HTM employee in the case of the SMP + - name: emailAddress + in: query + schema: + type: string + format: email + example: john.doe@mymailprovider.com + required: false + description: The emailadress of the customer in the case of anonymous opt-ins + responses: + "200": + description: OK + content: + application/json: + examples: + getNotifactionSubscriptionsWithAccount: + summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP + value: + { + "notificationSubscriptions":[ + { + "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", + "notificationCategoryId": 1, + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "customer":{ + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": True + }, + "ovpayTokenId": null, + "isActive": True + }, + { + "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", + "notificationCategoryId": 3, + "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", + "customer":{ + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": True + }, + "ovpayToken": + { + "ovPayTokenId": 134, + "alias": "Mijn Rabopas" + }, + "isActive": True + }, + { + "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", + "notificationCategoryId": 3, + "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", + "customer":{ + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": True + }, + "ovpayTokenId": 101, + "ovpayToken": + { + "ovPayTokenId": 101, + "alias": "Mijn ING pas" + }, + "isActive": False + } + ] + } + getNotifactionSubscriptionsWithoutAccount: + summary: Return all the notification subscriptions when the user is anoymous + value: + { + "notificationSubscriptions":[ + { + "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", + "notificationCategoryId": 1, + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "customer":{ + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": False + }, + "ovpayTokenId": null, + "isActive": True + } + ] + } + + "404": + description: No notification subscriptions found + content: + application/json: + example: + { + "type": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers", + "apiErrorCode": "400.1", + "title": "Niet gevonden", + "detail": "Notificatie niet gevonden", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", + "errors": [{ "subApiErrorCode": "0017" }], + } + post: + tags: + - Notifications + summary: Create a new notificationSubscription for a customer (account or private). + description: | + Create a new notificationSubscription for a customer (account or private). + parameters: + - name: X-HTM-JWT-AUTH-HEADER + in: header + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + required: false + description: The JWT of a customer in case of touchpoint were customer logs in themselves + - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER + in: header + schema: + type: string + example: feaaef83-a551-4283-8419-340b1ada3b55 + required: false + description: The customerProfileId of a customer in the case of the SMP + - name: X-HTM-ROLE-HEADER + in: header + schema: + type: string + example: Customer + required: false + description: The role of the HTM employee in the case of the SMP + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Add a new notificationSubscription for a customer with account: + value: + { + "notificationCategoryId": 1, + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "emailAddress": null, + "ovpayTokenId": null, + "isActive": True + } + Add a new token notificationSubscription for a customer with account: + value: + { + "notificationCategoryId": 3, + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "emailAddress": null, + "ovpayTokenId": 135, + "isActive": True + } + Add a new notificationSubscription for a customer without account: + value: + { + "notificationCategoryId": 1, + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "emailAddress": "j.jansen@mymailprovider.nl", + "ovpayTokenId": null, + "isActive": True + } + responses: + "201": + description: Created + content: + application/json: + examples: + Add a new notificationSubscription for a customer with account: + summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP + value: + { + "notificationSubscriptions":[ + { + "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", + "notificationCategoryId": 1, + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "customer":{ + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": True + }, + "ovpayTokenId": null, + "isActive": True + }, + { + "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", + "notificationCategoryId": 3, + "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", + "customer":{ + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": True + }, + "ovpayToken": + { + "ovPayTokenId": 134, + "alias": "Mijn Rabopas" + }, + "isActive": True + }, + { + "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", + "notificationCategoryId": 3, + "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", + "customer":{ + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": True + }, + "ovpayTokenId": 101, + "ovpayToken": + { + "ovPayTokenId": 101, + "alias": "Mijn ING pas" + }, + "isActive": False + } + ] + } + /notificationsubscriptions/{notificationSubscriptionId}: + patch: + tags: + - Notifications + summary: Update a notificationSubscription for a customer (account or private). + description: | + Update a notificationSubscription for a customer (account or private). + parameters: + - name: X-HTM-JWT-AUTH-HEADER + in: header + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + required: false + description: The JWT of a customer in case of touchpoint were customer logs in themselves + - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER + in: header + schema: + type: string + example: feaaef83-a551-4283-8419-340b1ada3b55 + required: false + description: The customerProfileId of a customer in the case of the SMP + - name: X-HTM-ROLE-HEADER + in: header + schema: + type: string + example: Customer + required: false + description: The role of the HTM employee in the case of the SMP + - name: notificationSubscriptionId + in: path + schema: + type: string + format: uuid + example: e112f26e-37fa-4bde-8def-9977cd1d50ae + required: true + description: The id of the notificationSubscription you want to update + - name: emailAddress + in: query + schema: + type: string + format: email + example: john.doe@mymailprovider.com + required: false + description: The emailadress of the customer in the case of anonymous opt-ins + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Update a notificationSubscription to inactive: + value: + { + "isActive": False + } + Update a notificationSubscription to active: + value: + { + "isActive": True + } + + responses: + "201": + description: Created + content: + application/json: + examples: + Update a notificationSubscription to inactive: + summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP + value: + { + "notificationSubscriptions":[ + { + "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", + "notificationCategoryId": 1, + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "customer":{ + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": True + }, + "ovpayTokenId": null, + "isActive": False + }, + { + "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", + "notificationCategoryId": 3, + "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", + "customer":{ + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": True + }, + "ovpayToken": + { + "ovPayTokenId": 134, + "alias": "Mijn Rabopas" + }, + "isActive": True + }, + { + "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", + "notificationCategoryId": 3, + "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", + "customer":{ + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": True + }, + "ovpayTokenId": 101, + "ovpayToken": + { + "ovPayTokenId": 101, + "alias": "Mijn ING pas" + }, + "isActive": False + } + ] + } +components: + schemas: + unavailable: + type: object From f2d8532f7f3012939e59a9ecac0d13d99ed29367 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Wed, 22 Oct 2025 12:00:53 +0200 Subject: [PATCH 02/16] added nesting to response subscriptions --- src/openapi/customers/SE-notifications.yaml | 418 ++++++++++++-------- 1 file changed, 250 insertions(+), 168 deletions(-) diff --git a/src/openapi/customers/SE-notifications.yaml b/src/openapi/customers/SE-notifications.yaml index 545058d..4ea787e 100644 --- a/src/openapi/customers/SE-notifications.yaml +++ b/src/openapi/customers/SE-notifications.yaml @@ -15,31 +15,9 @@ paths: get: tags: - Notifications - summary: Get notification categories that a person can opt in for, can also be accessed anonymously + summary: Get notification categories and optins for that category that a touchpoint can show. description: | - Get notification categories that a person can opt in for, can also be accessed anonymously. If accessed anonymously, it only returns the categories for which a user does not need to have an account. - parameters: - - name: X-HTM-JWT-AUTH-HEADER - in: header - schema: - type: string - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c - required: false - description: The JWT of a customer in case of touchpoint were customer logs in themselves - - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER - in: header - schema: - type: string - example: feaaef83-a551-4283-8419-340b1ada3b55 - required: false - description: The customerProfileId of a customer in the case of the SMP - - name: X-HTM-ROLE-HEADER - in: header - schema: - type: string - example: Customer - required: false - description: The role of the HTM employee in the case of the SMP + Get notification categories that a touchpoint can show and optins ( eventTypes) and channels (eventType_channels) for the optin for that category responses: "200": description: OK @@ -47,7 +25,7 @@ paths: application/json: examples: getNotifactionCategoriesWithAccount: - summary: Return all the notification categories when the user has an account + summary: Return all the notification categories value: { "notificationCategories":[ @@ -86,7 +64,7 @@ paths: "optinRequired": False, "eventTypes": [ { - "eventTypeId": 1, + "eventTypeId": 2, "eventOrigin": { "eventOriginId": 1, "name": "GBO" @@ -117,7 +95,7 @@ paths: ] }, { - "eventTypeId": 2, + "eventTypeId": 3, "eventOrigin": { "eventOriginId": 1, "name": "GBO" @@ -154,7 +132,8 @@ paths: "name": "Mijn Passen", "optinRequired": False, "eventTypes": [ - { + { + "eventTypeId": 4, "eventOrigin": { "eventOriginId": 1, "name": "GBO" @@ -185,6 +164,7 @@ paths: ] }, { + "eventTypeId": 5, "eventOrigin": { "eventOriginId": 1, "name": "GBO" @@ -271,9 +251,9 @@ paths: get: tags: - Notifications - summary: Get a notificationSubscription for a customer (account or private). + summary: Get all possible notificationSubscriptions for a customer (account or private). description: | - Get a notificationSubscription for a customer (account or private). + Get all possible notificationSubscriptions for a customer (account or private), including if they have opted-in for it. parameters: - name: X-HTM-JWT-AUTH-HEADER in: header @@ -304,16 +284,238 @@ paths: example: john.doe@mymailprovider.com required: false description: The emailadress of the customer in the case of anonymous opt-ins + - name: nested + in: query + schema: + type: boolean + default: true + required: false + description: Return subscriptions nested, so it is presentation ready for touchpoint (default), if false only return the notificationSubcriptions as a flat list responses: "200": description: OK content: application/json: examples: - getNotifactionSubscriptionsWithAccount: + getNotifactionSubscriptionsWithAccountNestedTrue: + summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP + value: + { + "customer":{ + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": True + }, + "notificationCategory":[ + { + "notificationCategoryId": 1, + "status": "on", + "eventTypes":[ + { + "eventTypeId": 1, + "status": "on", + "eventTypeChannels":[ + { + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "notificationSubscriptions":[ + { + "notificationSubscriptionId":"", + "ovpayToken": null, + "isActive": True + } + ] + } + + ] + } + ] + }, + { + "notificationCategoryId": 2, + "status": "off", + "eventTypes":[ + { + "eventTypeId": 2, + "status": "off", + "eventTypeChannels":[ + { + "eventTypeChannelId": "ccc8c025-06b5-4928-a632-23e1c55cd173", + "notificationSubscriptions":[ + { + "notificationSubscriptionId":"", + "ovpayToken":{ + "ovPayTokenId": 134, + "alias": "Mijn Rabopas" + }, + "isActive": False + }, + { + "notificationSubscriptionId":"", + "ovpayToken": { + "ovPayTokenId": 138, + "alias": "Mijn ING pas" + }, + "isActive": False + } + ] + }, + { + "eventTypeChannelId": "da2deb4c-ce77-4b5f-aecc-ddebfd14349d", + "notificationSubscriptions":[ + { + "notificationSubscriptionId":"", + "ovpayToken":{ + "ovPayTokenId": 134, + "alias": "Mijn Rabopas" + }, + "isActive": False + }, + { + "notificationSubscriptionId":"", + "ovpayToken": { + "ovPayTokenId": 138, + "alias": "Mijn ING pas" + }, + "isActive": False + } + ] + } + ] + }, + { + "eventTypeId": 3, + "status": "off", + "eventTypeChannels":[ + { + "eventTypeChannelId": "8e7df8f1-7e50-482f-8301-d399e75fd432", + "notificationSubscriptions":[ + { + "notificationSubscriptionId":"", + "ovpayTokenId": 136, + "isActive": False + }, + { + "notificationSubscriptionId":"", + "ovpayTokenId": 138, + "isActive": False + } + ] + }, + { + "eventTypeChannelId": "72960a92-1855-469f-9cfd-5d72f57106f2", + "notificationSubscriptions":[ + { + "notificationSubscriptionId":"", + "ovpayTokenId": 136, + "isActive": False + }, + { + "notificationSubscriptionId":"", + "ovpayTokenId": 138, + "isActive": False + } + ] + } + ] + } + ] + }, + { + "notificationCategoryId": 3, + "status": "partial", + "eventTypes":[ + { + "eventTypeId": 4, + "status": "on", + "eventTypeChannels":[ + { + "eventTypeChannelId": "ccc8c025-06b5-4928-a632-23e1c55cd173", + "notificationSubscriptions":[ + { + "notificationSubscriptionId":"", + "ovpayToken":{ + "ovPayTokenId": 134, + "alias": "Mijn Rabopas" + }, + "isActive": True + }, + { + "notificationSubscriptionId":"", + "ovpayToken": { + "ovPayTokenId": 138, + "alias": "Mijn ING pas" + }, + "isActive": False + } + ] + }, + { + "eventTypeChannelId": "da2deb4c-ce77-4b5f-aecc-ddebfd14349d", + "notificationSubscriptions":[ + { + "notificationSubscriptionId":"", + "ovpayToken":{ + "ovPayTokenId": 134, + "alias": "Mijn Rabopas" + }, + "isActive": False + }, + { + "notificationSubscriptionId":"", + "ovpayToken": { + "ovPayTokenId": 138, + "alias": "Mijn ING pas" + }, + "isActive": False + } + ] + } + ] + }, + { + "eventTypeId": 5, + "status": "off", + "eventTypeChannels":[ + { + "eventTypeChannelId": "8e7df8f1-7e50-482f-8301-d399e75fd432", + "notificationSubscriptions":[ + { + "notificationSubscriptionId":"", + "ovpayTokenId": 136, + "isActive": False + }, + { + "notificationSubscriptionId":"", + "ovpayTokenId": 138, + "isActive": False + } + ] + }, + { + "eventTypeChannelId": "72960a92-1855-469f-9cfd-5d72f57106f2", + "notificationSubscriptions":[ + { + "notificationSubscriptionId":"", + "ovpayTokenId": 136, + "isActive": False + }, + { + "notificationSubscriptionId":"", + "ovpayTokenId": 138, + "isActive": False + } + ] + } + ] + } + ] + } + ] + } + getNotifactionSubscriptionsWithAccountNestedFalse: summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP value: { + "notificationSubscriptions":[ { "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", @@ -341,6 +543,21 @@ paths: }, "isActive": True }, + { + "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", + "notificationCategoryId": 3, + "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", + "customer":{ + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": True + }, + "ovpayToken": + { + "ovPayTokenId": 134, + "alias": "Mijn Rabopas" + }, + "isActive": True + }, { "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", "notificationCategoryId": 3, @@ -359,25 +576,6 @@ paths: } ] } - getNotifactionSubscriptionsWithoutAccount: - summary: Return all the notification subscriptions when the user is anoymous - value: - { - "notificationSubscriptions":[ - { - "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", - "notificationCategoryId": 1, - "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", - "customer":{ - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": False - }, - "ovpayTokenId": null, - "isActive": True - } - ] - } - "404": description: No notification subscriptions found content: @@ -391,122 +589,6 @@ paths: "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", "errors": [{ "subApiErrorCode": "0017" }], } - post: - tags: - - Notifications - summary: Create a new notificationSubscription for a customer (account or private). - description: | - Create a new notificationSubscription for a customer (account or private). - parameters: - - name: X-HTM-JWT-AUTH-HEADER - in: header - schema: - type: string - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c - required: false - description: The JWT of a customer in case of touchpoint were customer logs in themselves - - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER - in: header - schema: - type: string - example: feaaef83-a551-4283-8419-340b1ada3b55 - required: false - description: The customerProfileId of a customer in the case of the SMP - - name: X-HTM-ROLE-HEADER - in: header - schema: - type: string - example: Customer - required: false - description: The role of the HTM employee in the case of the SMP - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - examples: - Add a new notificationSubscription for a customer with account: - value: - { - "notificationCategoryId": 1, - "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", - "emailAddress": null, - "ovpayTokenId": null, - "isActive": True - } - Add a new token notificationSubscription for a customer with account: - value: - { - "notificationCategoryId": 3, - "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", - "emailAddress": null, - "ovpayTokenId": 135, - "isActive": True - } - Add a new notificationSubscription for a customer without account: - value: - { - "notificationCategoryId": 1, - "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", - "emailAddress": "j.jansen@mymailprovider.nl", - "ovpayTokenId": null, - "isActive": True - } - responses: - "201": - description: Created - content: - application/json: - examples: - Add a new notificationSubscription for a customer with account: - summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP - value: - { - "notificationSubscriptions":[ - { - "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", - "notificationCategoryId": 1, - "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", - "customer":{ - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": True - }, - "ovpayTokenId": null, - "isActive": True - }, - { - "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", - "notificationCategoryId": 3, - "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", - "customer":{ - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": True - }, - "ovpayToken": - { - "ovPayTokenId": 134, - "alias": "Mijn Rabopas" - }, - "isActive": True - }, - { - "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", - "notificationCategoryId": 3, - "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", - "customer":{ - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": True - }, - "ovpayTokenId": 101, - "ovpayToken": - { - "ovPayTokenId": 101, - "alias": "Mijn ING pas" - }, - "isActive": False - } - ] - } /notificationsubscriptions/{notificationSubscriptionId}: patch: tags: @@ -570,8 +652,8 @@ paths: } responses: - "201": - description: Created + "200": + description: OK content: application/json: examples: From b518f4fbd19e120cf74d62e272f438def0ee2581 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Wed, 22 Oct 2025 14:46:38 +0200 Subject: [PATCH 03/16] updated get categories with expand param --- src/openapi/customers/SE-notifications.yaml | 262 ++++++++++++++------ 1 file changed, 192 insertions(+), 70 deletions(-) diff --git a/src/openapi/customers/SE-notifications.yaml b/src/openapi/customers/SE-notifications.yaml index 4ea787e..52d1c84 100644 --- a/src/openapi/customers/SE-notifications.yaml +++ b/src/openapi/customers/SE-notifications.yaml @@ -14,18 +14,26 @@ paths: /notificationcategories: get: tags: - - Notifications + - Notification categories summary: Get notification categories and optins for that category that a touchpoint can show. description: | Get notification categories that a touchpoint can show and optins ( eventTypes) and channels (eventType_channels) for the optin for that category + parameters: + - name: expand + in: query + schema: + type: array + items: + type: string + description: Choose the records related to the category nested, options are eventType, evenTypeChannel responses: "200": description: OK content: application/json: examples: - getNotifactionCategoriesWithAccount: - summary: Return all the notification categories + getNotifactionCategories?Expand=eventType, evenTypeChannel, channel: + summary: Return all the notification categories with their nested attributes value: { "notificationCategories":[ @@ -198,8 +206,8 @@ paths: } ] } - getNotifactionCategoriesWithoutAccount: - summary: Return the anonymous notification categories when the user does not have an account / is not logged in + getNotifactionCategories?Expand=eventType: + summary: Return all the notification categories with nested eventTypes value: { "notificationCategories":[ @@ -217,20 +225,89 @@ paths: "name": "HTM nieuwsbrief", "subName": "", "prettyName": "HTM nieuwsbrief", - "optinRequired": False, - "eventTypeChannels":[ - { - "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", - "channel":{ - "channelId": 2, - "name": "email" - }, - "isDefault": True, - "isMandatory": False - } - ] + "optinRequired": False } ] + }, + { + "notificationCategoryId": 2, + "name": "Mijn Reizen", + "optinRequired": False, + "eventTypes": [ + { + "eventTypeId": 2, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, TRAVEL_SCHEME", + "subName": "CI", + "prettyName": "Check In", + "optinRequired": False + }, + { + "eventTypeId": 3, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, PAD", + "subName": null, + "prettyName": "Profielgegevens op de pas", + "optinRequired": False + } + ] + }, + { + "notificationCategoryId": 3, + "name": "Mijn Passen", + "optinRequired": False, + "eventTypes": [ + { + "eventTypeId": 4, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, CARD", + "subName": null, + "prettyName": "Mijn passen", + "optinRequired": False + }, + { + "eventTypeId": 5, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, PAD", + "subName": null, + "prettyName": "Profielgegevens op de pas", + "optinRequired": False + } + ] + } + ] + } + getNotifactionCategories: + summary: Return all the notification categories + value: + { + "notificationCategories":[ + { + "notificationCategoryId": 1, + "name": "Nieuwsbrief", + "optinRequired": False + }, + { + "notificationCategoryId": 2, + "name": "Mijn Reizen", + "optinRequired": False + }, + { + "notificationCategoryId": 3, + "name": "Mijn Passen", + "optinRequired": False } ] } @@ -298,10 +375,11 @@ paths: application/json: examples: getNotifactionSubscriptionsWithAccountNestedTrue: - summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP + summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP in a nested form value: { "customer":{ + "customerProfileId":"f1ba488b-7b2f-46c2-b72f-f24fe25a81e5", "emailAddress": "j.jansen@mymailprovider.nl", "isEmailVerified": True }, @@ -324,7 +402,6 @@ paths: } ] } - ] } ] @@ -512,10 +589,9 @@ paths: ] } getNotifactionSubscriptionsWithAccountNestedFalse: - summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP + summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP as a flat list value: { - "notificationSubscriptions":[ { "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", @@ -576,14 +652,96 @@ paths: } ] } + getNotifactionSubscriptionsWithEmailNestedTrue: + summary: Return all the notification subscriptions when the user has identified themselves by email + description: Return all the notification subscriptions when the user has identified themselves by email, but the email is not verified + value: + { + "customer":{ + "customerProfileId": "d6771347-b56f-4020-92bb-7c77c8f13f40", + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": False + }, + "notificationCategory":[ + { + "notificationCategoryId": 1, + "status": "on", + "eventTypes":[ + { + "eventTypeId": 1, + "status": "on", + "eventTypeChannels":[ + { + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "notificationSubscriptions":[ + { + "notificationSubscriptionId":"882b33ef-b750-44f9-a1e0-bed8fe1b4e0b", + "ovpayToken": null, + "isActive": True + } + ] + } + ] + } + ] + } + ] + } + getNotifactionSubscriptionsAnonymousNestedTrue: + summary: Return all the notification subscriptions when the user is not identifiable, return customerobject with id if customer decides to opt in. + value: + { + "customer":{ + "customerProfileId": "71e3cc93-ab16-4dc8-beed-7c7abfb3f09c", + "emailAddress": null, + "isEmailVerified": False + }, + "notificationCategory":[ + { + "notificationCategoryId": 1, + "status": "off", + "eventTypes":[ + { + "eventTypeId": 1, + "status": "off", + "eventTypeChannels":[ + { + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "notificationSubscriptions":[ + { + "notificationSubscriptionId": "fde46cac-7dd3-46d0-86c0-fcab685998ad", + "ovpayToken": null, + "isActive": False + } + ] + } + ] + } + ] + } + ] + } + "403": + description: Forbidden // Als geverifieerd profiel gevonden wordt, maar niet op een geverifieerde manier benaderd wordt + content: + application/json: + example: + { + "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", + "apiErrorCode": "403", + "title": "Verboden", + "detail": "", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", + "errors": [], + } "404": description: No notification subscriptions found content: application/json: example: { - "type": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers", - "apiErrorCode": "400.1", + "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", + "apiErrorCode": "404", "title": "Niet gevonden", "detail": "Notificatie niet gevonden", "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", @@ -643,14 +801,13 @@ paths: Update a notificationSubscription to inactive: value: { - "isActive": False + "isActive": False } Update a notificationSubscription to active: value: { "isActive": True } - responses: "200": description: OK @@ -658,53 +815,18 @@ paths: application/json: examples: Update a notificationSubscription to inactive: - summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP + summary: Return the updated notification value: { - "notificationSubscriptions":[ - { - "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", - "notificationCategoryId": 1, - "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", - "customer":{ - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": True - }, - "ovpayTokenId": null, - "isActive": False - }, - { - "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", - "notificationCategoryId": 3, - "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", - "customer":{ - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": True - }, - "ovpayToken": - { - "ovPayTokenId": 134, - "alias": "Mijn Rabopas" - }, - "isActive": True - }, - { - "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", - "notificationCategoryId": 3, - "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", - "customer":{ - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": True - }, - "ovpayTokenId": 101, - "ovpayToken": - { - "ovPayTokenId": 101, - "alias": "Mijn ING pas" - }, - "isActive": False - } - ] + "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", + "notificationCategoryId": 1, + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "customer":{ + "emailAddress": "j.jansen@mymailprovider.nl", + "isEmailVerified": True + }, + "ovpayTokenId": null, + "isActive": False } components: schemas: From e73e3bd7791724f31b01aecb7fe807c3d85a0a62 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 27 Oct 2025 16:34:21 +0100 Subject: [PATCH 04/16] updated --- src/openapi/customers/SE-notifications.yaml | 710 ++++++++++---------- 1 file changed, 355 insertions(+), 355 deletions(-) diff --git a/src/openapi/customers/SE-notifications.yaml b/src/openapi/customers/SE-notifications.yaml index 52d1c84..fea1623 100644 --- a/src/openapi/customers/SE-notifications.yaml +++ b/src/openapi/customers/SE-notifications.yaml @@ -40,7 +40,6 @@ paths: { "notificationCategoryId": 1, "name": "Nieuwsbrief", - "optinRequired": False, "eventTypes": [ { "eventTypeId": 1, @@ -69,7 +68,6 @@ paths: { "notificationCategoryId": 2, "name": "Mijn Reizen", - "optinRequired": False, "eventTypes": [ { "eventTypeId": 2, @@ -138,7 +136,6 @@ paths: { "notificationCategoryId": 3, "name": "Mijn Passen", - "optinRequired": False, "eventTypes": [ { "eventTypeId": 4, @@ -214,7 +211,6 @@ paths: { "notificationCategoryId": 1, "name": "Nieuwsbrief", - "optinRequired": False, "eventTypes": [ { "eventTypeId": 1, @@ -232,7 +228,6 @@ paths: { "notificationCategoryId": 2, "name": "Mijn Reizen", - "optinRequired": False, "eventTypes": [ { "eventTypeId": 2, @@ -261,7 +256,6 @@ paths: { "notificationCategoryId": 3, "name": "Mijn Passen", - "optinRequired": False, "eventTypes": [ { "eventTypeId": 4, @@ -296,18 +290,15 @@ paths: "notificationCategories":[ { "notificationCategoryId": 1, - "name": "Nieuwsbrief", - "optinRequired": False + "name": "Nieuwsbrief" }, { "notificationCategoryId": 2, - "name": "Mijn Reizen", - "optinRequired": False + "name": "Mijn Reizen" }, { "notificationCategoryId": 3, - "name": "Mijn Passen", - "optinRequired": False + "name": "Mijn Passen" } ] } @@ -327,7 +318,7 @@ paths: /notificationsubscriptions: get: tags: - - Notifications + - Notification subscriptions summary: Get all possible notificationSubscriptions for a customer (account or private). description: | Get all possible notificationSubscriptions for a customer (account or private), including if they have opted-in for it. @@ -361,363 +352,48 @@ paths: example: john.doe@mymailprovider.com required: false description: The emailadress of the customer in the case of anonymous opt-ins - - name: nested - in: query - schema: - type: boolean - default: true - required: false - description: Return subscriptions nested, so it is presentation ready for touchpoint (default), if false only return the notificationSubcriptions as a flat list responses: "200": description: OK content: application/json: examples: - getNotifactionSubscriptionsWithAccountNestedTrue: - summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP in a nested form - value: - { - "customer":{ - "customerProfileId":"f1ba488b-7b2f-46c2-b72f-f24fe25a81e5", - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": True - }, - "notificationCategory":[ - { - "notificationCategoryId": 1, - "status": "on", - "eventTypes":[ - { - "eventTypeId": 1, - "status": "on", - "eventTypeChannels":[ - { - "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", - "notificationSubscriptions":[ - { - "notificationSubscriptionId":"", - "ovpayToken": null, - "isActive": True - } - ] - } - ] - } - ] - }, - { - "notificationCategoryId": 2, - "status": "off", - "eventTypes":[ - { - "eventTypeId": 2, - "status": "off", - "eventTypeChannels":[ - { - "eventTypeChannelId": "ccc8c025-06b5-4928-a632-23e1c55cd173", - "notificationSubscriptions":[ - { - "notificationSubscriptionId":"", - "ovpayToken":{ - "ovPayTokenId": 134, - "alias": "Mijn Rabopas" - }, - "isActive": False - }, - { - "notificationSubscriptionId":"", - "ovpayToken": { - "ovPayTokenId": 138, - "alias": "Mijn ING pas" - }, - "isActive": False - } - ] - }, - { - "eventTypeChannelId": "da2deb4c-ce77-4b5f-aecc-ddebfd14349d", - "notificationSubscriptions":[ - { - "notificationSubscriptionId":"", - "ovpayToken":{ - "ovPayTokenId": 134, - "alias": "Mijn Rabopas" - }, - "isActive": False - }, - { - "notificationSubscriptionId":"", - "ovpayToken": { - "ovPayTokenId": 138, - "alias": "Mijn ING pas" - }, - "isActive": False - } - ] - } - ] - }, - { - "eventTypeId": 3, - "status": "off", - "eventTypeChannels":[ - { - "eventTypeChannelId": "8e7df8f1-7e50-482f-8301-d399e75fd432", - "notificationSubscriptions":[ - { - "notificationSubscriptionId":"", - "ovpayTokenId": 136, - "isActive": False - }, - { - "notificationSubscriptionId":"", - "ovpayTokenId": 138, - "isActive": False - } - ] - }, - { - "eventTypeChannelId": "72960a92-1855-469f-9cfd-5d72f57106f2", - "notificationSubscriptions":[ - { - "notificationSubscriptionId":"", - "ovpayTokenId": 136, - "isActive": False - }, - { - "notificationSubscriptionId":"", - "ovpayTokenId": 138, - "isActive": False - } - ] - } - ] - } - ] - }, - { - "notificationCategoryId": 3, - "status": "partial", - "eventTypes":[ - { - "eventTypeId": 4, - "status": "on", - "eventTypeChannels":[ - { - "eventTypeChannelId": "ccc8c025-06b5-4928-a632-23e1c55cd173", - "notificationSubscriptions":[ - { - "notificationSubscriptionId":"", - "ovpayToken":{ - "ovPayTokenId": 134, - "alias": "Mijn Rabopas" - }, - "isActive": True - }, - { - "notificationSubscriptionId":"", - "ovpayToken": { - "ovPayTokenId": 138, - "alias": "Mijn ING pas" - }, - "isActive": False - } - ] - }, - { - "eventTypeChannelId": "da2deb4c-ce77-4b5f-aecc-ddebfd14349d", - "notificationSubscriptions":[ - { - "notificationSubscriptionId":"", - "ovpayToken":{ - "ovPayTokenId": 134, - "alias": "Mijn Rabopas" - }, - "isActive": False - }, - { - "notificationSubscriptionId":"", - "ovpayToken": { - "ovPayTokenId": 138, - "alias": "Mijn ING pas" - }, - "isActive": False - } - ] - } - ] - }, - { - "eventTypeId": 5, - "status": "off", - "eventTypeChannels":[ - { - "eventTypeChannelId": "8e7df8f1-7e50-482f-8301-d399e75fd432", - "notificationSubscriptions":[ - { - "notificationSubscriptionId":"", - "ovpayTokenId": 136, - "isActive": False - }, - { - "notificationSubscriptionId":"", - "ovpayTokenId": 138, - "isActive": False - } - ] - }, - { - "eventTypeChannelId": "72960a92-1855-469f-9cfd-5d72f57106f2", - "notificationSubscriptions":[ - { - "notificationSubscriptionId":"", - "ovpayTokenId": 136, - "isActive": False - }, - { - "notificationSubscriptionId":"", - "ovpayTokenId": 138, - "isActive": False - } - ] - } - ] - } - ] - } - ] - } - getNotifactionSubscriptionsWithAccountNestedFalse: - summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP as a flat list + getNotifactionSubscriptionsAll: + summary: Return all the notification subscriptions where for each category the client has actively opted in or out - All value: { "notificationSubscriptions":[ { - "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", + "notificationSubscriptionId": "64047471-e0c3-4abc-b4eb-83a12a6de903", "notificationCategoryId": 1, - "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", - "customer":{ - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": True - }, - "ovpayTokenId": null, - "isActive": True + "isActive": true }, { - "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", - "notificationCategoryId": 3, - "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", - "customer":{ - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": True - }, - "ovpayToken": - { - "ovPayTokenId": 134, - "alias": "Mijn Rabopas" - }, - "isActive": True + "notificationSubscriptionId": "571388cd-8903-40d5-89e6-9191cb8d656e", + "notificationCategoryId": 2, + "isActive": true }, { - "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", + "notificationSubscriptionId": "cf736ff2-2f8f-434e-a3c7-a14064b73c9b", "notificationCategoryId": 3, - "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", - "customer":{ - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": True - }, - "ovpayToken": - { - "ovPayTokenId": 134, - "alias": "Mijn Rabopas" - }, - "isActive": True - }, - { - "notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d", - "notificationCategoryId": 3, - "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", - "customer":{ - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": True - }, - "ovpayTokenId": 101, - "ovpayToken": - { - "ovPayTokenId": 101, - "alias": "Mijn ING pas" - }, - "isActive": False + "isActive": false } ] } - getNotifactionSubscriptionsWithEmailNestedTrue: - summary: Return all the notification subscriptions when the user has identified themselves by email - description: Return all the notification subscriptions when the user has identified themselves by email, but the email is not verified + getNotifactionSubscriptionsSome: + summary: Return all the notification subscriptions where for each category the client has actively opted in or out - Some value: - { - "customer":{ - "customerProfileId": "d6771347-b56f-4020-92bb-7c77c8f13f40", - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": False - }, - "notificationCategory":[ + { + "notificationSubscriptions": [ { + "notificationSubscriptionId": "64047471-e0c3-4abc-b4eb-83a12a6de903", "notificationCategoryId": 1, - "status": "on", - "eventTypes":[ - { - "eventTypeId": 1, - "status": "on", - "eventTypeChannels":[ - { - "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", - "notificationSubscriptions":[ - { - "notificationSubscriptionId":"882b33ef-b750-44f9-a1e0-bed8fe1b4e0b", - "ovpayToken": null, - "isActive": True - } - ] - } - ] - } - ] - } - ] - } - getNotifactionSubscriptionsAnonymousNestedTrue: - summary: Return all the notification subscriptions when the user is not identifiable, return customerobject with id if customer decides to opt in. - value: - { - "customer":{ - "customerProfileId": "71e3cc93-ab16-4dc8-beed-7c7abfb3f09c", - "emailAddress": null, - "isEmailVerified": False - }, - "notificationCategory":[ + "isActive": true + }, { - "notificationCategoryId": 1, - "status": "off", - "eventTypes":[ - { - "eventTypeId": 1, - "status": "off", - "eventTypeChannels":[ - { - "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", - "notificationSubscriptions":[ - { - "notificationSubscriptionId": "fde46cac-7dd3-46d0-86c0-fcab685998ad", - "ovpayToken": null, - "isActive": False - } - ] - } - ] - } - ] + "notificationSubscriptionId": "cf736ff2-2f8f-434e-a3c7-a14064b73c9b", + "notificationCategoryId": 3, + "isActive": false } ] } @@ -747,10 +423,121 @@ paths: "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", "errors": [{ "subApiErrorCode": "0017" }], } + post: + tags: + - Notification subscriptions + summary: Create a new notificationSubscription for a customer (account or private). + description: | + Create a notificationSubscriptions for a customer (account or private), including if they have opted-in for it. + parameters: + - name: X-HTM-JWT-AUTH-HEADER + in: header + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + required: false + description: The JWT of a customer in case of touchpoint were customer logs in themselves + - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER + in: header + schema: + type: string + example: feaaef83-a551-4283-8419-340b1ada3b55 + required: false + description: The customerProfileId of a customer in the case of the SMP + - name: X-HTM-ROLE-HEADER + in: header + schema: + type: string + example: Customer + required: false + description: The role of the HTM employee in the case of the SMP + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Create notificationSubscription anonymous active: + value: + { + "emailAddress": "anonymous@mymailprovider.com", + "notificationCategoryId": 1, + "isActive": True + } + Create notificationSubscription anonymous inactive: + value: + { + "emailAddress": "anonymous@mymailprovider.com", + "notificationCategoryId": 1, + "isActive": False + } + Create notificationSubscription account active: + value: + { + "notificationCategoryId": 2, + "isActive": True + } + Create notificationSubscription account inactive: + value: + { + "notificationCategoryId": 3, + "isActive": False + } + responses: + "201": + description: Created + content: + application/json: + examples: + Create notificationSubscription anonymous active: + summary: Return the created notification for an anonymous user active + value: + { + "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", + "notificationCategoryId": 1, + "isActive": True + } + Create notificationSubscription anonymous inactive: + summary: Return the created notification for an anonymous user inactive + value: + { + "notificationSubscriptionId": "d51081fd-c48d-4111-8de4-ac5db7d47ecb", + "notificationCategoryId": 1, + "isActive": False + } + Create notificationSubscription account active: + summary: Return the created notification for an anonymous user active + value: + { + "notificationSubscriptionId": "6b88eba1-af1f-42fc-82d3-d7202d5f1afe", + "notificationCategoryId": 2, + "isActive": True + } + Create notificationSubscription account inactive: + summary: Return the created notification for an anonymous user inactive + value: + { + "notificationSubscriptionId": "0dfc0ac9-c221-4493-8828-9dfa79ad9061", + "notificationCategoryId": 3, + "isActive": False + } + "405": + description: Method not allowed + content: + application/json: + example: + { + "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", + "apiErrorCode": "405", + "title": "Methode ", + "detail": "Notificatie niet gevonden", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", + "errors": [{ "subApiErrorCode": "0017" }], + } /notificationsubscriptions/{notificationSubscriptionId}: patch: tags: - - Notifications + - Notification subscriptions summary: Update a notificationSubscription for a customer (account or private). description: | Update a notificationSubscription for a customer (account or private). @@ -819,15 +606,228 @@ paths: value: { "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", - "notificationCategoryId": 1, - "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", - "customer":{ - "emailAddress": "j.jansen@mymailprovider.nl", - "isEmailVerified": True - }, - "ovpayTokenId": null, + "notificationCategoryId": 1, "isActive": False } + Update a notificationSubscription to active: + summary: Return the updated notification + value: + { + "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", + "notificationCategoryId": 1, + "isActive": True + } + /notificationsubscriptions/{notificationSubscriptionId}/notificationpreferences: + get: + tags: + - Notification preferences + summary: Get all possible latest notificationPreferences for a customer (account or private) for a specific notificationSubscription. + description: | + Get all possible notificationPreferences for a customer (account or private) for a specific notificationSubscription. + parameters: + - name: X-HTM-JWT-AUTH-HEADER + in: header + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + required: false + description: The JWT of a customer in case of touchpoint were customer logs in themselves + - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER + in: header + schema: + type: string + example: feaaef83-a551-4283-8419-340b1ada3b55 + required: false + description: The customerProfileId of a customer in the case of the SMP + - name: X-HTM-ROLE-HEADER + in: header + schema: + type: string + example: Customer + required: false + description: The role of the HTM employee in the case of the SMP + - name: notificationSubscriptionId + in: path + schema: + type: string + format: uuid + example: b4afbbca-55e0-4578-944e-0112929d2b13 + required: true + description: The id of notificationsubscription we want to to get the notificationSubscriptions for + - name: emailAddress + in: query + schema: + type: string + format: email + example: john.doe@mymailprovider.com + required: false + description: The emailadress of the customer in the case of anonymous opt-ins + responses: + "200": + description: OK + content: + application/json: + examples: + getNotifactionPreferencesAll: + summary: Return all the latest unique notification preferences for a specific subscription + value: + { + "notificationPreferences":[ + { + "eventTypeChannel":{ + "eventTypeChannelId": 1, + "eventType":{ + "prettyName": "HTM nieuwsbrief", + "optinRequired": False + }, + "channel":{ + "channelId": 2, + "name": "email" + } + }, + "isActive": True, + "_links":{ + "create_new":{ + "href": "https://services.dev.api.htm.nl/abt/touchpoint/2.0/notificationPreferences", + "method": "POST" + } + } + }, + { + "eventTypeChannel":{ + "eventTypeChannelId": 2, + "eventType":{ + "prettyName": "Check in", + "optinRequired": False + }, + "channel":{ + "channelId": 2, + "name": "email" + } + }, + "isActive": True, + "_links":{ + "create_new":{ + "href": "https://services.dev.api.htm.nl/abt/touchpoint/2.0/notificationPreferences", + "method": "POST" + }, + "get_tokens":{ + "href": "https://services.dev.api.htm.nl/abt/touchpoint/2.0/customers/tokens", + "method": "GET" + } + } + }, + { + "eventTypeChannel":{ + "eventTypeChannelId": 3, + "eventType":{ + "prettyName": "Profielgegevens op de pas", + "optinRequired": False + }, + "channel":{ + "channelId": 2, + "name": "email" + } + }, + "isActive": True, + "_links":{ + "partial_edit":{ + "href": "https://services.dev.api.htm.nl/abt/touchpoint/2.0/notificationPreferences/e3045b28-d686-4e02-babd-53f0724c8826", + "method": "PATCH" + }, + "get_tokens":{ + "href": "https://services.dev.api.htm.nl/abt/touchpoint/2.0/customers/tokens", + "method": "GET" + } + } + } + ] + } + /notificationpreferences: + post: + tags: + - Notification preferences + summary: Create a new notificationPreference for a customer (account or private). + description: | + Create a notificationPreference for a customer (account or private), including if they have opted-in for it. + parameters: + - name: X-HTM-JWT-AUTH-HEADER + in: header + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + required: false + description: The JWT of a customer in case of touchpoint were customer logs in themselves + - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER + in: header + schema: + type: string + example: feaaef83-a551-4283-8419-340b1ada3b55 + required: false + description: The customerProfileId of a customer in the case of the SMP + - name: X-HTM-ROLE-HEADER + in: header + schema: + type: string + example: Customer + required: false + description: The role of the HTM employee in the case of the SMP + - name: emailAddress + in: header + schema: + type: string + format: email + example: anonymous@mymailprovider.com + required: false + description: The emailadress of the customer in case of an anonymous customer + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Create notificationPreference anonymous active: + value: + { + "eventTypeChannelId": 1, + "isActive": False, + "notificationPreferenceResources": null + } + Create notificationSubscription for token inactive: + value: + { + "eventTypeChannelId": 3, + "isActive": False, + "notificationPreferenceResources":[ + { + "resourceNameId": 6, + "resourceIdentifier": 136 + } + ] + } + responses: + "201": + description: Created + content: + application/json: + examples: +TODO + +TODO error emailadress known for verified profile + "405": + description: Method not allowed + content: + application/json: + example: + { + "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", + "apiErrorCode": "405", + "title": "Methode ", + "detail": "Notificatie niet gevonden", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", + "errors": [{ "subApiErrorCode": "0017" }], + } + components: schemas: unavailable: From dad23041552f21781a33a07f33eb62d08cbce7fc Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Wed, 29 Oct 2025 13:36:59 +0100 Subject: [PATCH 05/16] removed TODO's --- src/openapi/customers/SE-notifications.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/openapi/customers/SE-notifications.yaml b/src/openapi/customers/SE-notifications.yaml index fea1623..3033849 100644 --- a/src/openapi/customers/SE-notifications.yaml +++ b/src/openapi/customers/SE-notifications.yaml @@ -811,9 +811,7 @@ paths: content: application/json: examples: -TODO -TODO error emailadress known for verified profile "405": description: Method not allowed content: @@ -827,7 +825,6 @@ TODO error emailadress known for verified profile "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", "errors": [{ "subApiErrorCode": "0017" }], } - components: schemas: unavailable: From 11390d22757ae36fba5b9e6c4f760b204a748891 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Wed, 29 Oct 2025 13:43:19 +0100 Subject: [PATCH 06/16] updated tags --- src/openapi/customers/SE-notifications.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/openapi/customers/SE-notifications.yaml b/src/openapi/customers/SE-notifications.yaml index 3033849..6a6a8c9 100644 --- a/src/openapi/customers/SE-notifications.yaml +++ b/src/openapi/customers/SE-notifications.yaml @@ -7,9 +7,15 @@ info: servers: - url: https://services.acc.api.htm.nl/abt/touchpoint/2.0 tags: - - name: Notifications + - name: Notification categories description: >- - Service Engine APIs for all HTM Notifications. These are NOT the CRUD APIs to access raw data in the database. + Service Engine APIs for all HTM Notifications metadata. To build content only. + - name: Notification subscriptions + description: >- + Service Engine APIs for the HTM Notification subscriptions for a user. Contains the subscriptions on category level + - name: Notification preferences + description: >- + //future Service Engine APIs for the HTM Notification preferences for a category for a user. Contains the discrepancies from the default. paths: /notificationcategories: get: From c77c05895d34ef2a40e8c0c74b897dc652e56385 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Wed, 29 Oct 2025 13:50:19 +0100 Subject: [PATCH 07/16] updated customer crud endpoints with is emailverified --- src/openapi/customers/customers-crud-v2.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/openapi/customers/customers-crud-v2.yaml b/src/openapi/customers/customers-crud-v2.yaml index 98d3e2e..61c3e15 100644 --- a/src/openapi/customers/customers-crud-v2.yaml +++ b/src/openapi/customers/customers-crud-v2.yaml @@ -242,6 +242,7 @@ paths: suffix: PhD dateOfBirth: "2002-10-29" emailAddresses: TEST@HTM.NL + isEmailVerified: True addresses: - addressId: 1 street: mystreet @@ -374,6 +375,7 @@ paths: suffix: PhD dateOfBirth: "2002-10-29" emailAddresses: TEST@HTM.NL + isEmailVerified: False address: - addressId: 1 street: mystreet @@ -521,6 +523,7 @@ paths: suffix: PhD dateOfBirth: "2002-10-29" emailAddresses: TEST@HTM.NL + isEmailVerified: False addresses: - addressId: 1 street: mystreet @@ -662,6 +665,7 @@ paths: suffix: PhD dateOfBirth: "2002-10-29" emailAddresses: TEST@HTM.NL + isEmailVerified: True addresses: - addressId: 1 street: mystreet @@ -827,6 +831,7 @@ paths: suffix: jr dateOfBirth: "1970-01-01" emailAddress: j.jansen@hatseflats.nl + isEmailVerified: False addresses: - street: Laan van Meerdervoort houseNumber: 5 @@ -924,7 +929,8 @@ paths: prefix: "de", suffix: "jr", dateOfBirth: "1970-01-01", - emailAddress: "TEST@TEST1.NL" + emailAddress: "TEST@TEST1.NL", + isEmailVerified: False } updateCompleteEntity: value: @@ -935,7 +941,8 @@ paths: prefix: "de", suffix: "jr", dateOfBirth: "1970-01-01", - emailAddress: "TEST@TEST1.NL" + emailAddress: "TEST@TEST1.NL", + isEmailVerified: True } required: true responses: @@ -2401,6 +2408,8 @@ components: emailAddresses: type: string format: email + isEmailVerified: + type: boolean addresses: type: array items: @@ -2836,6 +2845,8 @@ components: format: date emailAddress: type: string + isEmailVerified: + type: string postOvPayTokenResponse: type: object properties: From f6f77421e285cab1de42dc7ad7bf2c291128f3f5 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Wed, 29 Oct 2025 15:05:26 +0100 Subject: [PATCH 08/16] added SE api's voor maileon --- src/openapi/customers/se-maileon.yaml | 548 ++++++++++++++++++++++++++ 1 file changed, 548 insertions(+) create mode 100644 src/openapi/customers/se-maileon.yaml diff --git a/src/openapi/customers/se-maileon.yaml b/src/openapi/customers/se-maileon.yaml new file mode 100644 index 0000000..0413726 --- /dev/null +++ b/src/openapi/customers/se-maileon.yaml @@ -0,0 +1,548 @@ +openapi: 3.0.1 +info: + title: Service Engine APIs for Notifications + description: >- + Service Engine APIs for all HTM Notifications. These are NOT the CRUD APIs to access raw data in the database. + version: "1.0" +servers: + - url: https://services.acc.api.htm.nl/abt/touchpoint/2.0 +tags: + - name: Customers + description: >- + Service Engine API's for maileon to update the customer profile. Only field isEmailVerified. + - name: Notification categories + description: >- + Service Engine APIs for all HTM Notifications metadata. To build content only. + - name: Notification subscriptions + description: >- + Service Engine APIs for the HTM Notification subscriptions for a user. Contains the subscriptions on category level +paths: + /customers: + patch: + tags: + - Customers + parameters: + - name: customerProfileId + in: header + schema: + type: string + example: 1 + required: false + description: The customerProfileId of a customer + summary: Update a customer profile + description: Update a customer profile based on the customerProfileId + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + patchCustomer: + value: + { + "person": { + "isEmailVerified": True + } + } + responses: + "200": + description: OK + /notificationcategories: + get: + tags: + - Notification categories + summary: Get notification categories and optins for that category that a touchpoint can show. + description: | + Get notification categories that a touchpoint can show and optins ( eventTypes) and channels (eventType_channels) for the optin for that category + parameters: + - name: expand + in: query + schema: + type: array + items: + type: string + description: Choose the records related to the category nested, options are eventType, evenTypeChannel + responses: + "200": + description: OK + content: + application/json: + examples: + getNotifactionCategories?Expand=eventType, evenTypeChannel, channel: + summary: Return all the notification categories with their nested attributes + value: + { + "notificationCategories":[ + { + "notificationCategoryId": 1, + "name": "Nieuwsbrief", + "eventTypes": [ + { + "eventTypeId": 1, + "eventOrigin": { + "eventOriginId": 6, + "name": "Maileon" + }, + "name": "HTM nieuwsbrief", + "subName": "", + "prettyName": "HTM nieuwsbrief", + "optinRequired": False, + "eventTypeChannels":[ + { + "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", + "channel":{ + "channelId": 2, + "name": "email" + }, + "isDefault": True, + "isMandatory": False + } + ] + } + ] + }, + { + "notificationCategoryId": 2, + "name": "Mijn Reizen", + "eventTypes": [ + { + "eventTypeId": 2, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, TRAVEL_SCHEME", + "subName": "CI", + "prettyName": "Check In", + "optinRequired": False, + "eventTypeChannels":[ + { + "eventTypeChannelId": "ccc8c025-06b5-4928-a632-23e1c55cd173", + "channel":{ + "channelId": 1, + "name": "push" + }, + "isDefault": True, + "isMandatory": False + }, + { + "eventTypeChannelId": "da2deb4c-ce77-4b5f-aecc-ddebfd14349d", + "channel":{ + "channelId": 2, + "name": "email" + }, + "isDefault": False, + "isMandatory": False + } + ] + }, + { + "eventTypeId": 3, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, PAD", + "subName": null, + "prettyName": "Profielgegevens op de pas", + "optinRequired": False, + "eventTypeChannels":[ + { + "eventTypeChannelId": "8e7df8f1-7e50-482f-8301-d399e75fd432", + "channel":{ + "channelId": 1, + "name": "push" + }, + "isDefault": True, + "isMandatory": False + }, + { + "eventTypeChannelId": "72960a92-1855-469f-9cfd-5d72f57106f2", + "channel":{ + "channelId": 2, + "name": "email" + }, + "isDefault": False, + "isMandatory": False + } + ] + } + ] + }, + { + "notificationCategoryId": 3, + "name": "Mijn Passen", + "eventTypes": [ + { + "eventTypeId": 4, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, CARD", + "subName": null, + "prettyName": "Mijn passen", + "optinRequired": False, + "eventTypeChannels":[ + { + "eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60", + "channel":{ + "channelId": 1, + "name": "push" + }, + "isDefault": True, + "isMandatory": False + }, + { + "eventTypeChannelId": "0c797b5a-ed34-494b-8c64-0a832830d392", + "channel":{ + "channelId": 2, + "name": "email" + }, + "isDefault": False, + "isMandatory": False + } + ] + }, + { + "eventTypeId": 5, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, PAD", + "subName": null, + "prettyName": "Profielgegevens op de pas", + "optinRequired": False, + "eventTypeChannels":[ + { + "eventTypeChannelId": "b910368f-c045-4e8e-b01d-bcbc78708bac", + "channel":{ + "channelId": 1, + "name": "push" + }, + "isDefault": True, + "isMandatory": False + }, + { + "eventTypeChannelId": "93e773da-ba3b-48da-9a0e-ee478eaa752f", + "channel":{ + "channelId": 2, + "name": "email" + }, + "isDefault": False, + "isMandatory": False + } + ] + } + ] + } + ] + } + getNotifactionCategories?Expand=eventType: + summary: Return all the notification categories with nested eventTypes + value: + { + "notificationCategories":[ + { + "notificationCategoryId": 1, + "name": "Nieuwsbrief", + "eventTypes": [ + { + "eventTypeId": 1, + "eventOrigin": { + "eventOriginId": 6, + "name": "Maileon" + }, + "name": "HTM nieuwsbrief", + "subName": "", + "prettyName": "HTM nieuwsbrief", + "optinRequired": False + } + ] + }, + { + "notificationCategoryId": 2, + "name": "Mijn Reizen", + "eventTypes": [ + { + "eventTypeId": 2, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, TRAVEL_SCHEME", + "subName": "CI", + "prettyName": "Check In", + "optinRequired": False + }, + { + "eventTypeId": 3, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, PAD", + "subName": null, + "prettyName": "Profielgegevens op de pas", + "optinRequired": False + } + ] + }, + { + "notificationCategoryId": 3, + "name": "Mijn Passen", + "eventTypes": [ + { + "eventTypeId": 4, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, CARD", + "subName": null, + "prettyName": "Mijn passen", + "optinRequired": False + }, + { + "eventTypeId": 5, + "eventOrigin": { + "eventOriginId": 1, + "name": "GBO" + }, + "name": "ALERTS, PAD", + "subName": null, + "prettyName": "Profielgegevens op de pas", + "optinRequired": False + } + ] + } + ] + } + getNotifactionCategories: + summary: Return all the notification categories + value: + { + "notificationCategories":[ + { + "notificationCategoryId": 1, + "name": "Nieuwsbrief" + }, + { + "notificationCategoryId": 2, + "name": "Mijn Reizen" + }, + { + "notificationCategoryId": 3, + "name": "Mijn Passen" + } + ] + } + "404": + description: No notification category found + content: + application/json: + example: + { + "type": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers", + "apiErrorCode": "400.1", + "title": "Niet gevonden", + "detail": "Notificatiecategorie niet gevonden", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", + "errors": [{ "subApiErrorCode": "0017" }], + } + /notificationsubscriptions: + get: + tags: + - Notification subscriptions + summary: Get all possible notificationSubscriptions for a customer (account or private). + description: | + Get all possible notificationSubscriptions for a customer (account or private), including if they have opted-in for it. + parameters: + - name: X-HTM-JWT-AUTH-HEADER + in: header + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + required: false + description: The JWT of a customer in case of touchpoint were customer logs in themselves + - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER + in: header + schema: + type: string + example: feaaef83-a551-4283-8419-340b1ada3b55 + required: false + description: The customerProfileId of a customer in the case of the SMP + - name: X-HTM-ROLE-HEADER + in: header + schema: + type: string + example: Customer + required: false + description: The role of the HTM employee in the case of the SMP + - name: emailAddress + in: query + schema: + type: string + format: email + example: john.doe@mymailprovider.com + required: false + description: The emailadress of the customer in the case of anonymous opt-ins + responses: + "200": + description: OK + content: + application/json: + examples: + getNotifactionSubscriptionsAll: + summary: Return all the notification subscriptions where for each category the client has actively opted in or out - All + value: + { + "notificationSubscriptions":[ + { + "notificationSubscriptionId": "64047471-e0c3-4abc-b4eb-83a12a6de903", + "notificationCategoryId": 1, + "isActive": true + }, + { + "notificationSubscriptionId": "571388cd-8903-40d5-89e6-9191cb8d656e", + "notificationCategoryId": 2, + "isActive": true + }, + { + "notificationSubscriptionId": "cf736ff2-2f8f-434e-a3c7-a14064b73c9b", + "notificationCategoryId": 3, + "isActive": false + } + ] + } + getNotifactionSubscriptionsSome: + summary: Return all the notification subscriptions where for each category the client has actively opted in or out - Some + value: + { + "notificationSubscriptions": [ + { + "notificationSubscriptionId": "64047471-e0c3-4abc-b4eb-83a12a6de903", + "notificationCategoryId": 1, + "isActive": true + }, + { + "notificationSubscriptionId": "cf736ff2-2f8f-434e-a3c7-a14064b73c9b", + "notificationCategoryId": 3, + "isActive": false + } + ] + } + "403": + description: Forbidden // Als geverifieerd profiel gevonden wordt, maar niet op een geverifieerde manier benaderd wordt + content: + application/json: + example: + { + "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", + "apiErrorCode": "403", + "title": "Verboden", + "detail": "", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", + "errors": [], + } + "404": + description: No notification subscriptions found + content: + application/json: + example: + { + "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", + "apiErrorCode": "404", + "title": "Niet gevonden", + "detail": "Notificatie niet gevonden", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", + "errors": [{ "subApiErrorCode": "0017" }], + } + /notificationsubscriptions/{notificationSubscriptionId}: + patch: + tags: + - Notification subscriptions + summary: Update a notificationSubscription for a customer (account or private). + description: | + Update a notificationSubscription for a customer (account or private). + parameters: + - name: X-HTM-JWT-AUTH-HEADER + in: header + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + required: false + description: The JWT of a customer in case of touchpoint were customer logs in themselves + - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER + in: header + schema: + type: string + example: feaaef83-a551-4283-8419-340b1ada3b55 + required: false + description: The customerProfileId of a customer in the case of the SMP + - name: X-HTM-ROLE-HEADER + in: header + schema: + type: string + example: Customer + required: false + description: The role of the HTM employee in the case of the SMP + - name: notificationSubscriptionId + in: path + schema: + type: string + format: uuid + example: e112f26e-37fa-4bde-8def-9977cd1d50ae + required: true + description: The id of the notificationSubscription you want to update + - name: emailAddress + in: query + schema: + type: string + format: email + example: john.doe@mymailprovider.com + required: false + description: The emailadress of the customer in the case of anonymous opt-ins + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Update a notificationSubscription to inactive: + value: + { + "isActive": False + } + Update a notificationSubscription to active: + value: + { + "isActive": True + } + responses: + "200": + description: OK + content: + application/json: + examples: + Update a notificationSubscription to inactive: + summary: Return the updated notification + value: + { + "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", + "notificationCategoryId": 1, + "isActive": False + } + Update a notificationSubscription to active: + summary: Return the updated notification + value: + { + "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", + "notificationCategoryId": 1, + "isActive": True + } +components: + schemas: + unavailable: + type: object \ No newline at end of file From 7383116ecd42581de8ba2ec7f90c67efd578747d Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Wed, 29 Oct 2025 15:08:32 +0100 Subject: [PATCH 09/16] endpoints --- src/openapi/customers/SE-notifications.yaml | 2 +- src/openapi/customers/se-maileon.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openapi/customers/SE-notifications.yaml b/src/openapi/customers/SE-notifications.yaml index 6a6a8c9..2d20f3b 100644 --- a/src/openapi/customers/SE-notifications.yaml +++ b/src/openapi/customers/SE-notifications.yaml @@ -15,7 +15,7 @@ tags: Service Engine APIs for the HTM Notification subscriptions for a user. Contains the subscriptions on category level - name: Notification preferences description: >- - //future Service Engine APIs for the HTM Notification preferences for a category for a user. Contains the discrepancies from the default. + //future Service Engine APIs for the HTM Notification preferences for a category for a user. Contains the discrepancies from the default. or paths: /notificationcategories: get: diff --git a/src/openapi/customers/se-maileon.yaml b/src/openapi/customers/se-maileon.yaml index 0413726..b2c6e44 100644 --- a/src/openapi/customers/se-maileon.yaml +++ b/src/openapi/customers/se-maileon.yaml @@ -1,11 +1,11 @@ openapi: 3.0.1 info: - title: Service Engine APIs for Notifications + title: Service Engine APIs for maileon description: >- - Service Engine APIs for all HTM Notifications. These are NOT the CRUD APIs to access raw data in the database. + Service Engine APIs for maileon. These are NOT the CRUD APIs to access raw data in the database. version: "1.0" servers: - - url: https://services.acc.api.htm.nl/abt/touchpoint/2.0 + - url: https://services.acc.api.htm.nl/abt/maileon/2.0 tags: - name: Customers description: >- From b6a52e244ea0eacc84120fc1387ace8c2f6f574b Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Wed, 29 Oct 2025 15:10:07 +0100 Subject: [PATCH 10/16] endpoints --- src/openapi/customers/se-maileon.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openapi/customers/se-maileon.yaml b/src/openapi/customers/se-maileon.yaml index b2c6e44..4f08cc2 100644 --- a/src/openapi/customers/se-maileon.yaml +++ b/src/openapi/customers/se-maileon.yaml @@ -5,7 +5,7 @@ info: Service Engine APIs for maileon. These are NOT the CRUD APIs to access raw data in the database. version: "1.0" servers: - - url: https://services.acc.api.htm.nl/abt/maileon/2.0 + - url: https://services.acc.api.htm.nl/abt/maileon/1.0 tags: - name: Customers description: >- From b2404f9ff94697b27ecdb9fdce54ca178adfad5d Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Wed, 29 Oct 2025 15:12:12 +0100 Subject: [PATCH 11/16] things --- src/openapi/customers/se-maileon.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openapi/customers/se-maileon.yaml b/src/openapi/customers/se-maileon.yaml index 4f08cc2..9df569e 100644 --- a/src/openapi/customers/se-maileon.yaml +++ b/src/openapi/customers/se-maileon.yaml @@ -15,7 +15,7 @@ tags: Service Engine APIs for all HTM Notifications metadata. To build content only. - name: Notification subscriptions description: >- - Service Engine APIs for the HTM Notification subscriptions for a user. Contains the subscriptions on category level + Service Engine APIs for the HTM Notification subscriptions for a user. Contains the subscriptions on category level. paths: /customers: patch: From d48669a25c9e53c5420a8d40449538e2f7c2736c Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 3 Nov 2025 14:26:21 +0100 Subject: [PATCH 12/16] updated --- src/openapi/customers/SE-notifications.yaml | 267 ++++---------------- 1 file changed, 46 insertions(+), 221 deletions(-) diff --git a/src/openapi/customers/SE-notifications.yaml b/src/openapi/customers/SE-notifications.yaml index 2d20f3b..806f23b 100644 --- a/src/openapi/customers/SE-notifications.yaml +++ b/src/openapi/customers/SE-notifications.yaml @@ -20,8 +20,8 @@ paths: /notificationcategories: get: tags: - - Notification categories - summary: Get notification categories and optins for that category that a touchpoint can show. + - Notification categories + summary: Get notification categories and optins references for that category that a touchpoint can show. description: | Get notification categories that a touchpoint can show and optins ( eventTypes) and channels (eventType_channels) for the optin for that category parameters: @@ -371,17 +371,26 @@ paths: "notificationSubscriptions":[ { "notificationSubscriptionId": "64047471-e0c3-4abc-b4eb-83a12a6de903", - "notificationCategoryId": 1, + "notificationCategory": { + "notificationCategoryId": 1, + "name": "HTM nieuwbrief" + }, "isActive": true }, { "notificationSubscriptionId": "571388cd-8903-40d5-89e6-9191cb8d656e", - "notificationCategoryId": 2, + "notificationCategory": { + "notificationCategoryId": 2, + "name": "Mijn reizen" + }, "isActive": true }, { "notificationSubscriptionId": "cf736ff2-2f8f-434e-a3c7-a14064b73c9b", - "notificationCategoryId": 3, + "notificationCategory": { + "notificationCategoryId": 3, + "name": "Mijn contracten" + }, "isActive": false } ] @@ -393,12 +402,18 @@ paths: "notificationSubscriptions": [ { "notificationSubscriptionId": "64047471-e0c3-4abc-b4eb-83a12a6de903", - "notificationCategoryId": 1, + "notificationCategory": { + "notificationCategoryId": 1, + "name": "HTM nieuwbrief" + }, "isActive": true }, { "notificationSubscriptionId": "cf736ff2-2f8f-434e-a3c7-a14064b73c9b", - "notificationCategoryId": 3, + "notificationCategory": { + "notificationCategoryId": 3, + "name": "Mijn contracten" + }, "isActive": false } ] @@ -467,26 +482,38 @@ paths: value: { "emailAddress": "anonymous@mymailprovider.com", - "notificationCategoryId": 1, + "notificationCategory": { + "notificationCategoryId": 1, + "name": "HTM nieuwbrief" + }, "isActive": True } Create notificationSubscription anonymous inactive: value: { "emailAddress": "anonymous@mymailprovider.com", - "notificationCategoryId": 1, + "notificationCategory": { + "notificationCategoryId": 1, + "name": "HTM nieuwbrief" + }, "isActive": False } Create notificationSubscription account active: value: { - "notificationCategoryId": 2, + "notificationCategory": { + "notificationCategoryId": 2, + "name": "Mijn reizen" + }, "isActive": True } Create notificationSubscription account inactive: value: { - "notificationCategoryId": 3, + "notificationCategory": { + "notificationCategoryId": 2, + "name": "Mijn reizen" + }, "isActive": False } responses: @@ -612,7 +639,10 @@ paths: value: { "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", - "notificationCategoryId": 1, + "notificationCategory": { + "notificationCategoryId": 1, + "name": "HTM nieuwbrief" + }, "isActive": False } Update a notificationSubscription to active: @@ -620,217 +650,12 @@ paths: value: { "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", - "notificationCategoryId": 1, + "notificationCategory": { + "notificationCategoryId": 1, + "name": "HTM nieuwbrief" + }, "isActive": True } - /notificationsubscriptions/{notificationSubscriptionId}/notificationpreferences: - get: - tags: - - Notification preferences - summary: Get all possible latest notificationPreferences for a customer (account or private) for a specific notificationSubscription. - description: | - Get all possible notificationPreferences for a customer (account or private) for a specific notificationSubscription. - parameters: - - name: X-HTM-JWT-AUTH-HEADER - in: header - schema: - type: string - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c - required: false - description: The JWT of a customer in case of touchpoint were customer logs in themselves - - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER - in: header - schema: - type: string - example: feaaef83-a551-4283-8419-340b1ada3b55 - required: false - description: The customerProfileId of a customer in the case of the SMP - - name: X-HTM-ROLE-HEADER - in: header - schema: - type: string - example: Customer - required: false - description: The role of the HTM employee in the case of the SMP - - name: notificationSubscriptionId - in: path - schema: - type: string - format: uuid - example: b4afbbca-55e0-4578-944e-0112929d2b13 - required: true - description: The id of notificationsubscription we want to to get the notificationSubscriptions for - - name: emailAddress - in: query - schema: - type: string - format: email - example: john.doe@mymailprovider.com - required: false - description: The emailadress of the customer in the case of anonymous opt-ins - responses: - "200": - description: OK - content: - application/json: - examples: - getNotifactionPreferencesAll: - summary: Return all the latest unique notification preferences for a specific subscription - value: - { - "notificationPreferences":[ - { - "eventTypeChannel":{ - "eventTypeChannelId": 1, - "eventType":{ - "prettyName": "HTM nieuwsbrief", - "optinRequired": False - }, - "channel":{ - "channelId": 2, - "name": "email" - } - }, - "isActive": True, - "_links":{ - "create_new":{ - "href": "https://services.dev.api.htm.nl/abt/touchpoint/2.0/notificationPreferences", - "method": "POST" - } - } - }, - { - "eventTypeChannel":{ - "eventTypeChannelId": 2, - "eventType":{ - "prettyName": "Check in", - "optinRequired": False - }, - "channel":{ - "channelId": 2, - "name": "email" - } - }, - "isActive": True, - "_links":{ - "create_new":{ - "href": "https://services.dev.api.htm.nl/abt/touchpoint/2.0/notificationPreferences", - "method": "POST" - }, - "get_tokens":{ - "href": "https://services.dev.api.htm.nl/abt/touchpoint/2.0/customers/tokens", - "method": "GET" - } - } - }, - { - "eventTypeChannel":{ - "eventTypeChannelId": 3, - "eventType":{ - "prettyName": "Profielgegevens op de pas", - "optinRequired": False - }, - "channel":{ - "channelId": 2, - "name": "email" - } - }, - "isActive": True, - "_links":{ - "partial_edit":{ - "href": "https://services.dev.api.htm.nl/abt/touchpoint/2.0/notificationPreferences/e3045b28-d686-4e02-babd-53f0724c8826", - "method": "PATCH" - }, - "get_tokens":{ - "href": "https://services.dev.api.htm.nl/abt/touchpoint/2.0/customers/tokens", - "method": "GET" - } - } - } - ] - } - /notificationpreferences: - post: - tags: - - Notification preferences - summary: Create a new notificationPreference for a customer (account or private). - description: | - Create a notificationPreference for a customer (account or private), including if they have opted-in for it. - parameters: - - name: X-HTM-JWT-AUTH-HEADER - in: header - schema: - type: string - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c - required: false - description: The JWT of a customer in case of touchpoint were customer logs in themselves - - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER - in: header - schema: - type: string - example: feaaef83-a551-4283-8419-340b1ada3b55 - required: false - description: The customerProfileId of a customer in the case of the SMP - - name: X-HTM-ROLE-HEADER - in: header - schema: - type: string - example: Customer - required: false - description: The role of the HTM employee in the case of the SMP - - name: emailAddress - in: header - schema: - type: string - format: email - example: anonymous@mymailprovider.com - required: false - description: The emailadress of the customer in case of an anonymous customer - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - examples: - Create notificationPreference anonymous active: - value: - { - "eventTypeChannelId": 1, - "isActive": False, - "notificationPreferenceResources": null - } - Create notificationSubscription for token inactive: - value: - { - "eventTypeChannelId": 3, - "isActive": False, - "notificationPreferenceResources":[ - { - "resourceNameId": 6, - "resourceIdentifier": 136 - } - ] - } - responses: - "201": - description: Created - content: - application/json: - examples: - - "405": - description: Method not allowed - content: - application/json: - example: - { - "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", - "apiErrorCode": "405", - "title": "Methode ", - "detail": "Notificatie niet gevonden", - "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", - "errors": [{ "subApiErrorCode": "0017" }], - } components: schemas: unavailable: From 4202bb03f17196363f9041acb8f3894791913d82 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 3 Nov 2025 14:37:19 +0100 Subject: [PATCH 13/16] Updated maileon API's --- src/openapi/customers/se-maileon.yaml | 119 +++----------------------- 1 file changed, 11 insertions(+), 108 deletions(-) diff --git a/src/openapi/customers/se-maileon.yaml b/src/openapi/customers/se-maileon.yaml index 9df569e..504f291 100644 --- a/src/openapi/customers/se-maileon.yaml +++ b/src/openapi/customers/se-maileon.yaml @@ -27,8 +27,16 @@ paths: schema: type: string example: 1 - required: false + required: true description: The customerProfileId of a customer + - name: emailAddress + in: header + schema: + type: string + format: email + example: john.doe@mymailprovider.com + required: true + description: The emailadress of the customer summary: Update a customer profile description: Update a customer profile based on the customerProfileId requestBody: @@ -359,35 +367,13 @@ paths: description: | Get all possible notificationSubscriptions for a customer (account or private), including if they have opted-in for it. parameters: - - name: X-HTM-JWT-AUTH-HEADER - in: header - schema: - type: string - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c - required: false - description: The JWT of a customer in case of touchpoint were customer logs in themselves - - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER + - name: customerProfileId in: header schema: type: string example: feaaef83-a551-4283-8419-340b1ada3b55 required: false - description: The customerProfileId of a customer in the case of the SMP - - name: X-HTM-ROLE-HEADER - in: header - schema: - type: string - example: Customer - required: false - description: The role of the HTM employee in the case of the SMP - - name: emailAddress - in: query - schema: - type: string - format: email - example: john.doe@mymailprovider.com - required: false - description: The emailadress of the customer in the case of anonymous opt-ins + description: The customerProfileId of a customer responses: "200": description: OK @@ -459,89 +445,6 @@ paths: "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", "errors": [{ "subApiErrorCode": "0017" }], } - /notificationsubscriptions/{notificationSubscriptionId}: - patch: - tags: - - Notification subscriptions - summary: Update a notificationSubscription for a customer (account or private). - description: | - Update a notificationSubscription for a customer (account or private). - parameters: - - name: X-HTM-JWT-AUTH-HEADER - in: header - schema: - type: string - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c - required: false - description: The JWT of a customer in case of touchpoint were customer logs in themselves - - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER - in: header - schema: - type: string - example: feaaef83-a551-4283-8419-340b1ada3b55 - required: false - description: The customerProfileId of a customer in the case of the SMP - - name: X-HTM-ROLE-HEADER - in: header - schema: - type: string - example: Customer - required: false - description: The role of the HTM employee in the case of the SMP - - name: notificationSubscriptionId - in: path - schema: - type: string - format: uuid - example: e112f26e-37fa-4bde-8def-9977cd1d50ae - required: true - description: The id of the notificationSubscription you want to update - - name: emailAddress - in: query - schema: - type: string - format: email - example: john.doe@mymailprovider.com - required: false - description: The emailadress of the customer in the case of anonymous opt-ins - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - examples: - Update a notificationSubscription to inactive: - value: - { - "isActive": False - } - Update a notificationSubscription to active: - value: - { - "isActive": True - } - responses: - "200": - description: OK - content: - application/json: - examples: - Update a notificationSubscription to inactive: - summary: Return the updated notification - value: - { - "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", - "notificationCategoryId": 1, - "isActive": False - } - Update a notificationSubscription to active: - summary: Return the updated notification - value: - { - "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", - "notificationCategoryId": 1, - "isActive": True - } components: schemas: unavailable: From 3d42458d12d74913770f0ff92b5429210f984a8f Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 3 Nov 2025 14:46:08 +0100 Subject: [PATCH 14/16] switched request body and response --- src/openapi/customers/SE-notifications.yaml | 42 ++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/openapi/customers/SE-notifications.yaml b/src/openapi/customers/SE-notifications.yaml index 806f23b..107f7cc 100644 --- a/src/openapi/customers/SE-notifications.yaml +++ b/src/openapi/customers/SE-notifications.yaml @@ -482,38 +482,26 @@ paths: value: { "emailAddress": "anonymous@mymailprovider.com", - "notificationCategory": { - "notificationCategoryId": 1, - "name": "HTM nieuwbrief" - }, + "notificationCategoryId": 1, "isActive": True } Create notificationSubscription anonymous inactive: value: { "emailAddress": "anonymous@mymailprovider.com", - "notificationCategory": { - "notificationCategoryId": 1, - "name": "HTM nieuwbrief" - }, + "notificationCategoryId": 1, "isActive": False } Create notificationSubscription account active: value: { - "notificationCategory": { - "notificationCategoryId": 2, - "name": "Mijn reizen" - }, - "isActive": True + "notificationCategoryId": 2, + "isActive": True } Create notificationSubscription account inactive: value: { - "notificationCategory": { - "notificationCategoryId": 2, - "name": "Mijn reizen" - }, + "notificationCategoryId": 2, "isActive": False } responses: @@ -527,7 +515,10 @@ paths: value: { "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", - "notificationCategoryId": 1, + "notificationCategory": { + "notificationCategoryId": 1, + "name": "HTM nieuwbrief" + }, "isActive": True } Create notificationSubscription anonymous inactive: @@ -535,7 +526,10 @@ paths: value: { "notificationSubscriptionId": "d51081fd-c48d-4111-8de4-ac5db7d47ecb", - "notificationCategoryId": 1, + "notificationCategory": { + "notificationCategoryId": 1, + "name": "HTM nieuwbrief" + }, "isActive": False } Create notificationSubscription account active: @@ -543,7 +537,10 @@ paths: value: { "notificationSubscriptionId": "6b88eba1-af1f-42fc-82d3-d7202d5f1afe", - "notificationCategoryId": 2, + "notificationCategory": { + "notificationCategoryId": 2, + "name": "Mijn reizen" + }, "isActive": True } Create notificationSubscription account inactive: @@ -551,7 +548,10 @@ paths: value: { "notificationSubscriptionId": "0dfc0ac9-c221-4493-8828-9dfa79ad9061", - "notificationCategoryId": 3, + "notificationCategory": { + "notificationCategoryId": 2, + "name": "Mijn reizen" + }, "isActive": False } "405": From b5131629a9559f3f6239043eceba6bee650b3089 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Wed, 5 Nov 2025 15:28:30 +0100 Subject: [PATCH 15/16] review comments --- src/openapi/customers/SE-notifications.yaml | 78 +++++++++++++-------- src/openapi/customers/se-maileon.yaml | 65 ++++++++++------- 2 files changed, 91 insertions(+), 52 deletions(-) diff --git a/src/openapi/customers/SE-notifications.yaml b/src/openapi/customers/SE-notifications.yaml index 107f7cc..ffa39c8 100644 --- a/src/openapi/customers/SE-notifications.yaml +++ b/src/openapi/customers/SE-notifications.yaml @@ -28,17 +28,16 @@ paths: - name: expand in: query schema: - type: array - items: type: string - description: Choose the records related to the category nested, options are eventType, evenTypeChannel + enum: [none, eventType, eventTypeChannel] + default: none responses: "200": description: OK content: application/json: examples: - getNotifactionCategories?Expand=eventType, evenTypeChannel, channel: + getNotifactionCategories?expand=eventTypeChannel: summary: Return all the notification categories with their nested attributes value: { @@ -209,7 +208,7 @@ paths: } ] } - getNotifactionCategories?Expand=eventType: + getNotifactionCategories?expand=eventType: summary: Return all the notification categories with nested eventTypes value: { @@ -289,7 +288,7 @@ paths: } ] } - getNotifactionCategories: + getNotifactionCategories?expand=none: summary: Return all the notification categories value: { @@ -313,13 +312,19 @@ paths: content: application/json: example: - { - "type": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers", - "apiErrorCode": "400.1", + { + "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", "title": "Niet gevonden", - "detail": "Notificatiecategorie niet gevonden", + "detail": "Notificatiecategory niet gevonden", "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", - "errors": [{ "subApiErrorCode": "0017" }], + "errors": [ + { + "code": "404", + "detail": null, + "path": null, + "parameter": null + } + ], } /notificationsubscriptions: get: @@ -353,8 +358,7 @@ paths: - name: emailAddress in: query schema: - type: string - format: email + type: integer example: john.doe@mymailprovider.com required: false description: The emailadress of the customer in the case of anonymous opt-ins @@ -424,12 +428,18 @@ paths: application/json: example: { - "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", - "apiErrorCode": "403", + "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", "title": "Verboden", - "detail": "", + "detail": "Niet toegestaan", "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", - "errors": [], + "errors": [ + { + "code": "403", + "detail": null, + "path": null, + "parameter": null + } + ], } "404": description: No notification subscriptions found @@ -437,12 +447,18 @@ paths: application/json: example: { - "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", - "apiErrorCode": "404", + "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", "title": "Niet gevonden", "detail": "Notificatie niet gevonden", "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", - "errors": [{ "subApiErrorCode": "0017" }], + "errors": [ + { + "code": "404", + "detail": null, + "path": null, + "parameter": null + } + ], } post: tags: @@ -555,17 +571,23 @@ paths: "isActive": False } "405": - description: Method not allowed + description: Method not allowed, ook als een notificatie aangemaakt wordt voor een account maar op een anonieme manier benadert wordt. content: application/json: example: { - "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", - "apiErrorCode": "405", - "title": "Methode ", - "detail": "Notificatie niet gevonden", + "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", + "title": "Methode niet toegestaan", + "detail": "", "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", - "errors": [{ "subApiErrorCode": "0017" }], + "errors": [ + { + "code": "405", + "detail": null, + "path": null, + "parameter": null + } + ], } /notificationsubscriptions/{notificationSubscriptionId}: patch: @@ -635,7 +657,7 @@ paths: application/json: examples: Update a notificationSubscription to inactive: - summary: Return the updated notification + summary: Return the updated inactive notification value: { "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", @@ -646,7 +668,7 @@ paths: "isActive": False } Update a notificationSubscription to active: - summary: Return the updated notification + summary: Return the updated active notification value: { "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", diff --git a/src/openapi/customers/se-maileon.yaml b/src/openapi/customers/se-maileon.yaml index 504f291..a4a8b4f 100644 --- a/src/openapi/customers/se-maileon.yaml +++ b/src/openapi/customers/se-maileon.yaml @@ -38,7 +38,7 @@ paths: required: true description: The emailadress of the customer summary: Update a customer profile - description: Update a customer profile based on the customerProfileId + description: Update a customer profile based on the customerProfileId and emailAddress requestBody: content: application/json: @@ -53,7 +53,7 @@ paths: } } responses: - "200": + "202": description: OK /notificationcategories: get: @@ -66,17 +66,16 @@ paths: - name: expand in: query schema: - type: array - items: type: string - description: Choose the records related to the category nested, options are eventType, evenTypeChannel + enum: [none, eventType, eventTypeChannel] + default: none responses: "200": description: OK content: application/json: examples: - getNotifactionCategories?Expand=eventType, evenTypeChannel, channel: + getNotifactionCategories?expand=evenTypeChannel: summary: Return all the notification categories with their nested attributes value: { @@ -247,7 +246,7 @@ paths: } ] } - getNotifactionCategories?Expand=eventType: + getNotifactionCategories?expand=eventType: summary: Return all the notification categories with nested eventTypes value: { @@ -327,7 +326,7 @@ paths: } ] } - getNotifactionCategories: + getNotifactionCategories?expand=none: summary: Return all the notification categories value: { @@ -352,12 +351,18 @@ paths: application/json: example: { - "type": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers", - "apiErrorCode": "400.1", + "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", "title": "Niet gevonden", - "detail": "Notificatiecategorie niet gevonden", + "detail": "Notificatiecategory niet gevonden", "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", - "errors": [{ "subApiErrorCode": "0017" }], + "errors": [ + { + "code": "404", + "detail": null, + "path": null, + "parameter": null + } + ], } /notificationsubscriptions: get: @@ -370,9 +375,9 @@ paths: - name: customerProfileId in: header schema: - type: string - example: feaaef83-a551-4283-8419-340b1ada3b55 - required: false + type: integer + example: 12361 + required: true description: The customerProfileId of a customer responses: "200": @@ -425,25 +430,37 @@ paths: application/json: example: { - "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", - "apiErrorCode": "403", + "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", "title": "Verboden", - "detail": "", + "detail": "Niet toegestaan", "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", - "errors": [], + "errors": [ + { + "code": "403", + "detail": null, + "path": null, + "parameter": null + } + ], } "404": description: No notification subscriptions found content: application/json: example: - { - "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", - "apiErrorCode": "404", + { + "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", "title": "Niet gevonden", - "detail": "Notificatie niet gevonden", + "detail": "Notificaties niet gevonden", "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", - "errors": [{ "subApiErrorCode": "0017" }], + "errors": [ + { + "code": "404", + "detail": null, + "path": null, + "parameter": null + } + ], } components: schemas: From 63fa5a6e9830475ac82f9e7881eb871e674de0f8 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Thu, 6 Nov 2025 09:57:11 +0100 Subject: [PATCH 16/16] fixed the mengelmoes category --- src/openapi/customers/SE-notifications.yaml | 2 +- src/openapi/customers/se-maileon.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openapi/customers/SE-notifications.yaml b/src/openapi/customers/SE-notifications.yaml index ffa39c8..1358b4b 100644 --- a/src/openapi/customers/SE-notifications.yaml +++ b/src/openapi/customers/SE-notifications.yaml @@ -315,7 +315,7 @@ paths: { "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", "title": "Niet gevonden", - "detail": "Notificatiecategory niet gevonden", + "detail": "Notificatiecategorie niet gevonden", "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", "errors": [ { diff --git a/src/openapi/customers/se-maileon.yaml b/src/openapi/customers/se-maileon.yaml index a4a8b4f..5b9b38d 100644 --- a/src/openapi/customers/se-maileon.yaml +++ b/src/openapi/customers/se-maileon.yaml @@ -353,7 +353,7 @@ paths: { "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications", "title": "Niet gevonden", - "detail": "Notificatiecategory niet gevonden", + "detail": "Notificatiecategorie niet gevonden", "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", "errors": [ {