Gift Cards
Add Gift Card
post /sites/{siteid}/giftcardsDelivery Text
Email address when using deliverytype "email"
Mobile in MSISDN format when using deliverytype "sms"
Product reference (usually SKU)
Gift Card PIN
{ "type": "giftcard", "currencycode": "USD", "cardnumber": "95116763063530548720", "transactions": [ { "moneyamount": "500.00", "merchant_reference": "SC101" } ]}
{ "giftcard": { "type": "giftcard", "currencycode": "USD", "cardnumber": "95116763063530548720", "cardnumber_display": "95** **** **** **** 8720", "redeemable": true, "date_expires": 1866322799, "date_created": 1550669776, "moneyamount": "500.00", "requirespin": false, "transactions": [ { "transactionid": "3458", "date": 1550669776, "moneyamount": "500.00", "merchant_reference": "SC101", "staff_reference": null, "transaction_reference": null } ] }, "addedtransactionids": [ "3458", "a8e9cbd970ebfc2c20037b8e41c7e3c0aa522238" ], "receipttext": null, "print_voucher": false, "print_pin": null}
HTTP Status Code Summary | |
---|---|
200 | Returns giftcardresponse |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get Gift Card
get /sites/{siteid}/giftcards/{cardnumber}Validate gift card PIN.
{ "type": "giftcard", "currencycode": "USD", "cardnumber": "95123456789012345678", "cardnumber_display": "95** **** **** **** 5678", "redeemable": true, "date_expires": 1888181999, "date_created": 1569923445, "moneyamount": "371.00", "requirespin": false, "transactions": [ { "transactionid": "3456", "date": 1569923445, "moneyamount": "500.00", "merchant_reference": "SC101", "staff_reference": null, "transaction_reference": null }, { "transactionid": "3457", "date": 1570540431, "moneyamount": "-129.00", "merchant_reference": "SC102", "staff_reference": null, "transaction_reference": null } ]}
HTTP Status Code Summary | |
---|---|
200 | Returns a giftcardresponse. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Add Gift Card Transaction
post /sites/{siteid}/giftcards/{cardnumber}/transactionsGift Card PIN (Required if requirespin is set to true).
{ "moneyamount": "-299.00", "merchant_reference": "SC102"}
{ "giftcard": { "type": "giftcard", "currencycode": "USD", "cardnumber": "95116763063530548720", "cardnumber_display": "95** **** **** **** 8720", "redeemable": true, "date_expires": 1866322799, "date_created": 1550669776, "moneyamount": "201.00", "requirespin": false, "transactions": [ { "transactionid": "3458", "date": 1550669776, "moneyamount": "500.00", "merchant_reference": "SC101", "staff_reference": null, "transaction_reference": null }, { "transactionid": "3459", "date": 1550669776, "moneyamount": "-299.00", "merchant_reference": "SC102", "staff_reference": null, "transaction_reference": null } ] }, "addedtransactionids": [ "3459", "a57a121adda749bd7c8e37d13913724cabe7c56e" ], "receipttext": null, "print_voucher": false, "print_pin": null}
HTTP Status Code Summary | |
---|---|
200 | Returns giftcardresponse |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Delete Gift Card Transactions
delete /sites/{siteid}/giftcards/{cardnumber}/transactionsUsed for rollback of transaction that has been performed.
[ "3459", "a57a121adda749bd7c8e37d13913724cabe7c56e"]
true
HTTP Status Code Summary | |
---|---|
200 | Returns true |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Objects
deliverytypestring
email
Emailpreprinted
PrePrintedprintout
Printoutsms
SMS
giftcardobject
The gift card object.
The type of giftcard.
Currency for the giftcard. (ISO 4217, alpha-3)
The unique id of the gift card (card number).
The masked card number, used for public display.
If true, the gift card is active for redeem with the moneyamount available.
The date for the expiration of the gift card. (If passed, the gift card is invalid)
The date that the gift card was created.
Current monetary value of the gift card.
Indicates if PIN is required when redeeming the gift card.
The transactions for this gift card. An array of giftcardtransaction.
giftcardresponseobject
Response object for gift card operations.
The gift card object. See giftcard.
An array of transactionids added by the request. (Used for rollback)
Optional text printed on the receipt.
If set to true, a gift card voucher should be printed.
Optional PIN printed for the gift card (usually 4-6 digits).
giftcardtransactionobject
Gift card transaction object.
The unique id of this transaction.
The date that this transaction occurred.
Money added or subtracted by this transaction.
Optional merchant/store reference for this transaction. (Sitoo POS will send warehouse external ID in this field)
Optional staff reference for this transaction.
Optional reference for this transaction. (Sitoo POS will send receipt ID in this field)
giftcardtypestring
giftcard
Gift Cardcreditnote
Credit Note
moneystring
timestampinteger
Number of seconds since the Unix Epoch.