Gift Card Validations

Operations related to validating gift cards.

Validate a Gift Card by Code

get

Checks the validity of a gift card based on its code and the value intended to be used.

Authorizations
Query parameters
gift_card_codestringRequired

The code of the gift card to validate.

Example: GIFT0C307PBFJC3A5
value_usedstringRequired

The amount of value to be used from the gift card.

Example: 100
Responses
200
The validation result and details of the gift card.
application/json
get
GET /gift-cards/validate HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
  "validation_status": {
    "status": 1000,
    "message": "Gift Card is valid"
  },
  "data": {
    "href": "https://example.com",
    "type": "text",
    "id": "text",
    "gift_card_code": "text",
    "tag": "text",
    "created": 1,
    "start_time": 1,
    "expiry_time": 1,
    "total_value": "text",
    "balance": "text",
    "value_unit": "text",
    "currency": "text",
    "active_status": "text",
    "brand_id": "text",
    "teams": [
      "text"
    ],
    "brands": [],
    "metadata": {
      "from_name": "text",
      "from_email": "name@gmail.com",
      "to_name": "text",
      "to_email": "name@gmail.com",
      "to_phone": "text",
      "message": "text"
    }
  }
}

Validate a Gift Card by ID

get

Checks the validity of a specific gift card by its ID and the value intended to be used.

Authorizations
Path parameters
gift_card_idstringRequired

The unique identifier of the gift card to validate.

Example: gift-148061360458405ee43a1a8
Query parameters
value_usedstringRequired

The amount of value to be used from the gift card.

Example: 100
Responses
200
The validation result and details of the gift card.
application/json
get
GET /gift-cards/{gift_card_id}/validate HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
  "validation_status": {
    "status": 1000,
    "message": "Gift Card is valid"
  },
  "data": {
    "href": "https://example.com",
    "type": "text",
    "id": "text",
    "gift_card_code": "text",
    "tag": "text",
    "created": 1,
    "start_time": 1,
    "expiry_time": 1,
    "total_value": "text",
    "balance": "text",
    "value_unit": "text",
    "currency": "text",
    "active_status": "text",
    "brand_id": "text",
    "teams": [
      "text"
    ],
    "brands": [],
    "metadata": {
      "from_name": "text",
      "from_email": "name@gmail.com",
      "to_name": "text",
      "to_email": "name@gmail.com",
      "to_phone": "text",
      "message": "text"
    }
  }
}