Getting Messages

Getting array of messages

GET https://direct.revicom.ltd/api/v1/message

This method allows for getting arrays of message objects that conform filtration parameters.

Query Parameters

Name
Type
Description

page

integer

Requested page: By default, 1

per_page

integer

Number of messages per page. By default, 100. The limitation: page * perPage <= 10000 should be satisfied

sort

string

Sorting

time_from

string

Low bound of the time of sending in UTC (or receiving the final unsent status). Value example: 2020-01-01T00:00:00Z

time_to

string

Upper bound of the time of sending in UTC (or receiving the final unsent status).

dispatch_id

integer

Dispatch ID Multiple parameter

message_uuid

string

Message ID Multiple parameter

destination

string

Phone number Multiple parameter

status

string

Status Multiple parameter

traffic_center_id

integer

Traffic center ID Multiple parameter

tags

string

Message tag Multiple parameter

sending_method

string

Sending method Multiple parameter

channel_type

string

Channel type Multiple parameter

traffic_type

string

Traffic type Multiple parameter

template_id

string

Template ID

Multiple parameter

content

string

String contained in the message text

content_nor

string

String not contained in the message content

sender_name

string

Sender name

Multiple parameter

cascade_message_uuid

string

Root cascade message ID

root

boolean

true – only non-cascade and cascade messages of the first step are returned; false – only cascade messages are returned starting from the second step; By default, null

ready_to_stop

boolean

true – only ready to stop messages are returned (see Stopping messages)

country_code

string

Subscriber’s country two-letter code according to ISO-3166

direction

string

Message direction; by default, outbound

Multiple parameter

dispatch

booean

true – only dispatch messages are returned;

false – only single messages are returned.

Applicable for outbound-messages only

Headers

Name
Type
Description

Authorization*

string

Basic {TOKEN_1}

{
  "page": 1,
  "perPage": 1,
  "total": 100,
  "items": [
    {
      ... // message object
    }
  ]
}

This method allows for getting no more than 10,000 messages from one digest. That is, regardless of the total value in the response, paging is possible until the number of 10,000 messages is exceeded.

To have the option to get inbounds, please, contact a manager.

Enumerations:

Parameter
Allowed Values

sort

  • sentTime:asc

  • sentTime:desc

sending_method

channel_type

traffic_type

direction

Response object description

Parameter
Type
Description

page

integer

Requested page number

perPage

integer

Number of entries per page

total

integer

The total number of the entries found that matched the filter criteria

items

array

Message objects array (described below)

Request Example

This allows for getting dispatch messages 1 and 2 in the delivered and undelivered statuses, to which this status was assigned in the interval from 2020-11-01 21:00:00 UTC to 2020-11-02 21:00:00 UTC

GET https://direct.revicom.ltd/api/v1/message?time_from=2020-11-01T21:00:00Z&time_to=2020-11-02T21:00:00Z&dispatch_id=1&dispatch_id=2&status=delivered&status=undelivered
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

Getting message by uuid

GET https://direct.revicom.ltd/api/v1/message/{message_uuid}

Path Parameters

Name
Type
Description

message_uuid*

string

Message uuid

Headers

Name
Type
Description

Authorization*

string

Basic {TOKEN_1}

{
  "createdTime": "2020-01-01T08:00:00Z",
  "channelType": "SMS",
  "sendingMethog": "UI",
  "trafficType": "SERVICE",
  "templateId": 120,
  "dispatchId": 123,
  "dispatchName": "dispatch 1",
  "messageUuid": "9d213ffc-c388-46f5-b42b-01d589d1a815",
  "trafficCenterId": 1,
  "senderName": "testSender",
  "destination": "14085553911",
  "content": "message text",
  "tags": [
    "tag1",
    "tag2"
  ],
  "ttl": 86400,
  "hours": [
    10,
    11,
    12
  ],
  "days": [
    5,
    6
  ],
  "localSendTime": "2021-02-02 15:00:00",
  "localCompletionTime": "2021-02-10 15:00:00",
  "useLocalTime": true,
  "callbackEvents": [
    "sent",
    "delivered"
  ],
  "callbackUrl": "https://url-for-callbacks",
  "totalParts": 1,
  "price": {
    "totalPrice": 2.5,
    "currency": "RUB",
    "invoicedParts": 1,
    "final": false
  },
  "sentTime": "2020-01-01T09:00:00Z",
  "statusTime": "2020-01-01T10:00:00Z",
  "status": "undelivered",
  "cascadeMessageUuid": "9d213ffc-c388-46f5-b42b-01d589d1a814",
  "cascadeStep": 1,
  "errorCode": 7060
}

Message object description

Parameter
Type
Description

createdTime

string

Message creation time (UTC)

channelType

string

sendingMethod

string

trafficType

string

templateId

integer

Template ID (possible for SERVICE and TRANSACT traffic type)

dispatchId

integer

Dispatch ID (-1 for single messages)

dispatchName

string

Dispatch name (if exists)

messageUuid

string

Message ID

trafficCenterId

integer

Traffic partitioning center ID

senderName

string

Sender name

destination

string

Subscriber's number

direction

string

brand

string

Subscriber's mobile operator

country

string

Subscriber's country

region

string

Subscriber's region

content

string

Message text

tags

array

Array of tags (if exists)

ttl

integer

Message ttl

hours

array (integer)

Allowed hours for sending

days

array (integer)

Allowed days for sending

localSendTime

string

Low bound of the sending time

localCompletionTime

string

Upper bound of the sending time

useLocalTime

boolean

Flag which shows if subscribers local time is used for localSendTime, localCompletionTime, hours, days

callbackEvents

string

callbackUrl

string

Address to send callback

totalParts

integer

Number of parts in the message

price.totalPrice

number

Message cost

price.currency

string

Message currency

price.invoicedParts

integer

Number of the rated parts

price.final

boolean

Price is final (true) / preliminary (false)

sentTime

string

Sending time (UTC)

status

string

statusTime

string

Status time (UTC)

readStatus

string

readStatusTime

string

Read status time (UTC)

specialContent

object

Message content

specialContent.contentType

string

Message content type​. For SMS only text

specialContent.text

string

Message text

errorCode

integer

cascadeMessageUuid

string

Root cascade message ID

cascadeStep

integer

Cascade step number

Last updated