For the complete documentation index, see llms.txt. This page is also available as Markdown.

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
AuthorizationstringRequired

HTTP Basic Authentication. The username is your Merchant ID and the password is your API Key. The combined string Merchant_Id:Api_Key should be Base64 encoded.

Responses
200

A successful response returns a list of coupon objects.

application/json
hrefstringOptional

The URL for the requested resource.

Example: https://api.vauchar.com/coupons
get/coupons
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
AuthorizationstringRequired

HTTP Basic Authentication. The username is your Merchant ID and the password is your API Key. The combined string Merchant_Id:Api_Key should be Base64 encoded.

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
hrefstringOptionalExample: https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd
get/coupons/{couponId}
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
  }
}

Last updated