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"
}

FieldDescription
terminals An array of terminals to which the message should be sent. Array yes
terminals[].type The type of terminal. A list terminal types can be found HERE enum/int yes
terminals[].identifier The terminal's unique identifier. string yes
terminals[].maxLength The maximum length of the message that the terminal can handle. int no
terminals[].driverId The driver's ID associated with the terminal. int no
terminals[].driverName The driver's name associated with the terminal. string no
terminals[].vehicleId The vehicle ID associated with the terminal. int no
terminals[].licensePlate The vehicle's license plate associated with the terminal. string no
terminals[].email An e-mail address to send the message. string If type is Email.
message The content of the message to be sent. string yes
subject The subject of the message. string no
location The location details (optional). Object no
location.latitude The latitude of the location. double no
location.longitude The longitude of the location. double no
location.address The address of the location. string no
location.culture The cultural context or language of the location. string no
location.placeId The place ID of the location. int no
location.placeName The name of the place. string no
sendAs The mode in which the message should be sent ('Send message as' options).
Available options are: 1 - Office ; 2 - User enum/int yes
contentType The type of the content being sent. Ex: ex: "application/PDF" string yes
filename The name of the file to be associated with the message. string yes
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 string yes

Response

{
    "statusCode": "",
    "content": [
        {
            "id": 0
        }
    ]
}

FieldDescription
statusCode Response for http request. Array yes
content[].id The ID of the message. int yes

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