List Coupon Codes


URL:

https://api2.protexting.com/v1/coupons/index?access_token=your_access_token


Method:

GET

Response parameters:

Parameter Description
Id
Coupon Code Id
CouponCode
Coupon Code
InfoText
Custom info text added after the coupon code in the outgoing message. It will be added ONLY if there is value in the field.  "InfoText" is added per coupon code, this way it can be different for each coupon code
SentTo
The phone number the coupon code is sent to
ViaApp
Shows the app the coupon code is sent via
Status
Shows if the coupon code is already sent or not
CouponCodeCustomTag_Id
Custom Coupon Code Tag Id
CreatedOn
The date when the record was created

Example Request:

curl -i -H "Accept:application/xml" "https://api2.protexting.com/v1/coupons/index?access_token=your_access_token"

 

Example Response Headers:

Status Code: 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: Keep-Alive
Content-Type: application/xml; charset=utf-8
Keep-Alive: timeout=5, max=100
Link: <https://api2.protexting.com/v1/coupons?access_token=your_access_token&page=1>; 
rel=self Pragma: no-cache Transfer-Encoding: chunked X-Pagination-Current-Page: 1 X-Pagination-Page-Count: 1 X-Pagination-Per-Page: 100 X-Pagination-Total-Count: 46 X-Powered-By: PHP/5.6.2 X-Rate-Limit-Limit: 60 X-Rate-Limit-Remaining: 59 X-Rate-Limit-Reset: 0

Example Response Body:

[
    {
        "Id": "7443bf12-0257-11eb-a4ae-f23c91cc2b28",
        "CouponCode": "discount10",
        "InfoText": null,         "SentTo": "16461234567",
        "ViaApp": "Amazon Integration",
        "CreatedOn": "2020-09-29 09:27:00",
        "Status": "Sent",
        "CouponCodeCustomTag_Id": "daeca0ca-0255-11eb-a4ae-f23c91cc2b28",
        "SentOn": "2020-10-19 05:26:11" }, { "Id": "084d219b-2ff1-11eb-a4ae-f23c91cc2b28",         "CouponCode": "discount20",
        "InfoText": null,
        "SentTo": null,
        "ViaApp": "",
        "CreatedOn": "2020-09-29 09:27:00",
        "Status": "Not Sent",
        "CouponCodeCustomTag_Id": "0dd510c9-2ff1-11eb-a4ae-f23c91cc2b28",
        "SentOn": null } ... ]
<response>
<item>
<Id>7443bf12-0257-11eb-a4ae-f23c91cc2b28</Id>
<CouponCode>discount10</CouponCode>
<InfoText/>
<SentTo>16461234567</SentTo>
  <ViaApp>Amazon Integration</ViaApp>
<CreatedOn>2020-09-29 09:27:00</CreatedOn>
<Status>Sent</Status>
<CouponCodeCustomTag_Id>daeca0ca-0255-11eb-a4ae-f23c91cc2b28</CouponCodeCustomTag_Id>
<SentOn>2020-10-19 05:26:11</SentOn>
</item>
<item>
<Id>084d219b-2ff1-11eb-a4ae-f23c91cc2b28</Id>
<CouponCode>discount20</CouponCode>
<InfoText/>
<SentTo/>
  <ViaApp/>
<CreatedOn>2020-09-29 09:27:00</CreatedOn>
<Status>Not Sent</Status>
<CouponCodeCustomTag_Id>0dd510c9-2ff1-11eb-a4ae-f23c91cc2b28</CouponCodeCustomTag_Id>
<SentOn/>
</item>
...
</response>

HTTP Status Codes:

The standard HTTP Status Codes are used. More information is available here: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml

Error Codes:

Error Codes and Examples here »