features/TP-notifications #34
548
src/openapi/customers/se-maileon.yaml
Normal file
548
src/openapi/customers/se-maileon.yaml
Normal file
@ -0,0 +1,548 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: Service Engine APIs for Notifications
|
||||
description: >-
|
||||
Service Engine 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/touchpoint/2.0
|
||||
tags:
|
||||
- name: Customers
|
||||
description: >-
|
||||
Service Engine API's for maileon to update the customer profile. Only field isEmailVerified.
|
||||
- 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
|
||||
paths:
|
||||
/customers:
|
||||
patch:
|
||||
tags:
|
||||
- Customers
|
||||
parameters:
|
||||
- name: customerProfileId
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
example: 1
|
||||
required: false
|
||||
description: The customerProfileId of a customer
|
||||
summary: Update a customer profile
|
||||
description: Update a customer profile based on the customerProfileId
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
examples:
|
||||
patchCustomer:
|
||||
value:
|
||||
|
MirjamHTM marked this conversation as resolved
Outdated
|
||||
{
|
||||
"person": {
|
||||
"isEmailVerified": True
|
||||
}
|
||||
}
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
/notificationcategories:
|
||||
get:
|
||||
tags:
|
||||
- Notification categories
|
||||
summary: Get notification categories and optins for that category that a touchpoint can show.
|
||||
description: |
|
||||
Get notification categories that a touchpoint can show and optins ( eventTypes) and channels (eventType_channels) for the optin for that category
|
||||
parameters:
|
||||
|
bboterm
commented
Doe je hier bewust geen response body? Doe je hier bewust geen response body?
MirjamHTM
commented
Ja, ik zat hier nog na te denken, moeten we Maileon alle klant data geven. Ik dacht van niet, dus dacht misschien beter om dit leeg te laten of alleen het Id mee terug te geven, maar wat denk jij? Ja, ik zat hier nog na te denken, moeten we Maileon alle klant data geven. Ik dacht van niet, dus dacht misschien beter om dit leeg te laten of alleen het Id mee terug te geven, maar wat denk jij?
bboterm
commented
Ik dacht al dat dat de rationale zou zijn. Leeglaten is prima. Ik dacht al dat dat de rationale zou zijn. Leeglaten is prima.
|
||||
- name: expand
|
||||
in: query
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Choose the records related to the category nested, options are eventType, evenTypeChannel
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
|
bboterm
commented
Klopt het dat dit een array is? Kun je meerdere kiezen? Ik dacht, is een enum niet mooier?
Klopt het dat dit een array is? Kun je meerdere kiezen?
Ik dacht, is een enum niet mooier?
```
- name: expand
in: query
schema:
type: string
enum: [none, eventType, eventTypeChannel]
```
|
||||
examples:
|
||||
getNotifactionCategories?Expand=eventType, evenTypeChannel, channel:
|
||||
summary: Return all the notification categories with their nested attributes
|
||||
value:
|
||||
{
|
||||
"notificationCategories":[
|
||||
{
|
||||
"notificationCategoryId": 1,
|
||||
"name": "Nieuwsbrief",
|
||||
"eventTypes": [
|
||||
{
|
||||
"eventTypeId": 1,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 6,
|
||||
"name": "Maileon"
|
||||
},
|
||||
"name": "HTM nieuwsbrief",
|
||||
"subName": "",
|
||||
"prettyName": "HTM nieuwsbrief",
|
||||
"optinRequired": False,
|
||||
"eventTypeChannels":[
|
||||
{
|
||||
"eventTypeChannelId": "447a1116-6cd7-4645-8c3d-43237b6186cd",
|
||||
"channel":{
|
||||
"channelId": 2,
|
||||
"name": "email"
|
||||
},
|
||||
"isDefault": True,
|
||||
"isMandatory": False
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"notificationCategoryId": 2,
|
||||
"name": "Mijn Reizen",
|
||||
"eventTypes": [
|
||||
{
|
||||
"eventTypeId": 2,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 1,
|
||||
"name": "GBO"
|
||||
},
|
||||
"name": "ALERTS, TRAVEL_SCHEME",
|
||||
"subName": "CI",
|
||||
"prettyName": "Check In",
|
||||
"optinRequired": False,
|
||||
"eventTypeChannels":[
|
||||
{
|
||||
"eventTypeChannelId": "ccc8c025-06b5-4928-a632-23e1c55cd173",
|
||||
"channel":{
|
||||
"channelId": 1,
|
||||
"name": "push"
|
||||
},
|
||||
"isDefault": True,
|
||||
"isMandatory": False
|
||||
},
|
||||
{
|
||||
"eventTypeChannelId": "da2deb4c-ce77-4b5f-aecc-ddebfd14349d",
|
||||
"channel":{
|
||||
"channelId": 2,
|
||||
"name": "email"
|
||||
},
|
||||
"isDefault": False,
|
||||
"isMandatory": False
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"eventTypeId": 3,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 1,
|
||||
"name": "GBO"
|
||||
},
|
||||
"name": "ALERTS, PAD",
|
||||
"subName": null,
|
||||
"prettyName": "Profielgegevens op de pas",
|
||||
"optinRequired": False,
|
||||
"eventTypeChannels":[
|
||||
{
|
||||
"eventTypeChannelId": "8e7df8f1-7e50-482f-8301-d399e75fd432",
|
||||
"channel":{
|
||||
"channelId": 1,
|
||||
"name": "push"
|
||||
},
|
||||
"isDefault": True,
|
||||
"isMandatory": False
|
||||
},
|
||||
{
|
||||
"eventTypeChannelId": "72960a92-1855-469f-9cfd-5d72f57106f2",
|
||||
"channel":{
|
||||
"channelId": 2,
|
||||
"name": "email"
|
||||
},
|
||||
"isDefault": False,
|
||||
"isMandatory": False
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"notificationCategoryId": 3,
|
||||
"name": "Mijn Passen",
|
||||
"eventTypes": [
|
||||
{
|
||||
"eventTypeId": 4,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 1,
|
||||
"name": "GBO"
|
||||
},
|
||||
"name": "ALERTS, CARD",
|
||||
"subName": null,
|
||||
"prettyName": "Mijn passen",
|
||||
"optinRequired": False,
|
||||
"eventTypeChannels":[
|
||||
{
|
||||
"eventTypeChannelId": "be07c7bb-714b-4637-acf5-a67025ad8e60",
|
||||
"channel":{
|
||||
"channelId": 1,
|
||||
"name": "push"
|
||||
},
|
||||
"isDefault": True,
|
||||
"isMandatory": False
|
||||
},
|
||||
{
|
||||
"eventTypeChannelId": "0c797b5a-ed34-494b-8c64-0a832830d392",
|
||||
"channel":{
|
||||
"channelId": 2,
|
||||
"name": "email"
|
||||
},
|
||||
"isDefault": False,
|
||||
"isMandatory": False
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"eventTypeId": 5,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 1,
|
||||
"name": "GBO"
|
||||
},
|
||||
"name": "ALERTS, PAD",
|
||||
"subName": null,
|
||||
"prettyName": "Profielgegevens op de pas",
|
||||
"optinRequired": False,
|
||||
"eventTypeChannels":[
|
||||
{
|
||||
"eventTypeChannelId": "b910368f-c045-4e8e-b01d-bcbc78708bac",
|
||||
"channel":{
|
||||
"channelId": 1,
|
||||
"name": "push"
|
||||
},
|
||||
"isDefault": True,
|
||||
"isMandatory": False
|
||||
},
|
||||
{
|
||||
"eventTypeChannelId": "93e773da-ba3b-48da-9a0e-ee478eaa752f",
|
||||
"channel":{
|
||||
"channelId": 2,
|
||||
"name": "email"
|
||||
},
|
||||
"isDefault": False,
|
||||
"isMandatory": False
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
getNotifactionCategories?Expand=eventType:
|
||||
summary: Return all the notification categories with nested eventTypes
|
||||
value:
|
||||
{
|
||||
"notificationCategories":[
|
||||
{
|
||||
"notificationCategoryId": 1,
|
||||
"name": "Nieuwsbrief",
|
||||
"eventTypes": [
|
||||
{
|
||||
"eventTypeId": 1,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 6,
|
||||
"name": "Maileon"
|
||||
},
|
||||
"name": "HTM nieuwsbrief",
|
||||
"subName": "",
|
||||
"prettyName": "HTM nieuwsbrief",
|
||||
"optinRequired": False
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"notificationCategoryId": 2,
|
||||
"name": "Mijn Reizen",
|
||||
"eventTypes": [
|
||||
{
|
||||
"eventTypeId": 2,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 1,
|
||||
"name": "GBO"
|
||||
},
|
||||
"name": "ALERTS, TRAVEL_SCHEME",
|
||||
"subName": "CI",
|
||||
"prettyName": "Check In",
|
||||
"optinRequired": False
|
||||
},
|
||||
{
|
||||
"eventTypeId": 3,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 1,
|
||||
"name": "GBO"
|
||||
},
|
||||
"name": "ALERTS, PAD",
|
||||
"subName": null,
|
||||
"prettyName": "Profielgegevens op de pas",
|
||||
"optinRequired": False
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"notificationCategoryId": 3,
|
||||
"name": "Mijn Passen",
|
||||
"eventTypes": [
|
||||
{
|
||||
"eventTypeId": 4,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 1,
|
||||
"name": "GBO"
|
||||
},
|
||||
"name": "ALERTS, CARD",
|
||||
"subName": null,
|
||||
"prettyName": "Mijn passen",
|
||||
"optinRequired": False
|
||||
},
|
||||
{
|
||||
"eventTypeId": 5,
|
||||
"eventOrigin": {
|
||||
"eventOriginId": 1,
|
||||
"name": "GBO"
|
||||
},
|
||||
"name": "ALERTS, PAD",
|
||||
"subName": null,
|
||||
"prettyName": "Profielgegevens op de pas",
|
||||
"optinRequired": False
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
getNotifactionCategories:
|
||||
summary: Return all the notification categories
|
||||
value:
|
||||
{
|
||||
"notificationCategories":[
|
||||
{
|
||||
"notificationCategoryId": 1,
|
||||
"name": "Nieuwsbrief"
|
||||
},
|
||||
{
|
||||
"notificationCategoryId": 2,
|
||||
"name": "Mijn Reizen"
|
||||
},
|
||||
{
|
||||
"notificationCategoryId": 3,
|
||||
"name": "Mijn Passen"
|
||||
}
|
||||
]
|
||||
}
|
||||
"404":
|
||||
description: No notification category found
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
{
|
||||
"type": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers",
|
||||
"apiErrorCode": "400.1",
|
||||
"title": "Niet gevonden",
|
||||
"detail": "Notificatiecategorie niet gevonden",
|
||||
"instance": "555d00b5-bc3f-4591-949b-479e76d49ea7",
|
||||
"errors": [{ "subApiErrorCode": "0017" }],
|
||||
}
|
||||
/notificationsubscriptions:
|
||||
get:
|
||||
|
bboterm
commented
SVP deze structuur even updaten naar: https://htm-prod.atlassian.net/browse/OVPAY-1499 SVP deze structuur even updaten naar: https://htm-prod.atlassian.net/browse/OVPAY-1499
|
||||
tags:
|
||||
- Notification subscriptions
|
||||
summary: Get all possible notificationSubscriptions for a customer (account or private).
|
||||
description: |
|
||||
Get all possible notificationSubscriptions for a customer (account or private), including if they have opted-in for it.
|
||||
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
|
||||
|
MirjamHTM marked this conversation as resolved
Outdated
bboterm
commented
Klopt het dat deze niet verplicht is? Klopt het dat deze niet verplicht is?
MirjamHTM
commented
Nope, dat was een fout van mijn kant Nope, dat was een fout van mijn kant
|
||||
schema:
|
||||
type: string
|
||||
example: feaaef83-a551-4283-8419-340b1ada3b55
|
||||
|
MirjamHTM marked this conversation as resolved
bboterm
commented
CustomerProfileId is een integer. CustomerProfileId is een integer.
|
||||
required: false
|
||||
description: The customerProfileId of a customer in the case of the SMP
|
||||
- name: X-HTM-ROLE-HEADER
|
||||
in: header
|
||||
schema:
|
||||
type: string
|
||||
example: Customer
|
||||
required: false
|
||||
description: The role of the HTM employee in the case of the SMP
|
||||
- name: emailAddress
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
format: email
|
||||
example: john.doe@mymailprovider.com
|
||||
required: false
|
||||
description: The emailadress of the customer in the case of anonymous opt-ins
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
examples:
|
||||
getNotifactionSubscriptionsAll:
|
||||
summary: Return all the notification subscriptions where for each category the client has actively opted in or out - All
|
||||
value:
|
||||
{
|
||||
"notificationSubscriptions":[
|
||||
{
|
||||
"notificationSubscriptionId": "64047471-e0c3-4abc-b4eb-83a12a6de903",
|
||||
"notificationCategoryId": 1,
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId": "571388cd-8903-40d5-89e6-9191cb8d656e",
|
||||
"notificationCategoryId": 2,
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"notificationSubscriptionId": "cf736ff2-2f8f-434e-a3c7-a14064b73c9b",
|
||||
"notificationCategoryId": 3,
|
||||
"isActive": false
|
||||
}
|
||||
]
|
||||
}
|
||||
getNotifactionSubscriptionsSome:
|
||||
summary: Return all the notification subscriptions where for each category the client has actively opted in or out - Some
|
||||
value:
|
||||
{
|
||||
"notificationSubscriptions": [
|
||||
{
|
||||
"notificationSubscriptionId": "64047471-e0c3-4abc-b4eb-83a12a6de903",
|
||||
"notificationCategoryId": 1,
|
||||
"isActive": true
|
||||
},
|
||||
|
bboterm
commented
https://htm-prod.atlassian.net/browse/OVPAY-1499
|
||||
{
|
||||
"notificationSubscriptionId": "cf736ff2-2f8f-434e-a3c7-a14064b73c9b",
|
||||
"notificationCategoryId": 3,
|
||||
"isActive": false
|
||||
}
|
||||
]
|
||||
}
|
||||
"403":
|
||||
description: Forbidden // Als geverifieerd profiel gevonden wordt, maar niet op een geverifieerde manier benaderd wordt
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
{
|
||||
|
bboterm
commented
https://htm-prod.atlassian.net/browse/OVPAY-1499
|
||||
"type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications",
|
||||
"apiErrorCode": "403",
|
||||
"title": "Verboden",
|
||||
"detail": "",
|
||||
"instance": "555d00b5-bc3f-4591-949b-479e76d49ea7",
|
||||
"errors": [],
|
||||
}
|
||||
"404":
|
||||
description: No notification subscriptions found
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
{
|
||||
"type": "https://api.integratielaag.nl/abt/touchpoint/2.0/notifications",
|
||||
"apiErrorCode": "404",
|
||||
"title": "Niet gevonden",
|
||||
"detail": "Notificatie niet gevonden",
|
||||
"instance": "555d00b5-bc3f-4591-949b-479e76d49ea7",
|
||||
"errors": [{ "subApiErrorCode": "0017" }],
|
||||
}
|
||||
/notificationsubscriptions/{notificationSubscriptionId}:
|
||||
patch:
|
||||
tags:
|
||||
- Notification subscriptions
|
||||
summary: Update a notificationSubscription for a customer (account or private).
|
||||
description: |
|
||||
Update a 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
|
||||
- name: notificationSubscriptionId
|
||||
in: path
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: e112f26e-37fa-4bde-8def-9977cd1d50ae
|
||||
required: true
|
||||
description: The id of the notificationSubscription you want to update
|
||||
- name: emailAddress
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
format: email
|
||||
example: john.doe@mymailprovider.com
|
||||
required: false
|
||||
description: The emailadress of the customer in the case of anonymous opt-ins
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
examples:
|
||||
Update a notificationSubscription to inactive:
|
||||
value:
|
||||
{
|
||||
"isActive": False
|
||||
}
|
||||
Update a notificationSubscription to active:
|
||||
value:
|
||||
{
|
||||
"isActive": True
|
||||
}
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
examples:
|
||||
Update a notificationSubscription to inactive:
|
||||
summary: Return the updated notification
|
||||
value:
|
||||
{
|
||||
"notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae",
|
||||
"notificationCategoryId": 1,
|
||||
"isActive": False
|
||||
}
|
||||
Update a notificationSubscription to active:
|
||||
summary: Return the updated notification
|
||||
value:
|
||||
{
|
||||
"notificationSubscriptionId": "e112f26e-37fa-4bde-8def-9977cd1d50ae",
|
||||
"notificationCategoryId": 1,
|
||||
"isActive": True
|
||||
}
|
||||
components:
|
||||
schemas:
|
||||
unavailable:
|
||||
type: object
|
||||
Loading…
Reference in New Issue
Block a user
... and emailAddress.