added nesting to response subscriptions
This commit is contained in:
parent
d7d9c23a5a
commit
f2d8532f7f
@ -15,31 +15,9 @@ paths:
|
||||
get:
|
||||
tags:
|
||||
- Notifications
|
||||
summary: Get notification categories that a person can opt in for, can also be accessed anonymously
|
||||
summary: Get notification categories and optins for that category that a touchpoint can show.
|
||||
description: |
|
||||
Get notification categories that a person can opt in for, can also be accessed anonymously. If accessed anonymously, it only returns the categories for which a user does not need to have an account.
|
||||
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 notification categories that a touchpoint can show and optins ( eventTypes) and channels (eventType_channels) for the optin for that category
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
@ -47,7 +25,7 @@ paths:
|
||||
application/json:
|
||||
examples:
|
||||
getNotifactionCategoriesWithAccount:
|
||||
summary: Return all the notification categories when the user has an account
|
||||
summary: Return all the notification categories
|
||||
value:
|
||||
{
|
||||
"notificationCategories":[
|
||||
@ -86,7 +64,7 @@ paths:
|
||||
"optinRequired": False,
|
||||
"eventTypes": [
|
||||
{
|
||||
"eventTypeId": 1,
|
||||
"eventTypeId": 2,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 1,
|
||||
"name": "GBO"
|
||||
@ -117,7 +95,7 @@ paths:
|
||||
]
|
||||
},
|
||||
{
|
||||
"eventTypeId": 2,
|
||||
"eventTypeId": 3,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 1,
|
||||
"name": "GBO"
|
||||
@ -154,7 +132,8 @@ paths:
|
||||
"name": "Mijn Passen",
|
||||
"optinRequired": False,
|
||||
"eventTypes": [
|
||||
{
|
||||
{
|
||||
"eventTypeId": 4,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 1,
|
||||
"name": "GBO"
|
||||
@ -185,6 +164,7 @@ paths:
|
||||
]
|
||||
},
|
||||
{
|
||||
"eventTypeId": 5,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 1,
|
||||
"name": "GBO"
|
||||
@ -271,9 +251,9 @@ paths:
|
||||
get:
|
||||
tags:
|
||||
- Notifications
|
||||
summary: Get a notificationSubscription for a customer (account or private).
|
||||
summary: Get all possible notificationSubscriptions for a customer (account or private).
|
||||
description: |
|
||||
Get a notificationSubscription for a customer (account or private).
|
||||
Get all possible notificationSubscriptions for a customer (account or private), including if they have opted-in for it.
|
||||
parameters:
|
||||
- name: X-HTM-JWT-AUTH-HEADER
|
||||
in: header
|
||||
@ -304,16 +284,238 @@ paths:
|
||||
example: john.doe@mymailprovider.com
|
||||
required: false
|
||||
description: The emailadress of the customer in the case of anonymous opt-ins
|
||||
- name: nested
|
||||
in: query
|
||||
schema:
|
||||
type: boolean
|
||||
default: true
|
||||
required: false
|
||||
description: Return subscriptions nested, so it is presentation ready for touchpoint (default), if false only return the notificationSubcriptions as a flat list
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
examples:
|
||||
getNotifactionSubscriptionsWithAccount:
|
||||
getNotifactionSubscriptionsWithAccountNestedTrue:
|
||||
summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP
|
||||
value:
|
||||
{
|
||||
"customer":{
|
||||
"emailAddress": "j.jansen@mymailprovider.nl",
|
||||
"isEmailVerified": True
|
||||
},
|
||||
"notificationCategory":[
|
||||
{
|
||||
"notificationCategoryId": 1,
|
||||
"status": "on",
|
||||
"eventTypes":[
|
||||
{
|
||||
"eventTypeId": 1,
|
||||
"status": "on",
|
||||
"eventTypeChannels":[
|
||||
{
|
||||
"eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd",
|
||||
"notificationSubscriptions":[
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayToken": null,
|
||||
"isActive": True
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"notificationCategoryId": 2,
|
||||
"status": "off",
|
||||
"eventTypes":[
|
||||
{
|
||||
"eventTypeId": 2,
|
||||
"status": "off",
|
||||
"eventTypeChannels":[
|
||||
{
|
||||
"eventTypeChannelId": "ccc8c025-06b5-4928-a632-23e1c55cd173",
|
||||
"notificationSubscriptions":[
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayToken":{
|
||||
"ovPayTokenId": 134,
|
||||
"alias": "Mijn Rabopas"
|
||||
},
|
||||
"isActive": False
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayToken": {
|
||||
"ovPayTokenId": 138,
|
||||
"alias": "Mijn ING pas"
|
||||
},
|
||||
"isActive": False
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"eventTypeChannelId": "da2deb4c-ce77-4b5f-aecc-ddebfd14349d",
|
||||
"notificationSubscriptions":[
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayToken":{
|
||||
"ovPayTokenId": 134,
|
||||
"alias": "Mijn Rabopas"
|
||||
},
|
||||
"isActive": False
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayToken": {
|
||||
"ovPayTokenId": 138,
|
||||
"alias": "Mijn ING pas"
|
||||
},
|
||||
"isActive": False
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"eventTypeId": 3,
|
||||
"status": "off",
|
||||
"eventTypeChannels":[
|
||||
{
|
||||
"eventTypeChannelId": "8e7df8f1-7e50-482f-8301-d399e75fd432",
|
||||
"notificationSubscriptions":[
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayTokenId": 136,
|
||||
"isActive": False
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayTokenId": 138,
|
||||
"isActive": False
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"eventTypeChannelId": "72960a92-1855-469f-9cfd-5d72f57106f2",
|
||||
"notificationSubscriptions":[
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayTokenId": 136,
|
||||
"isActive": False
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayTokenId": 138,
|
||||
"isActive": False
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"notificationCategoryId": 3,
|
||||
"status": "partial",
|
||||
"eventTypes":[
|
||||
{
|
||||
"eventTypeId": 4,
|
||||
"status": "on",
|
||||
"eventTypeChannels":[
|
||||
{
|
||||
"eventTypeChannelId": "ccc8c025-06b5-4928-a632-23e1c55cd173",
|
||||
"notificationSubscriptions":[
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayToken":{
|
||||
"ovPayTokenId": 134,
|
||||
"alias": "Mijn Rabopas"
|
||||
},
|
||||
"isActive": True
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayToken": {
|
||||
"ovPayTokenId": 138,
|
||||
"alias": "Mijn ING pas"
|
||||
},
|
||||
"isActive": False
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"eventTypeChannelId": "da2deb4c-ce77-4b5f-aecc-ddebfd14349d",
|
||||
"notificationSubscriptions":[
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayToken":{
|
||||
"ovPayTokenId": 134,
|
||||
"alias": "Mijn Rabopas"
|
||||
},
|
||||
"isActive": False
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayToken": {
|
||||
"ovPayTokenId": 138,
|
||||
"alias": "Mijn ING pas"
|
||||
},
|
||||
"isActive": False
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"eventTypeId": 5,
|
||||
"status": "off",
|
||||
"eventTypeChannels":[
|
||||
{
|
||||
"eventTypeChannelId": "8e7df8f1-7e50-482f-8301-d399e75fd432",
|
||||
"notificationSubscriptions":[
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayTokenId": 136,
|
||||
"isActive": False
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayTokenId": 138,
|
||||
"isActive": False
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"eventTypeChannelId": "72960a92-1855-469f-9cfd-5d72f57106f2",
|
||||
"notificationSubscriptions":[
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayTokenId": 136,
|
||||
"isActive": False
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId":"",
|
||||
"ovpayTokenId": 138,
|
||||
"isActive": False
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
getNotifactionSubscriptionsWithAccountNestedFalse:
|
||||
summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP
|
||||
value:
|
||||
{
|
||||
|
||||
"notificationSubscriptions":[
|
||||
{
|
||||
"notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae",
|
||||
@ -341,6 +543,21 @@ paths:
|
||||
},
|
||||
"isActive": True
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d",
|
||||
"notificationCategoryId": 3,
|
||||
"eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60",
|
||||
"customer":{
|
||||
"emailAddress": "j.jansen@mymailprovider.nl",
|
||||
"isEmailVerified": True
|
||||
},
|
||||
"ovpayToken":
|
||||
{
|
||||
"ovPayTokenId": 134,
|
||||
"alias": "Mijn Rabopas"
|
||||
},
|
||||
"isActive": True
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d",
|
||||
"notificationCategoryId": 3,
|
||||
@ -359,25 +576,6 @@ paths:
|
||||
}
|
||||
]
|
||||
}
|
||||
getNotifactionSubscriptionsWithoutAccount:
|
||||
summary: Return all the notification subscriptions when the user is anoymous
|
||||
value:
|
||||
{
|
||||
"notificationSubscriptions":[
|
||||
{
|
||||
"notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae",
|
||||
"notificationCategoryId": 1,
|
||||
"eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd",
|
||||
"customer":{
|
||||
"emailAddress": "j.jansen@mymailprovider.nl",
|
||||
"isEmailVerified": False
|
||||
},
|
||||
"ovpayTokenId": null,
|
||||
"isActive": True
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
"404":
|
||||
description: No notification subscriptions found
|
||||
content:
|
||||
@ -391,122 +589,6 @@ paths:
|
||||
"instance": "555d00b5-bc3f-4591-949b-479e76d49ea7",
|
||||
"errors": [{ "subApiErrorCode": "0017" }],
|
||||
}
|
||||
post:
|
||||
tags:
|
||||
- Notifications
|
||||
summary: Create a new notificationSubscription for a customer (account or private).
|
||||
description: |
|
||||
Create a new notificationSubscription for a customer (account or private).
|
||||
parameters:
|
||||
- name: X-HTM-JWT-AUTH-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
|
||||
required: false
|
||||
description: The JWT of a customer in case of touchpoint were customer logs in themselves
|
||||
- name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
example: feaaef83-a551-4283-8419-340b1ada3b55
|
||||
required: false
|
||||
description: The customerProfileId of a customer in the case of the SMP
|
||||
- name: X-HTM-ROLE-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
example: Customer
|
||||
required: false
|
||||
description: The role of the HTM employee in the case of the SMP
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
examples:
|
||||
Add a new notificationSubscription for a customer with account:
|
||||
value:
|
||||
{
|
||||
"notificationCategoryId": 1,
|
||||
"eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd",
|
||||
"emailAddress": null,
|
||||
"ovpayTokenId": null,
|
||||
"isActive": True
|
||||
}
|
||||
Add a new token notificationSubscription for a customer with account:
|
||||
value:
|
||||
{
|
||||
"notificationCategoryId": 3,
|
||||
"eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd",
|
||||
"emailAddress": null,
|
||||
"ovpayTokenId": 135,
|
||||
"isActive": True
|
||||
}
|
||||
Add a new notificationSubscription for a customer without account:
|
||||
value:
|
||||
{
|
||||
"notificationCategoryId": 1,
|
||||
"eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd",
|
||||
"emailAddress": "j.jansen@mymailprovider.nl",
|
||||
"ovpayTokenId": null,
|
||||
"isActive": True
|
||||
}
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
content:
|
||||
application/json:
|
||||
examples:
|
||||
Add a new notificationSubscription for a customer with account:
|
||||
summary: Return all the notification subscriptions when the user is logged in with an account/ identified by SMP
|
||||
value:
|
||||
{
|
||||
"notificationSubscriptions":[
|
||||
{
|
||||
"notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae",
|
||||
"notificationCategoryId": 1,
|
||||
"eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd",
|
||||
"customer":{
|
||||
"emailAddress": "j.jansen@mymailprovider.nl",
|
||||
"isEmailVerified": True
|
||||
},
|
||||
"ovpayTokenId": null,
|
||||
"isActive": True
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d",
|
||||
"notificationCategoryId": 3,
|
||||
"eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60",
|
||||
"customer":{
|
||||
"emailAddress": "j.jansen@mymailprovider.nl",
|
||||
"isEmailVerified": True
|
||||
},
|
||||
"ovpayToken":
|
||||
{
|
||||
"ovPayTokenId": 134,
|
||||
"alias": "Mijn Rabopas"
|
||||
},
|
||||
"isActive": True
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId": "17e87b99-014f-491f-87db-39b92ffd2b1d",
|
||||
"notificationCategoryId": 3,
|
||||
"eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60",
|
||||
"customer":{
|
||||
"emailAddress": "j.jansen@mymailprovider.nl",
|
||||
"isEmailVerified": True
|
||||
},
|
||||
"ovpayTokenId": 101,
|
||||
"ovpayToken":
|
||||
{
|
||||
"ovPayTokenId": 101,
|
||||
"alias": "Mijn ING pas"
|
||||
},
|
||||
"isActive": False
|
||||
}
|
||||
]
|
||||
}
|
||||
/notificationsubscriptions/{notificationSubscriptionId}:
|
||||
patch:
|
||||
tags:
|
||||
@ -570,8 +652,8 @@ paths:
|
||||
}
|
||||
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
examples:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user