diff --git a/src/openapi/customers/SE-notifications.yaml b/src/openapi/customers/SE-notifications.yaml index 72f3f4f..1b451b6 100644 --- a/src/openapi/customers/SE-notifications.yaml +++ b/src/openapi/customers/SE-notifications.yaml @@ -12,10 +12,12 @@ tags: 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 + Service Engine APIs for the HTM Notification subscriptions for a user. + Contains the subscriptions on category level. - name: Notification preferences description: >- - //future Service Engine APIs for the HTM Notification preferences for a category for a user. Contains the discrepancies from the default. or + Service Engine APIs for the HTM Notification preferences for a category for a user. + Contains a full list on event type channel level. paths: /notificationcategories: get: @@ -232,6 +234,1622 @@ paths: }, ], } + /customers/notificationpreferences: + 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 + 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, + }, + ], + }, + ], + }, + ], + }, + ], + }, + ], + } + multipleNotificationCategoriesWithSubscriptions: + summary: Return multiple notification categories with subscriptions for one customer + 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" + 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, + }, + ], + }, + ], + }, + ], + }, + ], + }, + ], + } + 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, + }, + ], + }, + ], + }, + ], + }, + ], + }, + ], + } /notificationsubscriptions: get: tags: @@ -414,10 +2032,12 @@ paths: value: { "emailAddress": "anonymous@mymailprovider.com", - "notificationCategoryId": 1 + "notificationCategoryId": 1, } Create notificationSubscription account active: value: { "notificationCategoryId": 2 } + Create notificationSubscription for token: + value: { "notificationCategoryId": 3, "ovPayTokenId": 42 } responses: "201": description: Created @@ -442,7 +2062,10 @@ paths: { "notificationSubscriptionId": "6b88eba1-af1f-42fc-82d3-d7202d5f1afe", "notificationCategory": - { "notificationCategoryId": 2, "name": "Nieuwsbrief aanmelding" }, + { + "notificationCategoryId": 2, + "name": "Nieuwsbrief aanmelding", + }, "isActive": True, } "405": diff --git a/src/openapi/customers/customers_reference-crud.yaml b/src/openapi/customers/customers_reference-crud.yaml index e3c5a7e..8ea19c0 100644 --- a/src/openapi/customers/customers_reference-crud.yaml +++ b/src/openapi/customers/customers_reference-crud.yaml @@ -417,38 +417,56 @@ paths: example: Entries: phoneTypes: - - name: mobile + - name: Mobiel id: 1 - - name: fixed line + - name: Thuis id: 2 + - name: Ouders + id: 3 + - name: Bewindvoerder + id: 4 + - name: Home + id: 5 + - name: Mobile + id: 6 + - name: Work + id: 7 + - name: Noodtelefoon + id: 8 addressTypes: - - name: home + - name: Shipping id: 1 - - name: office + - name: Billing id: 2 customerStatuses: - - name: active + - name: Inactive id: 1 - - name: blocked + - name: Active id: 2 - - name: inactive + - name: Blocked id: 3 - - name: new + - name: Frozen id: 4 + - name: Cleared + id: 5 tokenTypes: - - name: Debit card + - name: EMV id: 1 - - name: Credit card - id: 2 - name: OVPas physical - id: 3 + id: 2 - name: OVPas digital - id: 4 + id: 3 directDebitMandateTypes: - name: Paper Contract id: 1 - name: PIN transaction id: 2 + - name: SEPA eMandate + id: 3 + - name: Digital signature + id: 4 + - name: IDEAL transaction + id: 5 tokenStatuses: - name: Expired id: 1 diff --git a/src/openapi/customers/notifications-crud.yaml b/src/openapi/customers/notifications-crud.yaml index 22821dd..e9c7db5 100644 --- a/src/openapi/customers/notifications-crud.yaml +++ b/src/openapi/customers/notifications-crud.yaml @@ -257,6 +257,7 @@ paths: value: notificationCategoryId: 1 customerProfileId: 1337 + ovPayTokenId: 42 subscriptionActivity: user: "1001337" timestamp: "2025-10-02T14:00:00Z" @@ -666,6 +667,10 @@ paths: schema: $ref: "#/components/schemas/GetNotificationCategoriesResponse" examples: + emptyNotificationCategoriesResponse: + summary: No notification categories found + value: + notificationCategories: [] getNotifactionCategories?expand=none: summary: Return all the notification categories without nested attributes (expand=none) value: @@ -1388,6 +1393,9 @@ components: customerProfileId: type: integer example: 1337 + ovPayTokenId: + type: integer + example: 42 subscriptionActivity: type: object properties: @@ -1418,14 +1426,9 @@ components: PatchNotificationSubscriptionRequest: type: object properties: - notificationCategoryId: + ovPayTokenId: type: integer - example: 1 - customerProfileId: - type: integer - example: 1337 - required: - - notificationCategoryId + example: 43 PatchNotificationSubscriptionResponse: type: object properties: diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index 1258704..4587b8c 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -324,7 +324,7 @@ paths: { "orderCustomerAddressId": "aa50047c-58ac-4f15-9448-ee000dfc6893", "addressType": - { "addressTypeId": 3, "name": "Billing" }, + { "addressTypeId": 2, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -635,7 +635,7 @@ paths: { "orderCustomerAddressId": "aa50047c-58ac-4f15-9448-ee000dfc6893", "addressType": - { "addressTypeId": 3, "name": "Billing" }, + { "addressTypeId": 2, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -1046,7 +1046,7 @@ paths: "orderCustomerAddresses": [ { - "addressTypeId": 3, + "addressTypeId": 2, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -2328,7 +2328,7 @@ paths: { "orderCustomerAddressId": "aa50047c-58ac-4f15-9448-ee000dfc6893", "addressType": - { "addressTypeId": 3, "name": "Billing" }, + { "addressTypeId": 2, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -2398,7 +2398,7 @@ paths: $ref: "#/components/schemas/unavailable" example: { - "addressTypeId": 3, + "addressTypeId": 2, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -2448,7 +2448,7 @@ paths: type: integer explode: false required: false - description: Filter on possible types of addresses. 1 = Shipping, 3 = Billing. + description: Filter on possible types of addresses. 1 = Shipping, 2 = Billing. - in: query name: street schema: @@ -2504,7 +2504,7 @@ paths: "orderCustomerAddressId": "aa50047c-58ac-4f15-9448-ee000dfc6893", "orderCustomerId": "540d8b7a-d626-443f-8f99-c24398604d7a", "orderId": "73cca95a-81d1-468f-a8bf-99b36367001a", - "addressType": { "addressTypeId": 3, "name": "Billing" }, + "addressType": { "addressTypeId": 2, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index adaebe9..38c3e5a 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -1314,7 +1314,7 @@ paths: { "orderCustomerAddressId": "aa50047c-58ac-4f15-9448-ee000dfc6893", "addressType": - { "addressTypeId": 3, "name": "Billing" }, + { "addressTypeId": 2, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -3688,7 +3688,7 @@ paths: { "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", "addressType": - { "addressTypeId": 3, "name": "Billing" }, + { "addressTypeId": 2, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -3965,7 +3965,7 @@ paths: { "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", "addressTypeId": - { "addressTypeId": 3, "name": "Billing" }, + { "addressTypeId": 2, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -4174,7 +4174,7 @@ paths: { "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", "addressTypeId": - { "addressTypeId": 3, "name": "Billing" }, + { "addressTypeId": 2, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -4226,7 +4226,7 @@ paths: "orderCustomerAddresses": [ { - "addressTypeId": 3, + "addressTypeId": 2, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -4433,7 +4433,7 @@ paths: { "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", "addressType": - { "addressTypeId": 3, "name": "Billing" }, + { "addressTypeId": 2, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -4680,7 +4680,7 @@ paths: { "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", "addressType": - { "addressTypeId": 3, "name": "Billing" }, + { "addressTypeId": 2, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -4724,7 +4724,7 @@ paths: description: Add an address to a customer on an order value: { - "addressTypeId": 3, + "addressTypeId": 2, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -4935,7 +4935,7 @@ paths: { "orderCustomerAddressId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", "addressType": - { "addressTypeId": 3, "name": "Billing" }, + { "addressTypeId": 2, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 10, "houseNumberSuffix": "a", @@ -4979,7 +4979,7 @@ paths: description: Update order customer address value: { - "addressTypeId": 3, + "addressTypeId": 2, "street": "Kon. Julianaplein", "houseNumber": 101, "houseNumberSuffix": "a", @@ -5190,7 +5190,7 @@ paths: { "orderCustomerAddressId": "94270188-4cf6-447e-bd49-e8186bcec073", "addressType": - { "addressTypeId": 3, "name": "Billing" }, + { "addressTypeId": 2, "name": "Billing" }, "street": "Kon. Julianaplein", "houseNumber": 101, "houseNumberSuffix": "a", diff --git a/src/openapi/products/vouchers-se.yaml b/src/openapi/products/vouchers-se.yaml new file mode 100644 index 0000000..c8423d2 --- /dev/null +++ b/src/openapi/products/vouchers-se.yaml @@ -0,0 +1,211 @@ +openapi: 3.0.1 +info: + title: Service Engine APIs for HTM vouchers + description: Service Engine APIs for HTM vouchers. These are NOT the CRUD APIs to the data hub. + version: "1.0" +servers: + - url: https://services.acc.api.htm.nl/abt/abtvouchers/1.0 +paths: + /issuedvouchers/{voucherCode}: + get: + summary: Get voucher details by voucher code + description: Retrieve voucher details using its unique voucher code. + parameters: + - name: voucherCode + in: path + required: true + description: The unique code of the voucher details to retrieve. + schema: + type: string + tags: + - Vouchers + responses: + "200": + description: Successful retrieval of voucher instance + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Voucher for a product with required attributes: + summary: Voucher for a single product with required attributes + value: + { + "issuedVoucher": + { + "issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90", + "voucherCode": "VOUCHER123", + "fromInclusive": "2024-10-04T00:00:00.000", + "untilInclusive": "2024-11-04T00:00:00.000", + "voucherStatus": + { "voucherStatusId": 1, "name": "New" }, + "product": + { + "productId": 263, + "productName": "HTM-80001", + "productDescription": "10 euro korting op Regiovrij maand.", + "productCategory": + { + "productCategoryId": 9, + "isTravelProduct": false, + "name": "Voucher", + }, + "amountInclTax": -1000, + "requiredProducts": + [ + { + "productId": 126, + "productName": "HTM-30001", + "productDescription": "Reis met 20% korting op je betaalpas bij HTM.", + "_links": + { + "get_details": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/products/126", + "method": "GET", + }, + }, + }, + ], + "_links": + { + "get_details": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/products/263", + "method": "GET", + }, + }, + }, + "mandatoryCustomerDataItems": + [ + { + "mandatoryCustomerDataItemId": 8, + "customerDataItem": "padBirthDate", + }, + { + "mandatoryCustomerDataItemId": 4, + "customerDataItem": "emailAddress", + }, + ], + }, + } + Voucher for a whole order: + summary: Voucher for a whole order + value: + { + "issuedVoucher": + { + "issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90", + "voucherCode": "VOUCHER123", + "fromInclusive": "2024-10-04T00:00:00.000", + "untilInclusive": "2024-11-04T00:00:00.000", + "voucherStatus": + { "voucherStatusId": 1, "name": "New" }, + "product": + { + "productId": 263, + "productName": "HTM-80002", + "productDescription": "10 euro korting op je gehele winkelmand.", + "productCategory": + { + "productCategoryId": 9, + "isTravelProduct": false, + "name": "Voucher", + }, + "amountInclTax": -1000, + "requiredProducts": [], + "_links": + { + "get_details": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/products/263", + "method": "GET", + }, + }, + }, + }, + "mandatoryCustomerDataItems": [], + } + "403": + description: Forbidden + content: + application/problem+json: + schema: + $ref: "#/components/schemas/rfc9457" + examples: + Access denied due to insufficient permissions: + summary: Access denied due to insufficient permissions + value: + { + "type": "https://example.com/probs/forbidden", + "title": "Access denied", + "detail": "You do not have permission to access this resource.", + "instance": "/issuedvouchers/VOUCHER123", + } + "404": + description: Not found + content: + application/problem+json: + schema: + $ref: "#/components/schemas/rfc9457" + examples: + Voucher not found: + summary: Voucher not found + value: + { + "type": "https://example.com/probs/not-found", + "title": "Voucher not found", + "detail": "The voucher with code VOUCHER123 does not exist.", + "instance": "/issuedvouchers/VOUCHER123", + } + "500": + description: Internal server error + content: + application/problem+json: + schema: + $ref: "#/components/schemas/rfc9457" + examples: + Unexpected server error: + summary: Unexpected server error + value: + { + "type": "https://example.com/probs/internal-server-error", + "title": "Internal Server Error", + "detail": "An unexpected error occurred while processing your request.", + "instance": "/issuedvouchers/VOUCHER123", + } +components: + securitySchemes: + bearerToken: + type: http + scheme: bearer + bearerFormat: JWT + schemas: + unavailable: + type: object + rfc9457: + type: object + properties: + type: + type: string + format: url + example: https://example.com/probs/out-of-credit + title: + type: string + example: You do not have enough credit. + detail: + type: string + example: Your current balance is 30, but that costs 50. + instance: + type: string + example: /account/12345/msgs/abc + balance: + type: string + example: 30 + accounts: + type: array + items: + type: string + example: + - /account/12345 + - /account/67890