first version of swagger, WIP

This commit is contained in:
Mirjam Herald 2025-10-20 16:36:46 +02:00
parent 4d2fb6ca3c
commit d7d9c23a5a

View File

@ -0,0 +1,630 @@
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: Notifications
description: >-
Service Engine APIs for all HTM Notifications. These are NOT the CRUD APIs to access raw data in the database.
paths:
/notificationcategories:
get:
tags:
- Notifications
summary: Get notification categories that a person can opt in for, can also be accessed anonymously
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
responses:
"200":
description: OK
content:
application/json:
examples:
getNotifactionCategoriesWithAccount:
summary: Return all the notification categories when the user has an account
value:
{
"notificationCategories":[
{
"notificationCategoryId": 1,
"name": "Nieuwsbrief",
"optinRequired": False,
"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",
"optinRequired": False,
"eventTypes": [
{
"eventTypeId": 1,
"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": 2,
"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",
"optinRequired": False,
"eventTypes": [
{
"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
}
]
},
{
"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
}
]
}
]
}
]
}
getNotifactionCategoriesWithoutAccount:
summary: Return the anonymous notification categories when the user does not have an account / is not logged in
value:
{
"notificationCategories":[
{
"notificationCategoryId": 1,
"name": "Nieuwsbrief",
"optinRequired": False,
"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
}
]
}
]
}
]
}
"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:
tags:
- Notifications
summary: Get a notificationSubscription for a customer (account or private).
description: |
Get 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: 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:
getNotifactionSubscriptionsWithAccount:
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
}
]
}
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:
application/json:
example:
{
"type": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers",
"apiErrorCode": "400.1",
"title": "Niet gevonden",
"detail": "Notificatie niet gevonden",
"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:
- Notifications
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:
"201":
description: Created
content:
application/json:
examples:
Update a notificationSubscription to inactive:
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": False
},
{
"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
}
]
}
components:
schemas:
unavailable:
type: object