diff --git a/src/openapi/container/abt-container-notifications.yaml b/src/openapi/container/abt-container-notifications.yaml new file mode 100644 index 0000000..9143c68 --- /dev/null +++ b/src/openapi/container/abt-container-notifications.yaml @@ -0,0 +1,1841 @@ +openapi: 3.0.1 +info: + title: ABT Container APIs for Notifications + description: >- + ABT Containere 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/container/1.0 +tags: + - 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. + - name: Notification preferences + description: >- + Service Engine APIs for the HTM Notification preferences for a category for a user. + Contains a full list on event type channel level. +paths: + /customers/{customerProfileId}/notificationpreferences: + parameters: + - name: customerProfileId + in: path + schema: + type: integer + example: 123 + required: true + description: The identifier of the customer who wants to access their notification preferences + - 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: + tags: + - Notification preferences + summary: Get notification categories and optins references for that category that a touchpoint can show for a specific customer. + description: | + Get notification categories that a touchpoint can show and optins ( eventTypes) and channels (eventType_channels) for the optin for that category for a specific customer. + responses: + "200": + description: OK + content: + application/json: + examples: + noNotificationSubscriptions: + summary: Return no notification categories with subscriptions + value: { "notificationCategories": [] } + oneNotificationCategoryWithSubscription: + summary: Return one notification category with one subscription + value: + { + "notificationCategories": + [ + { + "notificationCategoryId": 2, + "name": "Nieuwsbrief aanmelding", + "groupName": "Marketing", + "notificationSubscriptions": + [ + { + "notificationSubscriptionId": "af6305d3-f95d-42af-b22a-4181594d45dc", + "customerProfileId": 42, + "ovPayTokenId": null, + "isActive": true, + "eventTypes": + [ + { + "eventTypeId": 1, + "name": "newsletter", + "subName": null, + "prettyName": "HTM Nieuwsbrief", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "29cfcde2-c2f9-4548-a65e-d7789e3decc2", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": true, + }, + ], + }, + ], + }, + ], + }, + ], + }, + ], + } + 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: + summary: Return multiple notification categories with subscriptions for one customer, both push and mail + 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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + ], + }, + { + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": true, + }, + ], + }, + { + "eventTypeChannelId": "c3d4e5f6-789a-4bcd-ef01-34567890abcd", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": true, + }, + ], + }, + ], + }, + ], + }, + { + "notificationSubscriptionId": "8469e00a-724a-4e72-b432-fb14c939c9d3", + "customerProfileId": 42, + "ovPayToken": + { + "ovPayTokenId": 113, + "alias": "Mijn OV-pas", + }, + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + ], + }, + { + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + { + "eventTypeChannelId": "c3d4e5f6-789a-4bcd-ef01-34567890abcd", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": false, + }, + ], + }, + ], + }, + ], + }, + ], + }, + { + "notificationCategoryId": 4, + "name": "Producten", + "groupName": "Mijn passen", + "notificationSubscriptions": + [ + { + "notificationSubscriptionId": "af6305d3-f95d-42af-b22a-4181594d45dc", + "customerProfileId": 42, + "ovPayToken": + { + "ovPayTokenId": 112, + "alias": "Mijn ING bankpas", + }, + "isActive": true, + "eventTypes": + [ + { + "eventTypeId": 8, + "name": "GBO", + "subName": "PRODUCT_ACTIVATED", + "prettyName": "Product Activated", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "912ef811-976d-4b8d-8e39-24496335d556", + "channelId": 1, + "name": "push", + "isMandatory": true, + "resources": + [ + { + "resourceName": "devices", + "resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b", + "alias": "Mijn iPhone 12", + "isActive": true, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": true, + }, + ], + }, + { + "eventTypeChannelId": "f6789abc-def0-1234-5678-90abcdef1234", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": true, + }, + ], + }, + ], + }, + { + "eventTypeId": 9, + "name": "GBO", + "subName": "PRODUCT_REFUNDED", + "prettyName": "Product Refunded", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "b2c3d4e5-f678-49ab-cdef-234567890abc", + "channelId": 1, + "name": "push", + "isMandatory": true, + "resources": + [ + { + "resourceName": "devices", + "resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b", + "alias": "Mijn iPhone 12", + "isActive": true, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + { + "eventTypeChannelId": "f6789abc-def0-1234-5678-90abcdef1234", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": false, + }, + ], + }, + ], + }, + ], + }, + { + "notificationSubscriptionId": "f2acafdc-0410-474f-8c8b-ba7c7b550f8e", + "customerProfileId": 42, + "ovPayToken": + { + "ovPayTokenId": 113, + "alias": "Mijn OV-pas", + }, + "isActive": true, + "eventTypes": + [ + { + "eventTypeId": 8, + "name": "GBO", + "subName": "PRODUCT_ACTIVATED", + "prettyName": "Product Activated", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "912ef811-976d-4b8d-8e39-24496335d556", + "channelId": 1, + "name": "push", + "isMandatory": true, + "resources": + [ + { + "resourceName": "devices", + "resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b", + "alias": "Mijn iPhone 12", + "isActive": true, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": true, + }, + ], + }, + { + "eventTypeChannelId": "f6789abc-def0-1234-5678-90abcdef1234", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": false, + }, + ], + }, + ], + }, + { + "eventTypeId": 9, + "name": "GBO", + "subName": "PRODUCT_REFUNDED", + "prettyName": "Product Refunded", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "b2c3d4e5-f678-49ab-cdef-234567890abc", + "channelId": 1, + "name": "push", + "isMandatory": true, + "resources": + [ + { + "resourceName": "devices", + "resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b", + "alias": "Mijn iPhone 12", + "isActive": true, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + { + "eventTypeChannelId": "f6789abc-def0-1234-5678-90abcdef1234", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": true, + }, + ], + }, + ], + }, + ], + }, + ], + }, + { + "notificationCategoryId": 2, + "name": "Nieuwsbrief aanmelding", + "groupName": "Marketing", + "notificationSubscriptions": + [ + { + "notificationSubscriptionId": "af6305d3-f95d-42af-b22a-4181594d45dc", + "customerProfileId": 42, + "ovPayTokenId": null, + "isActive": true, + "eventTypes": + [ + { + "eventTypeId": 1, + "name": "HTM", + "subName": "NEWSLETTER", + "prettyName": "HTM Nieuwsbrief", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "29cfcde2-c2f9-4548-a65e-d7789e3decc2", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": true, + }, + ], + }, + ], + }, + ], + }, + ], + }, + ], + } + put: + tags: + - Notification preferences + summary: Get notification categories and optins references for that category that a touchpoint can show for a specific customer. + description: | + Get notification categories that a touchpoint can show and optins ( eventTypes) and channels (eventType_channels) for the optin for that category for a specific customer. + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + putMultipleSubscriptionsWithoutFilter: + summary: Put all notification categories with all subscriptions for a single customer, without filtering + 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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + ], + }, + { + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": true, + }, + ], + }, + { + "eventTypeChannelId": "c3d4e5f6-789a-4bcd-ef01-34567890abcd", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": true, + }, + ], + }, + ], + }, + ], + }, + { + "notificationSubscriptionId": "8469e00a-724a-4e72-b432-fb14c939c9d3", + "customerProfileId": 42, + "ovPayToken": + { + "ovPayTokenId": 113, + "alias": "Mijn OV-pas", + }, + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + ], + }, + { + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + { + "eventTypeChannelId": "c3d4e5f6-789a-4bcd-ef01-34567890abcd", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": false, + }, + ], + }, + ], + }, + ], + }, + ], + }, + { + "notificationCategoryId": 4, + "name": "Producten", + "groupName": "Mijn passen", + "notificationSubscriptions": + [ + { + "notificationSubscriptionId": "af6305d3-f95d-42af-b22a-4181594d45dc", + "customerProfileId": 42, + "ovPayToken": + { + "ovPayTokenId": 112, + "alias": "Mijn ING bankpas", + }, + "isActive": true, + "eventTypes": + [ + { + "eventTypeId": 8, + "name": "GBO", + "subName": "PRODUCT_ACTIVATED", + "prettyName": "Product Activated", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "912ef811-976d-4b8d-8e39-24496335d556", + "channelId": 1, + "name": "push", + "isMandatory": true, + "resources": + [ + { + "resourceName": "devices", + "resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b", + "alias": "Mijn iPhone 12", + "isActive": true, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": true, + }, + ], + }, + { + "eventTypeChannelId": "f6789abc-def0-1234-5678-90abcdef1234", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": true, + }, + ], + }, + ], + }, + { + "eventTypeId": 9, + "name": "GBO", + "subName": "PRODUCT_REFUNDED", + "prettyName": "Product Refunded", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "b2c3d4e5-f678-49ab-cdef-234567890abc", + "channelId": 1, + "name": "push", + "isMandatory": true, + "resources": + [ + { + "resourceName": "devices", + "resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b", + "alias": "Mijn iPhone 12", + "isActive": true, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + { + "eventTypeChannelId": "f6789abc-def0-1234-5678-90abcdef1234", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": false, + }, + ], + }, + ], + }, + ], + }, + { + "notificationSubscriptionId": "f2acafdc-0410-474f-8c8b-ba7c7b550f8e", + "customerProfileId": 42, + "ovPayToken": + { + "ovPayTokenId": 113, + "alias": "Mijn OV-pas", + }, + "isActive": true, + "eventTypes": + [ + { + "eventTypeId": 8, + "name": "GBO", + "subName": "PRODUCT_ACTIVATED", + "prettyName": "Product Activated", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "912ef811-976d-4b8d-8e39-24496335d556", + "channelId": 1, + "name": "push", + "isMandatory": true, + "resources": + [ + { + "resourceName": "devices", + "resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b", + "alias": "Mijn iPhone 12", + "isActive": true, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": true, + }, + ], + }, + { + "eventTypeChannelId": "f6789abc-def0-1234-5678-90abcdef1234", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": false, + }, + ], + }, + ], + }, + { + "eventTypeId": 9, + "name": "GBO", + "subName": "PRODUCT_REFUNDED", + "prettyName": "Product Refunded", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "b2c3d4e5-f678-49ab-cdef-234567890abc", + "channelId": 1, + "name": "push", + "isMandatory": true, + "resources": + [ + { + "resourceName": "devices", + "resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b", + "alias": "Mijn iPhone 12", + "isActive": true, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + { + "eventTypeChannelId": "f6789abc-def0-1234-5678-90abcdef1234", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": true, + }, + ], + }, + ], + }, + ], + }, + ], + }, + { + "notificationCategoryId": 2, + "name": "Nieuwsbrief aanmelding", + "groupName": "Marketing", + "notificationSubscriptions": + [ + { + "notificationSubscriptionId": "af6305d3-f95d-42af-b22a-4181594d45dc", + "customerProfileId": 42, + "ovPayTokenId": null, + "isActive": true, + "eventTypes": + [ + { + "eventTypeId": 1, + "name": "HTM", + "subName": "NEWSLETTER", + "prettyName": "HTM Nieuwsbrief", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "29cfcde2-c2f9-4548-a65e-d7789e3decc2", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": true, + }, + ], + }, + ], + }, + ], + }, + ], + }, + ], + } + 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: + "200": + description: OK + content: + application/json: + example: + { + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + ], + }, + { + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": true, + }, + ], + }, + { + "eventTypeChannelId": "c3d4e5f6-789a-4bcd-ef01-34567890abcd", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": true, + }, + ], + }, + ], + }, + ], + }, + { + "notificationSubscriptionId": "8469e00a-724a-4e72-b432-fb14c939c9d3", + "customerProfileId": 42, + "ovPayToken": + { "ovPayTokenId": 113, "alias": "Mijn OV-pas" }, + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + ], + }, + { + "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, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + { + "eventTypeChannelId": "c3d4e5f6-789a-4bcd-ef01-34567890abcd", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": false, + }, + ], + }, + ], + }, + ], + }, + ], + }, + { + "notificationCategoryId": 4, + "name": "Producten", + "groupName": "Mijn passen", + "notificationSubscriptions": + [ + { + "notificationSubscriptionId": "af6305d3-f95d-42af-b22a-4181594d45dc", + "customerProfileId": 42, + "ovPayToken": + { + "ovPayTokenId": 112, + "alias": "Mijn ING bankpas", + }, + "isActive": true, + "eventTypes": + [ + { + "eventTypeId": 8, + "name": "GBO", + "subName": "PRODUCT_ACTIVATED", + "prettyName": "Product Activated", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "912ef811-976d-4b8d-8e39-24496335d556", + "channelId": 1, + "name": "push", + "isMandatory": true, + "resources": + [ + { + "resourceName": "devices", + "resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b", + "alias": "Mijn iPhone 12", + "isActive": true, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": true, + }, + ], + }, + { + "eventTypeChannelId": "f6789abc-def0-1234-5678-90abcdef1234", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": true, + }, + ], + }, + ], + }, + { + "eventTypeId": 9, + "name": "GBO", + "subName": "PRODUCT_REFUNDED", + "prettyName": "Product Refunded", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "b2c3d4e5-f678-49ab-cdef-234567890abc", + "channelId": 1, + "name": "push", + "isMandatory": true, + "resources": + [ + { + "resourceName": "devices", + "resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b", + "alias": "Mijn iPhone 12", + "isActive": true, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + { + "eventTypeChannelId": "f6789abc-def0-1234-5678-90abcdef1234", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": false, + }, + ], + }, + ], + }, + ], + }, + { + "notificationSubscriptionId": "f2acafdc-0410-474f-8c8b-ba7c7b550f8e", + "customerProfileId": 42, + "ovPayToken": + { "ovPayTokenId": 113, "alias": "Mijn OV-pas" }, + "isActive": true, + "eventTypes": + [ + { + "eventTypeId": 8, + "name": "GBO", + "subName": "PRODUCT_ACTIVATED", + "prettyName": "Product Activated", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "912ef811-976d-4b8d-8e39-24496335d556", + "channelId": 1, + "name": "push", + "isMandatory": true, + "resources": + [ + { + "resourceName": "devices", + "resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b", + "alias": "Mijn iPhone 12", + "isActive": true, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": true, + }, + ], + }, + { + "eventTypeChannelId": "f6789abc-def0-1234-5678-90abcdef1234", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": false, + }, + ], + }, + ], + }, + { + "eventTypeId": 9, + "name": "GBO", + "subName": "PRODUCT_REFUNDED", + "prettyName": "Product Refunded", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "b2c3d4e5-f678-49ab-cdef-234567890abc", + "channelId": 1, + "name": "push", + "isMandatory": true, + "resources": + [ + { + "resourceName": "devices", + "resourceIdentifier": "7b3379b8-fb12-41f5-94a8-0d3f0fbcf55b", + "alias": "Mijn iPhone 12", + "isActive": true, + }, + { + "resourceName": "devices", + "resourceIdentifier": "52ad19c1-f6f7-403d-b577-df7219aa6ab4", + "alias": "Mijn Pixel 9 Pro", + "isActive": false, + }, + ], + }, + { + "eventTypeChannelId": "f6789abc-def0-1234-5678-90abcdef1234", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": true, + }, + ], + }, + ], + }, + ], + }, + ], + }, + { + "notificationCategoryId": 2, + "name": "Nieuwsbrief aanmelding", + "groupName": "Marketing", + "notificationSubscriptions": + [ + { + "notificationSubscriptionId": "af6305d3-f95d-42af-b22a-4181594d45dc", + "customerProfileId": 42, + "ovPayTokenId": null, + "isActive": true, + "eventTypes": + [ + { + "eventTypeId": 1, + "name": "HTM", + "subName": "NEWSLETTER", + "prettyName": "HTM Nieuwsbrief", + "eventTypeChannels": + [ + { + "eventTypeChannelId": "29cfcde2-c2f9-4548-a65e-d7789e3decc2", + "channelId": 2, + "name": "email", + "isMandatory": false, + "resources": + [ + { + "resourceName": "customers", + "resourceIdentifier": "42", + "alias": "stasjo.van.bakel@htm.nl", + "isActive": true, + }, + ], + }, + ], + }, + ], + }, + ], + }, + ], + } +components: + schemas: + unavailable: + type: object diff --git a/src/openapi/container/abt-container-tokens.yaml b/src/openapi/container/abt-container-tokens.yaml new file mode 100644 index 0000000..ee4dca2 --- /dev/null +++ b/src/openapi/container/abt-container-tokens.yaml @@ -0,0 +1,143 @@ +openapi: 3.0.1 +info: + title: Integraion layer APIs for token storage for ABT + description: >- + APIs that give business processes access to the security and authorization state of a token within the scope of HTM. In the backend this is connected to a container which handles the accessToken en refreshToken management. + version: "2.0" +servers: + - url: https://services.acc.api.htm.nl/abt/containertokens/1.0 +tags: + - name: tokens +paths: + /tokens/{xtat}/status: + parameters: + - name: xtat + in: path + schema: + type: string + example: uuid + required: true + description: The xTAT for the token for which the status needs to be checked + - name: customerProfileId + in: query + schema: + type: integer + example: 323 + required: false + description: The id of the customer Profile for which the request is being done, if customer has identified themselves + get: + tags: + - tokens + summary: Request the security and authorization status of an OV pas token + description: Request the security and authorization status of an OV pas token, if the customerProfileId has been supplied look in the customerToken DB otherwise check the AnonymousToken DB. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/TokenStatusResponse" + example: + isApproved: false + isSecured: false + "400": + description: Bad Request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + Missing Parameters: + value: + status: 400 + title: Missing Mandatory Parameter + detail: Required parameter {0} is missing. + Invalid Parameters: + value: + status: 400 + title: Invalid Parameter + detail: Required parameter {0} is invalid. + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + Unauthorized: + value: + status: 401 + title: Unauthorized + detail: Invalid Access Token + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + examples: + TAT not found: + value: + status: 404 + title: Not Found + detail: TAT Account Not Found + "500": + description: Internal server error + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + example: + error: An unknown error has occurred +components: + schemas: + unavailable: + type: object + GenerateTatOutput: + type: object + properties: + uid: + type: string + description: >- + An uid IS A unique identifier THAT is associated with the + user. + recipient: + type: string + description: >- + A recipient IS A unique identifier THAT is associated with the + TAT owner. + key: + type: string + description: >- + A key IS a 32 character string THAT uniquely identifies the + OTP session. + ErrorResponse: + description: Default response when an invalid request has been sent + type: object + properties: + status: + type: integer + description: >- + A status IS An integer that represents the HTTP status code of the + response. + example: 400 + title: + type: string + description: A title IS A string that provides a brief summary of the error. + detail: + type: string + description: A detail IS A string that provides more details about the error. + TokenStatusResponse: + description: Default response when an invalid request has been sent + type: object + properties: + isSecured: + type: boolean + description: >- + Is the OVpas secured according to the GBO + example: False + isAuthorized: + type: boolean + description: >- + Does HTM have the authorization to access the secured the data of the OVpas + example: False \ No newline at end of file