Redeem a License Key
License keys can be marked as redeemed/used via this endpoint.
Endpoint
POST /licensekeys/redeem
Required parameters
license_key
- The license key supplied by your buyer that you want to redeem
Example request
curl -X POST https://api.zylvie.com/licensekeys/redeem \
-h "Authorization: Bearer e97f0aafe4884bc380c81fdb2347dc55" \
-d "license_key=8ab6e448-825d-4f03-8e94-2e0ece7c855b" \
Example response
A successful redemption of a non-redeemed license key returns a response like this:
{
"key": "8ab6e448-825d-4f03-8e94-2e0ece7c855b",
"created": 1690952000, //UTC timestamp
"redeemed": true,
"redeemed_at": 1790952000, //UTC timestamp
"refunded": false,
"refunded_at": null, //UTC timestamp or null
}
If the license key was already redeemed, you'll receive a response like this:
{
"error": "Already redeemed",
"redeemed_at": 1790952000, //UTC timestamp
}