Validate Digital Stamp Cards via API (v1)

The Stamp Validation API checks whether a stamp is in a valid state before adding or removing stamps, or processing reward redemption.

It verifies the stamp IDX, validity period, activation status, and whether the reward has already been redeemed in a single request.

In addition to validation, it returns the current accumulation status and card details, allowing you to build a user-facing stamp view.

This API is available on the Personal plan or higher.

v1 (Legacy) documentation.

For new integrations, we recommend using the latest version, v2.
v1 is intended for maintaining existing integrations and does not receive new features or improvements.

GET

https://vivoldi.com/api/stamp/v1/validate?stampIdx={stampIdx}


GET /api/stamp/v1/validate
     ?stampIdx=274

Request Parameters

stampIdx integer required
Stamp IDX.
{
    "code": 0,
    "message": "",
    "result": {
        "stampIdx": 16,
        "domain": "https://vvd.bz",
        "cardIdx": 1,
        "cardNm": "Accumulate 10 Americanos",
        "cardTtl": "Collect 10 stamps to get one free Americano.",
        "stamps": 10,
        "maxStamps": 12,
        "changedStamps": null,
        "stampUrl": "https://vvd.bz/stamp/274",
        "url": "https://myshopping.com",
        "strtYmd": "2025-01-01",
        "endYmd": "2026-12-31",
        "onsiteYn": "Y",
        "onsitePwd": "123456",
        "memo": null,
        "activeYn": "Y",
        "userId": "NKkDu9X4p4mQ",
        "userNm": null,
        "userPhnno": null,
        "userEml": null,
        "userEtc1": null,
        "userEtc2": null,
        "stampImgUrl": "https://cdn.vivoldi.com/www/image/icon/stamp/icon.stamp.1.webp",
        "regYmdt": "2025-10-30 05:11:35",
        "payloadVersion": "v1"
    }
}

Response Parameters

codeinteger
Response code: 0 = Success, any other value = Error
messagestring
Response message. If the response code is not 0, an error-related message is returned.
resultobject
If the verification succeeds, the response will include the stamp information.
If the verification fails, the response value will be null, and the error message will indicate the cause.
stampIdx integer
Stamp IDX.
domain string
Stamp domain.
cardIdx integer
Card IDX.
cardNm string
Card name.
cardTtl string
Card title.
stamps integer
Number of collected stamps so far.
maxStamps integer
Maximum number of stamps for the card.
stampUrl string
URL of the stamp page.
url string
The URL to which the user is redirected when clicking the button on the stamp page.
strtYmd date
Stamp validity start date.
endYmd date
Stamp expiration date.
onsiteYn string
Enum:
YN
Indicates whether on-site accumulation is enabled. If the value is Y, store staff can add stamps at the location.
onsitePwd string
On-site accumulation password. Required when on-site accumulation (Y) is enabled for using the stamp reward API.
memo string
Internal memo for reference.
activeYn string
Enum:
YN
Indicates whether the stamp is active. If deactivated, customers cannot use the stamp.
userId string
User ID. Used to manage the recipient of the stamp.
Typically, this corresponds to the website member’s login ID.
If not set, the system automatically generates a user ID.
userNm string
User name. For internal management.
userPhnno string
User phone number. For internal management.
userEml string
User email address. For internal management.
userEtc1 string
Additional internal management field.
userEtc2 string
Additional internal management field.
stampImgUrl string
URL of the stamp image.
regYmdt datetime
Stamp creation date. Example: 2025-07-21 11:50:20

Numeric parameter validation

If a numeric value (stampIdx, cardIdx when creating or updating, or stamps in an update) is not a number or is too large, the request is rejected before processing with 400 (usually error code 653; store numbers in v2 return 665). An issuing store value that conflicts with the card policy returns 1221.

stamps in the Add and Remove APIs must be an integer of 1 or more; otherwise the request is rejected with code 400 and HTTP 200.

In every case no stamp data or earning history changes, and no event record or Webhook delivery is produced. A failed response means nothing was saved.

Behaviour change. Previously v1 kept processing the request even when this validation failed. As a result the error could be overwritten by another parameter's message, or part of the stamp data could actually be saved while the response reported an error. It now stops with 400 before processing, the same as the latest version.

What Is the Role of Stamp Validation?

The Stamp Validation API reads the current state of one stamp card. Calling it does not change the stamp.

  • Get the stamp page address to send to the customer (stampUrl) — the issue API response does not include it
  • Check the stamps collected (stamps) and the goal (maxStamps)
  • Get the value needed to redeem the reward on a card with on-site verification — a one-time token (onsiteToken) in v2, the on-site password (onsitePwd) in v1

What You Can Determine from the Validation Result

The server checks the conditions below; if any fails, it returns an error code without result (HTTP 200).

  • The stamp belongs to your organization (otherwise code 400)
  • It is within its validity period (not started 1107, expired 1108)
  • Its reward has not been used and it is active (otherwise code 400)
  • For a stamp limited to a branch, the processing store (processStoreIdx in v2, storeIdx in v1) is in that branch (1215, 1212)

It does not check whether all stamps are collected. If stamps in a successful response is at least maxStamps, the stamp-count condition is met; the Redemption API checks on-site verification and the usable branch again. For example, an on-site card whose password is deactivated validates successfully but gets no token, so redemption is blocked with 1206.

How to Use the Response Data

  • stampUrl — send it to the customer by text, email, or app push.
  • stamps, maxStamps — show progress (for example 7/10) and the stamps left.
  • cardNm, cardTtl, stampImgUrl — draw the card name, description, and stamp image in your app.
  • onsiteToken — send it to the Stamp Redemption API within 180 seconds to redeem the reward on a card with on-site verification. In v1, the on-site password onsitePwd comes here instead.

Difference from Coupon Validation API

Both APIs check the state and return details, but they succeed under different conditions.

  • Coupon Validation succeeds only when the coupon can be used right now and returns the discount type and value. Use it to calculate “how much is the discount now”.
  • Stamp Validation succeeds for any usable stamp, whatever the stamp count, and returns the count, goal, and stamp address. Use it to show “how many collected and how many left”.

Operational Importance

The Add, Remove, and Redemption APIs run the same checks again when processing, so you do not have to call the Validation API before them. You do need it in two cases:

  • To get the stampUrl to send to the customer after issuing
  • In v2, to get the onsiteToken for redeeming the reward on a card with on-site verification (onsiteYn = Y)

In v1, if you already know the on-site password (onsitePwd), you can call the Redemption API directly without validating.

Things to consider

  • Another request can change the state after you validate. The processing APIs check again, so rely on the code in the processing response.
  • In v2, onsiteToken expires after 180 seconds and can be used once. Each validation issues a new token, so validate right before redeeming.
  • For a stamp limited to a branch, calling without a processing store (processStoreIdx in v2, storeIdx in v1) fails with 1215, and no stampUrl is returned.
  • A stamp whose validity period has not started fails with 1107.