Method: GetOutboundMsgs

Method Type: Post

This method will be called by your application to retrieve outbound text messages to 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 get or include 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 Outbound Messages By Date Range:
https://restapi.crmtext.com/smapi/rest?method=getoutboundmsgs&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= "getcustmsgsbymobile" status= "200" message= "ok">
<msglist>
<message>
<msgID>999111222</msgID>
<message>That's correct including labor.'</message>
<timestamp>2014-08-11 14:26:42</timestamp>
<delivered/>
<txnid>0987654321</txnid>
<msg_direction>MT</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>Should be ready by 3:30 but text me 30 minutes before.</message>
<timestamp>2014-08-11 14:41:26</timestamp>
<delivered/>
<txnid>0987654322</txnid>
<msg_direction>MT</msg_direction>
<user_id>4321<user_id>
<customer>
<custId>1234567891011</custId>
<subacct>456</subacct>
<timestamp>2014-08-11 09:30:51</timestamp>
<optinsStatus>3</optinStatus>
<custName>John Queue</custName>
<custMobile>9993338888</custMobile>
</customer>
</message>
</msglist>
</response>

XML Sample Error Response

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