features/TP-notifications #34

Merged
MirjamHTM merged 16 commits from features/TP-notifications into develop 2025-11-06 09:18:20 +00:00
Showing only changes of commit b518f4fbd1 - Show all commits

View File

@ -14,18 +14,26 @@ paths:
/notificationcategories: /notificationcategories:
get: get:
tags: tags:
- Notifications - Notification categories
summary: Get notification categories and optins for that category that a touchpoint can show. summary: Get notification categories and optins for that category that a touchpoint can show.
description: | description: |
Get notification categories that a touchpoint can show and optins ( eventTypes) and channels (eventType_channels) for the optin for that category 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: responses:
"200": "200":
description: OK description: OK
Review

Klopt het dat dit een array is? Kun je meerdere kiezen?

Ik dacht, is een enum niet mooier?

        - name: expand
          in: query
          schema: 
            type: string
            enum: [none, eventType, eventTypeChannel]
Klopt het dat dit een array is? Kun je meerdere kiezen? Ik dacht, is een enum niet mooier? ``` - name: expand in: query schema: type: string enum: [none, eventType, eventTypeChannel] ```
Review

Done

Done
content: content:
application/json: application/json:
examples: examples:
getNotifactionCategoriesWithAccount: getNotifactionCategories?Expand=eventType, evenTypeChannel, channel:
summary: Return all the notification categories summary: Return all the notification categories with their nested attributes
value: value:
{ {
"notificationCategories":[ "notificationCategories":[
@ -198,8 +206,8 @@ paths:
} }
] ]
} }
getNotifactionCategoriesWithoutAccount: getNotifactionCategories?Expand=eventType:
summary: Return the anonymous notification categories when the user does not have an account / is not logged in summary: Return all the notification categories with nested eventTypes
value: value:
{ {
"notificationCategories":[ "notificationCategories":[
@ -217,20 +225,89 @@ paths:
"name": "HTM nieuwsbrief", "name": "HTM nieuwsbrief",
"subName": "", "subName": "",
"prettyName": "HTM nieuwsbrief", "prettyName": "HTM nieuwsbrief",
"optinRequired": False, "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": 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: application/json:
examples: examples:
getNotifactionSubscriptionsWithAccountNestedTrue: 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: value:
{ {
"customer":{ "customer":{
"customerProfileId":"f1ba488b-7b2f-46c2-b72f-f24fe25a81e5",
"emailAddress": "j.jansen@mymailprovider.nl", "emailAddress": "j.jansen@mymailprovider.nl",
"isEmailVerified": True "isEmailVerified": True
}, },
@ -324,7 +402,6 @@ paths:
} }
] ]
} }
] ]
} }
] ]
@ -512,10 +589,9 @@ paths:
] ]
} }
getNotifactionSubscriptionsWithAccountNestedFalse: 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: value:
{ {
"notificationSubscriptions":[ "notificationSubscriptions":[
{ {
"notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", "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": "404":
description: No notification subscriptions found description: No notification subscriptions found
content: content:
application/json: application/json:
example: example:
{ {
"type": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers", "type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications",
"apiErrorCode": "400.1", "apiErrorCode": "404",
"title": "Niet gevonden", "title": "Niet gevonden",
"detail": "Notificatie niet gevonden", "detail": "Notificatie niet gevonden",
"instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7",
@ -643,14 +801,13 @@ paths:
Update a notificationSubscription to inactive: Update a notificationSubscription to inactive:
value: value:
{ {
"isActive": False "isActive": False
} }
Update a notificationSubscription to active: Update a notificationSubscription to active:
value: value:
{ {
"isActive": True "isActive": True
} }
responses: responses:
"200": "200":
description: OK description: OK
@ -658,53 +815,18 @@ paths:
application/json: application/json:
examples: examples:
Update a notificationSubscription to inactive: 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: value:
{ {
"notificationSubscriptions":[ "notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae",
{ "notificationCategoryId": 1,
"notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae", "eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd",
"notificationCategoryId": 1, "customer":{
"eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd", "emailAddress": "j.jansen@mymailprovider.nl",
"customer":{ "isEmailVerified": True
"emailAddress": "j.jansen@mymailprovider.nl", },
"isEmailVerified": True "ovpayTokenId": null,
}, "isActive": False
"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: components:
schemas: schemas: