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.
A successful response returns a list of gift card objects.
Unauthorized. The request lacks valid authentication credentials.
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.
Gift Card created successfully.
Bad Request. The request body is invalid or missing required fields.
Unauthorized. The request lacks valid authentication credentials.
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-150399274159a51ba5d6b34Successfully retrieved the details of the gift card.
Unauthorized. The request lacks valid authentication credentials.
Not Found. A gift card with the specified ID does not exist.
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-150676699459cf709263edeThe desired status of the gift card.
Gift Card updated successfully.
Bad Request. The request body is invalid.
Unauthorized. The request lacks valid authentication credentials.
Not Found. A gift card with the specified ID does not exist.
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-150676699459cf709263edeNo Content. The gift card was successfully deleted.
No content
Unauthorized. The request lacks valid authentication credentials.
Not Found. A gift card with the specified ID does not exist.
DELETE /gift-cards/{gift_card_id} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
No content
Last updated