> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Transfer Loyalty Points

> Transfer points between different loyalty cards which have holders.

Provide the campaign ID and the loyalty card ID you want the points to be transferred to as path parameters. In the request body, provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card.

Transfer works only for loyalty cards that have holders, meaning the cards were published to customers.

The transferred points expire according to the target program expiration rules.



## OpenAPI

````yaml /openapi/loyalties.json post /v1/loyalties/{campaignId}/members/{memberId}/transfers
openapi: 3.0.1
info:
  title: Voucherify API - Loyalties
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /v1/loyalties/{campaignId}/members/{memberId}/transfers:
    parameters:
      - schema:
          $ref: '#/components/schemas/ParameterCampaignId'
        name: campaignId
        in: path
        required: true
        description: >-
          A unique identifier of the loyalty campaign containing the voucher to
          which the loyalty points will be sent (destination).
      - schema:
          $ref: '#/components/schemas/ParameterMemberId'
        name: memberId
        in: path
        required: true
        description: >-
          A unique code identifying the loyalty card to which the user wants to
          transfer loyalty points (destination).
    post:
      tags:
        - Loyalties
      summary: Transfer Loyalty Points
      description: >-
        Transfer points between different loyalty cards which have holders.


        Provide the campaign ID and the loyalty card ID you want the points to
        be transferred to as path parameters. In the request body, provide the
        loyalty cards you want the points to be transferred from and the number
        of points to transfer from each card.


        Transfer works only for loyalty cards that have holders, meaning the
        cards were published to customers.


        The transferred points expire according to the target program expiration
        rules.
      operationId: transfer-points
      parameters: []
      requestBody:
        description: >-
          Provide the loyalty cards you want the points to be transferred from
          and the number of points to transfer from each card.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoyaltiesMembersTransfersCreateRequestBody'
            examples:
              Example:
                value:
                  - code: 0PmQ7JQI
                    points: 1
                  - code: kCeufB8i
                    points: 1
        required: true
      responses:
        '200':
          description: >-
            Returns a loyalty card object for the loaded loyalty card, ie. the
            one that that points were transferred to from the other cards(s).
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoyaltiesMembersTransfersCreateResponseBody
              examples:
                Example:
                  value:
                    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
      security:
        - X-App-Id: []
          X-App-Token: []
        - X-Voucherify-OAuth:
            - api
            - loyalties
components:
  schemas:
    ParameterCampaignId:
      type: string
      example: camp_rRsfatlwN7unSeUIJDCYedal
    ParameterMemberId:
      type: string
      example: MmFAzfDe
    LoyaltiesMembersTransfersCreateRequestBody:
      title: Loyalties Members Transfers Create Request Body
      description: >-
        Response body schema for **POST**
        `v1/loyalties/{campaignId}/members/{memberId}/transfers`.
      type: array
      items:
        $ref: '#/components/schemas/LoyaltiesTransferPoints'
    LoyaltiesMembersTransfersCreateResponseBody:
      title: Loyalties Members Transfers Create Response Body
      description: >-
        Response body schema for **POST**
        `v1/loyalties/{campaignId}/members/{memberId}/transfers`.
      type: object
      properties:
        id:
          type: string
          description: Assigned by the Voucherify API, identifies the voucher.
        code:
          type: string
          description: >-
            A code that identifies a voucher. Pattern can use all letters of the
            English alphabet, Arabic numerals, and special characters.
        campaign:
          type: string
          description: A unique campaign name, identifies the voucher's parent campaign.
        campaign_id:
          type: string
          description: >-
            Assigned by the Voucherify API, identifies the voucher's parent
            campaign.
        category:
          type: string
          nullable: true
          description: >-
            Tag defining the category that this voucher belongs to. Useful when
            listing vouchers using the List Vouchers endpoint.
        category_id:
          type: string
          nullable: true
          description: Unique category ID assigned by Voucherify.
        categories:
          type: array
          items:
            $ref: '#/components/schemas/Category'
        type:
          type: string
          enum:
            - LOYALTY_CARD
          description: Defines the type of the voucher.
        loyalty_card:
          type: object
          description: >-
            Object representing loyalty card parameters. Child attributes are
            present only if type is LOYALTY_CARD.
          required:
            - points
            - balance
          properties:
            points:
              type: integer
              description: >-
                Total number of points added to the loyalty card over its
                lifespan.
            balance:
              type: integer
              description: >-
                Points available for reward redemption. This is calculated as
                follows: `balance` = `points` - `expired_points` -
                `subtracted_points` - `redemption.redeemed_points`.
            next_expiration_date:
              type: string
              description: >-
                The next closest date when the next set of points are due to
                expire.
            next_expiration_points:
              type: integer
              description: The amount of points that are set to expire next.
            pending_points:
              type: integer
              description: >-
                Shows the number of pending points that will be added to the
                loyalty card when they are activated automatically or manually.
            expired_points:
              type: integer
              description: >-
                Shows the total number of expired points over the lifetime of
                the loyalty card.
            subtracted_points:
              type: integer
              description: >-
                Shows the total number of subtracted points over the lifetime of
                the loyalty card.
        start_date:
          type: string
          nullable: true
          description: >-
            Activation timestamp defines when the code starts to be active in
            ISO 8601 format. Voucher is inactive before this date.
          format: date-time
        expiration_date:
          type: string
          nullable: true
          description: >-
            Expiration timestamp defines when the code expires in ISO 8601
            format. Voucher is inactive after this date.
          format: date-time
        validity_timeframe:
          $ref: '#/components/schemas/ValidityTimeframe'
        validity_day_of_week:
          $ref: '#/components/schemas/ValidityDayOfWeek'
        validity_hours:
          $ref: '#/components/schemas/ValidityHours'
        publish:
          type: object
          description: >-
            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.
          properties:
            object:
              type: string
              default: list
              enum:
                - list
              description: >-
                The type of the object represented is by default list. To get
                this list, you need to make a call to the endpoint returned in
                the url attribute.
            count:
              type: integer
              description: Publication events counter.
            entries:
              type: array
              items:
                type: string
            url:
              type: string
              description: >-
                The endpoint where this list of publications can be accessed
                using a **GET** method. /v1/vouchers/{voucher_code}/publications
          required:
            - object
        redemption:
          type: object
          description: >-
            Stores a summary of redemptions that have been applied to the
            voucher.
          properties:
            quantity:
              type: integer
              nullable: true
              description: >-
                How many times a voucher can be redeemed. A null value means
                unlimited.
            redeemed_points:
              type: integer
              description: Total loyalty points redeemed.
            redeemed_quantity:
              type: integer
              description: How many times a voucher has already been redeemed.
            object:
              type: string
              default: list
              enum:
                - list
              description: >-
                The type of the object represented is by default list. To get
                this list, you need to make a call to the endpoint returned in
                the url attribute.
            url:
              type: string
              description: >-
                The endpoint where this list of redemptions can be accessed
                using a **GET** method. /v1/vouchers/{voucher_code}/redemptions
          required:
            - quantity
        active:
          type: string
          description: >-
            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:
          type: string
          nullable: true
          description: >-
            An optional field to keep any extra textual information about the
            code such as a code description and details.
        metadata:
          type: object
          description: >-
            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.
        assets:
          type: object
          description: >-
            Stores links to images of QR and barcode that correspond to an
            encrypted voucher code.
          properties:
            qr:
              type: object
              description: Stores Quick Response (QR) representation of encrypted code.
              properties:
                id:
                  type: string
                  example: >-
                    U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==
                  description: Encrypted voucher code ID.
                url:
                  type: string
                  example: >-
                    https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D
                  description: >-
                    URL to QR code  


                    *Optional:* Attach query parameters to base URL to customize
                    the image of the encrypted voucher code.  


                    - `size`: integer value from `1` to `100`  

                    - `format`: string, either `png` (default) or `svg`
            barcode:
              type: object
              description: Stores barcode representation of encrypted code.
              properties:
                id:
                  type: string
                  example: >-
                    U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==
                  description: Encrypted voucher code ID.
                url:
                  type: string
                  example: >-
                    https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D
                  description: >-
                    URL to barcode  


                    *Optional:* Attach query parameters to base URL to customize
                    the image of the encrypted voucher code.  


                    - `size`: integer value from `1` to `100`  

                    - `format`: string, either `png` (default) or `svg`
        is_referral_code:
          type: boolean
          description: >-
            Flag indicating whether this voucher is a referral code; `true` for
            campaign type `REFERRAL_PROGRAM`.
        holder_id:
          type: string
          description: >-
            Unique customer identifier of the redeemable holder. It equals to
            the customer ID assigned by Voucherify.
        updated_at:
          type: string
          description: >-
            Timestamp representing the date and time when the voucher was last
            updated in ISO 8601 format.
          format: date-time
        created_at:
          type: string
          format: date-time
      required:
        - id
        - code
        - category
        - category_id
        - type
        - loyalty_card
        - start_date
        - expiration_date
        - validity_timeframe
        - validity_day_of_week
        - active
        - additional_info
        - metadata
        - is_referral_code
        - created_at
    LoyaltiesTransferPoints:
      title: Loyalties Transfer Points
      type: object
      properties:
        code:
          type: string
          description: >-
            Unique loyalty card code from which the user wants to transfer
            loyalty points (source).
        points:
          type: integer
          description: >-
            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).
        reason:
          type: string
          description: Reason for the transfer.
        source_id:
          type: string
          description: >-
            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.
      required:
        - code
        - points
        - source_id
    Category:
      title: Category
      description: This is an object representing a category.
      type: object
      properties:
        id:
          type: string
          description: Unique category ID assigned by Voucherify.
        name:
          type: string
          description: Category name.
        hierarchy:
          type: integer
          description: >-
            Category hierarchy. Categories with lower hierarchy are processed
            before categories with higher hierarchy value.
          minimum: 0
        object:
          type: string
          default: category
          enum:
            - category
          description: >-
            The type of the object represented by the JSON. This object stores
            information about the category.
        created_at:
          type: string
          description: >-
            Timestamp representing the date and time when the category was
            created. The value is shown in the ISO 8601 format.
          example: '2022-07-14T10:45:13.156Z'
          format: date-time
        updated_at:
          type: string
          example: '2022-08-16T10:52:08.094Z'
          description: >-
            Timestamp representing the date and time when the category was
            updated. The value is shown in the ISO 8601 format.
          format: date-time
      required:
        - id
        - name
        - hierarchy
        - created_at
        - object
    ValidityTimeframe:
      title: Validity Timeframe
      type: object
      description: >-
        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`.
      properties:
        duration:
          type: string
          description: >-
            Defines the amount of time an earning rule will be active in ISO
            8601 format. For example, an earning rule with a `duration` of
            `PT1H` will be valid for a duration of one hour.
          example: PT1H
        interval:
          type: string
          description: >-
            Defines the intervening time between two time points in ISO 8601
            format, expressed as a duration. For example, an earning rule with
            an `interval` of `P2D` will be valid every other day.
          example: P2D
    ValidityDayOfWeek:
      title: Validity Day Of Week
      type: array
      description: >-
        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
      items:
        type: integer
        enum:
          - 0
          - 1
          - 2
          - 3
          - 4
          - 5
          - 6
    ValidityHours:
      title: Validity Hours
      type: object
      description: Determines the hours of validity, e.g. to create a happy hours scenario.
      properties:
        daily:
          type: array
          description: >-
            Defines the recurring period(s) when the resource is active. The
            periods should not overlap.
          items:
            type: object
            description: Defines the recurring period(s) when the resource will be active.
            properties:
              start_time:
                type: string
                format: time
                description: >-
                  Defines the starting hour of validity in the HH:mm format. The
                  resource is *inactive before* this time.
                example: '12:00'
              days_of_week:
                type: array
                description: >-
                  Integer array corresponding to the particular days of the week
                  in which the resource is valid.


                  - `0` Sunday

                  - `1` Monday

                  - `2` Tuesday

                  - `3`  Wednesday

                  - `4` Thursday

                  - `5` Friday

                  - `6` Saturday
                items:
                  type: integer
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
              expiration_time:
                type: string
                format: time
                description: >-
                  Defines the ending hour of validity in the HH:mm format. The
                  resource is *inactive after* this time.
                example: '14:00'
  securitySchemes:
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header
    X-Voucherify-OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://api.voucherify.io/v1/oauth/token
          scopes:
            api: Gives access to whole server-side API.
            vouchers: >-
              Gives access to all endpoints and methods starting with
              `v1/vouchers`.
            client_api: Gives access to whole client-side API.
            client_vouchers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/vouchers`.
            promotions: >-
              Gives access to all endpoints and methods starting with
              `/v1/promotions`.
            client_promotions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/promotions`
            campaigns: >-
              Gives access to all endpoints and methods starting with
              `v1/campaigns`.
            client_publish: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/publish`.
            exports: >-
              Gives access to all endpoints and methods starting with
              `/v1/exports`.
            publications: >-
              Gives access to all endpoints and methods starting with
              `/v1/publications`.
            client_validate: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validate`.
            validations: >-
              Gives access to all endpoints and methods starting with
              `/v1/validations`.
            client_validations: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validations`.
            qualifications: >-
              Gives access to all endpoints and methods starting with
              `/v1/qualifications`.
            client_qualifications: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/qualifications`.
            client_redeem: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redeem
            redemptions: >-
              Gives access to all endpoints and methods starting with
              `/v1/redemptions`.
            client_redemptions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redemptions`
            customers: >-
              Gives access to all endpoints and methods starting with
              `/v1/customers`.
            client_customers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/customers`.
            orders: >-
              Gives access to all endpoints and methods starting with
              `/v1/orders`.
            products: >-
              Gives access to all endpoints and methods starting with
              `/v1/products`.
            skus: >-
              Gives access to all endpoints and methods starting with
              `/v1/SKUs`.
            validation-rules: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules`.
            validation-rules-assignments: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules-assignments
            segments: >-
              Gives access to all endpoints and methods starting with
              `/v1/segments`.
            events: >-
              Gives access to all endpoints and methods starting with
              `/v1/events`.
            client_events: >-
              Gives access to all endpoints and methods starting with
              `client/v1/events`.
            rewards: >-
              Gives access to all endpoints and methods starting with
              `/v1/rewards`.
            assets: >-
              Gives access to all endpoints and methods starting with
              `/v1/assets`.
            task-results: >-
              Gives access to all endpoints and methods starting with
              `/v1/task-results`.
            loyalties: >-
              Gives access to all endpoints and methods starting with
              `/v1/loyalties`.
            client_consents: >-
              Gives access to all endpoints and methods starting with
              `client/v1/consents`.
            consents: >-
              Gives access to all endpoints and methods starting with
              `/v1/consents`.
            async-actions: >-
              Gives access to all endpoints and methods starting with
              `/v1/async-actions`.
            product-collections: >-
              Gives access to all endpoints and methods starting with
              `/v1/product-collections`.
            categories: >-
              Gives access to all endpoints and methods starting with
              `/v1/categories`.
            metadata-schemas: >-
              Gives access to all endpoints and methods starting with
              `/v1/metadata-schemas`.
            locations: >-
              Gives access to all endpoints and methods starting with
              `/v1/locations`.
            referrals: >-
              Gives access to all endpoints and methods starting with
              `/v1/referrals`.
            trash-bin: >-
              Gives access to all endpoints and methods starting with
              `/v1/trash-bin`.
            templates: >-
              Gives access to all endpoints and methods starting with
              `/v1/templates`.

````