Gift Cards

Operations related to creating, retrieving, updating, and deleting gift cards.

List Gift Cards

get

Retrieves a list of all gift cards associated with the merchant's account. The list is paginated and contains detailed information for each gift card.

Authorizations
Responses
200
A successful response returns a list of gift card objects.
application/json
get
GET /gift-cards HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
  "href": "https://example.com",
  "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"
      }
    }
  ]
}

Create a Gift Card

post

Creates a new gift card with the specified details.

Authorizations
Body
start_timeinteger · int64Optional

A Unix timestamp for when the gift card becomes valid.

expiry_timeinteger · int64Optional

A Unix timestamp for when the gift card expires. Use 0 for no expiration.

active_statusstring · enumOptional

The desired status of the gift card upon creation.

Possible values:
valuestringRequired

The monetary value of the gift card.

currencystringRequired

The currency of the gift card's value (e.g., "USD").

tagstringOptional

A tag for organizing or categorizing the gift card.

Responses
201
Gift Card created successfully.
application/json
post
POST /gift-cards HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 293

{
  "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"
  }
}
{
  "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"
  }
}

Retrieve a specific Gift Card

get

Fetches the details of a single gift card by its unique ID.

Authorizations
Path parameters
gift_card_idstringRequired

The unique identifier of the gift card to retrieve.

Example: gift-150399274159a51ba5d6b34
Responses
200
Successfully retrieved the details of the gift card.
application/json
get
GET /gift-cards/{gift_card_id} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
  "href": "https://example.com",
  "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"
    }
  }
}

Update a Gift Card

put

Updates the details of a specific gift card.

Authorizations
Path parameters
gift_card_idstringRequired

The unique identifier of the gift card to update.

Example: gift-150676699459cf709263ede
Body
active_statusstring · enumOptional

The desired status of the gift card.

Possible values:
Responses
200
Gift Card updated successfully.
application/json
put
PUT /gift-cards/{gift_card_id} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 224

{
  "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"
  }
}
{
  "href": "https://example.com",
  "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"
    }
  }
}

Delete a Gift Card

delete

Permanently deletes a specific gift card by its unique ID.

Authorizations
Path parameters
gift_card_idstringRequired

The unique identifier of the gift card to delete.

Example: gift-150676699459cf709263ede
Responses
204
No Content. The gift card was successfully deleted.
delete
DELETE /gift-cards/{gift_card_id} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*

No content