This commit is contained in:
Mirjam Herald 2025-10-27 16:34:21 +01:00
parent b518f4fbd1
commit e73e3bd779

View File

@ -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).
@ -820,14 +607,227 @@ paths:
{
"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
}
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: