Step 3: Query the status of a sent message / message notification

The tyntec server will respond to your query with the current message notification. tyntec stores message notifications for three months. tyntec will also POST these message notifications in case there is a call-back URL specified.

Query the Status of a Request/Message Notification (JSON)

curl https://username:password@rest.tyntec.com/messaging/im/v1/outbound/requests/12-75cfafba-8799-4f2b-8505-ece6af6abf01/status

Message Notification – Delivery via Instant Messaging (JSON)

{
"deliveryChannel": {
"channel": "IM",
"ott": “Viber”
},
"from": "MyCompany",
"overallState": "DELIVERED",
"requestId": "12-75cfafba-8799-4f2b-8505-ece6af6abf01",
"sendParts": [
{
"contentExcerpt": "http://www.example.c",
"currency": "EUR",
"deliveryState": "DELIVERED",
"deliveryStateDate": 1454066954667,
"errorCode": "",
"messagePartId": 1
}
],
"size": 1,
"to": "+4917912345678",
"userContext": null
}

Message Notification – Delivery via SMS (JSON)

{
"deliveryChannel": {
"channel": "SMS",
"mccmnc": null,
"ttid": "16"
},
"from": "MyCompany",
"overallState": "DELIVERED",
"requestId": "12-75cfafba-8799-4f2b-8505-ece6af6abf01",
"sendParts": [
{
"contentExcerpt": "http://www.example.c",
"currency": "EUR",
"deliveryState": "DELIVERED",
"deliveryStateDate": 1454066954667,
"errorCode": "",
"messagePartId": 1,
"price": 0.5,
"priceEffective": 1454067015769,
"sentDate": 1454066949962
},
{
"contentExcerpt": "This is a test.",
"currency": "EUR",
"deliveryState": "DELIVERED",
"deliveryStateDate": 1454066954631,
"errorCode": "",
"messagePartId": 2,
"price": 0.5,
"priceEffective": 1454067015769,
"sentDate": 1454066949994
}
],
"size": 2,
"to": "+4917912345678",
"userContext": null
}

Parameter

Description

requestId

The unique identifier provided for each request.

overallState

Aggregated status from all respective deliveryStatus.

size

1 if the message is delivered via IM or the amount of concatenated parts if the message is delivered via SMS.

from

This parameter gives the identification of the sending party, which can either be the phone number in international format or an alphanumeric identifier with up to 11 characters.

to

This parameter represents the receiving party‘s phone number in international format.

userContext

The custom message context provided by the customer.

deliveryChannel

Specifies if the message was delivered to a messaging app (“IM”) or via SMS (“SMS”).

ott

The name of the messaging app to which the message was delivered.

mccmnc

A representative IMSI prefix of the target network. The respective mapping can be found at http://www.mcc-mnc.com/, for example.

ttid

The respective tyntec ID of the target network.

overallPrice

The aggregated price from all respective message parts.

MessageNotificationContent

The actual message notifications for respective parts.

message

The separator for each part.

deliveryState

The delivery status of this specific part. Possible values are given in a following table.

contentExcerpt

The first 20 characters of the sent message.

messagePartId

A number identifying the message part.

price

The price for sending the respective message part.

currency

The currency in which the price is given, corresponding to the currency of the invoice.

priceEffective

The date when the "price" became active.

sentDate

The time stamp when the message was sent out by tyntec for delivery.

doneDate

The time stamp when the message was successfully delivered.

errorCode

The reason for an unsuccessful delivery attempt. Possible values are provided in the following table.

 

Possible values for "deliveryStatus":

Parameter

Description

DELIVERED

Message was successfully delivered.

SEEN

Message was seen by the recipient on their device.

UNDELIVERABLE

Message cannot be delivered. See error codes for more details.

EXPIRED

Message expired, i.e., the message could not be delivered within the specified time span. See error codes for more details.

REJECTED

Message rejected, i.e., the message could not be accepted by our platform. See error codes for more details.

BUFFERED

Message could not be delivered. tyntec is in the process of resending. Please wait for one of the above final statuses.