Home

Search the wiki

»

API Documentation


Mobile Payment

Intouch REST Resource: Messages

RSS
This page describes the messages portion of the Intouch REST API.


Endpoints

URIMethodReturnsNotes
/messagesPOSTA single messageUsed to send a message to a list of recipients. The message is returned with the MessageId set.
/messages/{id}GETA single messageRetrieve a single message.
/messages/{id}DELETEStatus code 200, no contentDelete a single message. This can be used to cancel messages not yet sent.

Data contract

When getting or sending message data you have the option of using either XML or JSON.
Parameter names are Case-Sensitive!

JSON

Sample data, returned by requesting resource /messages/63472:

{
    "FolderId":197,
    "HandledDate":"\/Date(1224488767350+0200)\/",
    "IsMergeMessage":false,
    "IsPrivate":false,
    "MessageId":"I_1234",
    "MessageStatus":"Sent",
    "Receivers":"2077",
    "SenderNumber":"4755501966",
    "Tariff":0,
    "Text":"Genoa test"
}

XML

Sample data, returned by requesting resource /messages/I_1234:

<?xml version="1.0" encoding="utf-8"?>
<Message xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PSWinCom.Intouch.API.Resources">
  <FolderId>197</FolderId>
  <HandledDate>2008-10-20T09:46:07.35</HandledDate>
  <IsMergeMessage>false</IsMergeMessage>
  <IsPrivate>false</IsPrivate>
  <MessageId>I_1234</MessageId>
  <MessageStatus>Sent</MessageStatus>
  <Receivers>2077</Receivers>
  <SenderNumber>4755501966</SenderNumber>
  <Tariff>0</Tariff>
  <Text>Genoa test</Text>
</Message>


Sending messages

Sending messages is done through sending message data to /messages using the POST verb.

Receivers

Receivers are specified as a semicolon separated list. Contacts is specified by prepending /contacts/ to the contact's id while groups is specified by prepending /groups/ to the group's id. You can also specify a number that is not associated with any contact. An example of a list of receivers is:

12345678; /contacts/3432; /groups/23

JSON

Sample request, POSTed to /messages:

{
    "Receivers": "4755501966;/groups/23;/contacts/3432",
    "SenderNumber": "2077",
    "Text": "Genoa test",
    "Tariff": 0,
    "HandledDate": "/Date(1224488767000+0200)/"
}

Note: HandledDate is specified as milliseconds since Jan 1 1970 with timezone given on the format +/-hhmm. If you do not wish to send message with deferred delivery please omit this property.

See also

Gateway interfaces: | XML | HTTP | SMTP | SOAP | SFTP BatchLoader
Intouch interfaces: REST | Syncopy

© Copyright Link Mobility ASA.





GuestLogin