The Giftcard GET request can be used to retrieve data on a specific giftcard. This is achieved by including a Path parameter with the unique giftcard identifier.
Please ensure requests are sent only to this https endpoint. Any non secure requests will be rejected.
This API call is also used to retrieve the current balance of the card.
Responses
-
A Successful response will contain a JSON object with a nested "data" object containing the various values associated with the giftcard.
-
A Bad request could be returned for a variety of reasons e.g. not including the path paremeter with the giftcard identifier.
The body of the response will be a json object containing a message which can be used to help identify what caused the 400 response.
GET
/giftcard/{Identifier}
curl \
-X GET https://api.gift-stream.com/giftcard/{Identifier} \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorisation: string"
Request example
# Headers
Authorisation: string
# Payload
{}
Request examples
# Headers
Authorisation: string
# Payload
{}
Response examples (200)
{
"message": "OK",
"records_returned": 1,
"timestamp": 1671030405,
"data": [
{
"cardType": 2,
"siteLockedId": 6,
"currentBalance": 20,
"currencyCode": 826,
"lastTransaction": null,
"createdDate": "2022-11-12 17:09:29",
"expiryDate": "0000-00-00 00:00:00",
"active": 1,
"sitename": "111dfasd"
}
]
}
Response examples (200)
{
"message": "string",
"records_returned": 42,
"timestamp": 42,
"data": [
{
"cardType": 42,
"siteLockedId": 42,
"currentBalance": 42.0,
"currencyCode": 42,
"lastTransaction": "string",
"createdDate": "string",
"expiryDate": "string",
"active": 42,
"sitename": "string"
}
]
}
Response examples (400)
{
"message": "Missing Card Id",
"timestamp": 1671031614
}
Response examples (400)
{
"message": "string",
"timestamp": 42
}