Gift Card Redemptions

Operations related to gift card redemptions.

List Gift Card Redemptions

get

Retrieves the redemption history for a specific gift card.

Authorizations
Path parameters
gift_card_idstringRequired

The unique identifier of the gift card.

Example: gift-148061212058405918eee94
Responses
200
A successful response with the gift card's redemption history.
application/json
get
GET /gift-cards/{gift_card_id}/redemptions HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
  "href": "https://example.com",
  "data": [
    {
      "href": "https://example.com",
      "type": "redemption",
      "id": "text",
      "gift_card_id": "text",
      "user_id": "text",
      "user_email": "name@gmail.com",
      "user_phone": "text",
      "transaction_id": "text",
      "value_used": "text",
      "created": 1
    }
  ]
}

Create a Gift Card Redemption

post

Redeems a specific gift card by its ID.

Authorizations
Path parameters
gift_card_idstringRequired

The unique identifier of the gift card to redeem.

Example: gift-148061360458405ee43a1a8
Body
user_idstringOptional
user_emailstring · emailOptional
user_phonestringOptional
value_usednumberRequired

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

Responses
201
Redemption created successfully.
application/json
post
POST /gift-cards/{gift_card_id}/redemptions HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 97

{
  "user_id": "user001",
  "user_email": "user1@vauchar.com",
  "user_phone": "91100911100",
  "value_used": 50
}
{
  "href": "https://example.com",
  "type": "redemption",
  "id": "text",
  "gift_card_id": "text",
  "user_id": "text",
  "user_email": "name@gmail.com",
  "user_phone": "text",
  "transaction_id": "text",
  "value_used": "text",
  "created": 1
}

Retrieve a specific Redemption

get

Retrieves the details of a single gift card redemption.

Authorizations
Path parameters
gift_card_idstringRequired

The unique identifier of the gift card.

Example: gift-148061360458405ee43a1a8
redemption_idstringRequired

The unique identifier of the redemption.

Example: res-148061693358406be5cbe66
Responses
200
A successful response with the redemption details.
application/json
get
GET /gift-cards/{gift_card_id}/redemptions/{redemption_id} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
  "href": "https://example.com",
  "data": {
    "href": "https://example.com",
    "type": "redemption",
    "id": "text",
    "gift_card_id": "text",
    "user_id": "text",
    "user_email": "name@gmail.com",
    "user_phone": "text",
    "transaction_id": "text",
    "value_used": "text",
    "created": 1
  }
}

Delete a Redemption

delete

Permanently deletes a specific gift card redemption.

Authorizations
Path parameters
gift_card_idstringRequired

The unique identifier of the gift card.

Example: gift-148061360458405ee43a1a8
redemption_idstringRequired

The unique identifier of the redemption to delete.

Example: res-148061693358406be5cbe66
Responses
204
No Content. The redemption was successfully deleted.
delete
DELETE /gift-cards/{gift_card_id}/redemptions/{redemption_id} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*

No content