Create an invoice for the sale of a gift card

This API helps you to create an invoice for the sale of a gift card without having to first create or select a gift card template.

If you have your own Webstore, e-commerce store, or Consumer Mobile App (CMA), this API helps you to record the sale of a physical or online gift card (with a custom gift code or gift card number) in your Zenoti application.

gift_cards Object

NameTypeDescription
typeenumMandatory
Indicates the type of the gift card: 0 - CustomAmount, 1 - Service, and 2 - PreDefined. If you do not provide any value for this parameter, the API takes the default value of 0.
codestringMandatory
Unique code of the gift card.
custom_amountobjectMandatory
Object that contains the custom price and amount details of the gift card: price (purchase price of the gift card) and value (value of the gift card).
notesstringOptional
Any helpful notes related to the gift card sale invoice.
is_onetime_usebooleanOptional Indicates whether the gift card can be used or redeemed only once. If you do not provide any value for this parameter, the API takes the default value of false.
expiryobjectMandatory
Object that contains the gift card's expiry-related details: days (number of days from the purchase date after which the gift card will expire) and date (date on which the gift card will expire).

Response Details

NameTypeDescription
invoice_idguidUnique 32-character identifier of the generated gift card sale invoice.
errorobjectObject that contains error code and error message details. For more information, refer to the error Object table.

error Object

codemessage
448GiftCard with same Number already sold.
503Invalid input.
502center_id was not passed.
502guest_id was not passed.
502center_id is not valid.
502giftcard code was not passed.
502gift cards value is required.
1201employee is Compulsory, as saleBy is enforced for gift cards.
1202non expiry gift card is not allowed.
1200gift cards with different price and value not allowed.
438User is Not Authorized for gift card sale with difference in price and value.
1207Only one of gift card validity days or expiry date is allowed.
Language
Authorization
Header
Click Try It! to start a request and see the response here!