Skip to main content

Create Voucher / Gift Card

Create a new voucher (gift card) that can be redeemed for bookings.

Endpointโ€‹

POST /v1/vouchers

Request Bodyโ€‹

FieldTypeRequiredDescription
codestringNoUnique code (auto-generated if not provided)
original_valuenumberYesInitial value of the voucher
valid_fromstringNoStart date (ISO 8601)
valid_untilstringNoExpiration date (ISO 8601)
purchaser_namestringNoName of the purchaser
purchaser_emailstringNoEmail of the purchaser
recipient_namestringNoName of the recipient
recipient_emailstringNoEmail of the recipient
personal_messagestringNoGift message (max 1000 chars)
statusstringNoactive or inactive (default: active)
send_emailsbooleanNoSend confirmation/gift emails

Example Request - Gift Cardโ€‹

curl -X POST "https://app.equipdash.com/api/v1/vouchers" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"original_value": 100.00,
"purchaser_name": "John Doe",
"purchaser_email": "john@example.com",
"recipient_name": "Jane Smith",
"recipient_email": "jane@example.com",
"personal_message": "Happy Birthday! Enjoy your adventure!",
"valid_until": "2026-12-31T23:59:59Z",
"send_emails": true
}'

Example Request - Custom Codeโ€‹

curl -X POST "https://app.equipdash.com/api/v1/vouchers" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "BIRTHDAY2026",
"original_value": 50.00
}'

Responseโ€‹

{
"data": {
"id": 1,
"code": "GFT-ABCD-1234",
"original_value": 100.00,
"remaining_value": 100.00,
"currency": "USD",
"status": "active",
"valid_from": null,
"valid_until": "2026-12-31T23:59:59+00:00",
"purchaser_name": "John Doe",
"purchaser_email": "john@example.com",
"recipient_name": "Jane Smith",
"recipient_email": "jane@example.com",
"personal_message": "Happy Birthday! Enjoy your adventure!",
"is_redeemable": false,
"is_expired": false,
"is_paid": false,
"payment_status": "unpaid",
"source": "api",
"created_at": "2026-02-01T10:00:00+00:00",
"updated_at": "2026-02-01T10:00:00+00:00"
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-02-01T10:00:00+00:00"
}
}

Code Generationโ€‹

If no code is provided, a unique code is automatically generated in the format:

GFT-XXXX-XXXX

Email Notificationsโ€‹

When send_emails: true:

  1. Purchaser Confirmation - Sent to purchaser_email with voucher details
  2. Gift Card Email - Sent to recipient_email with the voucher code and personal message

Voucher Statesโ€‹

StateDescription
is_paid: falseVoucher cannot be redeemed until payment is recorded
is_redeemable: trueVoucher can be used for bookings
is_expired: truevalid_until has passed

Notesโ€‹

  • Vouchers must be paid before they can be redeemed
  • Use the admin interface or payment API to record voucher payments
  • Currency is automatically set to your account's currency
  • remaining_value starts equal to original_value