Skip to main content
POST
Subir de programa con la tarjeta de sellos completa
Turns a full stamps card into a membership in another program. A stamps program can name the program it upgrades to in rules.stamps.upgrades_to_program_id. For example, a Club card with six visits can be exchanged for the VIP card. When the card is complete, this call deletes it, including its movements, and gives the customer the target membership. The customer’s wallet card follows automatically. If the target membership had no pass yet, the same card in Apple Wallet or Google Wallet turns into the target program’s card, with its design and data. If the customer already had a pass for the target program, the old card is voided, because Apple and Google do not let a server remove a pass from a phone.

Endpoint

Required scope

loyalty:write

Headers

Path parameters

The request has no body.

Example request

Response

201 Created

Membership objects are abbreviated here. They have the same shape as GET /v1/loyalty/memberships/.

400 Bad Request

The program is not a stamps program, or it has no upgrades_to_program_id.

401 Unauthorized

The token is missing, invalid, revoked, or expired.

403 Forbidden

The token does not have the loyalty:write scope.

404 Not Found

There is no membership with that id in your company, or the target program no longer exists.

409 Conflict

The card is not full yet, the card is not active (for example, it was already handed in), or the target program is not active. Nothing changes.

Operational notes

  • The upgrade happens only once. Claiming the full card is a single conditional update. If two calls race, one succeeds and the other gets 409.
  • The old card is gone. It is deleted the same way as DELETE /v1/loyalty/memberships/.
  • Partial redemptions use the ledger. To pay out what a card has accumulated without upgrading, record kind: "redeem" with POST …/ledger. With reset_on_redeem, the card goes back to 0.
  • The cash value of a stamp is rules.stamps.value_per_stamp. The wallet binding {{stampsValue}} shows the stamp count multiplied by that value, for example the cashback accumulated so far.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Path Parameters

id
string
required

Response

201 - application/json
upgraded_card
object
required

La tarjeta entregada: sellos en 0 y estado consumed

membership
object
required

La membresía del programa destino (nueva o la que ya tenía)

entry
object
required