The SCG messaging API enables the retrieval of Message Requests and Messages information including the “State”.
This document describes the possible values for the “state” field on a Message Requests and Messages.
Examples
We can query information about a Message Request and a Message through the GET method and the "/message_requests” and “/messages” resources of the SCG messaging API. The following are examples of the json responses obtained through these resources and API calls:
Message Request example:
{
"application_id": 11407,
"company_id": [company_id],
"created_date": 1656704873258,
"last_updated_date": 1656705000283,
"version_number": 3,
"id": "nyXggPzDpBtO320SPPkbC",
"from": "channel:Bxn9SHBYhl89KnuDllO2L4",
"to": [
"+5066173XXXX",
"+5066016XXXX"
],
"body": "Test message to multiple msisdn",
"scheduled_delivery_time": 1656705000000,
"state": "COMPLETED",
"channel_id": "Bxn9SHBYhl89KnuDllO2L4",
"recipient_count": 2,
"sent_count": 2,
"delivered_count": 2,
"media_requested_count": 0,
"read_count": 0,
"click_thru_count": 0,
"converted_count": 0,
"canceled_count": 0,
"failed_count": 0,
"sender_id_sort_criteria": [],
"contact_delivery_address_priority": [],
"scheduled": false,
"request_start_time": 1656705000000
}
Message example:
{
"application_id": 11407,
"company_id": [company_id],
"created_date": 1656704873495,
"last_updated_date": 1656705005553,
"version_number": 3,
"id": "FA5jsLtprXTKRspsyJqEv6",
"message_request_id": "nyXggPzDpBtO320SPPkbC",
"direction": "MT",
"customer_sender_id": "FVwXNFWghnXyBazsR1HxQ3",
"from_address": "7777",
"to_address": "+5066173XXXX",
"state": "DELIVERED",
"body": "Test message for sample",
"sent_date": 1656705000214,
"delivered_date": 1656705000000,
"attachments": [],
"scheduled_delivery_time": 1656705000000,
"channel_id": "Bxn9SHBYhl89KnuDllO2L4",
"type": "SMS",
"destination_country": "CRI",
"price": 0.024,
"sender_id_alias": "FVwXNFWghnXyBazsR1HxQ3",
"fragments_info": [
{
"fragment_id": "HNcMwq97VnTph3d8ar2CF1",
"fragment_state": "DELIVERED",
"charge": 0.024,
"external_id": "102420229621653156486968",
"delivery_report_reference": "FA5jsLtprXTKRspsyJqEv6"
}
],
"consent_requirement": "NONE",
"standalone": false,
"request_start_time": 1656705000000
}
List of valid Message Request’s “State”
Here you can find a complete list of the supported states in the following table:
State Values |
Description |
SUBMITTED |
|
ACCEPTED |
The Message Request has been validated and is accepted for processing. |
REJECTED |
The Message Request has failed validation and will not be processed. |
PREPARING |
While in the preparing state, the recipient count may increase with time i.e. SCG will keep track of the preparing step to allow polling on the resource to have user see progress. The Message Request is being processed. Individual messages are being created and delivered. |
TRANSMITTING |
The message request processing is finished. Individual messages are being delivered. |
COMPLETED |
The request’s message was sent for all the recipients to the outbound delivery system. |
PAUSED |
The Message request processing is paused. No individual messages will be delivered until the Message Request state is set back to "Transmitting." A Message Request can enter the Paused state when it is submitted with the "pause before transmit" flag set to true. |
CANCELED |
Cancel can be requested at any time) NOTE: to resume paused messages, the status should be updated by customer from PAUSED to TRANSMITTING. The Message request has been canceled. Any unsent messages will not be delivered. |
DELETED |
The Message Request has been deleted. It will no longer appear in the list of Message Requests. |
List of valid Message’s “State”
Here you can find a complete list of the supported states in the following table:
State Values |
Description |
CREATED |
Message was created and is in the queue of SCG The Message has been created in the SMS API service and is pending delivery. |
QUEUED |
The Message has been created but it is on a queue waiting to be sent. |
SENT |
Message was sent to the outbound delivery system. The Message has been sent to the recipient. |
DELIVERED |
Message was delivered to end-device of the user. A delivery report has been received for this Message. * This state is set by the Channel Partner. |
READ |
Message was read by the user. A read report has been received for this Message. * This state is set by the Channel Partner. |
CONVERTED |
The customer can externally track conversion and could update the message status applying the POST method and specifying status = CONVERTED. |
CLICKTHRU |
The Message that included a link generated using Syniverse tracking service was clicked on or has been auto previewed. |
FAILED |
The Message delivery failed and will not be retried. |
EXPIRED |
Message was too old to be sent. The Message was not delivered before the expiration date, so processing was canceled. |
SCHEDULED |
Message is created but not submitted for sending. The Message is scheduled to be delivered at a later date. |
TEST |
Message was created but the request was a test request.
More info here. |
PAUSED |
Message was created but the request was to pause before delivery. The Message was sent with "Pause before transmitting" flag. The Message will not be sent until the state is moved back to "Created". |
DELETED |
When the message was deleted by the customer. |
RECEIVED |
Received at SCG. Valid for MO messages. |
0 Comments