Skip to main content
Last updated: 05-Jan-2022
Rate this article:

Overview

The list_coupons call is used to retrieve list of all coupons in the account.

URL: https://www.2checkout.com/api/products/list_coupons

HTTP Method: GET

Input Parameters

No input parameters required.

Data Returned

coupon

Parameter Description
coupon_code The string value of coupon code.
vendor_id Merchant ID (2Checkout Account Number) of user.
date_expire Expiration Date.(YYYY-MM-DD)
percentage_off Percentage Discount.
value_off Fixed Discount.
type Coupon type.
minimum_purchase Minimum purchase amount.
product_id ID of product selected for coupon.

Example API Call

curl -G https://www.2checkout.com/api/products/list_coupons \
    -H 'Accept: application/json' -u 'username:password'

Example Successful Response

{
       "coupon" : [
          {
             "coupon_code" : "TESTPERCENT",
             "date_expire" : "2013-06-30",
             "minimum_purchase" : "1.00",
             "percentage_off" : "0.10",
             "type" : "product",
             "value_off" : null
          },
          {
             "coupon_code" : "APITEST002",
             "date_expire" : "2012-12-31",
             "minimum_purchase" : "5.00",
             "percentage_off" : "0.05",
             "type" : "sale",
             "value_off" : null
          },
          {
             "coupon_code" : "APITEST003",
             "date_expire" : "2012-12-31",
             "minimum_purchase" : "5.00",
             "percentage_off" : "0.01",
             "type" : "sale",
             "value_off" : null
          },
          {
             "coupon_code" : "APITEST004",
             "date_expire" : "2012-12-31",
             "minimum_purchase" : "5.00",
             "percentage_off" : "0.02",
             "type" : "sale",
             "value_off" : null
          },
          {
             "coupon_code" : "PERCENTALL",
             "date_expire" : "2012-05-04",
             "minimum_purchase" : "10.00",
             "percentage_off" : "0.10",
             "type" : "product",
             "value_off" : null
          }
       ],
       "response_code" : "OK",
       "response_message" : "Coupon information retrieved successfully."
    }

Common Error Codes

Code Description
PARAMETER_MISSING Required parameter missing:
PARAMETER_INVALID Invalid value for parameter:
RECORD_NOT_FOUND Unable to find record.
Rate this article:
Logo of Verifone