Coupon Redemptions

Operations related to coupon redemptions.

Get Coupon Redemptions

get

Retrieves a list of all redemptions for a specific coupon.

Authorizations
Path parameters
couponIdstringRequired

The ID of the coupon for which to retrieve redemptions.

Example: cpn-1502288320598b19c0d59fd
Responses
200
A successful response returns a list of redemption objects.
application/json
get
GET /coupons/{couponId}/redemptions HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
  "href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions",
  "count": 2,
  "data": [
    {
      "href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-150507097559b58f7f8b276",
      "type": "redemption",
      "id": "res-150507097559b58f7f8b276",
      "coupon_id": "cpn-1502288320598b19c0d59fd",
      "user_id": "12",
      "customer_id": "cust-149000628058cfb1084467c",
      "user_email": "",
      "user_phone": "",
      "transaction_id": "",
      "value_used": "",
      "team_id": "E57BB2DOKBW",
      "created": 1505070975
    },
    {
      "href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-1502473727598dedff485f1",
      "type": "redemption",
      "id": "res-1502473727598dedff485f1",
      "coupon_id": "cpn-1502288320598b19c0d59fd",
      "user_id": "1",
      "customer_id": "cust-148976158458cbf53023141",
      "user_email": "vaibhav571@gmail.com",
      "user_phone": "",
      "transaction_id": "10",
      "value_used": "300.00",
      "team_id": "",
      "created": 1502473727
    }
  ]
}

Create Coupon Redemption

post

Redeems a coupon for a specific user. While only user_id is mandatory, providing more details is recommended for better tracking.

Authorizations
Path parameters
couponIdstringRequired

The ID of the coupon to redeem.

Example: cpn-1502288320598b19c0d59fd
Body
user_idstringRequired

The unique identifier for the user redeeming the coupon.

user_emailstringOptional

The email address of the user.

user_phonestringOptional

The phone number of the user.

transaction_idstringOptional

The identifier for the transaction this redemption is part of.

value_usednumberOptional

The value used in this specific transaction.

Responses
200
Successful redemption. Returns the created redemption object.
application/json
post
POST /coupons/{couponId}/redemptions HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 121

{
  "user_id": "123",
  "user_email": "test@vauchar.com",
  "user_phone": "82383209830",
  "transaction_id": "transa001",
  "value_used": 50
}
{
  "href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-150675935459cf52bad9207",
  "type": "redemption",
  "id": "res-150675935459cf52bad9207",
  "coupon_id": "cpn-1502288320598b19c0d59fd",
  "user_id": "123",
  "customer_id": "cust-150614516859c5f39002a4a",
  "user_email": "test@vauchar.com",
  "user_phone": "82383209830",
  "transaction_id": "transa001",
  "value_used": "50.00",
  "team_id": "",
  "created": 1506759354
}

Get Specific Redemption

get

Retrieves the details of a specific redemption by providing the coupon ID and redemption ID.

Authorizations
Path parameters
couponIdstringRequired

The ID of the coupon.

Example: cpn-1502288320598b19c0d59fd
redemptionIdstringRequired

The ID of the redemption to retrieve.

Example: res-1502473727598dedff485f1
Responses
200
A successful response returns the specified redemption object.
application/json
get
GET /coupons/{couponId}/redemptions/{redemptionId} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*
{
  "href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-1502473727598dedff485f1",
  "data": {
    "href": "https://api.vauchar.com/coupons/cpn-1502288320598b19c0d59fd/redemptions/res-1502473727598dedff485f1",
    "type": "redemption",
    "id": "res-1502473727598dedff485f1",
    "coupon_id": "cpn-1502288320598b19c0d59fd",
    "user_id": "1",
    "customer_id": "cust-148976158458cbf53023141",
    "user_email": "vaibhav571@gmail.com",
    "user_phone": "",
    "transaction_id": "10",
    "value_used": "300.00",
    "team_id": "",
    "created": 1502473727
  }
}

Delete Specific Redemption

delete

Deletes a specific coupon redemption. This can be useful for correcting mistaken redemptions.

Authorizations
Path parameters
couponIdstringRequired

The ID of the coupon.

Example: cpn-1502288320598b19c0d59fd
redemptionIdstringRequired

The ID of the redemption to delete.

Example: res-150675935459cf52bad9207
Responses
204
No Content. The redemption was successfully deleted.
delete
DELETE /coupons/{couponId}/redemptions/{redemptionId} HTTP/1.1
Host: api.vauchar.com
Authorization: Basic username:password
Accept: */*

No content