Gift Cards

The Gift Cards API is used to access, create, and modify the gift card objects on your business' account. The Gift Cards API is connected to the Invoice Item and Clients APIs, as gift cards appear on invoices are are connected to clients.

On this page





Gift Cards API Endpoints

These are the endpoints that are available under the /giftcards path, which lists all the different gift cards made available on your business' account.

EndpointDescription
GET /giftcards/client/{clientId}Returns all gift card objects that have been added to the specified client's account.
POST /giftcards

Creates new gift card object or updates an existing gift card object.

Request body/payload: Must pass a gift card object in request body/payload. 

For these calls, you need to pass a gift card object with all required fields and any fields you want to set or update filled in the body of the payload. We have an example of a gift card object in the responses section below and have indicated the required fields in the object values table at the bottom of this page.

DELETE /giftcards/{giftcardUUId}Removes a gift card object from view by setting its active property to false.




Gift Cards API Parameters

There are no parameters included with giftcards calls.




Gift Cards API Request Body/Payloads

The objects below represent the minimum viable objects to pass that are needed to create or update a giftcards object. Check whether or not a property can be written to by looking at the Object Values table below to see if the property is writable.

POST /giftcards
{
    "active": true,
    "amount": "25",
    "balanceAmount": "25",
    "businessId": 43111,
    "clientId": 5146945,
    "purchaseDate": 1681963200000,
    "status": "Active"
}




Gift Cards API Responses

GET /giftcards/client/{clientId}
[{
    "active": true,
    "amount": 50,
    "balanceAmount": 40,
    "businessId": 43111,
    "clientId": 5147394,
    "createdDate": 1536852216871,
    "createdUser": "JoeSchmo",
    "expireDate": null,
    "giftCardUUId": "rSnVGKkHSGCYfalfOuae1g",
    "modifiedDate": 1538151178027,
    "modifiedUser": "JoeSchmo",
    "purchaseDate": 1536811200000,
    "status": "Active"
}]
POST /giftcards
{
    "active": true,
    "amount": 100,
    "balanceAmount": 100,
    "businessId": 43111,
    "clientId": 5143212,
    "createdDate": 1538492022951,
    "createdUser": "JoeSchmo",
    "expireDate": null,
    "giftCardUUId": "NIPXS_uhQr-4CApE6C0qWw",
    "modifiedDate": 1538492022951,
    "modifiedUser": "JoeSchmo",
    "purchaseDate": 1538452800000,
    "status": "Active"
}




Gift Cards Object Values

Property NameTypeRequiredDescription
activebooleanYesIndicates whether or not specified gift card should return on GET calls. 
amountintegerYesDisplays as the total monetary amount of specified gift card.
balanceAmountintegerYesDisplays as the current monetary amount of specified gift card. 
businessIdintegerYesProvides unique numeric ID for the business to which specified gift card belongs.
clientIdintegerYesProvides unique numeric ID for the client connected to specified gift card.
createdDateinteger
Displays as date specified gift card was created in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
createdUserstring
Displays as username of the user who created specified gift card.
expireDateinteger
Displays as a string in YYYY-MM-DD format. Not currently in use, but can be set as date specified coupon expires.
giftCardUUIdstring
Provides unique alphanumeric ID for specified gift card.
modifiedDateinteger
Displays as date specified gift card was last modified in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
modifiedUserstring
Displays as username of the user who last modified specified gift card.
purchaseDateintegerYesDisplays as date specified gift card was purchased in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. 
statusstringYesDisplays the status of specified gift card. Has acceptable values "Active", "Deleted", "Expired".