Vauchar

The Vauchar Developer Hub

Welcome to the Vauchar developer hub. You'll find comprehensive guides and documentation to help you start working with Vauchar as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Suggest Edits

Introduction

 

Welcome to the Vauchar API! You can use our API to access Vauchar resources. Our API is based on REST based model. We use built-in HTTP features like basic authentication and standard response codes throughout our API. JSON is returned by all API responses, including errors and messages.

Base URL

All URLs referenced in the documentation have the following base:

https://api.vauchar.com

Important

The Vauchar API is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.

Suggest Edits

Authentication

 

Vauchar uses API keys to allow access to the API. You can register a new Vauchar API key for free by going here.

Vauchar API uses basic authentication and expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)

Important

You must replace Your_Merchant_Id and Your_Api_Key with your Merchant Id and API Key.

The Vauchar API uses the following error codes:

The Vauchar API uses the standard HTTP status codes to indicate success or failure. Responses with a status code starting with 4xx or 5xx can be considered as failed.

HTTP status code summary

Error Code
Description

400

Bad Request – Your request is not correct or required parameter missing

401

Unauthorised – Your Merchant ID or API key is wrong

402

Insufficient Balance – There is not enough balance in your account

403

Forbidden – Either the resource is hidden or you are not allowed to access the resource

404

Not Found – The specified resource could not be found

405

Method Not Allowed – You tried to access a resource with an invalid method

406

Not Acceptable – You requested a format that isn’t JSON

500

Internal Server Error – We had a problem with our server. Try again later

503

Service Unavailable – We’re temporarily offline for maintenance. Please try again later

Suggest Edits

Verify Credentials

This is the endpoint to verify your credentials

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/verifycredentials
curl --request GET \
  --url https://api.vauchar.com/verifycredentials
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/verifycredentials' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/verifycredentials")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/verifycredentials");

xhr.send(data);
import requests

url = "https://api.vauchar.com/verifycredentials"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/verifycredentials"
{
  "message": "Credentials Valid."
}
Suggest Edits

Validate Codes

This is a common endpoint which can be used to validate by using both coupon or voucher code. The response code will be same as per individual type of resource

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/validate
curl --request GET \
  --url 'https://api.vauchar.com/validate?code=code'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/validate',
  qs: { code: 'code' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/validate?code=code")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/validate?code=code");

xhr.send(data);
import requests

url = "https://api.vauchar.com/validate"

querystring = {"code":"code"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

code
string
required

The human readable coupon/voucher code which is to be validated (This value is case sensitive)

user_id
string

The user id of the user who making this redemption

value_used
string

The value which is required to be redeemed (Required to validate the balance in gift card)

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/validate?code=E57BBRT87X2DB&user_id=user001&value_used=100"
{
    "validation_status": {
        "status": 1004,
        "message": "Voucher already redeemed"
    },
    "data": {
        "href": "https://api.vauchar.com/vouchers/vcr-150513600959b68d89f211b",
        "type": "voucher",
        "id": "vcr-150513600959b68d89f211b",
        "voucher_code": "E57BBRT87X2DB",
        "tag": "cam-150513566359b68c2fe24b1",
        "created": 1505136009,
        "start_time": 1505136009,
        "expiry_time": 0,
        "value": "30.00",
        "value_unit": "percentage",
        "currency": "USD",
        "redeemed": 1,
        "redeemed_date": 1506588906,
        "teams": []
    }
}

The validation status and message give you the details of of discount codes after validating all the parameters from the API

Suggest Edits

Get All Coupons

This endpoint retrieves all coupons.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/coupons
curl --request GET \
  --url https://api.vauchar.com/coupons
var request = require("request");

var options = { method: 'GET', url: 'https://api.vauchar.com/coupons' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/coupons");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

limit
string

The number of coupons to retrieve at a time

offset
string

The row from where to start retrieving the coupon

coupon_code
string

The human readable coupon code

created
date-time

Unix Time Stamp of the coupon created time.

start_time
date-time

Unix Time Stamp when the coupon is going to active.

expiry_time
date-time

Unix Time Stamp when the coupon is going to deactivated (0 means indefinitely).

allowed_users
int32

The type of users allowed (0 means new users, 1 means new users, 2 means existing users)

value
float

The value of discount that will be given by the coupon.

value_unit
string

The unit of the value of the coupon. (Allowed values are value & percentage)

currency
string

The currency in 3 digit format in which the discount value shall be calculated

active_status
int32

The current active status of the coupon

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/coupons"
{
    "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
        }
    ]
}
Suggest Edits

Get Specific Coupon

This endpoint retrieves a specific coupon.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/coupons/coupon_id
curl --request GET \
  --url https://api.vauchar.com/coupons/coupon_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/coupons/coupon_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/coupon_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/coupons/coupon_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/coupon_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

coupon_id
string
required

The Unique ID of the coupon to retrieve

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd"
{
    "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
    }
}
Suggest Edits

Get Coupon Statistics

Get the redemption statistics of a specific coupon

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/coupons/coupon_id/stats
curl --request GET \
  --url https://api.vauchar.com/coupons/coupon_id/stats
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/coupons/coupon_id/stats' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/coupon_id/stats")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/coupons/coupon_id/stats");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/coupon_id/stats"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

coupon_id
string
required

The Unique ID of the coupon to retrieve

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/stats"
{
    "href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/stats",
    "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,
        "stats": {
            "redemptions_count_total": 2,
            "redemptions_value_total": 300,
            "redemptions_count_month": 1,
            "redemptions_value_month": 0,
            "redemptions_count_week": 0,
            "redemptions_value_week": 0,
            "redemptions_count_today": 0,
            "redemptions_value_today": 0
        }
    }
}
Suggest Edits

Create Coupon

 

Currently creating of coupons through API is available only on request. If you need to create coupons though API, please contact us.

Suggest Edits

Delete Specific Coupon

 

Currently deleting of coupons through API is available only on request. If you need to create coupons though API, please contact us.

Suggest Edits

Update Specific Coupon

 

Currently deleting of coupons through API is available only on request. If you need to create coupons though API, please contact us.

Suggest Edits

Validate by Coupon Code

This endpoint validates whether the coupon is valid to be redemption using the human readable coupon code.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/coupons/validate
curl --request GET \
  --url 'https://api.vauchar.com/coupons/validate?coupon_code=coupon_code'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/coupons/validate',
  qs: { coupon_code: 'coupon_code' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/validate?coupon_code=coupon_code")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/coupons/validate?coupon_code=coupon_code");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/validate"

querystring = {"coupon_code":"coupon_code"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

coupon_code
string
required

The coupon code which is to be validated (This value is case sensitive)

user_id
string

The id of the user for whom the validation needs to be checked

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/coupons/validate?coupon_code=AMAZING&user_id=123"
{
    "validation_status": {
        "status": 1000,
        "message": "Coupon is valid"
    },
    "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
    }
}
Suggest Edits

Validate by Coupon ID

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/coupons/coupon_id/validate
curl --request GET \
  --url https://api.vauchar.com/coupons/coupon_id/validate
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/coupons/coupon_id/validate' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/coupon_id/validate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/coupons/coupon_id/validate");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/coupon_id/validate"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

coupon_id
string
required

The unique ID of the coupon to validate

Query Params

user_id
string

The user id of the user who making this redemption

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/validate?user_id=123"
{
    "validation_status": {
        "status": 1000,
        "message": "Coupon is valid"
    },
    "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
    }
}
Suggest Edits

Get All Redemptions

This endpoint retrieves all redemptions for a specific coupon.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/coupons/coupon_id/redemptions
curl --request GET \
  --url https://api.vauchar.com/coupons/coupon_id/redemptions
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/coupons/coupon_id/redemptions' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/coupon_id/redemptions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/coupons/coupon_id/redemptions");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/coupon_id/redemptions"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

coupon_id
string
required

The Unique ID of the coupon for which redemptions are to to be retrieved

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions"
{
    "href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions",
    "count": 2,
    "data": [
        {
            "href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-150507097559b58f7f8b276",
            "type": "redemption",
            "id": "res-150507097559b58f7f8b276",
            "coupon_id": "cpn-1502288320598b19c0d59fd",
            "user_id": "12",
            "customer_id": "cust-149000628058cfb1084467c",
            "user_email": "",
            "user_phone": "",
            "transaction_id": "",
            "value_used": "",
            "team_id": "E57BB2DOKBW",
            "created": 1505070975
        },
        {
            "href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-1502473727598dedff485f1",
            "type": "redemption",
            "id": "res-1502473727598dedff485f1",
            "coupon_id": "cpn-1502288320598b19c0d59fd",
            "user_id": "1",
            "customer_id": "cust-148976158458cbf53023141",
            "user_email": "vaibhav571@gmail.com",
            "user_phone": "",
            "transaction_id": "10",
            "value_used": "300.00",
            "team_id": "",
            "created": 1502473727
        }
    ]
}
Suggest Edits

Get Specific Redemption

This endpoint retrieves a specific redemption

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/coupons/coupon_id/redemptions/redemption_id
curl --request GET \
  --url https://api.vauchar.com/coupons/coupon_id/redemptions/redemption_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/coupons/coupon_id/redemptions/redemption_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/coupon_id/redemptions/redemption_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/coupons/coupon_id/redemptions/redemption_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/coupon_id/redemptions/redemption_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

coupon_id
string
required

The unique id of the coupon for redemptions

redemption_id
string
required

The unique id of the redemption to retrieve

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-1502473727598dedff485f1"
{
    "href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-1502473727598dedff485f1",
    "data": {
        "href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-1502473727598dedff485f1",
        "type": "redemption",
        "id": "res-1502473727598dedff485f1",
        "coupon_id": "cpn-1502288320598b19c0d59fd",
        "user_id": "1",
        "customer_id": "cust-148976158458cbf53023141",
        "user_email": "vaibhav571@gmail.com",
        "user_phone": "",
        "transaction_id": "10",
        "value_used": "300.00",
        "team_id": "",
        "created": 1502473727
    }
}
Suggest Edits

Create Redemption

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.vauchar.com/coupons/coupon_id/redemptions
curl --request POST \
  --url https://api.vauchar.com/coupons/coupon_id/redemptions
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.vauchar.com/coupons/coupon_id/redemptions' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/coupon_id/redemptions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.vauchar.com/coupons/coupon_id/redemptions");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/coupon_id/redemptions"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

coupon_id
string
required

The Unique ID of the coupon for which to retrieve the redemption

Body Params

user_id
string
required

The source id of the user who is making the redemption

user_email
string

The email address of the user who is making the redemption

user_phone
string

The phone number of the user who is making the redemption

transaction_id
string

The transaction id on which the redemption was made

value_used
string

The exact discount given on this transaction.

 

Important

Other than “user_id” all the parameters are optional may not be sent, but it is highly encouraged to send maximum parameters possible for better tracking and statistics.

curl -X POST 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-H "Content-Type: application/json"  
-d '{
    "user_id":"123",
    "user_email":"test@vauchar.com",
    "user_phone":"82383209830",
    "transaction_id":"transa001",
    "value_used": 50
}' 
"https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions"
{
    "href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-150675935459cf52bad9207",
    "type": "redemption",
    "id": "res-150675935459cf52bad9207",
    "coupon_id": "cpn-1502288320598b19c0d59fd",
    "user_id": "123",
    "customer_id": "cust-150614516859c5f39002a4a",
    "user_email": "test@vauchar.com",
    "user_phone": "82383209830",
    "transaction_id": "transa001",
    "value_used": "50.00",
    "team_id": "",
    "created": 1506759354
}
Suggest Edits

Delete Specific Redemption

This endpoint deletes a redemption for a coupon.

 

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.vauchar.com/coupons/coupon_id/redemptions/redemption_id
curl --request DELETE \
  --url https://api.vauchar.com/coupons/coupon_id/redemptions/redemption_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.vauchar.com/coupons/coupon_id/redemptions/redemption_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/coupon_id/redemptions/redemption_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.vauchar.com/coupons/coupon_id/redemptions/redemption_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/coupon_id/redemptions/redemption_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

coupon_id
string
required

The Unique ID of the coupon for which to delete the redemption

redemption_id
string
required

The Unique ID of the redemption to delete

 
curl -X DELETE 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-150675935459cf52bad9207"
No payload with Header: 204 No Content
Suggest Edits

Get All Vouchers

This endpoint retrieves all vouchers.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/vouchers
curl --request GET \
  --url https://api.vauchar.com/vouchers
var request = require("request");

var options = { method: 'GET', url: 'https://api.vauchar.com/vouchers' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/vouchers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/vouchers");

xhr.send(data);
import requests

url = "https://api.vauchar.com/vouchers"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

limit
int32

Number of vouchers to retrieve at a time

offset
int32

The row from where to start retrieving the voucher

voucher_code
string

The human readable voucher code

created
date-time

Unix Time Stamp of the voucher created time

start_time
date-time

Unix Time Stamp when the voucher is going to active

expiry_time
date-time

Unix Time Stamp when the voucher is going to deactivated (0 means indefinitely)

value
float

The value of discount that will be given by the voucher

value_unit
string

The unit of the value of the voucher. (Allowed values are value & percentage)

currency
string

The currency in 3 digit format in which the discount value shall be calculated

redeemed
int32

Whether the voucher has already been redeemed or not

teams
string

Team members ids to whom the voucher is locked for redemption

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/vouchers"
{
    "href": "https://api.vauchar.com/vouchers",
    "count": 2,
    "data": [
        {
            "href": "https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5",
            "type": "voucher",
            "id": "vcr-150659959859cce2ae044b5",
            "voucher_code": "E57BBO2ASPF25",
            "tag": "",
            "created": 1506599598,
            "start_time": 1506579300,
            "expiry_time": 1509474600,
            "value": "50.00",
            "value_unit": "percentage",
            "currency": "USD",
            "redeemed": 1,
            "redeemed_date": 1506601978,
            "teams": []
        },
        {
            "href": "https://api.vauchar.com/vouchers/vcr-150659959859cce2ae0beb3",
            "type": "voucher",
            "id": "vcr-150659959859cce2ae0beb3",
            "voucher_code": "E57BB9FYB8LPI",
            "tag": "",
            "created": 1506599598,
            "start_time": 1506579300,
            "expiry_time": 1509474600,
            "value": "50.00",
            "value_unit": "percentage",
            "currency": "USD",
            "redeemed": 1,
            "redeemed_date": 1506602657,
            "teams": []
        }
    ]
}
Suggest Edits

Get Specific Voucher

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/vouchers/voucher_id
curl --request GET \
  --url https://api.vauchar.com/vouchers/voucher_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/vouchers/voucher_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/vouchers/voucher_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/vouchers/voucher_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/vouchers/voucher_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

voucher_id
string
required

The Unique ID of the voucher to retrieve

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5"
{
    "href": "https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5",
    "data": {
        "href": "https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5",
        "type": "voucher",
        "id": "vcr-150659959859cce2ae044b5",
        "voucher_code": "E57BBO2ASPF25",
        "tag": "",
        "created": 1506599598,
        "start_time": 1506579300,
        "expiry_time": 1509474600,
        "value": "50.00",
        "value_unit": "percentage",
        "currency": "USD",
        "redeemed": 1,
        "redeemed_date": 1506601978,
        "teams": []
    }
}
Suggest Edits

Create Vouchers

This endpoint can be used to create vouchers

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.vauchar.com/vouchers
curl --request POST \
  --url https://api.vauchar.com/vouchers
var request = require("request");

var options = { method: 'POST', url: 'https://api.vauchar.com/vouchers' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/vouchers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.vauchar.com/vouchers");

xhr.send(data);
import requests

url = "https://api.vauchar.com/vouchers"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

count
int32
required

The total number of vouchers to generate (Max limit is 200 in one request)

value
float
required

The value of discount that will be given by the voucher. This value must be greater than 0

value_unit
string
required

The unit of the value of the voucher. (Allowed values are "value" & "percentage")

currency
string
required

The currency in 3 digit format in which the discount value shall be calculated

tag
string

A personalised alphanumeric string for own reference (Max character limit is 30)

start_time
string

Unix Time Stamp when the voucher is going to be considered as active

expiry_time
string

Unix Time Stamp when the voucher is going to de-active (0 means indefinitely)

teams
array of strings

team member ids if you want to lock the voucher to a particular team member to be redeemed (Must be an array)

 

Important

All the team id passed while creating vouchers must be present on the system

curl -X POST 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-H "Content-Type: application/json"  
-d '{
        "count":2,
        "start_time":1469555100,
        "expiry_time":0,
        "value":10,
        "value_unit":"percentage",
        "currency":"USD"
   }' 
"https://api.vauchar.com/vouchers"
[
    {
        "href": "https://api.vauchar.com/vouchers/vcr-150676308659cf614e2f56e",
        "type": "voucher",
        "id": "vcr-150676308659cf614e2f56e",
        "voucher_code": "E57BBY8NL143A",
        "tag": "",
        "created": 1506763086,
        "start_time": 1469555100,
        "expiry_time": 0,
        "value": "10.00",
        "value_unit": "percentage",
        "currency": "USD",
        "redeemed": 0,
        "redeemed_date": 0,
        "teams": []
    },
    {
        "href": "https://api.vauchar.com/vouchers/vcr-150676308659cf614e36e1e",
        "type": "voucher",
        "id": "vcr-150676308659cf614e36e1e",
        "voucher_code": "E57BB0J3EH6R2",
        "tag": "",
        "created": 1506763086,
        "start_time": 1469555100,
        "expiry_time": 0,
        "value": "10.00",
        "value_unit": "percentage",
        "currency": "USD",
        "redeemed": 0,
        "redeemed_date": 0,
        "teams": []
    }
]
Suggest Edits

Delete Specific Voucher

This endpoint can be used to delete vouchers

 

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.vauchar.com/vouchers/voucher_id
curl --request DELETE \
  --url https://api.vauchar.com/vouchers/voucher_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.vauchar.com/vouchers/voucher_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/vouchers/voucher_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.vauchar.com/vouchers/voucher_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/vouchers/voucher_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

voucher_id
string
required

The Unique ID of the voucher to delete

 
curl -X DELETE 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/vouchers/vcr-150676308659cf614e2f56e"
No payload with Header: 204 No Content.
Suggest Edits

Update Specific Vouchers

 

We do not support updating of vouchers, If you need to make changes, create new voucher.

Suggest Edits

Validate by Voucher Code

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/coupons/validate
curl --request GET \
  --url 'https://api.vauchar.com/coupons/validate?voucher_code=voucher_code'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/coupons/validate',
  qs: { voucher_code: 'voucher_code' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/validate?voucher_code=voucher_code")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/coupons/validate?voucher_code=voucher_code");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/validate"

querystring = {"voucher_code":"voucher_code"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

voucher_code
string
required

The voucher code which is to be validated. (This value is case sensitive)

 

Validation Response Codes

Error Code
Response Message
Description

1000

Is valid

Voucher is valid and can be used

1002

Not active

Voucher start time is in future

1003

Is expired

The expiry date of voucher has been crossed

1004

Already redeemed

The voucher has already been redeemed

curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/vouchers/validate?voucher_code=E57BB0J3EH6R2"
{
    "validation_status": {
        "status": 1000,
        "message": "Voucher is valid"
    },
    "data": {
        "href": "https://api.vauchar.com/vouchers/vcr-150676308659cf614e36e1e",
        "type": "voucher",
        "id": "vcr-150676308659cf614e36e1e",
        "voucher_code": "E57BB0J3EH6R2",
        "tag": "",
        "created": 1506763086,
        "start_time": 1469555100,
        "expiry_time": 0,
        "value": "10.00",
        "value_unit": "percentage",
        "currency": "USD",
        "redeemed": 0,
        "redeemed_date": 0,
        "teams": []
    }
}
Suggest Edits

Validate by Voucher ID

This endpoint validates whether the voucher is valid to be redemption using the unique voucher id

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/coupons/voucher_id/validate
curl --request GET \
  --url https://api.vauchar.com/coupons/voucher_id/validate
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/coupons/voucher_id/validate' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/voucher_id/validate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/coupons/voucher_id/validate");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/voucher_id/validate"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

voucher_id
string
required

The Unique ID of the voucher to validate

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/vouchers/vcr-150676308659cf614e36e1e/validate"
{
    "validation_status": {
        "status": 1000,
        "message": "Voucher is valid"
    },
    "data": {
        "href": "https://api.vauchar.com/vouchers/vcr-150676308659cf614e36e1e",
        "type": "voucher",
        "id": "vcr-150676308659cf614e36e1e",
        "voucher_code": "E57BB0J3EH6R2",
        "tag": "",
        "created": 1506763086,
        "start_time": 1469555100,
        "expiry_time": 0,
        "value": "10.00",
        "value_unit": "percentage",
        "currency": "USD",
        "redeemed": 0,
        "redeemed_date": 0,
        "teams": []
    }
}
Suggest Edits

Get Redemption

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/vouchers/voucher_id/redemptions
curl --request GET \
  --url https://api.vauchar.com/vouchers/voucher_id/redemptions
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/vouchers/voucher_id/redemptions' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/vouchers/voucher_id/redemptions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/vouchers/voucher_id/redemptions");

xhr.send(data);
import requests

url = "https://api.vauchar.com/vouchers/voucher_id/redemptions"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

voucher_id
string
required

The Unique ID of the voucher to retrieve

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5/redemptions"
{
    "href": "https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5/redemptions",
    "data": [
        {
            "href": "https://api.vauchar.com/vouchers/vcr-150659959859cce2ae044b5/redemptions/res-150660197859ccebfa8b218",
            "type": "redemption",
            "id": "res-150660197859ccebfa8b218",
            "voucher_id": "vcr-150659959859cce2ae044b5",
            "user_id": "user001",
            "customer_id": "cust-150658890659ccb8ea8b387",
            "user_email": "",
            "user_phone": "",
            "transaction_id": "",
            "value_used": "185.00",
            "team_id": "",
            "created": 1506601978
        }
    ]
}

Information

Each voucher will have only single redemption

Suggest Edits

Create Redemption

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.vauchar.com/vouchers/voucher_id/redemptions
curl --request POST \
  --url https://api.vauchar.com/vouchers/voucher_id/redemptions
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.vauchar.com/vouchers/voucher_id/redemptions' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/vouchers/voucher_id/redemptions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.vauchar.com/vouchers/voucher_id/redemptions");

xhr.send(data);
import requests

url = "https://api.vauchar.com/vouchers/voucher_id/redemptions"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

voucher_id
string
required

The Unique ID of the voucher for which to retrieve the redemption

Body Params

user_id
string
required

The source id of the user who is making the redemption

user_email
string

The email address of the user who is making the redemption

user_phone
string

The phone number of the user who is making the redemption

transaction_id
string

The transaction id on which the redemption was made

value_used
string

The exact discount given on this transaction.

 

Important

Other than “user_id” all the parameters are optional may not be sent, but it is highly encouraged to send maximum parameters possible for better tracking and statistics.

curl -X POST 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-H "Content-Type: application/json"  
-d '{
    "user_id":"123",
    "user_email":"test@vauchar.com",
    "user_phone":"82383209830",
    "transaction_id":"transa001",
    "value_used": 50
}' 
"https://api.vauchar.com/vouchers/vcr-150676308659cf614e2f56e/redemptions"
{
    "href": "https://api.vauchar.com/vouchers/vcr-150676308659cf614e2f56e/redemptions/res-150676438959cf6665717f4",
    "type": "redemption",
    "id": "res-150676438959cf6665717f4",
    "voucher_id": "vcr-150676308659cf614e2f56e",
    "user_id": "123",
    "customer_id": "cust-150614516859c5f39002a4a",
    "user_email": "test@vauchar.com",
    "user_phone": "82383209830",
    "transaction_id": "transa001",
    "value_used": "50.00",
    "team_id": "",
    "created": 1506764389
}
Suggest Edits

Delete Redemption

This endpoint deletes a redemption for a voucher.

 

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.vauchar.com/coupons/voucher_id/redemptions/redemption_id
curl --request DELETE \
  --url https://api.vauchar.com/coupons/voucher_id/redemptions/redemption_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.vauchar.com/coupons/voucher_id/redemptions/redemption_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/voucher_id/redemptions/redemption_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.vauchar.com/coupons/voucher_id/redemptions/redemption_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/voucher_id/redemptions/redemption_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

voucher_id
string
required

The Unique ID of the voucher for which to delete the redemption

redemption_id
string
required

The Unique ID of the redemption to delete

 
curl -X DELETE 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/vouchers/vcr-150676308659cf614e2f56e/redemptions/res-150676438959cf6665717f4"
No payload with Header: 204 No Content.
Suggest Edits

Update Specific Redemption

 

We do not support updating of redemption, If you need to make changes, delete the earlier redemption and create new redemption.

Suggest Edits

Get All Gift Cards

This endpoint retrieves all gift-cards

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/gift-cards
curl --request GET \
  --url https://api.vauchar.com/gift-cards
var request = require("request");

var options = { method: 'GET', url: 'https://api.vauchar.com/gift-cards' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/gift-cards")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/gift-cards");

xhr.send(data);
import requests

url = "https://api.vauchar.com/gift-cards"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

limit
int32

Number of gift-cards to retrieve at a time

offset
int32

The row from where to start retrieving the gift-card

gift_card_code
string

The human readable gift-card code.

tag
string

A personalised alphanumeric string for own reference (Max character limit is 30)

created
date-time

Unix Time Stamp of the gift-card created time

start_time
date-time

Unix Time Stamp when the gift-card is going to active

expiry_time
date-time

Unix Time Stamp when the gift-card is going to deactivated (0 means indefinitely).

total_value
float

The total value of gift-card.

balance
string

The remaining balance in the gift-card

value_unit
string

The unit of the value of the gift-card. (Always will be value)

currency
string

The currency in 3 digit format in which the discount value shall be calculated

active_status
int32

The current active status of the gift-card

teams
string

Team members ids to whom the gift card is locked for redemption

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/gift-cards"
{
    "href": "https://api.vauchar.com/gift-cards",
    "data": [
        {
            "href": "https://api.vauchar.com/gift-cards/gift-150399274159a51ba5d6b34",
            "type": "gift-card",
            "id": "gift-150399274159a51ba5d6b34",
            "gift_card_code": "GIFTE57BB41B7VN5S",
            "tag": "",
            "created": 1503992741,
            "start_time": 1503991800,
            "expiry_time": 0,
            "total_value": "1000.00",
            "balance": "500.00",
            "value_unit": "value",
            "currency": "USD",
            "active_status": 1,
            "teams": [],
            "metadata": {
                "from_name": "",
                "from_email": "",
                "to_name": "",
                "to_email": "",
                "to_phone": "",
                "message": ""
            }
        },
        {
            "href": "https://api.vauchar.com/gift-cards/gift-150399271259a51b88a5763",
            "type": "gift-card",
            "id": "gift-150399271259a51b88a5763",
            "gift_card_code": "GIFTE57BBTO7XPKLG",
            "tag": "",
            "created": 1503992712,
            "start_time": 1503991800,
            "expiry_time": 0,
            "total_value": "2000.00",
            "balance": "2000.00",
            "value_unit": "value",
            "currency": "USD",
            "active_status": 1,
            "teams": [],
            "metadata": {
                "from_name": "",
                "from_email": "",
                "to_name": "",
                "to_email": "",
                "to_phone": "",
                "message": ""
            }
        }
    ]
}
Suggest Edits

Get Specific Gift Card

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/gift-cards/gift_card_id
curl --request GET \
  --url https://api.vauchar.com/gift-cards/gift_card_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/gift-cards/gift_card_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/gift-cards/gift_card_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/gift-cards/gift_card_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/gift-cards/gift_card_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

gift_card_id
string
required

The Unique ID of the gift-card to retrieve

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/gift-cards/gift-150399274159a51ba5d6b34"
{
    "href": "https://api.vauchar.com/gift-cards/gift-150399274159a51ba5d6b34",
    "data": {
        "href": "https://api.vauchar.com/gift-cards/gift-150399274159a51ba5d6b34",
        "type": "gift-card",
        "id": "gift-150399274159a51ba5d6b34",
        "gift_card_code": "GIFTE57BB41B7VN5S",
        "tag": "",
        "created": 1503992741,
        "start_time": 1503991800,
        "expiry_time": 0,
        "total_value": "1000.00",
        "balance": "500.00",
        "value_unit": "value",
        "currency": "USD",
        "active_status": 1,
        "teams": [],
        "metadata": {
           "from_name": "Thomas",
           "from_email": "ThomasKFoster@jourrapide.com",
           "to_name": "Robert",
           "to_email": "RobertKMallett@jourrapide.com",
           "to_phone": "9727085818",
           "message": "Happy Bday"
       },
    }
}
Suggest Edits

Create Gift Card

This endpoint can be used to create gift-card

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.vauchar.com/gift-cards
curl --request POST \
  --url https://api.vauchar.com/gift-cards
var request = require("request");

var options = { method: 'POST', url: 'https://api.vauchar.com/gift-cards' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/gift-cards")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.vauchar.com/gift-cards");

xhr.send(data);
import requests

url = "https://api.vauchar.com/gift-cards"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

value
string
required

The value of discount that will be given by the voucher. This value must be greater than 0

start_time
date-time

Unix Time Stamp when the voucher is going to be considered as active

expiry_time
date-time

Unix Time Stamp when the voucher is going to de-active (0 means indefinitely)

active_status
string

Current active status of the gift card (1 means active, 0 means in active)

tag
string

A personalised alphanumeric string for own reference (Max character limit is 30)

teams
array of strings

Team members id if you want to lock the gift card to a particular team member to be redeemed (Must be an array

currency
string

The currency in 3 digit format in which the discount value shall be calculated

metadata
array of objects
from_name
from_email
to_name
to_email
to_phone
message
 
curl -X POST 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-H "Content-Type: application/json" 
-d '{  
   "start_time":1480427100,
   "expiry_time":0,
   "active_status":"1",
   "value":"600",
   "currency":"USD",
   "tag": "gifts",
   "metadata":{  
      "to_name":"Robert",
      "to_email":"RobertKMallett@jourrapide.com",
      "to_phone":"9727085818",
      "from_name":"Thomas",
      "from_email":"ThomasKFoster@jourrapide.com",
      "message":"Happy Bday"
   }
}' 
"https://api.vauchar.com/gift-cards"
{
    "href": "https://api.vauchar.com/gift-cards/gift-150676699459cf709263ede",
    "type": "gift-card",
    "id": "gift-150676699459cf709263ede",
    "gift_card_code": "GIFTE57BBFU3URO2L",
    "tag": "gifts",
    "created": 1506766994,
    "start_time": 1480427100,
    "expiry_time": 0,
    "total_value": "600.00",
    "balance": "600.00",
    "value_unit": "value",
    "currency": "USD",
    "active_status": 1,
    "teams": [],
    "metadata": {
        "from_name": "Thomas",
        "from_email": "ThomasKFoster@jourrapide.com",
        "to_name": "Robert",
        "to_email": "RobertKMallett@jourrapide.com",
        "to_phone": "9727085818",
        "message": "Happy Bday"
    }
}
Suggest Edits

Delete Specific Gift Card

This endpoint can be used to delete gift-card

 

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.vauchar.com/gift-cards/gift_card_id
curl --request DELETE \
  --url https://api.vauchar.com/gift-cards/gift_card_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.vauchar.com/gift-cards/gift_card_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/gift-cards/gift_card_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.vauchar.com/gift-cards/gift_card_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/gift-cards/gift_card_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

gift_card_id
string
required

The Unique ID of the gift-card to delete

 
curl -X DELETE 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/gift-cards/gift-150676699459cf709263ede"
No payload with Header: 204 No Content.
Suggest Edits

Update Specific Gift Card

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://api.vauchar.com/gift-cards/gift_card_id
curl --request PUT \
  --url https://api.vauchar.com/gift-cards/gift_card_id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.vauchar.com/gift-cards/gift_card_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/gift-cards/gift_card_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.vauchar.com/gift-cards/gift_card_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/gift-cards/gift_card_id"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

gift_card_id
string
required

The Unique ID of the gift-card to update

Body Params

active_status
int32

The current active status of the gift-card

metdata
array of objects
from_name
from_email
to_name
to_email
to_phone
message
 
curl -X PUT 
-H "Authorization: <Your_Merchant_Id>:<Your_Api_Key>" 
-H "Content-Type: application/json" 
-d '{ 
   "active_status":"1",
   "metadata":{  
      "to_name":"Robert K Mallett",
      "to_email":"RobertKMallett@jourrapide.com",
      "to_phone":"9727085818",
      "from_name":"Thomas",
      "from_email":"ThomasKFoster@jourrapide.com",
      "message":"Happy new year"
   }
}' 
"https://api.vauchar.com/gift-cards/gift-150676699459cf709263ede"
{
    "href": "https://api.vauchar.com/gift-cards/gift-150676699459cf709263ede",
    "data": {
        "href": "https://api.vauchar.com/gift-cards/gift-150676699459cf709263ede",
        "type": "gift-card",
        "id": "gift-150676699459cf709263ede",
        "gift_card_code": "GIFTE57BBFU3URO2L",
        "tag": "gifts",
        "created": 1506766994,
        "start_time": 1480427100,
        "expiry_time": 0,
        "total_value": "600.00",
        "balance": "600.00",
        "value_unit": "value",
        "currency": "USD",
        "active_status": 1,
        "teams": [],
        "metadata": {
            "from_name": "Thomas",
            "from_email": "ThomasKFoster@jourrapide.com",
            "to_name": "Robert K Mallett",
            "to_email": "RobertKMallett@jourrapide.com",
            "to_phone": "9727085818",
            "message": "Happy new year"
        }
    }
}
Suggest Edits

Get All Redemptions

This endpoint retrieves all redemption for a gift-cards.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/coupons/gift_card_id/redemptions
curl --request GET \
  --url https://api.vauchar.com/coupons/gift_card_id/redemptions
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/coupons/gift_card_id/redemptions' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/gift_card_id/redemptions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/coupons/gift_card_id/redemptions");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/gift_card_id/redemptions"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

gift_card_id
string
required

The Unique ID of the gift-card to retrieve

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/gift-cards/gift-148061212058405918eee94"
{
  "href": "https://api.vauchar.com/gift-cards/gift-148061212058405918eee94",
  "data": {
     "href": "https://api.vauchar.com/gift-cards/gift-148061212058405918eee94",
     "type": "gift-card",
     "id": "gift-148061212058405918eee94",
     "gift_card_code": "GIFT0C307FX941JN7",
     "tag": "",
     "created": 1480612120,
     "start_time": 1480427100,
     "expiry_time": 0,
     "total_value": "600.00",
     "balance": "600.00",
     "value_unit": "value",
     "currency": "USD",
     "active_status": 1,
     "teams": [
        "E57BB21J9HM",
        "E57BB296LNT",
        "E57BB26INOE"
     ],
     "metadata": {
       "from_name": "Thomas",
       "from_email": "ThomasKFoster@jourrapide.com",
       "to_name": "Robert",
       "to_email": "RobertKMallett@jourrapide.com",
       "to_phone": "9727085818",
       "message": "Happy Bday"
     }
  }
}
Suggest Edits

Get Specific Redemption

This endpoint retrieves specific redemption details.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/coupons/gift_card_id/redemptions/redemption_id
curl --request GET \
  --url https://api.vauchar.com/coupons/gift_card_id/redemptions/redemption_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/coupons/gift_card_id/redemptions/redemption_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/gift_card_id/redemptions/redemption_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/coupons/gift_card_id/redemptions/redemption_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/gift_card_id/redemptions/redemption_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

gift_card_id
string
required

The Unique ID of the gift-card for which to retrieve the redemption

redemption_id
string
required

The Unique ID of the redemption to retrieve

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/gift-cards/gift-148061360458405ee43a1a8/redemptions/res-148061693358406be5cbe66"
{
  "href": "https://api.vauchar.com/gift-cards/gift-148061360458405ee43a1a8/redemptions/res-148061693358406be5cbe66",
  "data": {
    "href": "https://api.vauchar.com/gift-cards/gift-148061360458405ee43a1a8/redemptions/res-148061693358406be5cbe66",
    "type": "redemption",
    "id": "res-148061693358406be5cbe66",
    "gift_card_id": "gift-148061360458405ee43a1a8",
    "user_id": "user001",
    "user_email": "user1@vauchar.com",
    "user_phone": "91100911100",
    "transaction_id": "",
    "value_used": "50.00",
    "created": 1480616933
  }
}
Suggest Edits

Create Redemption

This endpoint creates a redemption for a gift-card

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.vauchar.com/coupons/gift_card_id/redemptions
curl --request POST \
  --url https://api.vauchar.com/coupons/gift_card_id/redemptions
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.vauchar.com/coupons/gift_card_id/redemptions' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/gift_card_id/redemptions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.vauchar.com/coupons/gift_card_id/redemptions");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/gift_card_id/redemptions"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

gift_card_id
string
required

The Unique ID of the gift-card for which to retrieve the redemption

Body Params

user_id
string
required

The unique user ID of the user who is making the redemption

user_email
string

The email address of the user who is making the redemption

user_phone
string

The phone number of the user who is making the redemption

transaction_id
string

The transaction id on which the redemption was made

value_used
string

The exact discount given on this transaction

 
curl -X POST 
-H "Content-Type: application/json"  
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-d '{
        "user_id":"user001",
        "user_email":"user1@vauchar.com",
        "user_phone":"91100911100",
        "value_used":50
    }' 
"https://api.vauchar.com/gift-cards/gift-148061360458405ee43a1a8/redemptions"
{
  "href": "https://api.vauchar.com/gift-cards/gift-148061360458405ee43a1a8/redemptions/res-148061693358406be5cbe66",
  "type": "redemption",
  "id": "res-148061693358406be5cbe66",
  "gift_card_id": "gift-148061360458405ee43a1a8",
  "user_id": "user001",
  "user_email": "user1@vauchar.com",
  "user_phone": "91100911100",
  "transaction_id": "",
  "value_used": "50.00",
  "created": 1480616933
}
Suggest Edits

Delete Specific Redemption

This endpoint deletes a redemption for a gift-card.

 

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.vauchar.com/coupons/gift_card_id/redemptions/redemption_id
curl --request DELETE \
  --url https://api.vauchar.com/coupons/gift_card_id/redemptions/redemption_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.vauchar.com/coupons/gift_card_id/redemptions/redemption_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/coupons/gift_card_id/redemptions/redemption_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.vauchar.com/coupons/gift_card_id/redemptions/redemption_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/coupons/gift_card_id/redemptions/redemption_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

gift_card_id
string
required

The Unique ID of the gift-card for which to delete the redemption

redemption_id
string
required

The Unique ID of the redemption to delete

 
curl -X DELETE 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/gift-cards/gift-148061360458405ee43a1a8/redemptions/res-148061693358406be5cbe66"
No payload with Header: 204 No Content
Suggest Edits

Update Specific Redemption

 

We do not support updating of redemption, If you need to make changes, delete the earlier redemption and create new redemption.

Suggest Edits

Validate by Gift Card Code

This endpoint validates whether the gift card is valid to be redemption using the human readable gift card code.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/gift-cards/validate
curl --request GET \
  --url 'https://api.vauchar.com/gift-cards/validate?gift_card_code=gift_card_code'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/gift-cards/validate',
  qs: { gift_card_code: 'gift_card_code' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/gift-cards/validate?gift_card_code=gift_card_code")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/gift-cards/validate?gift_card_code=gift_card_code");

xhr.send(data);
import requests

url = "https://api.vauchar.com/gift-cards/validate"

querystring = {"gift_card_code":"gift_card_code"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

gift_card_code
string
required

The gift card code which is to be validated. This value is case sensitive

value_used
string

The value which is required to be redeemed (to validate the balance in gift card)

 
Error Code
Response Message
Description

1000

Is valid

Gift card is valid and can be used.

1002

Not active

Gift card is not active or start time is in future

1003

Is expired

The expiry date of gift card has been crossed.

1004

Balance exhausted

There is no available balance in gift card

1005

Insufficient balance

There is not required available balance in gift card (value_used must be sent as get parameter for this validation)

curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/gift-cards/validate?gift_card_code=GIFT0C307PBFJC3A5&value_used=100"
{
  "validation_status": {
    "status": 1000,
    "message": "Gift Card is valid"
  },
  "data": {
    "href": "https://api.vauchar.com/gift-cards/gift-148061360458405ee43a1a8",
    "type": "gift-card",
    "id": "gift-148061360458405ee43a1a8",
    "gift_card_code": "GIFT0C307PBFJC3A5",
    "tag": "gifts",
    "created": 1480613604,
    "start_time": 1480427100,
    "expiry_time": 0,
    "total_value": "600.00",
    "balance": "450.00",
    "value_unit": "value",
    "currency": "USD",
    "active_status": "1",
    "metadata": {
      "from_name": "Thomas",
      "from_email": "ThomasKFoster@jourrapide.com",
      "to_name": "Robert",
      "to_email": "RobertKMallett@jourrapide.com",
      "to_phone": "9727085818",
      "message": "Happy new year"
    }
  }
}
Suggest Edits

Validate by Gift Card Id

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/gift-cards/gift_card_id/validate
curl --request GET \
  --url https://api.vauchar.com/gift-cards/gift_card_id/validate
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/gift-cards/gift_card_id/validate' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/gift-cards/gift_card_id/validate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/gift-cards/gift_card_id/validate");

xhr.send(data);
import requests

url = "https://api.vauchar.com/gift-cards/gift_card_id/validate"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

gift_card_id
string
required

The Unique ID of the gift-card to retrieve

Query Params

value_used
string

The value which is required to be redeemed (to validate the balance in gift card)

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/gift-cards/gift-148061360458405ee43a1a8/validate?value_used=100"
{
  "validation_status": {
    "status": 1000,
    "message": "Gift Card is valid"
  },
  "data": {
    "href": "https://api.vauchar.com/gift-cards/gift-148061360458405ee43a1a8",
    "type": "gift-card",
    "id": "gift-148061360458405ee43a1a8",
    "gift_card_code": "GIFT0C307PBFJC3A5",
    "tag": "gifts",
    "created": 1480613604,
    "start_time": 1480427100,
    "expiry_time": 0,
    "total_value": "600.00",
    "balance": "450.00",
    "value_unit": "value",
    "currency": "USD",
    "active_status": "1",
    "metadata": {
      "from_name": "Thomas",
      "from_email": "ThomasKFoster@jourrapide.com",
      "to_name": "Robert",
      "to_email": "RobertKMallett@jourrapide.com",
      "to_phone": "9727085818",
      "message": "Happy new year"
    }
  }
}
Suggest Edits

Get All Products

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/products
curl --request GET \
  --url https://api.vauchar.com/products
var request = require("request");

var options = { method: 'GET', url: 'https://api.vauchar.com/products' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/products")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/products");

xhr.send(data);
import requests

url = "https://api.vauchar.com/products"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/products"
{
    "href": "https://api.vauchar.com/products",
    "count": 1,
    "data": [
        {
            "href": "https://api.vauchar.com/products/prdt-15250250225ae608fe942e2",
            "type": "products",
            "id": "prdt-15250250225ae608fe942e2",
            "name": "Linen Shirt",
            "sku": "SHT123",
            "price": 2499,
            "tag": [],
            "points_redeem_exception_percentage": "",
            "collections": [],
            "created": 1525025022
        }
    ]
}
Suggest Edits

Get Specific Product

This endpoint retrieves a specific product

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/products/product_id
curl --request GET \
  --url https://api.vauchar.com/products/product_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/products/product_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/products/product_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/products/product_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/products/product_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

product_id
string
required

The unique of the product

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/products/prdt-15250722985ae6c1aad0ad7"
{
    "href": "https://api.vauchar.com/products/prdt-15250722985ae6c1aad0ad7",
    "data": {
        "href": "https://api.vauchar.com/products/prdt-15250722985ae6c1aad0ad7",
        "type": "products",
        "id": "prdt-15250722985ae6c1aad0ad7",
        "name": "Black Trousers",
        "sku": "tr123",
        "price": 999.45,
        "tag": [],
        "points_redeem_exception_percentage": "",
        "collections": [],
        "created": 1525072298
    }
}
Suggest Edits

Create Product

This endpoint can be used to create a product

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.vauchar.com/products
curl --request POST \
  --url https://api.vauchar.com/products
var request = require("request");

var options = { method: 'POST', url: 'https://api.vauchar.com/products' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/products")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.vauchar.com/products");

xhr.send(data);
import requests

url = "https://api.vauchar.com/products"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
curl -X POST 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-H "Content-Type: application/json"  
-d '{  
      "name":"Black Trousers",
      "sku":"tr123",
      "price":"999.45"
    }' 
"https://api.vauchar.com/products"
{
    "href": "https://api.vauchar.com/products/prdt-15250710545ae6bccee7317",
    "type": "products",
    "id": "prdt-15250710545ae6bccee7317",
    "name": "Black Trousers",
    "sku": "tr123",
    "price": 999.45,
    "tag": [],
    "points_redeem_exception_percentage": "",
    "collections": [],
    "created": 1525071054
}
Suggest Edits

Update Specific Product

This endpoint can be used to update products

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://api.vauchar.com/products/product_id
curl --request PUT \
  --url https://api.vauchar.com/products/product_id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.vauchar.com/products/product_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/products/product_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.vauchar.com/products/product_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/products/product_id"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

product_id
string
required
 
curl -X PUT 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-H "Content-Type: application/json"  
-d '{  
       "name":"Linen Black Trousers",
       "price":"1499.95"
    }' 
"https://api.vauchar.com/products/prdt-15250710545ae6bccee7317"
{
    "href": "https://api.vauchar.com/products/prdt-15250710545ae6bccee7317",
    "data": {
        "href": "https://api.vauchar.com/products/prdt-15250710545ae6bccee7317",
        "type": "products",
        "id": "prdt-15250710545ae6bccee7317",
        "name": "Linen Black Trousers",
        "sku": "tr123",
        "price": 1499.95,
        "tag": [],
        "points_redeem_exception_percentage": "",
        "collections": [],
        "created": 1525071054
    }
}
Suggest Edits

Delete Specific Product

This endpoint can be used to delete products

 

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.vauchar.com/products/product_id
curl --request DELETE \
  --url https://api.vauchar.com/products/product_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.vauchar.com/products/product_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/products/product_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.vauchar.com/products/product_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/products/product_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

product_id
string
required

The id the product which you want to delete

 
curl -X DELETE 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/products/prdt-15250710545ae6bccee7317"
No payload with Header: 204 No Content.
Suggest Edits

Get All Team Members

This endpoint retrieves all team members.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/teams
curl --request GET \
  --url https://api.vauchar.com/teams
var request = require("request");

var options = { method: 'GET', url: 'https://api.vauchar.com/teams' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/teams")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/teams");

xhr.send(data);
import requests

url = "https://api.vauchar.com/teams"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

name
string

The name of the team member

email
string

The email id of the team member

created
date-time

Unix Time Stamp of the member created time

limit
string

Number of teams to retrieve at a time

offset
string

The row from where to start retrieving the team

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/teams"
{
    "href": "https://api.vauchar.com/teams",
    "data": [
        {
            "href": "https://api.vauchar.com/teams/E57BB2DOKBW",
            "type": "team",
            "id": "E57BB2DOKBW",
            "name": "Some Team",
            "email": "someteam@vauchar.com",
            "created": 1500538241,
            "permissions": {
                "make_redemptions": 1,
                "view_coupons": 1,
                "add_coupons": 1,
                "edit_coupons": 1,
                "view_vouchers": 1,
                "add_vouchers": 1,
                "edit_vouchers": 1,
                "view_gift_cards": 1,
                "add_gift_cards": 1,
                "edit_gift_cards": 1,
                "view_campaigns": 1
            }
        },
        {
            "href": "https://api.vauchar.com/teams/E57BB2FBVRI",
            "type": "team",
            "id": "E57BB2FBVRI",
            "name": "John",
            "email": "john@gmail.com",
            "created": 1499970948,
            "permissions": {
                "make_redemptions": 1,
                "view_gift_cards": 1,
                "add_gift_cards": 1
            }
        }
    ]
}
Suggest Edits

Get Specific Team Member

This endpoint retrieves a specific team member

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/teams/team_id
curl --request GET \
  --url https://api.vauchar.com/teams/team_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/teams/team_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/teams/team_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/teams/team_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/teams/team_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

team_id
string
required

The Unique ID of the team members to retrieve

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/teams/E57BB2S40CI"
{
    "href": "https://api.vauchar.com/teams/E57BB2DOKBW",
    "data": {
        "href": "https://api.vauchar.com/teams/E57BB2DOKBW",
        "type": "team",
        "id": "E57BB2DOKBW",
        "name": "Some Team",
        "email": "someteam@vauchar.com",
        "created": 1500538241,
        "permissions": {
            "make_redemptions": 1,
            "view_coupons": 1,
            "add_coupons": 1,
            "edit_coupons": 1,
            "view_vouchers": 1,
            "add_vouchers": 1,
            "edit_vouchers": 1,
            "view_gift_cards": 1,
            "add_gift_cards": 1,
            "edit_gift_cards": 1,
            "view_campaigns": 1
        }
    }
}
Suggest Edits

Create Team Member

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.vauchar.com/teams
curl --request POST \
  --url https://api.vauchar.com/teams
var request = require("request");

var options = { method: 'POST', url: 'https://api.vauchar.com/teams' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/teams")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.vauchar.com/teams");

xhr.send(data);
import requests

url = "https://api.vauchar.com/teams"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

name
string
required

The name of the user

email
string
required

The email of the team user.

password
string
required

Password of the team user

permissions
array of objects
required

The permissions object for the team member.

make_redemptions
view_redemptions
view_coupons
add_coupons
edit_coupons
view_vouchers
add_vouchers
edit_vouchers
view_gift_cards
add_gift_cards
edit_gift_cards
view_campaigns
 

Example Request for adding team members via API

curl -X POST 
-H "Content-Type: application/json"  
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-d '"name": "Some Team",
    "email": "someteam1@vauchar.com",
    "password": "testpass",
    "permissions": {
          "make_redemptions": 1,
          "view_redemptions": 2,
          "view_coupons": 2,
          "add_coupons": 1,
          "edit_coupons": 1,
          "view_vouchers": 1,
          "add_vouchers": 1,
          "edit_vouchers": 1,
          "view_gift_cards": 1,
          "add_gift_cards": 1,
          "edit_gift_cards": 1,
          "view_campaigns": 1
    }' 
"https://api.vauchar.com/teams"
{
    "href": "https://api.vauchar.com/teams/E57BB2EY6ZS",
    "type": "team",
    "id": "E57BB2EY6ZS",
    "name": "Some Team",
    "email": "someteam1@vauchar.com",
    "created": 1541748031,
    "permissions": {
        "make_redemptions": 1,
        "view_coupons": 1,
        "add_coupons": 1,
        "edit_coupons": 1,
        "view_vouchers": 1,
        "add_vouchers": 1,
        "edit_vouchers": 1,
        "view_gift_cards": 1,
        "add_gift_cards": 1,
        "edit_gift_cards": 1,
        "view_campaigns": 1
    }
}
Suggest Edits

Delete Team Member

 

Currently deleting of team members are not available using API and only possible using the user interface

Suggest Edits

Update Team Member

 

Currently updating of team members are not available using API and only possible using the user interface.

Suggest Edits

Get All Customers

This endpoint retrieves all customers.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/customers
curl --request GET \
  --url https://api.vauchar.com/customers
var request = require("request");

var options = { method: 'GET', url: 'https://api.vauchar.com/customers' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/customers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/customers");

xhr.send(data);
import requests

url = "https://api.vauchar.com/customers"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

limit
int32

Number of customers to retrieve at a time

offset
int32

The row from where to start retrieving the customer.

name
string

The human readable name of the customer

user_id
string

Unique identifier which differentiates the customers on your system (Must be unique for every customer)

email
string

E-Mail id of the customer

phone
string

Phone number of the customer (with country code)

birthday
date-time

Unix Time Stamp of the customer’s birthday

referral_code
string

Referral Code for the customer

referred_by
string

Customer ID whose referral code has been used by this customer

created
date-time

Unix Time Stamp of the customer created time

last_seen
date-time

Unix Time Stamp of the customer’s last active time

points
int32

Total number of points in the customer’s account

total_referral
int32

The total count of referral made by this customer

total_purchase
int32

The total count of the number purchases made by customer

last_purchase_date
date-time

Unix Time Stamp of when the last purchase was made by customer

total_redemption
int32

The total count of the number redemption made by customer

last_redemption_date
date-time

Unix Time Stamp of when the last redemption was made by customer

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/customers"
{
    "href": "https://api.vauchar.com/customers",
    "count": 2,
    "data": [
        {
            "href": "https://api.vauchar.com/customers/cust-15224046625abe0d3675139",
            "type": "customer",
            "id": "cust-15224046625abe0d3675139",
            "name": "Test user 51",
            "user_id": "55",
            "email": "testuser51@vauchar.com",
            "phone": "+919980733968",
            "gender": "",
            "birthday": 0,
            "referral_code": "ecr0264",
            "referred_by": 0,
            "referred_on": 0,
            "created": 1522404662,
            "last_seen": 1522608419,
            "loyalty_card_number": "8720180330603561",
            "points": 11558,
            "earned_points": 11558,
            "redeemed_points": 0,
            "expired_points": 0,
            "total_referral": 0,
            "referral_history": [],
            "total_purchase": 4,
            "last_purchase_date": 1522608419,
            "total_purchase_amount": "10558.00",
            "purchase_history": {
                "04-2018": "6143.00"
            },
            "purchase_count_history": {
                "04-2018": 3
            },
            "total_redemption": 0,
            "last_redemption_date": 0,
            "email_unsubscribed": 0,
            "lists": [],
            "total_rewards": 2,
            "rewards": [
                {
                    "reward_id": "rewd-15217418355ab3f00b815e1",
                    "event_id": "evnt-15224047275abe0d77de5d4",
                    "created": 1522404727
                },
                {
                    "reward_id": "rewd-15217418355ab3f00b815e1",
                    "event_id": "evnt-15226070305ac123b6c1739",
                    "created": 1522607030
                }
            ]
        },
        {
            "href": "https://api.vauchar.com/customers/cust-15217416535ab3ef5586b09",
            "type": "customer",
            "id": "cust-15217416535ab3ef5586b09",
            "name": "Vaibhav Poddar",
            "user_id": "54",
            "email": "testuser1@vauchar.com",
            "phone": "+918322397968",
            "gender": "",
            "birthday": 0,
            "referral_code": "ecp378q",
            "referred_by": "cust-15210079825aa8bd6e7c473",
            "referred_on": 1521741653,
            "created": 1521741653,
            "last_seen": 1521741653,
            "loyalty_card_number": "8720180322815464",
            "points": 3720,
            "earned_points": 3720,
            "redeemed_points": 0,
            "expired_points": 0,
            "total_referral": 0,
            "referral_history": [],
            "total_purchase": 3,
            "last_purchase_date": 1521801204,
            "total_purchase_amount": "2720.00",
            "purchase_history": {
                "03-2018": "2720.00"
            },
            "purchase_count_history": {
                "03-2018": 3
            },
            "total_redemption": 0,
            "last_redemption_date": 0,
            "email_unsubscribed": 0,
            "lists": [],
            "total_rewards": 1,
            "rewards": [
                {
                    "reward_id": "rewd-15217418355ab3f00b815e1",
                    "event_id": "evnt-15217419525ab3f0809dd7d",
                    "created": 1521741952
                }
            ]
        }
    ]
}
Suggest Edits

Get Specific Customer

This endpoint retrieves a specific customer

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/customers/customer_id
curl --request GET \
  --url https://api.vauchar.com/customers/customer_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/customers/customer_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/customers/customer_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/customers/customer_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/customers/customer_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

customer_id
string
required

The Unique ID of the customer to retrieve

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/customers/cust-15224046625abe0d3675139"
{
    "href": "https://api.vauchar.com/customers/cust-15224046625abe0d3675139",
    "data": {
        "href": "https://api.vauchar.com/customers/cust-15224046625abe0d3675139",
        "type": "customer",
        "id": "cust-15224046625abe0d3675139",
        "name": "Test user 51",
        "user_id": "55",
        "email": "testuser51@vauchar.com",
        "phone": "+919980733968",
        "gender": "",
        "birthday": 0,
        "referral_code": "ecr0264",
        "referred_by": 0,
        "referred_on": 0,
        "created": 1522404662,
        "last_seen": 1522608419,
        "loyalty_card_number": "8720180330603561",
        "points": 11558,
        "earned_points": 11558,
        "redeemed_points": 0,
        "expired_points": 0,
        "total_referral": 0,
        "referral_history": [],
        "total_purchase": 4,
        "last_purchase_date": 1522608419,
        "total_purchase_amount": "10558.00",
        "purchase_history": {
            "04-2018": "6143.00"
        },
        "purchase_count_history": {
            "04-2018": 3
        },
        "total_redemption": 0,
        "last_redemption_date": 0,
        "email_unsubscribed": 0,
        "lists": [],
        "total_rewards": 2,
        "rewards": [
            {
                "reward_id": "rewd-15217418355ab3f00b815e1",
                "event_id": "evnt-15224047275abe0d77de5d4",
                "created": 1522404727
            },
            {
                "reward_id": "rewd-15217418355ab3f00b815e1",
                "event_id": "evnt-15226070305ac123b6c1739",
                "created": 1522607030
            }
        ]
    }
}
Suggest Edits

Create Customer

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.vauchar.com/customers
curl --request POST \
  --url https://api.vauchar.com/customers
var request = require("request");

var options = { method: 'POST', url: 'https://api.vauchar.com/customers' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/customers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.vauchar.com/customers");

xhr.send(data);
import requests

url = "https://api.vauchar.com/customers"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

user_id
string
required

Unique identifier which differentiates the customers on your system (Must be unique for every customer)

name
string

The human readable name of the customer

email
string

The email address of the user who is making the redemption

phone
string

The phone number of the user who is making the redemption

birthday
date

Birth date of customer in (YYYY-MM-DD) format

created
date-time

Unix Time Stamp of the customer created time

last_seen
date-time

Unix Time Stamp of the customer’s last active time.

referred_by
string

The referral code of another customer who has referred this customer

 
curl -X POST 
-H "Content-Type: application/json"  
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-d '{  
       "user_id":"3028",
       "name":"Miłogost Sawicki",
       "email":"MilogostSawicki@armyspy.com",
       "phone":"+919980737998",
       "birthday": "1990-12-22",
       "created":1490348718,
       "last_seen":1490348718,
       "referred_by": "eccpyaz"
    }' 
"https://api.vauchar.com/customers"
{
    "href": "https://api.vauchar.com/customers/cust-15230067745ac73d368f075",
    "type": "customer",
    "id": "cust-15230067745ac73d368f075",
    "name": "Miłogost Sawicki",
    "user_id": "30281",
    "email": "MilogostSawicki@armyspy.com",
    "phone": "+919980737998",
    "gender": "",
    "birthday": "1990-12-22",
    "referral_code": "e5766zm",
    "referred_by": "cust-150521740759b7cb7fc966b",
    "referred_on": 1490348718,
    "created": 1490348718,
    "last_seen": 1490348718,
    "loyalty_card_number": "8720180406415464",
    "points": 0,
    "earned_points": 0,
    "redeemed_points": 0,
    "expired_points": 0,
    "total_referral": 0,
    "referral_history": [],
    "total_purchase": 0,
    "last_purchase_date": 0,
    "total_purchase_amount": 0,
    "purchase_history": [],
    "purchase_count_history": [],
    "total_redemption": 0,
    "last_redemption_date": 0,
    "email_unsubscribed": 0,
    "lists": [],
    "total_rewards": 0,
    "rewards": []
}
Suggest Edits

Update Specific Customer

This endpoint can be used to update customers

 

Basic Auth

 Authentication is required for this endpoint.
puthttps://api.vauchar.com/customers/customer_id
curl --request PUT \
  --url https://api.vauchar.com/customers/customer_id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.vauchar.com/customers/customer_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/customers/customer_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.vauchar.com/customers/customer_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/customers/customer_id"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

customer_id
string
required

The Unique ID of the customer to update

Body Params

name
string

The human readable name of the customer

email
string

The email address of the customer

phone
string

The phone number of the user (with country code)

birthday
date

Birth date of customer of (YYYY-MM-DD) format

created
date-time

Unix Time Stamp of the customer created time

last_seen
date-time

Unix Time Stamp of the customer’s last active time

total_purchase
int32

The total count of the number purchases made by customer

last_purchase_date
date-time

Unix Time Stamp of when the last purchase was made by customer

total_redemption
int32

The total count of the number redemption made by customer

last_redemption_date
date-time

Unix Time Stamp of when the last redemption was made by customer

 
curl -X PUT 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-H "Content-Type: application/json"  
-d '{  
       "email":"MilogostEigen@trinial.com",
       "phone":"+918573217820",
       "birthday": "1990-12-22",
       "created":1480636800,
       "last_seen":1490348718
    }' 
"https://api.vauchar.com/customers/cust-149034883958d4eb27d6a2a"
No payload with Header: 204 No Content.
Suggest Edits

Delete Specific Customer

This endpoint can be used to delete customers

 

Basic Auth

 Authentication is required for this endpoint.
deletehttps://api.vauchar.com/customers/customer_id
curl --request DELETE \
  --url https://api.vauchar.com/customers/customer_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.vauchar.com/customers/customer_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/customers/customer_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.vauchar.com/customers/customer_id");

xhr.send(data);
import requests

url = "https://api.vauchar.com/customers/customer_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

customer_id
string
required

The Unique ID of the customer to delete

 
curl -X DELETE 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/customers/cust-149034883958d4eb27d6a2a"
No payload with Header: 204 No Content.
Suggest Edits

Get Customer Referrals

This endpoint retrieves list of all the referrals made by a specific customer

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/customers/customer_id/referrals
curl --request GET \
  --url https://api.vauchar.com/customers/customer_id/referrals
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/customers/customer_id/referrals' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/customers/customer_id/referrals")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/customers/customer_id/referrals");

xhr.send(data);
import requests

url = "https://api.vauchar.com/customers/customer_id/referrals"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

customer_id
string
required

The Unique ID of the customer for which referrals are to be retrieved

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/customers/cust-1502540522598ef2ea64eb7/referrals"
{
    "href": "https://api.vauchar.com/customers/cust-1502540522598ef2ea64eb7/referrals",
    "data": [
        {
            "href": "https://api.vauchar.com/customers/cust-1502557824598f368023423",
            "type": "customer",
            "id": "cust-1502557824598f368023423",
            "name": "Miłogost Sawicki",
            "user_id": "3043",
            "email": "MilogostSawicki@armyspyus.com",
            "phone": "085 732 1782",
            "birthday": 661824000,
            "referral_code": "e5oa74k",
            "referred_by": "cust-1502540522598ef2ea64eb7",
            "created": 1490348718,
            "last_seen": 1490348718,
            "total_referral": 0,
            "total_purchase": 0,
            "last_purchase_date": 0,
            "total_redemption": 0,
            "last_redemption_date": 0,
            "lists": [
                "list-1503491398599d75463b4d1",
                "list-150377167359a1bc197d926"
            ]
        },
        {
            "href": "https://api.vauchar.com/customers/cust-15027305145991d912ca2df",
            "type": "customer",
            "id": "cust-15027305145991d912ca2df",
            "name": "Finn Henderson",
            "user_id": "3044",
            "email": "FinnHenderson@gmail.com",
            "phone": "085732732",
            "birthday": 661824000,
            "referral_code": "e5q3erf",
            "referred_by": "cust-1502540522598ef2ea64eb7",
            "created": 1490348718,
            "last_seen": 1490348718,
            "total_referral": 0,
            "total_purchase": 0,
            "last_purchase_date": 0,
            "total_redemption": 0,
            "last_redemption_date": 0,
            "lists": [
                "list-1503491398599d75463b4d1",
                "list-150377167359a1bc197d926"
            ]
        }
    ]
}
Suggest Edits

Get All Customers Events

This endpoint retrieves all the events for a specific customer.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/customers/customer_id/events
curl --request GET \
  --url https://api.vauchar.com/customers/customer_id/events
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/customers/customer_id/events' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/customers/customer_id/events")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/customers/customer_id/events");

xhr.send(data);
import requests

url = "https://api.vauchar.com/customers/customer_id/events"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

customer_id
string
required

The Unique ID of the customer for which the events to to be retrieved

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/customers/cust-15224046625abe0d3675139/events"
{
    "href": "https://api.vauchar.com/customers/cust-15224046625abe0d3675139/events",
    "count": 2,
    "data": [
        {
            "href": "https://api.vauchar.com/customers/cust-15224046625abe0d3675139/events/evnt-15230077875ac7412bca460",
            "type": "event",
            "id": "evnt-15230077875ac7412bca460",
            "customer_id": "cust-15224046625abe0d3675139",
            "event_type": "purchase",
            "description": "",
            "created": 1523007787,
            "event_data": {
                "transaction_id": "transaction-009",
                "value": 518,
                "currency": "USD"
            },
            "reward_data": {
                "reward_type": "points",
                "reward_value": 518,
                "reward_resource_id": "pttrns-15230077875ac7412bce6b4"
            }
        },
        {
            "href": "https://api.vauchar.com/customers/cust-15224046625abe0d3675139/events/evnt-15226084195ac1292355177",
            "type": "event",
            "id": "evnt-15226084195ac1292355177",
            "customer_id": "cust-15224046625abe0d3675139",
            "event_type": "purchase",
            "description": "",
            "created": 1522608419,
            "event_data": {
                "transaction_id": "32",
                "value": 2200,
                "currency": "INR"
            },
            "reward_data": {
                "reward_type": "points",
                "reward_value": 2200,
                "reward_resource_id": "pttrns-15226084195ac12923594b2"
            }
        }
    ]
}
Suggest Edits

Create Customer Event

This endpoint can be used to create customers events

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.vauchar.com/customers/customer_id/events
curl --request POST \
  --url https://api.vauchar.com/customers/customer_id/events
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.vauchar.com/customers/customer_id/events' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/customers/customer_id/events")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.vauchar.com/customers/customer_id/events");

xhr.send(data);
import requests

url = "https://api.vauchar.com/customers/customer_id/events"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

customer_id
string
required

The Unique ID of the customer for whom the event is to be created

Body Params

event_type
string
required

The type of event to create

value
string

The value of the event

currency
string

The currency in 3 digit format

transaction_id
string

The transaction id of the purchase transaction

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

curl -X POST 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-H "Content-Type: application/json"  
-d '{  
       "event_type":"purchase",
       "value": "518",
       "currency":"USD",
       "transaction_id" : "transaction-009"
    }'
"https://api.vauchar.com/customers/cust-15224046625abe0d3675139/events"
{
    "href": "https://api.vauchar.com/customers/cust-15224046625abe0d3675139/events/evnt-15230077875ac7412bca460",
    "type": "event",
    "id": "evnt-15230077875ac7412bca460",
    "customer_id": "cust-15224046625abe0d3675139",
    "event_type": "purchase",
    "description": "",
    "created": 1523007787,
    "event_data": {
        "transaction_id": "transaction-009",
        "value": 518,
        "currency": "USD"
    },
    "reward_data": {
        "reward_type": "points",
        "reward_value": 518,
        "reward_resource_id": "pttrns-15230077875ac7412bce6b4"
    }
}
Suggest Edits

Update Customer Event

 

Currently updating of customer event are not available using API.

Suggest Edits

Delete Customer Event

 

Currently deletion of customer event are not available using API.

Suggest Edits

Get All Loyalty Transactions

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/customers/customer_id/points
curl --request GET \
  --url https://api.vauchar.com/customers/customer_id/points
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/customers/customer_id/points' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/customers/customer_id/points")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/customers/customer_id/points");

xhr.send(data);
import requests

url = "https://api.vauchar.com/customers/customer_id/points"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

customer_id
string
required

The Unique ID of the customer for which the loyalty transactions are to be retrieved

 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/customers/cust-15224046625abe0d3675139/points"
{
    "href": "https://api.vauchar.com/customers/cust-15224046625abe0d3675139/points",
    "count": 2,
    "data": [
        {
            "href": "https://api.vauchar.com/customers/cust-15224046625abe0d3675139/points/pttrns-15230077875ac7412bce6b4",
            "type": "point_transactions",
            "id": "pttrns-15230077875ac7412bce6b4",
            "customer_id": "cust-15224046625abe0d3675139",
            "reference_resource_type": "",
            "reference_resource_id": "",
            "transaction_type": "credit",
            "transaction_value": "518.00",
            "points": 518,
            "base_points": 518,
            "times_increase": 1,
            "tier_name": "Silver",
            "bill_number": "transaction-009",
            "description": "",
            "team": "",
            "created": 1523007787
        },
        {
            "href": "https://api.vauchar.com/customers/cust-15224046625abe0d3675139/points/pttrns-15226084195ac12923594b2",
            "type": "point_transactions",
            "id": "pttrns-15226084195ac12923594b2",
            "customer_id": "cust-15224046625abe0d3675139",
            "reference_resource_type": "",
            "reference_resource_id": "",
            "transaction_type": "credit",
            "transaction_value": "2200.00",
            "points": 2200,
            "base_points": 2200,
            "times_increase": 1,
            "tier_name": "Silver",
            "bill_number": "32",
            "description": "",
            "team": "",
            "created": 1522608419
        }
    ]
}
Suggest Edits

Create Loyalty Transaction

This endpoint can be used to create customers loyalty transaction.

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.vauchar.com/customers/customer_id/points
curl --request POST \
  --url https://api.vauchar.com/customers/customer_id/points
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.vauchar.com/customers/customer_id/points' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/customers/customer_id/points")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.vauchar.com/customers/customer_id/points");

xhr.send(data);
import requests

url = "https://api.vauchar.com/customers/customer_id/points"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

customer_id
string
required

The Unique ID of the customer for whom the transaction has to be added

 
curl -X POST 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-H "Content-Type: application/json"  
-d '{  
       "points":"20",
       "transaction_type":"debit",
       "description": "Made a new purchase"
    }' 
"https://api.vauchar.com/customers/cust-15224046625abe0d3675139/points"
{
    "href": "https://api.vauchar.com/customers/cust-15224046625abe0d3675139/points/pttrns-15230087645ac744fc6625a",
    "type": "point_transactions",
    "id": "pttrns-15230087645ac744fc6625a",
    "customer_id": "cust-15224046625abe0d3675139",
    "reference_resource_type": "",
    "reference_resource_id": "",
    "transaction_type": "debit",
    "transaction_value": 20,
    "points": 20,
    "base_points": 20,
    "times_increase": 1,
    "tier_name": "Silver",
    "bill_number": "",
    "description": "Made a new purchase",
    "team": "",
    "created": 1523008764
}
Suggest Edits

Update Loyalty Transaction

 

We do not support updating of customer loyalty transaction.

Suggest Edits

Delete Loyalty Transaction

 

We do not support deleting of customer loyalty transaction.

Suggest Edits

Validate Points Redeem

The endpoint to validate the percentage of points that can be redeemed in a transaction

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/engage/loyalty/validate
curl --request GET \
  --url https://api.vauchar.com/engage/loyalty/validate
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.vauchar.com/engage/loyalty/validate' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/engage/loyalty/validate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/engage/loyalty/validate");

xhr.send(data);
import requests

url = "https://api.vauchar.com/engage/loyalty/validate"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
curl -X POST 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-H "Content-Type: application/json"  
-d '{
      "products": {
    	 "sku" : ["sum123", "pr1234", "123333"]
      }
    }' 
"https://api.vauchar.com/engage/loyalty/validate"
{
    "points_redeem_exception_percentage": 100,
    "products": {
        "sku": {
            "123333": {
                "points_redeem_exception_percentage": 100
            },
            "sum123": {
                "points_redeem_exception_percentage": 100
            },
            "pr1234": {
                "points_redeem_exception_percentage": 100
            }
        }
    }
}
Suggest Edits

Create Present

 

Basic Auth

 Authentication is required for this endpoint.
posthttps://api.vauchar.com/presents
curl --request POST \
  --url https://api.vauchar.com/presents
var request = require("request");

var options = { method: 'POST', url: 'https://api.vauchar.com/presents' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/presents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.vauchar.com/presents");

xhr.send(data);
import requests

url = "https://api.vauchar.com/presents"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

value
string

denomination of the gift card for third party brand

country
string

Country code (in ISO ALPHA-2 format) for which the present needs to be generated

product_code
string

The code for the third party brand

 

Wallet Balance

You must add balance in your Vauchar wallet before you can start generating gift cards from third party brands in production. To add balance, go to Settings from sidebar and select Wallet

curl -X POST 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-H "Content-Type: application/json"  
-d '{
        "value":"500",
        "country":"IN",
        "product_code": 1007
   }' 
"https://api.vauchar.com/presents"
{  
   "href":"https://api.vauchar.com/presents/prsn-14966388105934e55ac95eb",
   "type":"present",
   "id":"prsn-14966388105934e55ac95eb",
   "tag":"",
   "created":1496638810,
   "value":"500.00",
   "country":"IN",
   "product":{  
      "product_name":"flipkart",
      "product_code":1007,
      "code":"DEMO CODE",
      "pin":"DEMO PIN",
      "validity_date":"1970-01-01",
      "amount":"500.00"
   },
   "metadata":{  
      "to_name":"",
      "to_email":"",
      "to_phone":"",
      "from_name":"",
      "from_email":"",
      "message":""
   }
}

Demo Endpoint

If you want to test out the API, you can use demo endpoint. No wallet balance is required or deducted when this end point is used.

curl -X POST 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)" 
-H "Content-Type: application/json"  
-d '{
        "value":"500",
        "country":"IN",
        "product_code": 1007
   }' 
"https://api.vauchar.com/demo/presents"

Available Brands

You can download the complete list of brands available on our platform, you can download the list from below links:

India: Download List

Suggest Edits

Get All Presents

This endpoint retrieves all presents.

 

Basic Auth

 Authentication is required for this endpoint.
gethttps://api.vauchar.com/presents
curl --request GET \
  --url https://api.vauchar.com/presents
var request = require("request");

var options = { method: 'GET', url: 'https://api.vauchar.com/presents' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.vauchar.com/presents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.vauchar.com/presents");

xhr.send(data);
import requests

url = "https://api.vauchar.com/presents"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
curl -X GET 
-H "Authorization: Basic base64_encoded(<Your_Merchant_Id>:<Your_Api_Key>)"
"https://api.vauchar.com/presents"
{
    "href": "https://api.vauchar.com/presents",
    "data": [
        {
            "href": "https://api.vauchar.com/presents/prsn-15109985675a1002270dbff",
            "type": "present",
            "id": "prsn-15109985675a1002270dbff",
            "tag": "",
            "created": 1510998567,
            "value": "1000.00",
            "country": "IN",
            "product": {
                "product_name": "Flipkart",
                "product_code": 1007,
                "code": "DEMO CODE",
                "pin": "DEMO PIN",
                "validity_date": "1970-01-01",
                "amount": "1000.00"
            },
            "metadata": {
                "to_name": "",
                "to_email": "",
                "to_phone": "",
                "from_name": "",
                "from_email": "",
                "message": ""
            }
        },
        {
            "href": "https://api.vauchar.com/presents/prsn-150771905659ddf79071619",
            "type": "present",
            "id": "prsn-150771905659ddf79071619",
            "tag": "",
            "created": 1507719056,
            "value": "500.00",
            "country": "IN",
            "product": {
                "product_name": "Thomas Cook",
                "product_code": 46007,
                "code": "DEMO CODE",
                "pin": "DEMO PIN",
                "validity_date": "1970-01-01",
                "amount": "500.00"
            },
            "metadata": {
                "to_name": "",
                "to_email": "",
                "to_phone": "",
                "from_name": "",
                "from_email": "",
                "message": ""
            }
        }
    ]
}