Weblutions Documentation
Weblutions Main Site Contact Us Our Discord
FaxStore IconFaxStore

Gift cards API

By Emily Drayven 2 mins 7

The Gift Card API for FaxStore manages the creation, retrieval, and deletion of gift cards. It enables seamless handling of digital gift card balances and redemptions.

To add a gift card to an account. Refer to the Accounts API.

Table of Contents


Get All Gift cards

GET/api/giftcards
Returns an array of all gift cards that are in the store with a balance.
Authorization
NameTypeRequiredDescription
authorizationStringrequired
Responses
200OKjson
View response body
[
  {
    "id": 4,
    "giftId": "cmaAv3yFf2iYiGqeWoWo6x9MPO66LlXPbGCZB4ratmHrB",
    "cost": "10.00",
    "userId": "1679886138722",
    "username": "User One",
    "remainingAmount": "0.01"
  },
  {
    "id": 6,
    "giftId": "QCcvDZzjRcCycKyVw293eMWO1H-1vP7aMaY8mNJeRYFzO",
    "cost": "99.99",
    "userId": "1679886138745",
    "username": "User Two",
    "remainingAmount": "1966.01"
  },
  {
    "id": 7,
    "giftId": "mquTuameT-_jqUGpjQrXpys9AwGAvhWxK-u8RlvchZBxz",
    "cost": "10.00",
    "userId": "1679886138974",
    "username": "User Three",
    "remainingAmount": "10.00"
  }
]
404Not Foundplaintext
View response body
Gift cards table not found.

Get Single Gift card

GET/api/giftcards/:id
Returns a single gift card with the provided ID.
Authorization
NameTypeRequiredDescription
authorizationStringrequired
Path parameters
NameTypeRequiredDescription
idStringrequired
Responses
200OKjson
View response body
{
    "id": 4,
    "giftId": "cmaAv3yFf2iYiGqeWoWo6x9MPO66LlXPbGCZB4ratmHrB",
    "cost": "10.00",
    "userId": "1679886138722",
    "username": "User One",
    "remainingAmount": "0.01"
}
404Not Foundplaintext
View response body
Gift cards table not found.

Delete Gift card

DELETE/api/giftcards/:id
Delete an assigned gift card from the attached customer and from the store entirely
Authorization
NameTypeRequiredDescription
authorizationStringrequired
Path parameters
NameTypeRequiredDescription
idStringrequired
Responses
201OKplaintext
View response body
(no content)
404Not Foundplaintext
View response body
Gift card ID not found.

Document History

Loading version history...