Get User Messages

/v3/interact/Messages

This endpoint returns the user messages (sent and received) according to the filter received.

Parameters

filter

Object where search parameters are defined.

{
 "from": "2023-10-12T13:39:14.968Z",
 "to": "2023-10-13T13:39:14.968Z",
 "type": "all"
 "onlyProcessed": false
 "SentStatus": int array - SentNotDelivered = 1, DeliveredNotRead = 3, Read = 5
}

FieldDescription
from The begining of the period from where we want to return messages.
no the midnight of the current day
to The ending of the period from where we want to return messages.
no UTC Now
type The type of the desired messages enum yes
ID Type
1All
2Messages
3Forms
processedOnly Allows to force the return of processed messages only. yes
geometryGeoJSON JSON structure that defines the polygon. object When *geometry* is defined as *polygon*
geometryGeoJSON.geometry Used to define the points of the *polygon* object When *geometry* is defined as *polygon*

Response

{
    "statusCode" - string - Status code,
    "content" [
        {
            "id": 0
            "companyId": 0
            "timestamp": "2023-10-12T13:39:14.968Z",
            "direction": "string",
            "driverId": 0,
            "driverName": "string",
            "companyId": 0,
            "vehicleId": 0,
            "licensePlate": "string",
            "text": "string",
            "terminal": 'A',
            "status": 0,
            "statusTime" : "2023-10-12T13:39:14.968Z",
            "direction": "string",
            "vehicleIcon": 0,
            "vehicleOtherIcon": 0,
            "address": "string"
        }
    ],
    "error" {
        message: "string"
    }
}

FieldDescription
statusCode Status code string
content The array of messages found string[]
content[i].id The identifier of the message. int
content[i].companyId The identifier of the company int
td>content[i].timestamp The moment when the message was sent or received by the user.
content[i].direction Specified the direction of the message.
Two values are possible: "sent" and "received" string
content[i].driverId The ID of the driver associated with the terminal id
content[i].driverName The name of the driver associated with the terminal string
content[i].vehicleId The ID of the vehicle associated with the terminal, if any int
content[i].licensePlate The licensePlate of the vechicle, if a vehicle was associated with the terminal when the message was sent. string
content[i].text The text content of the message string
content[i].terminal Identifies the type of terminal.
See the complete list of available terminals types. char
content[i].status The ID of the status of the message.
See the complete list of messages statuses. int
content[i].statustTime The last time the status of the message was changed.
content[i].vehicleIcon The ID of the icon of the vehicle, if avalilable. int
content[i].id The ID of a second icon of the vehicle, if available. int
content[i].address Address in case one is passed along with the message string
error Included in the response in the cases when an error occours. object
message Some text the describes the error occoured. string

Response HTTP Codes

200 - OK

  • Response with the expected results

400 - Bad request

  • There are no vehicles for the user

401 - Unauthorized

  • Invalid creadencials