ApiDefinitions
Edit coupon definition
Editing does not change already-minted vouchers — benefit is frozen at mint.
PATCH
/api/coupons/{id}Editing does not change already-minted vouchers — benefit is frozen at mint.
Authorization<token>
Nostr <base64 of kind 27235 event>. Tags: u, method, optional
payload (sha256 hex of body), and a random nonce to avoid replay.
In: header
Path Parameters
id*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/coupons/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{ "coupon": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "description": "string", "image": "string", "benefit": { "type": "percent", "percent": 0, "productDs": [ "string" ], "cap": { "amount": 1, "currency": "ARS" } }, "maxUses": 0, "minted": 0, "claimed": 0, "expiresAt": 0, "archivedAt": 0, "createdAt": 0, "updatedAt": 0 }}