---
title: "Adjust Loyalty Card Balance with campaign ID"
method: POST
path: "/v1/loyalties/{campaignId}/members/{memberId}/balance"
tags: ["Loyalties"]
---

# Adjust Loyalty Card Balance with campaign ID

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

## Request

- Base URL: `https://api.voucherify.io`
- URL: `https://api.voucherify.io/v1/loyalties/{campaignId}/members/{memberId}/balance`
- Auth: one of:
  - API key in header `X-App-Id` and API key in header `X-App-Token`
  - OAuth 2
    - Implicit: `https://api.voucherify.io/v1/oauth/token`
    - Scopes: `api`, `loyalties`

This method adds or removes balance to an existing loyalty card that is assigned to a holder. The removal of points will consume the points that expire the soonest. 

 >🚧 Async Action
> 
> This is an async action. If you want to perform several add or remove loyalty card balance actions in a short time and their order matters, set up sufficient time-out between the calls.

## Request body

- LoyaltiesMembersBalanceUpdateRequestBody: Request Body schema for **POST** `v1/loyalties/members/{memberId}/balance` and **POST** `v1/loyalties/{campaignId}/members/{memberId}/balance`.
  - `points` integer, required: Incremental balance to be added to/subtracted from the loyalty card. - To add points: 100 - To subtract points, add a minus: -100
  - `expiration_type` 'PROGRAM_RULES' | 'CUSTOM_DATE' | 'NON_EXPIRING'
  - `expiration_date` string, 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`.
  - `reason` string: Reason for the transfer.
  - `source_id` string: 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.

## Response `200`

Returns a balance object.

- LoyaltiesMembersBalanceUpdateResponseBody: Response schema for **POST** `v1/loyalties/members/{memberId}/balance` and for **POST** `v1/loyalties/{campaignId}/members/{memberId}/balance`.
  - `points` integer, required: The incremental points removed or added to the current balance on the loyalty card.
  - `total` integer, required: The total of points accrued over the lifetime of the loyalty card.
  - `balance` integer, required: The balance after adding/removing points.
  - `type` 'loyalty_card' | 'gift_voucher', required: The type of voucher being modified.
  - `object` 'balance', required: The type of the object represented by JSON. Default is balance.
  - `related_object` object, required: Defines the object that is being modified with the values that are returned in the balance object.
    - `type` 'voucher', required: The object being modified.
    - `id` string, required: Identifies the loyalty card that is being modified, this is the ID that was assigned by the Voucherify API.
  - `operation_type` 'MANUAL' | 'AUTOMATIC': The type of operation being performed.

## Other responses

- `400`: Returns an error if the expiration date was defined incorrectly in the request payload.

---

[API](https://skmtc.dev/voucherifyio/apis/voucherify-api-async-actions.md) - [All operations](https://skmtc.dev/voucherifyio/apis/voucherify-api-async-actions/llms.txt) - [OpenAPI document](https://skmtc.dev/voucherifyio/apis/voucherify-api-async-actions/revisions/4982266e0494?raw)
