Skip to content

Get Gift Card
Alpha

Request

Get a gift card by its ID.

Security
OAuth2(Required scopes: gift-card.read)
Path
giftCardIdstringrequired

The unique identifier of the gift card.

curl -i -X GET \
  'https://api.understory.io/v1/gift-cards/{giftCardId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idstringrequired

The unique identifier of the gift card.

statusstring(GiftCardStatus)required

The current status of the gift card.

Enum:"ACTIVE""SPENT""EXPIRED""VOIDED""UNKNOWN"
currencystringrequired

The ISO 4217 currency code.

Example:"EUR"
initial_valueobject(Amount)required

The original value of the gift card.

balanceobject(Amount)required

The remaining balance of the gift card.

expires_atstring, (date-time)required

Timestamp of when the gift card expires.

created_atstring, (date-time)required

Timestamp of when the gift card was created.

updated_atstring, (date-time)required

Timestamp of the most recent change to this gift card.

order_idstring

ID of the purchase order that created this gift card.

sourcestring

Origin system (e.g. understory, truestory, fun-tours.com).

customerobject(PrivateCustomer)

The buyer/recipient associated with the gift card.

metadataobject(Metadata)

Key-value metadata.

Example:
{ "key1": "value1", "key2": "value2" }
Response
{ "id": "string", "status": "ACTIVE", "order_id": "string", "currency": "EUR", "initial_value": { "currency": "EUR", "value": 2500, "exponent": 2 }, "balance": { "currency": "EUR", "value": 2500, "exponent": 2 }, "expires_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "source": "string", "customer": { "customer_type": "PRIVATE", "full_name": "string", "email": "user@example.com", "phone": "string", "address": { … } }, "metadata": { "key1": "value1", "key2": "value2" } }