Gift Cards
Operations related to creating, retrieving, updating, and deleting gift cards.
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.
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"
}
}
]
}
Creates a new gift card with the specified details.
A Unix timestamp for when the gift card becomes valid.
A Unix timestamp for when the gift card expires. Use 0 for no expiration.
The desired status of the gift card upon creation.
The monetary value of the gift card.
The currency of the gift card's value (e.g., "USD").
A tag for organizing or categorizing the gift card.
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"
}
}
Fetches the details of a single gift card by its unique ID.
The unique identifier of the gift card to retrieve.
gift-150399274159a51ba5d6b34
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"
}
}
}
Updates the details of a specific gift card.
The unique identifier of the gift card to update.
gift-150676699459cf709263ede
The desired status of the gift card.
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"
}
}
}
Permanently deletes a specific gift card by its unique ID.
The unique identifier of the gift card to delete.
gift-150676699459cf709263ede
DELETE /gift-cards/{gift_card_id} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
No content