Gift Vouchers API

Design

This is a RESTful API to give developers the ability to create their own Gift Vouchers that are redeemable within the booking flow.

Authentication

This request requires authentication

Create a Gift Voucher

Request

Make a POST request to the following endpoint:

https://app.staylists.com/api/v3/gift_vouchers

Parameters

amount (required)

The value of the Gift Voucher that can be redeemed during the booking process. For a Gift Voucher of £50, values of 50 or 50.00 will work just fine.

expiry_date (required)

The date on which the voucher will expire and is no longer able to be redeemed. To avoid customer anger, the voucher will expire at the end of this day, and so one could argue the expiry date is actually the following day. If you one such pedant, you may prefer to consider this a use by date instead.

purchased_by (required)

A string based reference of the purchaser. Perhaps, a name, email, or some other way of tracing a purchase back to a person or company. Max 255 characters.

currency (default to GBP unless supplied)

The ISO code of the currency of the Gift Voucher.

active (default to true)

Set to false if you do not want the Gift Voucher to be immediately active.

Response

When a Parameters are valid

{
  "object": "GiftVoucher",
  "data": {
    "id": 24567,
    "amount": "50.00",
    "currency": "GBP"
    "redemption_code": "A5SGDBLX7O463PN8",
    "active": true,
  }
}