swagger: '2.0'
info:
title: Communication Management
description: This API Provides a capability to create and send communications, notifications, and instructions to Parties, Individuals, Organizations or Users.
version: '2.0'
host: api.mtn.com
basePath: /v1
schemes:
- https
consumes:
- application/json
produces:
- application/json
paths:
/communicationMessage:
post:
operationId: createCommunicationMessage
summary: Creates a 'CommunicationMessage'
tags:
- communicationMessage
parameters:
- schema:
$ref: '#/definitions/CommunicationMessage_Create2'
required: false
in: body
name: communicationMessage
description: The Communication Message to be created
responses:
'201':
description: Created
schema:
$ref: '#/definitions/CommunicationMessage'
'400':
description: Bad Request
schema:
$ref: '#/definitions/Error'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/Error'
definitions:
CommunicationMessage_Create2:
type: object
description: |-
Communication message means a notification approach in the format of a message which can be dispatched (sent) to the certain user by the system with the content which can be felt and understood by the recipient. The user can be either a final customer or a customer service agent. The message can reach the customer in different interaction channels, including: email, short message, mobile app notification (push).
Skipped properties: id,href
required:
- type
- content
- sender
- receiver
properties:
productId:
type: string
description: The promotion/communication Id.
content:
type: string
description: The content of the communication message.
description:
type: string
description: Description for the whole object
status:
type: string
description: Status of communication message
subject:
type: string
description: |-
The title of the message.
It is necessary for the email and mobile app push.
characteristic:
type: array
items:
$ref: '#/definitions/CommunicationRequestCharacteristic'
receiver:
type: array
items:
$ref: '#/definitions/Receiver'
sender:
type: array
items:
$ref: '#/definitions/Sender'
attachment:
type: array
items:
$ref: '#/definitions/Attachment'
CommunicationMessage:
type: object
description: 'Communication message means a notification approach in the format of a message which can be dispatched (sent) to the certain user by the system with the content which can be felt and understood by the recipient. The user can be either a final customer or a customer service agent. The message can reach the customer in different interaction channels, including: email, short message, mobile app notification (push).'
properties:
statusCode:
type: string
description: HTTP error code extension
customerId:
type: string
description: CustomerId provided in the input
example: string
statusMessage:
type: string
description: Description of the processing result. Forexample incase there was an error, this will have the message showing the error that happened
transactionId:
type: string
description: This is the same transactionId that is sent in the request
sendTime:
type: string
format: date-time
description: The time of sending communication message
CommunicationMessage_Create:
type: object
description: |-
Communication message means a notification approach in the format of a message which can be dispatched (sent) to the certain user by the system with the content which can be felt and understood by the recipient. The user can be either a final customer or a customer service agent. The message can reach the customer in different interaction channels, including: email, short message, mobile app notification (push).
Skipped properties: id,href
required:
- type
- content
- sender
- receiver
properties:
'@baseType':
type: string
description: It indicates the base type of REST resource.
'@schemaLocation':
type: string
description: It provides the link to the schema describing REST resource
'@type':
type: string
description: It indicates the class type of the catalog
callbackFlag:
type: boolean
content:
type: string
description: The content of the communication message.
description:
type: string
description: Description for the whole object
logFlag:
type: boolean
priority:
type: string
description: |-
The priority of the communication message.
Small number means higher priority.
sendTime:
type: string
format: date-time
description: The time of sending communication message.
sendTimeComplete:
type: string
format: date-time
description: The time of completion of sending communication message.
status:
type: string
description: Status of communication message
subject:
type: string
description: |-
The title of the message.
It is necessary for the email and mobile app push.
tryTimes:
type: integer
type:
type: string
description: |-
1: SMS
2: Email
3: Mobile app push notification
characteristic:
type: array
items:
$ref: '#/definitions/CommunicationRequestCharacteristic'
receiver:
type: array
items:
$ref: '#/definitions/Receiver'
sender:
$ref: '#/definitions/Sender'
attachment:
type: array
items:
$ref: '#/definitions/Attachment'
CommunicationRequestCharacteristic:
type: object
description: The values of parameters which are used in the content if the content contains them.
properties:
name:
type: string
description: Content parameter identifier
value:
type: string
description: Content parameter value
cardOrientation:
type: string
description: Content parameter identifier
imageAlignment:
type: string
description: Content parameter value
mediahref:
type: string
description: Content parameter identifier
mediaContent:
type: string
description: Content parameter value
mediaFileSize:
type: string
description: Content parameter value
thumbnailContentType:
type: string
description: Content parameter value
thumbnailFileSize:
type: string
description: Content parameter identifier
thumbnailhref:
type: string
description: Content parameter identifier
height:
type: string
description: Content parameter value
content:
type: string
description: Content parameter value
title:
type: string
description: Content parameter value
description:
type: string
description: Content parameter value
Receiver:
type: object
description: Receivers of the communication message.
properties:
appUserId:
type: string
description: ID of the mobile app user
email:
type: string
description: Receiver address of email, if the communication type is email
id:
type: string
description: ID of the receiver
ip:
type: string
description: IP address of the receiver
name:
type: string
description: Name of the receiver
phoneNumber:
type: string
description: Phone number of the receiver, if the communication type is SMS.
party:
$ref: '#/definitions/RelateParty'
Sender:
type: object
description: Sender of the communication message.
properties:
email:
type: string
description: Sender address of email, if the communication type is email
id:
type: string
description: ID of the sender
name:
type: string
description: Name of the sender
phoneNumber:
type: string
description: Phone number of the sender, if the communication type is SMS.
party:
$ref: '#/definitions/RelateParty'
Attachment:
type: object
description: Complements the description of an element (for instance a product) through video, pictures...
properties:
description:
type: string
description: A narrative text describing the content of the attachment
href:
type: string
description: Reference of the attachment
id:
type: string
description: Unique identifier of the attachment
type:
type: string
description: Attachment type such as video, picture
url:
type: string
description: Uniform Resource Locator, is a web page address (a subset of URI)
RelateParty:
type: object
description: The party entity of the receiver (user)
properties:
href:
type: string
description: Hypertext Reference of the party
id:
type: string
description: Unique identifier of party
name:
type: string
description: name of the party
postBack:
type: string
description: Send back information
role:
type: string
description: role of the party (customer, partner, etc)
validFor:
$ref: '#/definitions/TimePeriod'
description: Validity period of the party
TimePeriod:
type: object
description: A base / value business entity used to represent a period of time between two timepoints.
properties:
endDateTime:
type: string
format: date-time
description: An instant of time, ending at the TimePeriod.
startDateTime:
type: string
format: date-time
description: An instant of time, starting at the TimePeriod
Error:
required:
- statusCode
- statusMessage
type: object
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