Detail Coupon
Last updated: 05-Jan-2022
Rate this article:
Overview
The detail_coupon call is used to retrieve the details for a single coupon.
URL: https://www.2checkout.com/api/products/detail_coupon
HTTP Method: GET
Input Parameters
Parameter | Description |
---|---|
coupon_code | The string value of coupon code. Required |
Data Returned
Parameter | Description |
---|---|
coupon_code | String value of coupon code. |
date_expire | Expiration Date. (YYYY-MM-DD) |
percentage_off | Percentage Discount |
type | Coupon type |
value_off | Fixed Discount |
minimum_purchase | Minimum purchase amount. |
product_id | ID of product selected for coupon. |
Example API Call
curl -G https://www.2checkout.com/api/products/detail_coupon \
-H 'Accept: application/json' -u 'username:password' \
-d 'coupon_code=APITEST002'
Example Successful Response
{
"coupon" : {
"coupon_code" : "APITEST002",
"date_expire" : "2012-12-31",
"minimum_purchase" : "5.00",
"percentage_off" : "5",
"product" : [
{
"product_id" : "0",
"product_url" : "https://www.2checkout.com/api/products/detail_product?product_id=0"
}
],
"type" : "sale",
"value_off" : null
},
"response_code" : "OK",
"response_message" : "Coupon detail 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. |
FORBIDDEN | Access denied to coupon. |
Rate this article: