---
updatedAt: 2025-09-23T13:36:00.000Z
agentTools:
  siteIndex: https://developer.eagleeye.com/llms.txt
  projectIndex: https://developer.eagleeye.com/eagleeye-developer/llms.txt
---

# Campaign Create Recipe - Stamp Card

# 📌 Purpose

The stamp card campaign enables coupons to be issued as rewards based on a sequential progression model. The program can operate in two formats:

* Non-rotating: The stamp card completes after a single cycle.
* Rotating: The stamp card repeats across multiple cycles, which can be either limited to a set number of rotations or unlimited. Upon completion of the final stamp in a cycle, the card automatically restarts from the beginning.

To earn rewards, customers must qualify on each visit. A unique coupon can be issued at every stamp milestone or a stamp can be tracked without the issuance of a coupon. This recipe shows how to create a campaign that tracks 10 stamps before providing a coupon for a free coffee.

For more campaign options, refer to the <a href="https://developer.eagleeye.com/reference/getcampaigns-1" target="_blank">Campaigns Create API reference</a> and <a href="https://developer.eagleeye.com/docs/campaign-best-practices" target="_blank">Campaign Best Practices</a>.

# 🖼 Recipe Overview

This recipe will show you the steps to create a campaign that rewards the customer with a coupon for a free coffee after completing 10 transactions purchasing a qualifying product. The campaign will have the following setup:

* Product qualification: identified by UPC codes
* Reward: a coupon account after 10 transactions
* Redeemable at one banner and all stores within it
* Stamp Card rotates unlimited times

# 📋 Prerequisites

* Access to the Eagle Eye API platform
* Your company unit’s clientId and secret
* Active 3-level unit hierarchy (Company > Banner > Store)
* unitId and incomingIdentifier for all redemption partners (banners)
* Start and end dates for the campaign period
* Product UPCs associated to the banner unit
* Discount Products campaign offering a free product as the reward. See <a href="<https://developer.eagleeye.com/docs/campaign-create-recipe-discount-products>" target="_blank">this recipe</a> for more information on how to setup.

# 📤 Outputs

After completing this recipe, capture the following output:

| Output Name | Purpose                                                           |
| :---------- | :---------------------------------------------------------------- |
| campaignId  | Used to create accounts with wallets or retrieve campaign details |

# 📒 Steps

## Step 1: Define Your Campaign Setup

This step defines which products qualify for the offer, where it's valid, how many stamps are in a single rotation, and the campaign timeline.

* 1.1 Campaign Name: Select a name for the campaign in the details container e.g. *Free Coffee after 10 Visits*
* 1.2 Campaign timing: Define the startDate and endDate
* 1.3 Redemption Period: In rules.start and rules.expiry, set the coupon expiry dates expiry the same date as teh campaign end date
* 1.4 Redemption Locations: In partners.redemption, add the unitId for any banners where the coupon can be redeemed
* 1.5 Select the appropriate type and offerType for Stamp Card with a product qualification (additional types can be found <a href="https://developer.eagleeye.com/docs/campaigns-create-via-api" target="_blank">on the Campaign Create Via API page</a>:
  * type: CAMPAIGN\_STAMP\_CARD
  * offerType: STAMP\_CARD
* 1.6 Product Qualification:
  * Include eligible UPC(s) under included.items
  * Define minimumProductSpend (e.g. 200 for £2.00)
  * Set minimumUnits to 1
* 1.7 Use the banners incomingIdentifier as the key for offer.qualification.locations
* 1.8 Product Reward:
  * Set the reward.stampcard object to 10 to signify the first 9 stamps will offer no reward
    * In this "10" array, add the campaignId for the free coffee campaign

***

## Step 2: Call POST /campaigns

```json REQUEST
{
    "type": "CAMPAIGN_STAMP_CARD",
    "status": "ACTIVE",
    "class": "STAMP_CARD",
    "details": {
        "name": "Get a free coffee after 10 purchases",
        "alternativeName": "",
        "description": "",
        "alternativeDescription": "",
        "printerMessage": null,
        "screenMessage": null,
        "tags": [],
        "startDate": "2025-08-22T00:00:00+00:00",
        "endDate": "2026-12-31T23:59:00+00:00",
        "mode": "TARGETED"
    },
    "settings": {
        "tokenProvider": "EES",
        "tokenFormat": "000000001",
        "walletEnabled": true,
        "issuanceMethod": null,
        "accountClientType": "OFFER",
        "defaultAccountClientState": "LOADED"
    },
    "partners": {
        "creation": [],
        "redemption": [
            {
                "partner": "220673",
                "redemptionLimit": null
            }
        ]
    },
    "rules": {
        "creation": {
            "campaignLimit": null,
            "consumerLimit": null,
            "consumerLimitActive": null,
            "windows": {
                "active": false
            }
        },
        "verification": {
            "lock": false,
            "lockOnVerify": true
        },
        "redemption": {
            "campaignLimit": null,
            "couponLimit": 1,
            "windows": {
                "active": false
            },
            "dates": {
                "exclusion": {
                    "active": false
                }
            }
        },
        "refund": {
            "refundable": true,
            "unredeemable": false
        },
        "expiry": {
            "type": "CAMPAIGN_END",
            "valueType": null,
            "value": null,
            "date": null
        },
        "start": {
            "type": "IMMEDIATELY",
            "valueType": null,
            "value": null,
            "date": null
        }
    },
    "windows": {
        "creation": [],
        "redemption": []
    },
    "dates": {
        "redemption": {
            "redemption": [],
            "exclusion": []
        }
    },
    "offer": {
        "offerType": "STAMP_CARD",
        "qualification": {
            "locations": {
                "banner1": {
                    "included": {
                        "locationIdentifiers": null,
                        "locationTags": null
                    },
                    "excluded": {
                        "locationIdentifiers": null,
                        "locationTags": null
                    }
                }
            },
            "product": {
                "banner1": {
                    "logicalOperator": "OR",
                    "collections": [
                        {
                            "products": {
                                "allRequired": false,
                                "included": {
                                    "items": [
                                        "245876"
                                    ],
                                    "skus": null
                                },
                                "excluded": null
                            },
                            "minimumProductSpend": 200,
                            "minimumUnits": 1
                        }
                    ]
                }
            },
            "basket": null,
            "globalProductRestrictions": {
                "enabled": true
            }
        },
        "reward": {
            "basket": null,
            "product": null,
            "stampCard": {
                "10": [
                    {
                        "resourceId": "101490145",
                        "resourceType": "CAMPAIGN"
                    }
                ]
            }
        },
        "stampCard": {
            "configuration": {
                "rotations": {
                    "active": true,
                    "value": 0
                },
                "steps": 10
            }
        }
    },
    "version": 2
}
```
```json RESPONSE
{
    "id": "101490154",
    "type": "CAMPAIGN_STAMP_CARD",
    "status": "ACTIVE",
    "class": "STAMP_CARD",
    "details": {
        "name": "Get a free coffee after 10 purchases",
        "alternativeName": "",
        "description": "",
        "alternativeDescription": "",
        "printerMessage": null,
        "screenMessage": null,
        "tags": [],
        "startDate": "2025-08-22T00:00:00+00:00",
        "endDate": "2026-12-31T23:59:00+00:00",
        "mode": "TARGETED"
    },
    "settings": {
        "tokenProvider": "EES",
        "tokenFormat": "000000001",
        "walletEnabled": true,
        "issuanceMethod": null,
        "accountClientType": "OFFER",
        "defaultAccountClientState": "LOADED"
    },
    "partners": {
        "creation": [],
        "redemption": [
            {
                "partner": "220673",
                "redemptionLimit": null
            }
        ]
    },
    "rules": {
        "creation": {
            "campaignLimit": null,
            "consumerLimit": null,
            "consumerLimitActive": null,
            "windows": {
                "active": false
            }
        },
        "adjudication": {
            "excludedProducts": null
        },
        "verification": {
            "lock": false,
            "lockOnVerify": true
        },
        "redemption": {
            "maxRedemptionsPerPeriod": null,
            "campaignLimit": null,
            "couponLimit": 1,
            "allowOverride": null,
            "allowAccountOverride": null,
            "maximumAccountUsage": null,
            "maximumDiscountableRelatedContents": null,
            "maximumAccountsPerTransaction": null,
            "windows": {
                "active": false
            },
            "dates": {
                "exclusion": {
                    "active": false
                }
            },
            "timeBetweenRedemptions": null,
            "timeBetweenStamps": null,
            "allowMultipleRedeem": null,
            "isHiddenFromRelatedWallets": false,
            "redeemableOutsideOwningWalletWithIdentity": false,
            "redeemableOutsideOwningWalletWithoutIdentity": false
        },
        "refund": {
            "refundable": true,
            "unredeemable": false
        },
        "locations": null,
        "expiry": {
            "type": "CAMPAIGN_END",
            "valueType": null,
            "value": null,
            "date": null
        },
        "start": {
            "type": "IMMEDIATELY",
            "valueType": null,
            "value": null,
            "date": null
        },
        "graceAmount": null,
        "useLocalTime": null,
        "maxCreditsPerPeriod": null
    },
    "windows": {
        "creation": [],
        "redemption": []
    },
    "dates": {
        "redemption": {
            "redemption": [],
            "exclusion": []
        }
    },
    "relationships": null,
    "reference": "101490154",
    "offer": {
        "offerType": "STAMP_CARD",
        "qualification": {
            "locations": {
                "banner1": {
                    "included": {
                        "locationIdentifiers": null,
                        "locationTags": null
                    },
                    "excluded": {
                        "locationIdentifiers": null,
                        "locationTags": null
                    }
                }
            },
            "product": {
                "banner1": {
                    "logicalOperator": "OR",
                    "collections": [
                        {
                            "products": {
                                "allRequired": false,
                                "included": {
                                    "items": [
                                        "245876"
                                    ],
                                    "skus": null
                                },
                                "excluded": null
                            },
                            "minimumProductSpend": 200,
                            "minimumUnits": 1
                        }
                    ]
                }
            },
            "basket": null,
            "globalProductRestrictions": {
                "enabled": true
            },
            "tenders": null,
            "identityTypes": null
        },
        "reward": {
            "basket": null,
            "product": null,
            "stampCard": {
                "10": [
                    {
                        "resourceId": "101490145",
                        "resourceType": "CAMPAIGN"
                    }
                ]
            }
        },
        "stampCard": {
            "configuration": {
                "rotations": {
                    "active": true,
                    "value": 0
                },
                "steps": 10
            }
        },
        "promoId": null
    },
    "version": 2,
    "dateCreated": "2025-08-22T14:33:41+00:00",
    "lastUpdated": "2025-08-22T14:33:41+00:00"
}
```

# ✅ Business Readiness Checklist

Use these steps to validate the setup of your scheme:

* [ ] Retrieve the campaign via <a href="https://developer.eagleeye.com/reference/getcampaign-1" target="_blank">GET /campaigns/campaignId</a> to validate setup
* [ ] Start and end dates are set as expected
* [ ] Coupon expiry is set to campaign expiry
* [ ] Spend qualification logic is correct (product spend)
* [ ] Redemption banners are correctly listed by unitId and incomingIdentifier
* [ ] Reward setup reflects 10 stamps
* [ ] Create a <a href="https://developer.eagleeye.com/reference/createwalletcampaignaccount" target="_blank">coupon account</a> to test and validate the coupon can be issued
  * [ ] Complete 10 transactions to verify the free coffee coupon is added to the wallet and the stamp card remains active

# 🔧 Troubleshooting Tips

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Issue
      </th>

      <th>
        Possible Cause & Resolution
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        400 Bad Request
      </td>

      <td>
        Check all required fields, including description and alternativeDescription. These can be null but must be present.
      </td>
    </tr>

    <tr>
      <td>
        Invalid redemption partner
      </td>

      <td>
        Confirm each unitId is correct and belongs to a valid redemption partner under your company’s clientId. Use <a href="https://developer.eagleeye.com/reference/getunits" target="_blank">GET /units/unitId</a> to verify.
      </td>
    </tr>
  </tbody>
</Table>