swagger: "2.0" info: title: Content Push API version: '0.1' description: |- The API provides a target system with data content to be pushed via a channel to a customer. ## Supported Actions 1. SendSms. **Supported OpCo's:** MTN Uganda, MTN Ghana, MTN SA host: api.mtn.com basePath: "/v1" schemes: - https securityDefinitions: apiKey: type: apiKey in: header name: X-API-Key OAuth2: type: oauth2 flow: application tokenUrl: 'https://api.mtn.com/v1/oauth/access_token' security: - apiKey: [] - OAuth2: [] consumes: - application/json produces: - application/json paths: '/contents/pushes': post: tags: - Content Push summary: Push content to CPs customers description: >- Pushes content to CPs via a target system. parameters: - name: action in: header description: >- Example sendSms. required: false type: string - name: transactionId in: header description: transaction ID for tracing purposes required: false type: string - name: x-country-code in: header description: ISO Country Code required: true type: string - name: targetSystem in: header description: Target system to forward push the content to CP required: true type: string - name: notificationRequest in: body description: Target system to forward push the content to CP required: true schema: $ref: '#/definitions/sendSmsRequest' responses: '200': description: Success schema: $ref: '#/definitions/sendSmsResponse' '400': description: Bad Request schema: $ref: '#/definitions/Error' '401': description: Unauthorized schema: $ref: '#/definitions/Error' '403': description: Forbidden schema: $ref: '#/definitions/Error' '404': description: Not Found schema: $ref: '#/definitions/Error' '405': description: Method No Allowed schema: $ref: '#/definitions/Error' '406': description: Not acceptable schema: $ref: '#/definitions/Error' '500': description: Internal Server Error schema: $ref: '#/definitions/Error' definitions: sendSmsRequest: required: - customerId - channel - subscriptionId - contentProviderId - messageContent type: object properties: customerId: type: string description: HTTP error code extension example: '233545678981' channel: type: string description: Message. example: 'SMS' subscriptionId: type: string description: CP's subscribed product Id contentProviderId: type: string description: Content Provider Id messageContent: type: string description: Content to be pushed to customer linkId: type: string description: Link ID sendSmsResponse: required: - data - statusCode - statusMessage - transactionId type: object properties: statusCode: type: string description: HTTP error code extension example: '0000' statusMessage: type: string description: Message. example: Send Sms is in progress transactionId: type: string description: MSISDN of the customer provided in the input as customerId example: '0987777896789999781' 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). More information on these mappings can be found at https://developers.mtn.com/getting-started/response-and-error-codes example: '3001' 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: '2020-08-01T12:34' path: type: string description: The path that caused the error example: /subscriber/256789999781/simswap-date method: type: string description: The HTTP method type that was used example: POST