ApiDefinitions
List coupons, minters, discovery
One round-trip for the management page — every request costs a signature.
GET
/api/couponsOne round-trip for the management page — every request costs a signature.
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
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/coupons"{ "coupons": [ { "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 } ], "minters": [ { "pubkey": "string", "npub": "string", "label": "string", "createdAt": 0 } ], "discovery": { "id": "string", "pubkey": "string", "created_at": 0, "kind": 0, "tags": [ [ "string" ] ], "content": "string", "sig": "string" }}