Retrieve a gift code
One gift code, with the recipient once it was claimed.
Scope: gift-codes:read.
Authorization
bearerAuth A Platform API token, wyc_live_... or wyc_test_..., created at Settings > API tokens in the dashboard.
In: header
Path Parameters
Id of the gift code.
^gift_[A-Za-z0-9]{24}$Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/gift-codes/string"{ "id": "gift_8bW1vT9yN6pDmQ2xL7rCkZa3", "object": "gift_code", "livemode": true, "code": "WYC-7K3M-PLANT", "claim_url": "https://woodyou.care/gift/example/WYC-7K3M-PLANT", "status": "open", "trees": 1, "project": null, "sent_to": { "name": "John Doe", "email": "john@example.com" }, "external_reference": "XMAS-2026-0042", "recipient": null, "valid_until": "2027-01-31T23:59:59Z", "claimed_at": null, "created_at": "2026-12-01T09:00:00Z", "updated_at": "2026-12-01T09:00:00Z"}Create a gift code POST
Reserves `trees` trees from your unassigned trees behind a code. When a person claims the code at `/gift`, they become a recipient with a personal certificate and the `recipient.claimed` webhook fires. The Platform does not email the code; you hand it out yourself, for example in an order confirmation. Requires an `Idempotency-Key`. Scope: `gift-codes:write`.
Revoke a gift code POST
Makes an open code unusable and returns its trees to your unassigned trees. A claimed code cannot be revoked; delete the recipient instead. Scope: `gift-codes:write`.