Pull Sent Messages

  API-N

You can fetch messages sent via a main account or API-X account for a period of 7 days, using Pull Sent Messages API.

Fetching Main Account Messages
https://orgds.org/api?cmd=sentmsg&username=xxxxxxxx&password=xxxxxxxx&display=json

Where username is the user’s account username; password is the user’s account password; and the display parameter defines how to display the response (json or xml format).

Fetching API-X Sub-account Messages
https://orgds.org/api?cmd=sentmsg&token=APIX_xxxxxxxx&display=json

Where token is the API-X account token; and the display parameter defines how to display the response (json or xml format).

Response Formats

JSON Response

[
	{
		"messageId":"5d09029817ae3G4K",
		"sender":"SenderID",
		"mobileNo":"234806xxxxxx",
		"dateTimeSent":"2019-06-18 16:26:00",
		"dateTimeDelivered":"2019-06-18 16:26:40",
		"message":"This is a sample message.",
		"msgRoute":"Basic",
		"msgType":"0",
		"msgMedium":"frontend",
		"mccmnc":"030",
		"networkOperator":"MTN (Nigeria)",
		"msgDlrStatus":"DELIVRD",
		"dlrStatusDescr":"Delivered to SIM",
		"smsPageCount":"1",
		"costPerSMSPage":"1.00",
		"uniqRefId":"ods19-5d09029a3ec8cr"
	},
	{
		"messageId":"5d09029817ae3G4K",
		"sender":"SenderID",
		"mobileNo":"234805xxxxxxx",
		"dateTimeSent":"2019-06-18 16:26:00",
		"dateTimeDelivered":"2019-06-18 16:26:40",
		"message":"This is a sample message.",
		"msgRoute":"Basic",
		"msgType":"0",
		"msgMedium":"frontend",
		"mccmnc":"050",
		"networkOperator":"Glo (Nigeria)",
		"msgDlrStatus":"sent",
		"dlrStatusDescr":"Delivered to SIM",
		"smsPageCount":"1",
		"costPerSMSPage":"1.00",
		"uniqRefId":"ods19-5d09029a3fa36c"
	}
]

XML Response

<?xml version="1.0" encoding="UTF-8" ?>
<responses>
	<report>
	    <messageId>5d09029817ae3G4K</messageId>
	    <sender>SenderID</sender>
	    <mobileNo>234806xxxxxxx</mobileNo>
	    <dateTimeSent>2019-06-18 16:26:00</dateTimeSent>
	    <dateTimeDelivered>2019-06-18 16:26:40</dateTimeDelivered>
	    <message>This is a sample message.</message>
	    <msgRoute>Basic</msgRoute>
	    <msgType>0</msgType>
	    <msgMedium>frontend</msgMedium>
	    <mccmnc>030</mccmnc>
	    <networkOperator>MTN (Nigeria)</networkOperator>
	    <msgDlrStatus>DELIVRD</msgDlrStatus>
	    <dlrStatusDescr>Delivered to SIM</dlrStatusDescr>
	    <smsPageCount>1</smsPageCount>
	    <costPerSMSPage>1.00</costPerSMSPage>
	    <uniqRefId>ods19-5d09029a3ec8cr</uniqRefId>
	</report>
	<report>
	    <messageId>5d09029817ae3G4K</messageId>
	    <sender>SenderID</sender>
	    <mobileNo>234805xxxxxxx</mobileNo>
	    <dateTimeSent>2019-06-18 16:26:00</dateTimeSent>
	    <dateTimeDelivered>2019-06-18 16:26:40</dateTimeDelivered>
	    <message>This is a sample message.</message>
	    <msgRoute>Corporate</msgRoute>
	    <msgType>0</msgType>
	    <msgMedium>frontend</msgMedium>
	    <mccmnc>050</mccmnc>
	    <networkOperator>Glo (Nigeria)</networkOperator>
	    <msgDlrStatus>DELIVRD</msgDlrStatus>
	    <dlrStatusDescr>Delivered to SIM</dlrStatusDescr>
	    <smsPageCount>1</smsPageCount>
	    <costPerSMSPage>1.00</costPerSMSPage>
	    <uniqRefId>ods19-5d09029a3fa36c</uniqRefId>
	</report>
</responses>