younifyd
Menu

Update Loyalty Card Balance 1

Adjust Loyalty Card Balance with campaign ID

POST/v1/loyalties/{campaignId}/members/{memberId}/balance

Use it in a workflow

  1. Add a step and choose the Voucherify connector.
  2. Pick the Update Loyalty Card Balance 1 action (under Loyalties).
  3. Fill in the fields below, then reference the result from later steps as {{updateLoyaltyCardBalance1.response.data}}.

Request

Path parameters

campaignIdstringrequired

Unique campaign ID.

memberIdstringrequired

A code that identifies the loyalty card.

Request body

Enter the body as JSON in the step's Body field.

pointsinteger

Incremental balance to be added to/subtracted from the loyalty card. - To add points: 100 - To subtract points, add a minus: -100

expiration_typeany

Set the type of expiration for added points. `PROGRAM_RULES`: Inherit rules from campaign. `NON_EXPIRING`: Points never expire. `CUSTOM_DATE`: Points expire on a particular date. Requires expiration_date parameter.

expiration_datestring (date-time)

Set expiration date for added points, i.e. `YYYY-MM-DD`. This parameter is required only when expiration_type is set to `CUSTOM_DATE`.

reasonstring

Reason for the transfer.

source_idstring

The merchant's transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service.

json
{
  "points": 0,
  "expiration_type": null,
  "expiration_date": "2025-01-01T00:00:00Z",
  "reason": "string",
  "source_id": "string"
}

Response

Returns 200 with an object. Read it in later steps with {{updateLoyaltyCardBalance1.response.data.<field>}}.

pointsinteger

The incremental points removed or added to the current balance on the loyalty card.

totalinteger

The total of points accrued over the lifetime of the loyalty card.

balanceinteger

The balance after adding/removing points.

typestring

The type of voucher being modified.

One ofloyalty_cardgift_voucher

objectstring

The type of the object represented by JSON. Default is balance.

One ofbalanceDefault "balance"

related_objectobject

Defines the object that is being modified with the values that are returned in the balance object.

typestring

The object being modified.

One ofvoucherDefault "voucher"

idstring

Identifies the loyalty card that is being modified, this is the ID that was assigned by the Voucherify API.

operation_typestring

The type of operation being performed.

One ofMANUALAUTOMATIC

json
{
  "points": 0,
  "total": 0,
  "balance": 0,
  "type": "loyalty_card",
  "object": "balance",
  "related_object": {
    "type": "voucher",
    "id": "string"
  },
  "operation_type": "MANUAL"
}

Need more? See the Voucherify guide for connection setup and behaviour shared by every action.