GET /giftcard/{Identifier}

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.

Headers

  • Authorisation string Required

    Bearer accessToken

Body

object object

Responses

  • 200

    A Successful response will contain a JSON object with a nested "data" object containing the various values associated with the giftcard.

    Hide response attributes Show response attributes object
    • message string

      Description of request result

    • records_returned integer
    • timestamp integer

      Unix timestamp

    • data array[object]
      Hide data attributes Show data attributes array[object]
      • cardType integer

        1 = Barcode, 2 = QR

      • siteLockedId integer

        If this card is locked to a specific site then the ID of the site is returned. Zero values should be parsed as null

      • currentBalance number
      • currencyCode integer

        ISO Numeric currency code of card. Giftcards will only support transactions in the currency for which they have been created.

      • lastTransaction string | null
      • createdDate string
      • expiryDate string

        Will be returned as "0000-00-00 00:00:00" if card has no expiry date. Otherwise will return in format of YYYY-MM-DD HH:MM:SS

      • active integer

        1 = active (will process transaction requests), 0 = Inactive (will reject transaction requests)

      • sitename string

        Name of the site that this card is locked to, if applicable

  • 400

    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.

    Hide response attributes Show response attributes object
    • message string
    • timestamp integer
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
}