Coupons

Operations related to retrieving and managing coupons.

Get All Coupons

get

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
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
    }
  ]
}

Get Specific Coupon

get

Retrieves the details of a specific coupon by providing its unique ID.

Authorizations
Path parameters
couponIdstringRequired

The ID of the coupon to retrieve.

Example: cpn-1502288320598b19c0d59fd
Responses
200
A successful response returns the specified coupon object.
application/json
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
  }
}