Get a gift card

GET/api/v1/gift-cards/{id}
Scope: gift_cards:read

One gift card by id. The redeemable code is included only when you ask for it with "?include=code" — otherwise the field is absent. Treat the code as a payment instrument: request it only when you are about to hand it to the recipient. Requires the "gift_cards:read" scope.

Path parameters#

FieldTypeDescription
idrequired
string

Awrora id (UUID) for the gift card.

Query parameters#

FieldTypeDescription
include
string

Comma-separated extra fields to include. The only value is "code", which adds the redeemable code to the response. Omit it unless you actually need the code — it is a payment instrument.

Example request#

bash

curl -X GET "https://your-site.awrora.app/api/v1/gift-cards/id_8f2k3n" \
  -H "Authorization: Bearer $AWRORA_API_KEY"

Responses#

  • 200The gift card. Carries "code" only when "?include=code" was sent.
  • 401Missing, invalid, revoked or expired API key — codes "api_key_missing", "api_key_invalid", "api_key_revoked", "api_key_expired".
  • 403The API app is off, the plan does not include the API, or the key lacks the required scope — codes "app_not_enabled", "plan_upgrade_required", "insufficient_scope" (the last carries "required_scope").
  • 404No such resource. The same response is returned for a resource that belongs to another organization — code "not_found".
  • 422The request was understood but cannot be fulfilled as asked — codes "validation_failed" or "idempotency_key_reused" (the same Idempotency-Key was already used with a different body).
  • 429Rate limit exceeded — code "rate_limited". See the x-ratelimit-* headers.
  • 500Something went wrong on our side — code "internal_error".

Response 200

FieldTypeDescription
idrequired
string

Awrora id (UUID) for the gift card.

code_last4required
string | null

Last four characters of the code, for matching against a receipt without revealing it.

statusrequired
string

active = usable; expired = out of validity or fully spent; inactive = deactivated by the merchant.

"active""expired""inactive"
initial_amountrequired
object | null

Face value when the card was issued.

balancerequired
object | null

Remaining balance right now.

currencyrequired
string

ISO 4217 currency code for both amounts.

expires_atrequired
string | null

ISO 8601 timestamp with offset, or null when the card never expires.

purchaserrequired
object

Who bought the card.

recipientrequired
object

Who the card was bought for.

created_atrequired
string

ISO 8601 timestamp with offset.

code
string | null

The redeemable code. Only present when ?include=code was sent to GET /v1/gift-cards/{id}; absent otherwise. Never in the list and never in events — those carry code_last4. Treat it as a payment instrument.

200 response

{
  "id": "res_8f2k3n",
  "code_last4": "string",
  "status": "active",
  "initial_amount": {
    "amount_minor": -9007199254740991,
    "currency": "SEK"
  },
  "balance": {
    "amount_minor": -9007199254740991,
    "currency": "SEK"
  },
  "currency": "SEK",
  "expires_at": "string",
  "purchaser": {
    "name": "string",
    "email": "anna@example.com"
  },
  "recipient": {
    "name": "string",
    "email": "anna@example.com"
  },
  "created_at": "string",
  "code": "string"
}