openapi: 3.2.0 info: title: Mtn Group Notifications API version: '1.0' description: 'Operations tagged Notifications across 2 of this provider''s published API definitions: mtn-group-notification-production.yml, mtn-group-notification-v2.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.mtn.com/v1 - url: https://api.mtn.com/v2 security: - OAuth2: [] tags: - name: Notifications description: Send Notifications paths: /notification/3PP/{id}: post: tags: - Notifications summary: Send notification to 3PP by id. description: Send notification to 3PP by id. operationId: notification3PPByIdUsingPOST parameters: - name: id in: path description: id that needs to be included as generated by MADAPI upon Registration required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' deprecated: false requestBody: content: application/json: schema: type: object description: Notification data with objects and attributes that need to be passed onto the downstream system. Must be in valid JSON format. required: true servers: - url: https://api.mtn.com/v1 /notification/3PP/{targetSystem}/{code}/{notificationType}: post: tags: - Notifications summary: Send notification to 3PP by name, code and notification type. description: Send notificaion to 3PP by name, code and notification type. operationId: notification3PPByNameAndCodeAndnotificonTypeUsingPOST parameters: - name: notificationType in: path description: notificationType required: true schema: type: string - name: code in: path description: code required: true schema: type: string - name: targetSystem in: path description: Target System required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' deprecated: false requestBody: content: application/json: schema: type: object description: notificationData required: true servers: - url: https://api.mtn.com/v1 components: schemas: Data: type: object properties: id: type: string description: Id that gets generated example: Rec1 targetsystem: type: string description: The intended system that will receive the notification example: AYO code: type: string description: Code generated example: FZ-32-SFSG-1 notificationURL: type: string description: The URL that will receive the notifications example: https://ayowebapi-team2.mmiholdings.co.za/api/v1/madapi/rechargenotification notificationType: type: string description: The method used example: PUT countryCode: type: string example: ZA created At: type: string format: date-time description: Date and time the request is created example: '2021-07-21T17:32:28Z' modified At: type: string format: date-time description: Date and time the request was modified example: '2021-07-21T17:32:28Z' registration Status: type: string description: Status of the registration example: Deleted Error: type: object required: - statusCode - statusMessage properties: statusCode: type: string description: This is the MADAPI Canonical Error Code (it is 4 characters long and it is not the HTTP Status Code which is 3 characters long). Back-end system errors are mapped to specific canonical error codes which are returned. More information on these mappings can be found on the MADAPI Confluence Page 'Response Codes' example: '1000' statusMessage: type: string description: More details and corrective actions related to the error which can be shown to a client supportMessage: type: string description: Internal message meant for consumers of the API to troubleshoot the error (could possible include the back-end system error code in the message if it would be useful) transactionId: type: string description: This is the same transactionId that is sent in the request example: cdfa7bc3-cbcd-473b-a743-4fc90dcc91e4 timestamp: type: string format: date-time description: Timestamp that the error occurred example: '2021-07-21T17:32:28Z' path: type: string description: The path that caused the error example: /subscribers/27831234567 method: type: string description: The HTTP method type that was used example: GET Success: type: object required: - statusCode - statusMessage properties: statusCode: type: string description: This is the MADAPI Canonical Error Code (it is 4 characters long and it is not the HTTP Status Code which is 3 characters long). Back-end system errors are mapped to specific canonical error codes which are returned. More information on these mappings can be found on the MADAPI Confluence Page 'Response Codes' example: '0000' statusMessage: type: string description: More details and corrective actions related to the error which can be shown to a client transactionId: type: string description: This is the same transactionId that is sent in the request example: cdfa7bc3-cbcd-473b-a743-4fc90dcc91e4 timestamp: type: string format: date-time description: Timestamp that the error occurred example: '2021-07-21T17:32:28Z' AdditionalData: $ref: '#/components/schemas/Data' SendNotificationResponse: type: object description: The response expected after triggering a notification required: - statusCode - statusMessage properties: statusCode: type: string description: This is the MADAPI Canonical Error Code (it is 4 characters long and it is not the HTTP Status Code which is 3 characters long). Back-end system errors are mapped to specific canonical error codes which are returned. More information on these mappings can be found on the MADAPI Confluence Page 'Response Codes' example: '0000' statusMessage: type: string description: More details and corrective actions related to the error which can be shown to a client transactionId: type: string description: This is the same transactionId that is sent in the request example: cdfa7bc3-cbcd-473b-a743-4fc90dcc91e4 sequenceNo: type: string description: This is a unique transaction Identifier returned to the client example: '12345' NotificationData: description: The model expected to trigger a notification type: object properties: data: description: The data to be send as the notification. This must be a valid JSON request type: object deliveryReportUrl: description: The delivery report url. The status/report of the notification delivery is send to this url. It expects an object of the type definitions/DeliveryReportRequest. Ex. ```{"statusCode":"","statusMessage":"","transationId":"","sequenceNo":""}```. The response is of type definitions/DeliveryReportResponse. Ex. ```{"statusCode":"","statusMessage":""}``` type: string example: http://deliveryreporturl.com.ng Error_2: type: object description: Generic MADAPI error response required: - statusCode - statusMessage properties: statusCode: type: string description: This is the MADAPI Canonical Error Code (it is 4 characters long and it is not the HTTP Status Code which is 3 characters long). Back-end system errors are mapped to specific canonical error codes which are returned. More information on these mappings can be found on the MADAPI Confluence Page 'Response Codes' example: '1000' statusMessage: type: string description: More details and corrective actions related to the error which can be shown to a client supportMessage: type: string description: Internal message meant for consumers of the API to troubleshoot the error (could possible include the back-end system error code in the message if it would be useful) transactionId: type: string description: This is the same transactionId that is sent in the request example: cdfa7bc3-cbcd-473b-a743-4fc90dcc91e4 sequenceNo: type: string description: This is a unique transaction Identifier returned to the client example: 90dba2e7-676b-45c7-b4a0-9e82eb975596 timestamp: type: string format: date-time description: Timestamp that the error occurred example: 2020-08-01T12:34 path: type: string description: The path that caused the error example: /subscribers/27831234567 method: type: string description: The HTTP method type that was used example: GET securitySchemes: OAuth2: type: oauth2 flows: clientCredentials: scopes: {} tokenUrl: https://api.mtn.com/v1/oauth/access_token x-refined-from: - mtn-group-notification-production.yml - mtn-group-notification-v2.yml