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: