Push an active gift card's expiry date further out.
The new expiry must be later than the gift card's current expiry — this action only extends validity, it never shortens it. Only gift cards with status ACTIVE can be extended; a gift card that has already expired, been fully spent, or been voided is final.
Re-sending the gift card's current expiry date has no effect and returns the gift card unchanged, so a retried request is safe.
The change is recorded on the gift card's history and is visible to the company in Understory.
Security
OAuth2(Required scopes: gift-card.write)
- https://api.understory.iohttps://api.understory.io/v1/gift-cards/{giftCardId}/extend-expiry
curl -i -X POST \
'https://api.understory.io/v1/gift-cards/{giftCardId}/extend-expiry' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"expires_at": "2019-08-24T14:15:22Z",
"reason": "string"
}'OK
The current status of the gift card.
Enum:"ACTIVE""SPENT""EXPIRED""VOIDED""UNKNOWN"
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" } }