Gift certificates tools
All tool areas. Each tool acts within your access.
Gift certificates
change_gift_certificate_delivery
Change when (deliverOn, a local date at its location from today up to 365 days ahead) or where (recipientEmail) a gift certificate goes, before it has been sent. Undo puts back what it was, while it still hasn't been sent. Needs bookings:write where it was sold. Returns a preview to confirm.
Changes · Members of an organization · Needs bookings:write
Input
giftCertificateIdThe gift certificate's id, from list_gift_certificates
deliverOnA local date at the location, YYYY-MM-DD
recipientEmailCorrected recipient email; null or absent leaves it unchanged
Output
idcodeIn groups of 4. In full only to someone holding refunds:create and orders:amounts where it was sold; masked (•••• and its last 4) otherwise, since whoever reads it can spend it
kindreasonissuedBystatuspending (its purchase isn't paid yet), active, voided, or expired (promotional ones past expiresAt)
entityIdThe entity it's a liability of
locationIdWhere it was sold
currencyamountAs sold, minor units; null without orders:amounts
balanceWhat's left to use; null without orders:amounts
orderIdThe purchase's order; null for a promotional one
orderCodebuyerbuyer.customerIdbuyer.nameFirst name only without customers:contact
recipientNameFirst name only without customers:contact
recipientEmailNull without customers:contact, or when none was given
messagepresetNamedeliverOnThe local date at its location it goes to the recipient
deliverAtWhen the delivery job sends it: 9:00 at its location on deliverOn, or the moment it was paid for (or issued) when that was already the day. Show it in timeZone
timeZoneThe time zone of the location it was sold at, where deliverOn is a local date and deliverAt was planned; null without a location
deliveredAtdeliverydelivery.statescheduled: goes at deliverAt; overdue: deliverAt has passed without a send; sent; no_email: nowhere to send it (the buyer's receipt has its card link)
delivery.deliverOnA local date at the location, YYYY-MM-DD
delivery.deliverAtWhen it goes, as deliverAt above
delivery.timeZoneWhere deliverAt is shown, as timeZone above
delivery.deliveredAtexpiresAtvoidedAtvoidReasonvoidNoteStaff's own words; null without orders:amounts
createdAt
get_gift_certificate
Get one gift certificate, by giftCertificateId or code (any case, dashes ignored): what list_gift_certificates shows, with the orders it paid (by booking code, each use's amount and payment status, and what was given back), the amounts restored to it by refunds, and its delivery (scheduled, overdue, sent, or nowhere to send it). Masked as list_gift_certificates is.
Reads · Members of an organization · Needs bookings:read
Input
giftCertificateIdThe gift certificate's id, from list_gift_certificates
code
Output
idcodeIn groups of 4. In full only to someone holding refunds:create and orders:amounts where it was sold; masked (•••• and its last 4) otherwise, since whoever reads it can spend it
kindreasonissuedBystatuspending (its purchase isn't paid yet), active, voided, or expired (promotional ones past expiresAt)
entityIdThe entity it's a liability of
locationIdWhere it was sold
currencyamountAs sold, minor units; null without orders:amounts
balanceWhat's left to use; null without orders:amounts
orderIdThe purchase's order; null for a promotional one
orderCodebuyerbuyer.customerIdbuyer.nameFirst name only without customers:contact
recipientNameFirst name only without customers:contact
recipientEmailNull without customers:contact, or when none was given
messagepresetNamedeliverOnThe local date at its location it goes to the recipient
deliverAtWhen the delivery job sends it: 9:00 at its location on deliverOn, or the moment it was paid for (or issued) when that was already the day. Show it in timeZone
timeZoneThe time zone of the location it was sold at, where deliverOn is a local date and deliverAt was planned; null without a location
deliveredAtdeliverydelivery.statescheduled: goes at deliverAt; overdue: deliverAt has passed without a send; sent; no_email: nowhere to send it (the buyer's receipt has its card link)
delivery.deliverOnA local date at the location, YYYY-MM-DD
delivery.deliverAtWhen it goes, as deliverAt above
delivery.timeZoneWhere deliverAt is shown, as timeZone above
delivery.deliveredAtexpiresAtvoidedAtvoidReasonvoidNoteStaff's own words; null without orders:amounts
createdAtdiscountUsesdiscountUses[]discountUses[].orderIddiscountUses[].bookingCodediscountUses[].amountMinor units (cents) in the location's currency
discountUses[].statusdiscountUses[].atusesOldest first
uses[]uses[].paymentIduses[].orderIduses[].bookingCodeuses[].amountNull without orders:amounts
uses[].statuspending: reserved at checkout, its order not paid yet; succeeded: redeemed; canceled: its order was canceled before it was booked, and the balance came back
uses[].restoredGiven back to it by refunds of that order; null without orders:amounts
uses[].atrestoresOldest first
restores[]restores[].refundIdrestores[].orderIdrestores[].bookingCoderestores[].amountMinor units (cents) in the location's currency
restores[].reasonrestores[].at
get_gift_certificate_liability
Get what the business owes in gift certificates, per entity and currency, over a range of local dates (the organization's time zone, up to 366 days): outstanding at the start, sold, redeemed (net of what refunds gave back), voided, and outstanding at the end, which always reconcile (start + sold − redeemed − voided = end). Certificate sales aren't sales: they're in no sales, tax, or service charge figure. Promotional certificates are free value and never counted; refund certificates (a guest's refund given as a gift certificate) are, from the day they were issued. Narrow with entityId. Needs orders:amounts and bookings:read. columns and rows give the same figures as a table, to export as a CSV.
Reads · Members of an organization · Needs bookings:read, orders:amounts
Input
fromFirst local date, inclusive
toLast local date, inclusive, up to 366 days after
fromentityIdThe entity's id, from get_setup
Output
fromtocanExportWhether the organization's plan includes CSV export (Growth and up): the screen offers the download only then. The rows are the same either way
columnscolumns[]columns[].keycolumns[].labelcolumns[].kindrowsrows[]rows[].entityIdrows[].entityNamerows[].currencyrows[].outstandingAtStartBalances of active certificates as
frombeganrows[].soldCertificates whose purchase was paid, and refund certificates issued in place of a refund (a booking's refundDestination)
rows[].redeemedPaid with them, less what refunds gave back to them
rows[].voidedWhat voiding took off them
rows[].outstandingAtEndBalances as
toended: outstandingAtStart + sold − redeemed − voided
issue_gift_certificate
Give someone a promotional gift certificate (free value: a comp, for a partner or media, or service recovery). It comes off a booking before tax, like a comp promo code, and can only be used when booking online. It expires: by default promotionalCertificateExpiryMonths after today at the location. A manager is limited to their own locations, a comp or service recovery, up to their refund cap, and an expiry within 90 days. The recipient is emailed it on deliverOn (now, for today). Undo voids it within 15 minutes while it's unused. Returns a preview to confirm.
Changes · Members of an organization · Needs orders:amounts, promos:write
Input
locationIdThe location's id, from get_setup
amountMinor units (cents) in the location's currency
reasonWhy it's free: a comp, a partner or media, or service recovery
recipientrecipient.namerecipient.emailmessageA short message the recipient reads on the certificate
deliverOnSend it on this local date; now when left out
expiresOnThe last local date it can be used; the entity's default when left out
noteStaff's own note; the recipient never sees it
Output
idcodeIn groups of 4. In full only to someone holding refunds:create and orders:amounts where it was sold; masked (•••• and its last 4) otherwise, since whoever reads it can spend it
kindreasonissuedBystatuspending (its purchase isn't paid yet), active, voided, or expired (promotional ones past expiresAt)
entityIdThe entity it's a liability of
locationIdWhere it was sold
currencyamountAs sold, minor units; null without orders:amounts
balanceWhat's left to use; null without orders:amounts
orderIdThe purchase's order; null for a promotional one
orderCodebuyerbuyer.customerIdbuyer.nameFirst name only without customers:contact
recipientNameFirst name only without customers:contact
recipientEmailNull without customers:contact, or when none was given
messagepresetNamedeliverOnThe local date at its location it goes to the recipient
deliverAtWhen the delivery job sends it: 9:00 at its location on deliverOn, or the moment it was paid for (or issued) when that was already the day. Show it in timeZone
timeZoneThe time zone of the location it was sold at, where deliverOn is a local date and deliverAt was planned; null without a location
deliveredAtdeliverydelivery.statescheduled: goes at deliverAt; overdue: deliverAt has passed without a send; sent; no_email: nowhere to send it (the buyer's receipt has its card link)
delivery.deliverOnA local date at the location, YYYY-MM-DD
delivery.deliverAtWhen it goes, as deliverAt above
delivery.timeZoneWhere deliverAt is shown, as timeZone above
delivery.deliveredAtexpiresAtvoidedAtvoidReasonvoidNoteStaff's own words; null without orders:amounts
createdAt
list_gift_certificates
List gift certificates, newest first: code, kind, status, amount and balance, who bought it and for whom, and its delivery. Filter by status, kind, entityId, locationId (where it was sold), the buyer's email (buyerEmail, needs customers:contact), or code (exact, any case, dashes ignored), and page with before. Amounts and staff's note need orders:amounts; the code shows in full only to someone holding refunds:create and orders:amounts where it was sold; full names and the recipient's email need customers:contact. Someone limited to a location sees certificates sold there.
Reads · Members of an organization · Needs bookings:read
Input
statuskindentityIdThe entity's id, from get_setup
locationIdThe location's id, from get_setup
buyerEmailcodebeforeThe gift certificate's id, from list_gift_certificates
limitThe most results to return (default 50)
Output
giftCertificatesgiftCertificates[]giftCertificates[].idgiftCertificates[].codeIn groups of 4. In full only to someone holding refunds:create and orders:amounts where it was sold; masked (•••• and its last 4) otherwise, since whoever reads it can spend it
giftCertificates[].kindgiftCertificates[].reasongiftCertificates[].issuedBygiftCertificates[].statuspending (its purchase isn't paid yet), active, voided, or expired (promotional ones past expiresAt)
giftCertificates[].entityIdThe entity it's a liability of
giftCertificates[].locationIdWhere it was sold
giftCertificates[].currencygiftCertificates[].amountAs sold, minor units; null without orders:amounts
giftCertificates[].balanceWhat's left to use; null without orders:amounts
giftCertificates[].orderIdThe purchase's order; null for a promotional one
giftCertificates[].orderCodegiftCertificates[].buyergiftCertificates[].buyer.customerIdgiftCertificates[].buyer.nameFirst name only without customers:contact
giftCertificates[].recipientNameFirst name only without customers:contact
giftCertificates[].recipientEmailNull without customers:contact, or when none was given
giftCertificates[].messagegiftCertificates[].presetNamegiftCertificates[].deliverOnThe local date at its location it goes to the recipient
giftCertificates[].deliverAtWhen the delivery job sends it: 9:00 at its location on deliverOn, or the moment it was paid for (or issued) when that was already the day. Show it in timeZone
giftCertificates[].timeZoneThe time zone of the location it was sold at, where deliverOn is a local date and deliverAt was planned; null without a location
giftCertificates[].deliveredAtgiftCertificates[].deliverygiftCertificates[].delivery.statescheduled: goes at deliverAt; overdue: deliverAt has passed without a send; sent; no_email: nowhere to send it (the buyer's receipt has its card link)
giftCertificates[].delivery.deliverOnA local date at the location, YYYY-MM-DD
giftCertificates[].delivery.deliverAtWhen it goes, as deliverAt above
giftCertificates[].delivery.timeZoneWhere deliverAt is shown, as timeZone above
giftCertificates[].delivery.deliveredAtgiftCertificates[].expiresAtgiftCertificates[].voidedAtgiftCertificates[].voidReasongiftCertificates[].voidNoteStaff's own words; null without orders:amounts
giftCertificates[].createdAtnextBefore
resend_gift_certificate
Send a gift certificate to its recipient again, now (a lost email), optionally to a corrected recipientEmail, which it keeps. Can't be undone. Needs bookings:write where it was sold. Returns a preview to confirm.
Changes · Members of an organization · Needs bookings:write
Input
giftCertificateIdThe gift certificate's id, from list_gift_certificates
recipientEmailCorrected recipient email; null or absent leaves it unchanged
Output
idcodeIn groups of 4. In full only to someone holding refunds:create and orders:amounts where it was sold; masked (•••• and its last 4) otherwise, since whoever reads it can spend it
kindreasonissuedBystatuspending (its purchase isn't paid yet), active, voided, or expired (promotional ones past expiresAt)
entityIdThe entity it's a liability of
locationIdWhere it was sold
currencyamountAs sold, minor units; null without orders:amounts
balanceWhat's left to use; null without orders:amounts
orderIdThe purchase's order; null for a promotional one
orderCodebuyerbuyer.customerIdbuyer.nameFirst name only without customers:contact
recipientNameFirst name only without customers:contact
recipientEmailNull without customers:contact, or when none was given
messagepresetNamedeliverOnThe local date at its location it goes to the recipient
deliverAtWhen the delivery job sends it: 9:00 at its location on deliverOn, or the moment it was paid for (or issued) when that was already the day. Show it in timeZone
timeZoneThe time zone of the location it was sold at, where deliverOn is a local date and deliverAt was planned; null without a location
deliveredAtdeliverydelivery.statescheduled: goes at deliverAt; overdue: deliverAt has passed without a send; sent; no_email: nowhere to send it (the buyer's receipt has its card link)
delivery.deliverOnA local date at the location, YYYY-MM-DD
delivery.deliverAtWhen it goes, as deliverAt above
delivery.timeZoneWhere deliverAt is shown, as timeZone above
delivery.deliveredAtexpiresAtvoidedAtvoidReasonvoidNoteStaff's own words; null without orders:amounts
createdAt
void_gift_certificate
Void what's left on a gift certificate: its balance goes to 0 and it's voided, with a reason (refunded, fraud, issued_in_error, other) and staff's note, never shown to the guest. What it already paid stays paid. A refund certificate (a guest's refund given as one, under their booking's refund policy) voided unused takes that refund back too, so the booking reads as not refunded that much: for when the card was also refunded in the payment provider (the refund_exceeded alert); one partly used keeps it. Refunding a purchase to the buyer's card is refund_order on its order, which voids the remaining balance first. Can't be undone. Needs refunds:create and orders:amounts where it was sold. Returns a preview to confirm.
Changes · Members of an organization · Needs refunds:create
Input
giftCertificateIdThe gift certificate's id, from list_gift_certificates
reasonnote
Output
idcodeIn groups of 4. In full only to someone holding refunds:create and orders:amounts where it was sold; masked (•••• and its last 4) otherwise, since whoever reads it can spend it
kindreasonissuedBystatuspending (its purchase isn't paid yet), active, voided, or expired (promotional ones past expiresAt)
entityIdThe entity it's a liability of
locationIdWhere it was sold
currencyamountAs sold, minor units; null without orders:amounts
balanceWhat's left to use; null without orders:amounts
orderIdThe purchase's order; null for a promotional one
orderCodebuyerbuyer.customerIdbuyer.nameFirst name only without customers:contact
recipientNameFirst name only without customers:contact
recipientEmailNull without customers:contact, or when none was given
messagepresetNamedeliverOnThe local date at its location it goes to the recipient
deliverAtWhen the delivery job sends it: 9:00 at its location on deliverOn, or the moment it was paid for (or issued) when that was already the day. Show it in timeZone
timeZoneThe time zone of the location it was sold at, where deliverOn is a local date and deliverAt was planned; null without a location
deliveredAtdeliverydelivery.statescheduled: goes at deliverAt; overdue: deliverAt has passed without a send; sent; no_email: nowhere to send it (the buyer's receipt has its card link)
delivery.deliverOnA local date at the location, YYYY-MM-DD
delivery.deliverAtWhen it goes, as deliverAt above
delivery.timeZoneWhere deliverAt is shown, as timeZone above
delivery.deliveredAtexpiresAtvoidedAtvoidReasonvoidNoteStaff's own words; null without orders:amounts
createdAt