@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Notification Configuration API
@base https://cal-test.adyen.com/cal/services/Notification/v6
@version 6
@auth ApiKey X-API-Key in header | Bearer basic
@endpoints 6
@toc createNotificationConfiguration(1), deleteNotificationConfigurations(1), getNotificationConfiguration(1), getNotificationConfigurationList(1), testNotificationConfiguration(1), updateNotificationConfiguration(1)

@group createNotificationConfiguration
@endpoint POST /createNotificationConfiguration
@desc Subscribe to notifications
@required {configurationDetails: map{active: bool, apiVersion: int(int32), description: str, eventConfigs: [map], hmacSignatureKey: str, notificationId: int(int64), notifyPassword: str, notifyURL: str, notifyUsername: str, sslProtocol: str}}
@returns(200) {configurationDetails: map{active: bool, apiVersion: int(int32), description: str, eventConfigs: [map], hmacSignatureKey: str, notificationId: int(int64), notifyPassword: str, notifyURL: str, notifyUsername: str, sslProtocol: str}, invalidFields: [map], pspReference: str, resultCode: str} # OK - the request has succeeded.
@errors {400: Bad Request - a problem reading or understanding the request., 401: Unauthorized - authentication required., 403: Forbidden - insufficient permissions to process the request., 422: Unprocessable Entity - a request validation error., 500: Internal Server Error - the server could not process the request.}
@example_request {"configurationDetails":{"active":true,"description":"Unique description 123","eventConfigs":[{"eventType":"ACCOUNT_HOLDER_VERIFICATION","includeMode":"INCLUDE"}],"notifyURL":"https://www.adyen.com/notification-handler","notifyUsername":"testUserName","notifyPassword":"testPassword","sslProtocol":"TLSv13"}}

@endgroup

@group deleteNotificationConfigurations
@endpoint POST /deleteNotificationConfigurations
@desc Delete a notification subscription configuration
@required {notificationIds: [int(int64)] # A list of IDs of the notification subscription configurations to be deleted.}
@returns(200) {invalidFields: [map], pspReference: str, resultCode: str} # OK - the request has succeeded.
@errors {400: Bad Request - a problem reading or understanding the request., 401: Unauthorized - authentication required., 403: Forbidden - insufficient permissions to process the request., 422: Unprocessable Entity - a request validation error., 500: Internal Server Error - the server could not process the request.}
@example_request {"notificationIds":[27891]}

@endgroup

@group getNotificationConfiguration
@endpoint POST /getNotificationConfiguration
@desc Get a notification subscription configuration
@required {notificationId: int(int64) # The ID of the notification subscription configuration whose details are to be retrieved.}
@returns(200) {configurationDetails: map{active: bool, apiVersion: int(int32), description: str, eventConfigs: [map], hmacSignatureKey: str, notificationId: int(int64), notifyPassword: str, notifyURL: str, notifyUsername: str, sslProtocol: str}, invalidFields: [map], pspReference: str, resultCode: str} # OK - the request has succeeded.
@errors {400: Bad Request - a problem reading or understanding the request., 401: Unauthorized - authentication required., 403: Forbidden - insufficient permissions to process the request., 422: Unprocessable Entity - a request validation error., 500: Internal Server Error - the server could not process the request.}
@example_request {"notificationId":21259}

@endgroup

@group getNotificationConfigurationList
@endpoint POST /getNotificationConfigurationList
@desc Get a list of notification subscription configurations
@returns(200) {configurations: [map], invalidFields: [map], pspReference: str, resultCode: str} # OK - the request has succeeded.
@errors {400: Bad Request - a problem reading or understanding the request., 401: Unauthorized - authentication required., 403: Forbidden - insufficient permissions to process the request., 422: Unprocessable Entity - a request validation error., 500: Internal Server Error - the server could not process the request.}
@example_request {}

@endgroup

@group testNotificationConfiguration
@endpoint POST /testNotificationConfiguration
@desc Test a notification configuration
@required {notificationId: int(int64) # The ID of the notification subscription configuration to be tested.}
@optional {eventTypes: [str] # The event types to test.  If left blank, then all of the configured event types will be tested. >Permitted values: `ACCOUNT_HOLDER_CREATED`, `ACCOUNT_CREATED`, `ACCOUNT_UPDATED`, `ACCOUNT_HOLDER_UPDATED`, `ACCOUNT_HOLDER_STATUS_CHANGE`, `ACCOUNT_HOLDER_STORE_STATUS_CHANGE` `ACCOUNT_HOLDER_VERIFICATION`, `ACCOUNT_HOLDER_LIMIT_REACHED`, `ACCOUNT_HOLDER_PAYOUT`, `PAYMENT_FAILURE`, `SCHEDULED_REFUNDS`, `REPORT_AVAILABLE`, `TRANSFER_FUNDS`, `BENEFICIARY_SETUP`, `COMPENSATE_NEGATIVE_BALANCE`.}
@returns(200) {errorMessages: [str], eventTypes: [str], exchangeMessages: [map], invalidFields: [map], notificationId: int(int64), okMessages: [str], pspReference: str, resultCode: str} # OK - the request has succeeded.
@errors {400: Bad Request - a problem reading or understanding the request., 401: Unauthorized - authentication required., 403: Forbidden - insufficient permissions to process the request., 422: Unprocessable Entity - a request validation error., 500: Internal Server Error - the server could not process the request.}
@example_request {"eventTypes":["ACCOUNT_HOLDER_VERIFICATION"],"notificationId":25032}

@endgroup

@group updateNotificationConfiguration
@endpoint POST /updateNotificationConfiguration
@desc Update a notification subscription configuration
@required {configurationDetails: map{active: bool, apiVersion: int(int32), description: str, eventConfigs: [map], hmacSignatureKey: str, notificationId: int(int64), notifyPassword: str, notifyURL: str, notifyUsername: str, sslProtocol: str}}
@returns(200) {configurationDetails: map{active: bool, apiVersion: int(int32), description: str, eventConfigs: [map], hmacSignatureKey: str, notificationId: int(int64), notifyPassword: str, notifyURL: str, notifyUsername: str, sslProtocol: str}, invalidFields: [map], pspReference: str, resultCode: str} # OK - the request has succeeded.
@errors {400: Bad Request - a problem reading or understanding the request., 401: Unauthorized - authentication required., 403: Forbidden - insufficient permissions to process the request., 422: Unprocessable Entity - a request validation error., 500: Internal Server Error - the server could not process the request.}
@example_request {"configurationDetails":{"active":false,"description":"Test notif config 756","eventConfigs":[{"eventType":"ACCOUNT_HOLDER_CREATED","includeMode":"EXCLUDE"},{"eventType":"ACCOUNT_CREATED","includeMode":"INCLUDE"}],"notificationId":21259,"notifyPassword":"testPassword2","notifyURL":"https://www.adyen.com/notification-handler","notifyUsername":"testUserName2","sslProtocol":"TLSv13"}}

@endgroup

@end
