Attributes
| Name | Type | Description |
|---|---|---|
| id | Integer | Automatically set |
| created_at | Datetime | Automatically set |
| updated_at | Datetime | Automatically set |
| code | String | Unique per account. Max 50 characters. Automatically generated if not specified. Format: XXXX-9999-XXXX |
| value | Integer | Required. Current remaining value. Must be greater than 0 and less than or equal to 10000 |
| initial_value | Integer | Original value when created |
| active | Boolean | Default: true |
| valid_until | Date | Expiry date. Gift card is not redeemable after this date |
| person_id | Integer | Owner of the gift card |
| purchased_by_person_id | Integer | Person who purchased the gift card |
| custom_data | Object | Key/value. Stored as strings |
Listing
GET /gift_cards will return all active gift cards.
Response
[
{
"gift_card": {
"id": 1,
"code": "ABCD-2345-EFGH",
"initial_value": 500,
"value": 500,
"valid_until": null,
"active": true,
"person_id": null,
"purchased_by_person_id": 888,
"custom_data": null,
"created_at": "2026-03-26T10:00:00+02:00",
"updated_at": "2026-03-26T10:00:00+02:00"
}
}
]
Query Parameters
| Name | Type | Description |
|---|---|---|
| person_id | Integer | Filter by person |
Get gift card
GET /gift_cards/{gift_card_id} will get a gift card with id {gift_card_id}.
Add new gift card
POST /gift_cards will create a new gift card.
| Name | Type | Description |
|---|---|---|
| code | String | Not required. Auto-generated if not specified |
| value | Integer | Required |
| initial_value | Integer | Not required |
| active | Boolean | Not required |
| valid_until | Date | Not required |
| person_id | Integer | Not required |
| custom_data | Object | Not required |
Update gift card
PUT /gift_cards/{gift_card_id} will update existing gift card with id {gift_card_id}.
Delete gift card
DELETE /gift_cards/{gift_card_id} will delete existing gift card with id {gift_card_id}.