Description
This API method allows a marketer to obtain the status of coupons in a particular coupon bank. Submitting the bank ID will return data for all of the coupons in the bank, but a single coupon can be submitted as well. Data returned include status and date when a coupon is uploaded or assigned to a message as well as redemption status and date.
Arguments
Field | Description | Field Type | Required | Example |
---|---|---|---|---|
bank_id | The ID number of the coupon bank for which the status of coupons is needed | number | Yes | 4 |
coupon_code | An individual coupon code | number | No | M746209500 |
date_added | The filter for upload date and status elements | date | No | 2016-03-13 |
subscriber_assigned | The filter for assignment status and date elements | boolean | No | 1 |
redeemed | The filter for redemption status and date elements | boolean | No | 1 |
date_added_start | The beginning date for a range to limit results (Using range settings takes priority over date_added) | date | No | 2016-07-17 |
date_added_end | The end date for a range to limit results. | date | Yes | 2016-10-17 |
Response
Field | Description | Example |
---|---|---|
bank_id | The identification number of the coupon bank | 19 |
coupon_code | An individual coupon code | ASDF1234GHJK5678 |
The subscriber's email address | jdoe@example.com | |
message_id | The ID for a message assigned with a particular coupon | 1029304 |
date_added | A boolean value where 1 = coupon is uploaded (and 0 = not uploaded) | 1 |
subscriber_assigned | A boolean value where 1 = coupon is assigned to a message | 1 |
subscriber_assigned_date | The date when coupon is assigned to a message | 2015-11-17 |
redeemed | A boolean value where 1 = coupon is redeemed | 1 |
redeem_date | The date when coupon is redeemed | 2016-11-17 |
Response Codes
Response Code | Response Text | Description |
---|---|---|
667 | Action not taken, invalid bank id | Invalid bank_id passed |
673 | Invalid date or date format for date_added | Invalid value submitted for date_added |
674 | Invalid date or date format for date_added_start | Invalid value submitted for date_added_start |
675 | Invalid date or date format for date_added_end | Invalid value submitted for date_added_end |
676 | "date_added_end" cannot before "date_added_start" | Logic mismatch in a range search |
677 | "date_added_start/date_added_end" must be passed together | Logic mismatch in a range search |
678 | Success | Successful operation |
679 | Only "date_added" or "date_added_start/date_added_end" is allowed | Only a date OR date range can be searched |
680 | Exceeded maximum (4000) number of bank codes allowed | Exceeded maximum (4000) number of coupon codes allowed |
681 | Cannot search beyond 3 months | Cannot search beyond 3 months |
684 | No data available | No data available |
Example Post
<methodCall>
<methodName>coupon.getDetails</methodName>
<bank_id>204</bank_id>
<date_added>2016-05-25</date_added>
<subscriber_assigned>0</subscriber_assigned>
</methodCall>
Example Response
<methodResponse>
<item>
<methodName>coupon.getDetails</methodName>
<responseCode>678</responseCode>
<responseText>Success</responseText>
<responseData>
<item>
<valid>1</valid>
<bank_id>204</bank_id>
<code>code123</code>
<email>joe@example.com</email>
<mess_id>1998765</mess_id>
<date_added>2016-05-25</date_added>
<subscriber_assigned>1</subscriber_assigned>
<subscriber_assigned_date>2016-05-25</subscriber_assigned_date>
<redeemed>1</redeemed>
<redeemed_date>2016-06-01</redeemed_date>
<item>
<item>
<valid>1</valid>
<bank_id>204</bank_id>
<code>code456</code>
<email>jen@example.com</email>
<mess_id>1998989</mess_id>
<date_added>2016-05-25</date_added>
<subscriber_assigned>1</subscriber_assigned>
<subscriber_assigned_date>2016-05-28</subscriber_assigned_date>
<redeemed>1</redeemed>
<redeemed_date>2016-05-31</redeemed_date>
<item>
</responseData>
<responseNum>1</responseNum>
</item>
</methodResponse>