Send Messages With Attachment
/v3/interact/messages/sendMessageWithFile
This endpoint allows to send a message with an attachment.
Parameters
message
The message and the terminals to where it should be send.
{
"terminals": [
{
"type": "NAV",
"identifier": "string",
"maxLength": 0,
"driverId": 0,
"driverName": "string",
"vehicleId": 0,
"licensePlate": "string",
"email": "string"
}
],
"message": "string",
"subject": "string",
"location": {
"latitude": 0,
"longitude": 0,
"address": "string",
"culture": "string",
"placeId": 0,
"placeName": "string"
},
"sendAs": "office",
"contentType": "string",
"filename": "string",
"file": "string"
}
Field | Description |
terminals |
An array of terminals to which the message should be sent.
|
terminals[].type |
The type of terminal.
A list terminal types can be found HERE
|
terminals[].identifier |
The terminal's unique identifier.
|
terminals[].maxLength |
The maximum length of the message that the terminal can handle.
|
terminals[].driverId |
The driver's ID associated with the terminal.
|
terminals[].driverName |
The driver's name associated with the terminal.
|
terminals[].vehicleId |
The vehicle ID associated with the terminal.
|
terminals[].licensePlate |
The vehicle's license plate associated with the terminal.
|
terminals[].email |
An e-mail address to send the message.
type is Email . |
message |
The content of the message to be sent.
|
subject |
The subject of the message.
|
location |
The location details (optional).
|
location.latitude |
The latitude of the location.
|
location.longitude |
The longitude of the location.
|
location.address |
The address of the location.
|
location.culture |
The cultural context or language of the location.
|
location.placeId |
The place ID of the location.
|
location.placeName |
The name of the place.
|
sendAs |
The mode in which the message should be sent ('Send message as' options). Available options are: 1 - Office ; 2 - User |
contentType |
The type of the content being sent. Ex: ex: "application/PDF"
|
filename |
The name of the file to be associated with the message.
|
file |
The content of the file encoded in Base64. The maximum file size depends on the type: - email : the maximum is 5MB - Another type: the maximum size is 2MB |
Response
{
"statusCode": "",
"content": [
{
"id": 0
}
]
}
Field | Description |
statusCode |
Response for http request.
|
content[].id |
The ID of the message.
|
Response HTTP Codes
200 - OK
- When the operation succeeds
400 - Bad request
- if no input is received
- if the input is an empty array
403 - Forbidden
Forbidden is returned when the user doesn't have one or more of the following permissions:
- Permission to see interact forms messages
- Permission to see interact phone messages
- Permission to see interact NAV messages
- Permission to see interact MDT messages
- Permission to see interact Driver App messages