Method: GetInboundMsgs

Method Type: Post

This method will be called by your application to retrieve inbound text messages from a store’s opted-in customers with a start and end date for the store you request within your auth string. It will return a maximum of 1000 records.

  Restrictions


  • Note the date format requested in the parameters carefully as that is the only acceptable format.
  • A max record count of 1000.
  • Data is archived after 6 months by the CRM Text SMS API. Make sure you have a plan to store customer data on your side.

  Suggestions


  • Set your enddate one day ahead of the current date to include or only get the present day's data. For example, if today's date is March 15th, 2015 set the enddate to '20150316'. Use '20150315' as the startdate.
  • Use this method to extract daily message history.

Request Example

Get Inbound Messages By Date Range:
https://restapi.crmtext.com/smapi/rest?method=getinboundmsgs&startdate=&enddate=


Request Parameters

Name Required Value Description
startdate Yes string Format: "YYYYMMDD"
enddate Yes string Format: "YYYYMMDD"

XML Sample Successful Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<response op= "getinboundmsgs" status= "200" message= "ok">
<msglist>
<message>
<msgID>999111222</msgID>
<message>So with the brakes it costs $350?</message>
<timestamp>2014-08-11 14:23:36</timestamp>
<delivered/>
<txnid>0987654321</txnid>
<msg_direction>MO</msg_direction>
<user_id>4321</user_id>
<customer>
<custId>1234567891011</custId>
<subacct>456</subacct>
<timestamp>2014-08-11 09:19:12</timestamp>
<optinsStatus>3</optinStatus>
<custName>John Queue</custName>
<custMobile>9993338888</custMobile>
</customer>
</message>
<message>
<msgID>999111223</msgID>
<message>Ok that's fine. When will it be ready?</message>
<timestamp>2014-08-11 14:29:36</timestamp>
<delivered/>
<txnid>0987654322</txnid>
<msg_direction>MO</msg_direction>
<user_id>4321<user_id>
<customer>
<custId>1234567891011</custId>
<subacct>456</subacct>
<timestamp>2014-08-11 09:31:29</timestamp>
<optinsStatus>3</optinStatus>
<custName>John Queue</custName>
<custMobile>9993338888</custMobile>
</customer>
</message>
</msglist>
</response>

XML Sample Error Response

1
2
<response op= "getinboundmsgs" status= "4xx" message= "reason for Error">
</response>