OVPAY-973 - Added query param deviceId for GET and PUT notificationpreferences.

This commit is contained in:
Bas Boterman 2026-02-05 13:13:15 +01:00
parent 97c58dc3fe
commit 2d742ca3f1

View File

@ -257,6 +257,16 @@ paths:
example: Customer example: Customer
required: false required: false
description: The role of the HTM employee in the case of the SMP description: The role of the HTM employee in the case of the SMP
- name: deviceId
in: query
schema:
type: string
format: uuid
example: 7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b
required: false
description: |
Filter only notification preferences for this device id. Note that as a result, only eventTypeChannels that have resources for this device will be returned.
Also note that once the preferences are PUT back, the deviceId should be provided again to avoid overwriting other device preferences.
get: get:
tags: tags:
- Notification preferences - Notification preferences
@ -321,8 +331,109 @@ paths:
}, },
], ],
} }
oneNotificationSubscriptionFilteredByDeviceId:
summary: Return one notification category with one subscription, filtered for 'Mijn iPhone 12'
value:
{
"notificationCategories":
[
{
"notificationCategoryId": 1,
"name": "Reizen",
"groupName": "Mijn passen",
"notificationSubscriptions":
[
{
"notificationSubscriptionId": "04ef3297-e0ff-4db6-90a4-6f0576ef4741",
"customerProfileId": 42,
"ovPayToken":
{
"ovPayTokenId": 112,
"alias": "Mijn ING bankpas",
},
"isActive": true,
"eventTypes":
[
{
"eventTypeId": 2,
"name": "GBO",
"subName": "CI",
"prettyName": "Normal Check-in",
"eventTypeChannels":
[
{
"eventTypeChannelId": "912ef811-976d-4b8d-8e39-24496335d556",
"channelId": 1,
"name": "push",
"isMandatory": false,
"resources":
[
{
"resourceName": "devices",
"resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b",
"alias": "Mijn iPhone 12",
"isActive": true,
},
],
},
],
},
{
"eventTypeId": 3,
"name": "GBO",
"subName": "CO",
"prettyName": "Normal Check-out",
"eventTypeChannels":
[
{
"eventTypeChannelId": "a1b2c3d4-e5f6-4789-abcd-1234567890ab",
"channelId": 1,
"name": "push",
"isMandatory": false,
"resources":
[
{
"resourceName": "devices",
"resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b",
"alias": "Mijn iPhone 12",
"isActive": true,
},
],
},
],
},
{
"eventTypeId": 3,
"name": "GBO",
"subName": "MISSING_CO",
"prettyName": "Missing Check-out",
"eventTypeChannels":
[
{
"eventTypeChannelId": "b2c3d4e5-f678-49ab-cdef-234567890abc",
"channelId": 1,
"name": "push",
"isMandatory": false,
"resources":
[
{
"resourceName": "devices",
"resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b",
"alias": "Mijn iPhone 12",
"isActive": true,
},
],
},
],
},
],
},
],
},
],
}
multipleNotificationCategoriesWithSubscriptions: multipleNotificationCategoriesWithSubscriptions:
summary: Return multiple notification categories with subscriptions for one customer summary: Return multiple notification categories with subscriptions for one customer, both push and mail
value: value:
{ {
"notificationCategories": "notificationCategories":
@ -683,9 +794,10 @@ paths:
{ {
"notificationSubscriptionId": "f2acafdc-0410-474f-8c8b-ba7c7b550f8e", "notificationSubscriptionId": "f2acafdc-0410-474f-8c8b-ba7c7b550f8e",
"customerProfileId": 42, "customerProfileId": 42,
"ovPayToken": { "ovPayToken":
{
"ovPayTokenId": 113, "ovPayTokenId": 113,
"alias": "Mijn OV-pas" "alias": "Mijn OV-pas",
}, },
"isActive": true, "isActive": true,
"eventTypes": "eventTypes":
@ -839,7 +951,10 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: examples:
putMultipleSubscriptionsWithoutFilter:
summary: Put all notification categories with all subscriptions for a single customer, without filtering
value:
{ {
"notificationCategories": "notificationCategories":
[ [
@ -970,9 +1085,10 @@ paths:
{ {
"notificationSubscriptionId": "8469e00a-724a-4e72-b432-fb14c939c9d3", "notificationSubscriptionId": "8469e00a-724a-4e72-b432-fb14c939c9d3",
"customerProfileId": 42, "customerProfileId": 42,
"ovPayToken": { "ovPayToken":
{
"ovPayTokenId": 113, "ovPayTokenId": 113,
"alias": "Mijn OV-pas" "alias": "Mijn OV-pas",
}, },
"isActive": true, "isActive": true,
"eventTypes": "eventTypes":
@ -1198,9 +1314,10 @@ paths:
{ {
"notificationSubscriptionId": "f2acafdc-0410-474f-8c8b-ba7c7b550f8e", "notificationSubscriptionId": "f2acafdc-0410-474f-8c8b-ba7c7b550f8e",
"customerProfileId": 42, "customerProfileId": 42,
"ovPayToken": { "ovPayToken":
{
"ovPayTokenId": 113, "ovPayTokenId": 113,
"alias": "Mijn OV-pas" "alias": "Mijn OV-pas",
}, },
"isActive": true, "isActive": true,
"eventTypes": "eventTypes":
@ -1342,6 +1459,107 @@ paths:
}, },
], ],
} }
putSingleSubscriptionFilteredByDeviceId:
summary: Put one notification category with one subscription, which is filtered for 'Mijn iPhone 12'
value:
{
"notificationCategories":
[
{
"notificationCategoryId": 1,
"name": "Reizen",
"groupName": "Mijn passen",
"notificationSubscriptions":
[
{
"notificationSubscriptionId": "04ef3297-e0ff-4db6-90a4-6f0576ef4741",
"customerProfileId": 42,
"ovPayToken":
{
"ovPayTokenId": 112,
"alias": "Mijn ING bankpas",
},
"isActive": true,
"eventTypes":
[
{
"eventTypeId": 2,
"name": "GBO",
"subName": "CI",
"prettyName": "Normal Check-in",
"eventTypeChannels":
[
{
"eventTypeChannelId": "912ef811-976d-4b8d-8e39-24496335d556",
"channelId": 1,
"name": "push",
"isMandatory": false,
"resources":
[
{
"resourceName": "devices",
"resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b",
"alias": "Mijn iPhone 12",
"isActive": true,
},
],
},
],
},
{
"eventTypeId": 3,
"name": "GBO",
"subName": "CO",
"prettyName": "Normal Check-out",
"eventTypeChannels":
[
{
"eventTypeChannelId": "a1b2c3d4-e5f6-4789-abcd-1234567890ab",
"channelId": 1,
"name": "push",
"isMandatory": false,
"resources":
[
{
"resourceName": "devices",
"resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b",
"alias": "Mijn iPhone 12",
"isActive": true,
},
],
},
],
},
{
"eventTypeId": 3,
"name": "GBO",
"subName": "MISSING_CO",
"prettyName": "Missing Check-out",
"eventTypeChannels":
[
{
"eventTypeChannelId": "b2c3d4e5-f678-49ab-cdef-234567890abc",
"channelId": 1,
"name": "push",
"isMandatory": false,
"resources":
[
{
"resourceName": "devices",
"resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b",
"alias": "Mijn iPhone 12",
"isActive": true,
},
],
},
],
},
],
},
],
},
],
}
responses: responses:
"200": "200":
description: OK description: OK
@ -1478,10 +1696,8 @@ paths:
{ {
"notificationSubscriptionId": "8469e00a-724a-4e72-b432-fb14c939c9d3", "notificationSubscriptionId": "8469e00a-724a-4e72-b432-fb14c939c9d3",
"customerProfileId": 42, "customerProfileId": 42,
"ovPayToken": { "ovPayToken":
"ovPayTokenId": 113, { "ovPayTokenId": 113, "alias": "Mijn OV-pas" },
"alias": "Mijn OV-pas"
},
"isActive": true, "isActive": true,
"eventTypes": "eventTypes":
[ [
@ -1706,10 +1922,8 @@ paths:
{ {
"notificationSubscriptionId": "f2acafdc-0410-474f-8c8b-ba7c7b550f8e", "notificationSubscriptionId": "f2acafdc-0410-474f-8c8b-ba7c7b550f8e",
"customerProfileId": 42, "customerProfileId": 42,
"ovPayToken": { "ovPayToken":
"ovPayTokenId": 113, { "ovPayTokenId": 113, "alias": "Mijn OV-pas" },
"alias": "Mijn OV-pas"
},
"isActive": true, "isActive": true,
"eventTypes": "eventTypes":
[ [