Coupons
Operations related to retrieving and managing coupons.
This endpoint retrieves a list of all available coupons associated with the authenticated merchant account.
Authorizations
Responses
200
A successful response returns a list of coupon objects.
application/json
401
Unauthorized. The API Key or Merchant ID is missing or invalid.
500
Internal Server Error.
get
GET /coupons HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
"href": "https://api.vauchar.com/coupons",
"data": [
{
"href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd",
"type": "coupon",
"id": "cpn-1502288320598b19c0d59fd",
"coupon_code": "AMAZING",
"created": 1502288320,
"start_time": 1502287200,
"expiry_time": 0,
"allowed_users": 0,
"redemptions_limit_total": 0,
"redemptions_limit_per_user": 0,
"value": "5000.00",
"value_unit": "value",
"currency": "USD",
"active_status": 1
}
]
}
Retrieves the details of a specific coupon by providing its unique ID.
Authorizations
Path parameters
couponIdstringRequiredExample:
The ID of the coupon to retrieve.
cpn-1502288320598b19c0d59fd
Responses
200
A successful response returns the specified coupon object.
application/json
401
Unauthorized. The API Key or Merchant ID is missing or invalid.
404
Not Found. The coupon with the specified ID could not be found.
500
Internal Server Error.
get
GET /coupons/{couponId} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
"href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd",
"data": {
"href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd",
"type": "coupon",
"id": "cpn-1502288320598b19c0d59fd",
"coupon_code": "AMAZING",
"created": 1502288320,
"start_time": 1502287200,
"expiry_time": 0,
"allowed_users": 0,
"redemptions_limit_total": 0,
"redemptions_limit_per_user": 0,
"value": "5000.00",
"value_unit": "value",
"currency": "USD",
"active_status": 1
}
}