Added
Added: expires_at field in Reward schema
4 days ago by Tremendous Dev
We've added a new expires_at attribute to the reward schema. This field returns the datetime when a reward expires, allowing you to display expiration dates to recipients.
The field is returned as an ISO 8601 timestamp (e.g., "2025-03-15T23:59:59Z") and will be null for rewards that don't expire.
Example response:
{
"id": "ABCD1234",
"order_id": "WXYZ5678",
"created_at": "2025-01-15T10:30:00Z",
"expires_at": "2025-07-15T09:59:59Z",
"value": {
"denomination": 50.0,
"currency_code": "USD"
},
...
}This field is now included in responses from:
- GET /rewards
- GET /rewards/[id]
- POST /orders (in the rewards array)
- GET /orders/[id] (in the rewards array)