Programs

Adjust card points

Changed on

Manually adjusts the points balance of the member's card.

A positive points value creates an ADMIN_CREDIT card transaction. The expiration date comes from the member tier when that tier defines its own points expiration. Otherwise the date comes from the card definition. expiration_date is null when points don't expire.

A negative points value creates an ADMIN_DEBIT card transaction.

When points is 0, no transaction is created and status is NO_CHANGE.

The transaction is created with status PENDING and processed asynchronously. The program and the member must be ACTIVE. The program must also be inside its validity window. Otherwise the response is 423. The response is 404 when the program or the member doesn't exist, or when the card isn't assigned to that member.

post/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/points

Request

  • Base URL
    https://api.voucherify.io
  • URL
    https://api.voucherify.io/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/points
  • Auth
    • API key in header X-App-Id and API key in header X-App-Token
    • or HTTP bearer

Request body

pointsinteger required

Number of points to adjust. Positive values add points (ADMIN_CREDIT transaction), negative values subtract points (ADMIN_DEBIT transaction), zero results in no transaction (NO_CHANGE).

reasonstring

Optional reason for the adjustment, stored in the transaction details.

Response

Result of the points adjustment.

status'TRANSACTION_CREATED' | 'NO_CHANGE' required

TRANSACTION_CREATED when a transaction was created, NO_CHANGE when the requested points amount was zero.

message'Points addition transaction created' | 'Points subtraction transaction created' | 'Provided amount is zero, transaction was not created' required

Human-readable result message:

  • "Points addition transaction created",
  • "Points subtraction transaction created",
  • "Provided amount is zero, transaction was not created".

Changes

    • breaking

      added to the request body allOf list

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      added to the response body allOf list for the response status

    • breaking

      added the new required request property

    • warning

      removed from the request body allOf list

    • info

      added the new optional request property

    • info

      removed from the response body allOf list for the response status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status