Skip to main content
POST
/
v1
/
loyalties
/
{campaignId}
/
members
/
{memberId}
/
transfers
Transfer Loyalty Points
curl --request POST \
  --url https://{cluster}.voucherify.io/v1/loyalties/{campaignId}/members/{memberId}/transfers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>' \
  --data '[
  {
    "code": "0PmQ7JQI",
    "points": 1
  },
  {
    "code": "kCeufB8i",
    "points": 1
  }
]'
{
  "id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF",
  "code": "MmFAzfDe",
  "campaign": "Proportional Earning Rules",
  "campaign_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
  "category": null,
  "category_id": "cat_0b6152ce12414820de",
  "categories": [],
  "type": "LOYALTY_CARD",
  "discount": null,
  "gift": null,
  "loyalty_card": {
    "points": 13441,
    "balance": 13141,
    "next_expiration_date": "2022-11-30",
    "next_expiration_points": 0
  },
  "start_date": null,
  "expiration_date": null,
  "validity_timeframe": null,
  "validity_day_of_week": null,
  "active": true,
  "additional_info": null,
  "metadata": {},
  "assets": {
    "qr": {
      "id": "U2FsdGVkX184kVdWUO/msrLg1G0MRf/Cs6QwSN3f6kyWCOTGdijyq8OfUbUpcGx6fjdeIpTf2UilFGNG8aCWVk/dXm/QEJ/sulXKDlUMWf+MN7TRG5LB+wuzqTy7csDBfRoJn0fURpwU4A6VZZSwBQ==",
      "url": "{{internalVoucherifyURL}}"
    },
    "barcode": {
      "id": "U2FsdGVkX1/RGZN9VwvkdI6B26PPZQZWjh33USr5NPMXbHuJVkxsH6TUyW/cXen1Lc7gaqik09BGiry0R4QIAP52jnxQuABOsW0HdYfglsLPY7IajGX5rJzZKDKuzioq2vRIPyuE6z03frAod7ptvQ==",
      "url": "{{internalVoucherifyURL}}"
    }
  },
  "is_referral_code": false,
  "created_at": "2022-02-18T14:03:59.954Z",
  "updated_at": "2022-11-28T17:58:25.607Z",
  "holder_id": "cust_sehkNIi8Uq2qQuRqSr7xn4Zi",
  "redemption": {
    "quantity": null,
    "redeemed_quantity": 1,
    "redeemed_points": 300,
    "object": "list",
    "url": "/v1/vouchers/MmFAzfDe/redemptions?page=1&limit=10"
  },
  "publish": {
    "object": "list",
    "count": 1,
    "url": "/v1/vouchers/MmFAzfDe/publications?page=1&limit=10"
  },
  "object": "voucher"
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

campaignId
string
required

A unique identifier of the loyalty campaign containing the voucher to which the loyalty points will be sent (destination).

Example:

"camp_rRsfatlwN7unSeUIJDCYedal"

memberId
string
required

A unique code identifying the loyalty card to which the user wants to transfer loyalty points (destination).

Example:

"MmFAzfDe"

Body

application/json · Loyalties Transfer Points · object[]

Provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card.

Response body schema for POST v1/loyalties/{campaignId}/members/{memberId}/transfers.

code
string
required

Unique loyalty card code from which the user wants to transfer loyalty points (source).

points
integer
required

The number of loyalty points that the user wants to transfer to another loyalty card. The number of points cannot be higher than the current balance on the loyalty card (source).

source_id
string
required

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.

reason
string

Reason for the transfer.

Response

200 - application/json

Returns a loyalty card object for the loaded loyalty card, ie. the one that that points were transferred to from the other cards(s).

Response body schema for POST v1/loyalties/{campaignId}/members/{memberId}/transfers.

id
string
required

Assigned by the Voucherify API, identifies the voucher.

code
string
required

A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.

category
string | null
required

Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.

category_id
string | null
required

Unique category ID assigned by Voucherify.

type
enum<string>
required

Defines the type of the voucher.

Available options:
LOYALTY_CARD
loyalty_card
object
required

Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD.

start_date
string<date-time> | null
required

Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is inactive before this date.

expiration_date
string<date-time> | null
required

Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date.

validity_timeframe
object
required

Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.start_date required when including the validity_timeframe.

validity_day_of_week
enum<integer>[]
required

Integer array corresponding to the particular days of the week in which the voucher is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
active
string
required

A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the start_date and expiration_date.

  • true indicates an active voucher
  • false indicates an inactive voucher
additional_info
string | null
required

An optional field to keep any extra textual information about the code such as a code description and details.

metadata
object
required

The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format.

is_referral_code
boolean
required

Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.

created_at
string<date-time>
required
campaign
string

A unique campaign name, identifies the voucher's parent campaign.

campaign_id
string

Assigned by the Voucherify API, identifies the voucher's parent campaign.

categories
Category · object[]
validity_hours
object

Determines the hours of validity, e.g. to create a happy hours scenario.

publish
object

This object stores a summary of publish events: an events counter and an endpoint which can be called to return details of each event. A publication is required for loyalty cards and referral codes. This object gets updated whenever a voucher has been published. Publication means assigning a code to a particular customer. Typically, a publication is made by distributing your codes to your customers, e.g. through Export to MailChimp or publish voucher API method.

redemption
object

Stores a summary of redemptions that have been applied to the voucher.

assets
object

Stores links to images of QR and barcode that correspond to an encrypted voucher code.

holder_id
string

Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.

updated_at
string<date-time>

Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.

I