Loyalty stamps

POST /loyalty-stamps

Award stamps on a card type that earns them from your own code, which is what a custom earning type means. The stamps behave exactly like order-driven ones: stampsEarned rules fire, and the card completes and carries overflow the same way. Sending the same idempotencyKey twice returns the same card without stamping it again. Triggers the stampCard.updated webhook, plus stampCard.completed if the award fills the card.

Requires the loyalty:write permission.

Body Parameters

dataobjectrequired

The stamps to award.

Request
curl \
  -X POST \
  "https://api.cascade.dev/loyalty-stamps" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "data": {
    "stampCardTypeId": "550e8400-e29b-41d4-a716-446655440000",
    "customerEmail": "[email protected]",
    "count": 0,
    "idempotencyKey": "string",
    "createCustomer": true
  }
}'
Response
{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "stampCardTypeId": "550e8400-e29b-41d4-a716-446655440000",
    "loyaltyMembershipId": "550e8400-e29b-41d4-a716-446655440000",
    "stampCount": 0,
    "completedAt": "2025-01-15T09:30:00Z",
    "createdAt": "2025-01-15T09:30:00Z",
    "updatedAt": "2025-01-15T09:30:00Z"
  },
  "awarded": true,
  "loyaltyMembershipId": "550e8400-e29b-41d4-a716-446655440000",
  "completedStampCardIds": ["550e8400-e29b-41d4-a716-446655440000"]
}