Skip to content

GetAccount

/api/v1.0/LoyaltyVault/Account/{accountNumber}

The ‘GET’ account call retrieves the customer's loyalty information such as the loyalty programs the customer opted in for, the point balance and vouchers (active and inactive) per loyalty program as well as vouchers (active and inactive) issued ‘on demand’ in Treazure for a customer.

Parameters

For the account API call, the following additional parameter is added.

  • IncludeInactiveVouchers If this option is set to ‘True’ then the query will return inactive vouchers otherwise it will be omitted (false).

alt text

Response

{
  "loyaltyPrograms": [
    {
      "balance": 0,
      "loyaltyPointDefinitionId": "string",
      "vouchersSeparateSavingsAndRegular": true,
      "vouchersShowOnSale": true,
      "loyaltyProgramDescription": "string",
      "vouchers": [
        {
          "voucherSerial": "string",
          "voucherId": "string",
          "title": "string",
          "multilingualTitle": [
            {
              "description": "string",
              "isoLanguageCode": "string",
              "isDefault": true
            }
          ],
          "description": "string",
          "multilingualDescription": [
            {
              "description": "string",
              "isoLanguageCode": "string",
              "isDefault": true
            }
          ],
          "expiresAt": "2024-12-11T15:31:07.770Z",
          "unlimitedUse": true,
          "confirmationNeeded": true,
          "createdAt": "2024-12-11T15:31:07.770Z",
          "status": "Created",
          "links": [
            {
              "hRef": "string",
              "hRefInfo": {
                "controller": "string",
                "action": "string",
                "values": "string"
              },
              "rel": "string",
              "description": "string",
              "authHRef": "string",
              "authComplete": true,
              "required": true
            }
          ],
          "points": 0
        }
      ],
      "inactiveVouchers": [],
      "purchaseOptions": [
        {
          "voucherId": "string",
          "price": 0,
          "title": "string",
          "multilingualTitle": [
            {
              "description": "string",
              "isoLanguageCode": "string",
              "isDefault": true
            }
          ],
          "description": "string",
          "multilingualDescription": [
            {
              "description": "string",
              "isoLanguageCode": "string",
              "isDefault": true
            }
          ],
          "usable": true,
          "expiresAt": "2024-12-11T15:31:07.770Z",
          "validFrom": "2024-12-11T15:31:07.770Z",
          "unlimitedUse": true,
          "confirmationNeeded": true,
          "links": [
            {
              "hRef": "string",
              "hRefInfo": {
                "controller": "string",
                "action": "string",
                "values": "string"
              },
              "rel": "string",
              "description": "string",
              "authHRef": "string",
              "authComplete": true,
              "required": true
            }
          ]
        }
      ],
      "issueImmediateThreshold": 0,
      "negativePointsAllowed": true,
      "expiresAt": "2024-12-11T15:31:07.770Z"
    }
  ],
  "vouchers": [
    {
      "voucherSerial": "string",
      "voucherId": "string",
      "title": "string",
      "multilingualTitle": [
        {
          "description": "string",
          "isoLanguageCode": "string",
          "isDefault": true
        }
      ],
      "description": "string",
      "multilingualDescription": [
        {
          "description": "string",
          "isoLanguageCode": "string",
          "isDefault": true
        }
      ],
      "expiresAt": "2024-12-11T15:31:07.770Z",
      "unlimitedUse": true,
      "confirmationNeeded": true,
      "createdAt": "2024-12-11T15:31:07.770Z",
      "status": "Created",
      "links": [
        {
          "hRef": "string",
          "hRefInfo": {
            "controller": "string",
            "action": "string",
            "values": "string"
          },
          "rel": "string",
          "description": "string",
          "authHRef": "string",
          "authComplete": true,
          "required": true
        }
      ],
      "points": 0
    }
  ],
  "inactiveVouchers": []
}

The following information is returned in the response. (See scenario 1 for screen examples relating to the API result details).

  • Balance Customer point balance for the specific loyalty program.
  • LoyaltyPointDefinitionId The Loyalty program ID (as created in rCos).
  • VouchersSeparateSavingsandRegular If this option is true the ‘loyalty vouchers’ (vouchers earned /purchased) and ‘personalised promotions’ (promotions triggered by a voucher attribute linked to the customer card, for example, a birthday voucher attribute) must be ‘split’. (See screen example further on).

  • VouchersShowOnSale If the option is true, the vouchers are listed after the customer card is added to the basket and if the option is false then only the number of points and loyalty vouchers will be displayed below the customer card, i.e., the voucher list is not displayed.

  • LoyaltyProgramDecription The Loyalty program description (as created in rCos).
  • Vouchers A list of vouchers with an ‘active’ status, i.e., the customer can redeem the voucher.

    • VoucherSerial The unique voucher serial number issued by Treazure for the voucher.
    • VoucherId - The voucher ID, description and title are created in the ‘Voucher attribute screen’ screen in rCos.
    • Description (Multilingual)
    • Title (Multilingual)
    • ExpiresAt The date when the voucher expires. The voucher expiry period is defined in the ‘Loyalty program maintenance’ screen.

    • UnlimitedUse If ‘Unlimited Use’ is true, it allows the same voucher to trigger multiple promotions independent of the layer the promotions are linked to.

    • ConfirmationNeeded Confirmation needed indicates if the customer has a choice to activate and deactivate the voucher in the basket. These options are set up in the ‘Voucher attribute screen’ in rCos and are described further on in the document in more detail.
    • CreatedAt The date the voucher was created.
    • Status The voucher status (Created, Active).
    • points The number of points that were redeemed to obtain this voucher
  • InactiveVouchers A list of vouchers with a status of ‘redeemed’ or ‘expired’. The same fields for inactive vouchers are returned as described above for ‘active’ vouchers.

  • PurchaseOptions The list of vouchers that the customer can purchase with their loyalty points.

    • VoucherId • The voucher ID, description and title are created in the ‘Voucher attribute screen’ screen in rCos. The title and description fields are multi-language (contain a description and an isoLanguage code).
    • Description (Multilingual)
    • Title (Multilingual)
    • Price The number of points required to purchase the voucher.
    • Usable A purchase voucher is considered ‘usable’ when you can immediately use it for a discount after purchase. For instance, when a voucher is only valid after x days it cannot be used instantaneously.
    • Expires at The voucher expiry period is defined in the ‘Loyalty program maintenance’ screen.
    • Valid from The date the voucher is valid to use.
    • Unlimited Use If ‘Unlimited Use’ is true, it allows the same voucher to trigger multiple promotions independent of the layer the promotions are linked to.
    • Confirmation Needed Confirmation needed indicates if the customer has a choice to activate and deactivate the voucher in the basket. These options are set up in the ‘Voucher attribute screen’ and described further on in more detail.
  • IssueImmediateThreshold If a loyalty program is configured to ‘Automatically issue vouchers @ threshold’, this field indicates the point threshold (e.g., 100 points) that will trigger Treazure to issue a voucher for the customer.

  • NegativePointsAllowed If this field is true, then the customer loyalty points can go into negative when a linked refund is done. For example, if the customer's point balance is 10 and a linked refund is done where the customer originally received 20 points, the customer's balance will be -10 after the linked refund.
  • ExpiresAt If the loyalty program is configured to expire the total balance (i.e., not expiring per date earned), this is the date when the full balance of the loyalty program expires.
  • Vouchers These are active vouchers not linked to a loyalty program, i.e., issued by Treazure directly to the customer.

    • VoucherSerial The unique voucher serial number issued by Treazure
    • VoucherId The voucher ID, description and title are created in the ‘Voucher attribute screen’ screen in rCos. The title and description fields are multi-language (contain a description and an isoLanguage code).
    • Description (Multilingual)
    • Title (Multilingual)
    • Expires at The voucher expiry period is defined in the ‘Loyalty program’ screen.

    • Unlimited Use If ‘Unlimited Use’ is true, it allows the same voucher to trigger multiple promotions independent of the layer the promotions are linked to.

    • Confirmation Needed Confirmation needed indicates if the customer has a choice to activate and deactivate the voucher in the basket. These options are set up in the ‘Voucher attribute screen’ and described further on in more detail.
    • Created At The date the voucher was created.
    • Status The voucher status (Created, Active)
  • InactiveVouchers These are inactive vouchers not linked to a loyalty program, i.e., vouchers that were issued by Treazure directly to the customer that has already been ‘Redeemed’ or ‘Expired’. The same fields for inactive vouchers are returned as described above for vouchers.