OVPAY-973 - Added CRUD operations for NotificationSubscription.

This commit is contained in:
Bas Boterman 2025-09-10 11:16:42 +02:00
parent 840b62f493
commit e4472a2ae7

View File

@ -0,0 +1,760 @@
openapi: '3.0.3'
info:
title: ABT Notifications CRUD APIs
version: '1.0'
description: CRUD APIs for ABT Notification tables. These are NOT the functional APIs from Service Engine.
servers:
- url: https://services.acc.api.htm.nl/abt/notifications/1.0
paths:
/notificationsubscriptions:
get:
summary: Get all notification subscriptions
operationId: getAllNotificationSubscriptions
tags:
- Notification Subscriptions
parameters:
- name: notificationSubscriptionId
in: query
required: false
schema:
type: string
format: uuid
description: Filter by notification subscription ID
- name: eventTypeChannelId
in: query
required: false
schema:
type: string
format: uuid
description: Filter by event type channel ID
- name: eventTypeId
in: query
required: false
schema:
type: array
items:
type: integer
explode: false
description: Filter by event type IDs
- name: eventOriginId
in: query
required: false
schema:
type: array
items:
type: integer
description: Filter by event origin IDs
- name: channelId
in: query
required: false
schema:
type: array
items:
type: integer
description: Filter by channel IDs
- name: customerProfileId
in: query
required: false
schema:
type: integer
description: Filter by customer profile ID
- name: ovpayTokenId
in: query
required: false
schema:
type: integer
description: Filter by OVPay token ID
- name: deviceId
in: query
required: false
schema:
type: string
format: uuid
description: Filter by device ID
- name: createdAfter
in: query
required: false
schema:
type: string
format: date-time
description: Filter by creation date (after)
- name: createdBefore
in: query
required: false
schema:
type: string
format: date-time
description: Filter by creation date (before)
- name: updatedAfter
in: query
required: false
schema:
type: string
format: date-time
description: Filter by update date (after)
- name: updatedBefore
in: query
required: false
schema:
type: string
format: date-time
description: Filter by update date (before)
- name: isActive
in: query
required: false
schema:
type: boolean
description: Filter by active status
responses:
'200':
description: A list of notification subscriptions
content:
application/json:
schema:
$ref: '#/components/schemas/GetNotificationSubscriptionsResponse'
examples:
emptyNotificationSubscriptionResponse:
value:
notificationSubscriptions: []
minimalNotificationSubscriptionResponse:
value:
notificationSubscriptions:
- notificationSubscriptionId: 5bedce29-af0c-4f3c-b182-2caa8a1f9377
eventTypeChannel:
eventTypeChannelId: 22a9ab1cb-b1a3-482e-bae3-9a517a8cfb4f
eventType:
eventTypeId: 15
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKO
prettyName: Checkout gemist
optInRequired: true
channel:
channelId: 1
name: push
isDefault: true
isMandatory: false
createdAt: '2025-10-01T12:00:00Z'
createdBy: system
isActive: true
- notificationSubscriptionId: 39e8d8e6-5c85-49b6-ba4b-62e47fa4f7fd
eventTypeChannel:
eventTypeChannelId: c4729ad4-46ef-4329-94f9-5079be21dfc5
eventType:
eventTypeId: 16
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKI
prettyName: Checkin gemist
optInRequired: true
channel:
channelId: 1
name: push
isDefault: true
isMandatory: false
createdAt: '2025-09-15T08:30:00Z'
createdBy: system
isActive: false
fullNotificationSubscriptionResponse:
value:
notificationSubscriptions:
- notificationSubscriptionId: 5bedce29-af0c-4f3c-b182-2caa8a1f9377
eventTypeChannel:
eventTypeChannelId: 22a9ab1cb-b1a3-482e-bae3-9a517a8cfb4f
eventType:
eventTypeId: 15
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKO
prettyName: Checkout gemist
optInRequired: true
channel:
channelId: 1
name: push
isDefault: true
isMandatory: false
customerProfileId: 1337
ovpayTokenId: 42
deviceId: 7122a988-a00a-417d-a5b4-da2d91354976
createdAt: '2025-10-01T12:00:00Z'
createdBy: system
updatedAt: '2025-10-02T12:00:00Z'
updatedBy: user
isActive: true
- notificationSubscriptionId: 39e8d8e6-5c85-49b6-ba4b-62e47fa4f7fd
eventTypeChannel:
eventTypeChannelId: c4729ad4-46ef-4329-94f9-5079be21dfc5
eventType:
eventTypeId: 16
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKI
prettyName: Checkin gemist
optInRequired: true
channel:
channelId: 1
name: push
isDefault: true
isMandatory: false
customerProfileId: 1338
ovpayTokenId: 43
deviceId: c4b8e1f3-8f4e-4d2a-9f3e-1c2b3a4d5e6f
createdAt: '2025-09-15T08:30:00Z'
createdBy: system
updatedAt: '2025-09-16T09:45:00Z'
updatedBy: user
isActive: false
'400':
description: Bad request
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/400Response'
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/401Response'
'404':
description: Not found
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/404Response'
'500':
description: Internal server error
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/500Response'
post:
summary: Create a new notification subscription
operationId: createNotificationSubscription
tags:
- Notification Subscriptions
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PostNotificationSubscriptionRequest'
examples:
minimalNotificationSubscriptionRequest:
value:
eventTypeChannelId: 22a9ab1cb-b1a3-482e-bae3-9a517a8cfb4f
createdAt: '2025-10-01T12:00:00Z'
createdBy: system
isActive: true
fullNotificationSubscriptionRequest:
value:
eventTypeChannelId: 22a9ab1cb-b1a3-482e-bae3-9a517a8cfb4f
customerProfileId: 1337
ovpayTokenId: 42
deviceId: 7122a988-a00a-417d-a5b4-da2d91354976
createdAt: '2025-10-01T12:00:00Z'
createdBy: system
isActive: true
responses:
'201':
description: Notification subscription created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/PostNotificationSubscriptionResponse'
examples:
minimalNotificationSubscriptionResponse:
value:
notificationSubscriptionId: 5bedce29-af0c-4f3c-b182-2caa8a1f9377
eventTypeChannel:
eventTypeChannelId: 22a9ab1cb-b1a3-482e-bae3-9a517a8cfb4f
eventType:
eventTypeId: 15
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKO
prettyName: Checkout gemist
optInRequired: true
channel:
channelId: 1
name: push
isDefault: true
isMandatory: false
createdAt: '2025-10-01T12:00:00Z'
createdBy: system
isActive: true
fullNotificationSubscriptionResponse:
value:
notificationSubscriptionId: 5bedce29-af0c-4f3c-b182-2caa8a1f9377
eventTypeChannel:
eventTypeChannelId: 22a9ab1cb-b1a3-482e-bae3-9a517a8cfb4f
eventType:
eventTypeId: 15
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKO
prettyName: Checkout gemist
optInRequired: true
channel:
channelId: 1
name: push
isDefault: true
isMandatory: false
customerProfileId: 1337
ovpayTokenId: 42
deviceId: 7122a988-a00a-417d-a5b4-da2d91354976
createdAt: '2025-10-01T12:00:00Z'
createdBy: system
isActive: true
'400':
description: Bad request
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/400Response'
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/401Response'
'404':
description: Not found
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/404Response'
'500':
description: Internal server error
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/500Response'
/notificationsubscriptions/{notificationSubscriptionId}:
patch:
summary: Update a notification subscription by ID
tags:
- Notification Subscriptions
parameters:
- name: notificationSubscriptionId
in: path
required: true
schema:
type: string
format: uuid
example: 5bedce29-af0c-4f3c-b182-2caa8a1f9377
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PatchNotificationSubscriptionRequest'
examples:
notificationSubscriptionRequest:
value:
updatedAt: '2025-10-01T12:00:00Z'
updatedBy: user
isActive: false
responses:
'200':
description: Notification subscription updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/PatchNotificationSubscriptionResponse'
examples:
minimalNotificationSubscriptionResponse:
value:
notificationSubscriptionId: 5bedce29-af0c-4f3c-b182-2caa8a1f9377
eventTypeChannel:
eventTypeChannelId: 22a9ab1cb-b1a3-482e-bae3-9a517a8cfb4f
eventType:
eventTypeId: 15
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKO
prettyName: Checkout gemist
optInRequired: true
channel:
channelId: 1
name: push
isDefault: true
isMandatory: false
createdAt: '2025-10-01T12:00:00Z'
createdBy: system
updatedAt: '2025-10-02T12:00:00Z'
updatedBy: user
isActive: false
fullNotificationSubscriptionResponse:
value:
notificationSubscriptionId: 5bedce29-af0c-4f3c-b182-2caa8a1f9377
eventTypeChannel:
eventTypeChannelId: 22a9ab1cb-b1a3-482e-bae3-9a517a8cfb4f
eventType:
eventTypeId: 15
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKO
prettyName: Checkout gemist
optInRequired: true
channel:
channelId: 1
name: push
isDefault: true
isMandatory: false
customerProfileId: 1337
ovpayTokenId: 42
deviceId: 7122a988-a00a-417d-a5b4-da2d91354976
createdAt: '2025-10-01T12:00:00Z'
createdBy: system
updatedAt: '2025-10-02T12:00:00Z'
updatedBy: user
isActive: false
'400':
description: Bad request
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/400Response'
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/401Response'
'404':
description: Not found
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/404Response'
'500':
description: Internal server error
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/500Response'
delete:
summary: Delete a notification subscription by ID
operationId: deleteNotificationSubscription
tags:
- Notification Subscriptions
parameters:
- name: notificationSubscriptionId
in: path
required: true
schema:
type: string
format: uuid
example: 5bedce29-af0c-4f3c-b182-2caa8a1f9377
responses:
'204':
description: No content
'400':
description: Bad request
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/400Response'
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/401Response'
'404':
description: Not found
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/404Response'
'500':
description: Internal server error
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/500Response'
components:
schemas:
GetNotificationSubscriptionsResponse:
type: object
properties:
notificationSubscriptions:
type: array
items:
$ref: '#/components/schemas/NotificationSubscription'
required:
- notificationSubscriptions
NotificationSubscription:
type: object
properties:
notificationSubscriptionId:
type: string
format: uuid
example: 5bedce29-af0c-4f3c-b182-2caa8a1f9377
eventTypeChannel:
$ref: '#/components/schemas/EventTypeChannel'
customerProfileId:
type: integer
example: 1337
ovpayTokenId:
type: integer
example: 42
deviceId:
type: string
format: uuid
example: 7122a988-a00a-417d-a5b4-da2d91354976
createdAt:
type: string
format: date-time
example: '2025-10-01T12:00:00Z'
createdBy:
type: string
example: system
updatedAt:
type: string
format: date-time
example: '2025-10-02T12:00:00Z'
updatedBy:
type: string
example: user
isActive:
type: boolean
example: true
required:
- notificationSubscriptionId
- eventTypeChannel
- createdAt
- createdBy
- isActive
PostNotificationSubscriptionRequest:
type: object
properties:
eventTypeChannelId:
type: string
format: uuid
example: 22a9ab1cb-b1a3-482e-bae3-9a517a8cfb4f
customerProfileId:
type: integer
example: 1337
ovpayTokenId:
type: integer
example: 42
deviceId:
type: string
format: uuid
example: 7122a988-a00a-417d-a5b4-da2d91354976
createdAt:
type: string
format: date-time
example: '2025-10-01T12:00:00Z'
createdBy:
type: string
example: system
isActive:
type: boolean
example: true
required:
- eventTypeChannelId
- createdAt
- createdBy
PostNotificationSubscriptionResponse:
$ref: '#/components/schemas/NotificationSubscription'
PatchNotificationSubscriptionRequest:
type: object
properties:
updatedAt:
type: string
format: date-time
example: '2025-10-01T12:00:00Z'
updatedBy:
type: string
example: user
isActive:
type: boolean
example: false
PatchNotificationSubscriptionResponse:
$ref: '#/components/schemas/NotificationSubscription'
EventTypeChannel:
type: object
properties:
eventTypeChannelId:
type: string
format: uuid
example: 22a9ab1cb-b1a3-482e-bae3-9a517a8cfb4f
eventType:
$ref: '#/components/schemas/EventType'
channel:
$ref: '#/components/schemas/Channel'
isDefault:
type: boolean
example: true
isMandatory:
type: boolean
example: false
required:
- eventTypeChannelId
- eventType
- channel
- isDefault
- isMandatory
EventType:
type: object
properties:
eventTypeId:
type: integer
example: 15
eventOrigin:
$ref: '#/components/schemas/EventOrigin'
name:
type: string
example: Travel
subname:
type: string
example: Missing CKO
prettyName:
type: string
example: Checkout gemist
optInRequired:
type: boolean
example: true
required:
- eventTypeId
- eventOrigin
- name
- prettyName
- optInRequired
EventOrigin:
type: object
properties:
eventOriginId:
type: integer
example: 1
name:
type: string
example: GBO
description:
type: string
example: Events originated at GBO
required:
- eventOriginId
- name
Channel:
type: object
properties:
channelId:
type: integer
example: 1
name:
type: string
example: push
required:
- channelId
- name
400Response:
type: object
properties:
code:
type: string
example: '400'
type:
type: string
message:
type: string
example: Bad Request
description:
type: string
example: >-
'Bad Request: Input parameters missing! Please fill in at least 1
valid input parameter.
401Response:
type: object
properties:
code:
type: string
example: '401'
type:
type: string
message:
type: string
example: Invalid Credentials
description:
type: string
example: >-
Invalid Credentials. Make sure you have provided the correct
security credentials
404Response:
type: object
properties:
code:
type: string
example: '404'
type:
type: string
example: Status report
message:
type: string
example: Not Found
description:
type: string
example: The requested resource is not available.
500Response:
type: object
properties:
code:
type: string
example: '500'
type:
type: string
message:
type: string
example: Internal Server Error
description:
type: string
securitySchemes:
default:
type: oauth2
flows:
implicit:
authorizationUrl: https://services.acc.api.htm.nl/authorize
scopes: {}