The Lynked Public API is in development. Endpoints will appear here as they go live.

Rewards

object

Every reward a customer holds, as it stands now. The same object is the data of customer.rewards_updated. A part is empty (null or []) when that kind of reward is not used or the customer holds none.

Vouchers carry no codes: the customer redeems them with their Lynked barcode. Expired and used vouchers are not listed, and no event is sent when a voucher expires — use valid_until / expires_at.

Fields

  • customer_idintegerRequired
  • currencyCurrencyRequired

    The business currency. Amounts in Rewards and Orders are in this currency.

    One of 123

  • pointsoneOfRequired

    null when points are not used.

    2 variants

    Exactly one of:

    RewardPoints

    • balanceintegerRequired

      Points the customer holds, rounded down.

    • targetinteger | nullRequired

      Points needed for a voucher; 0 or null means points do not turn into vouchers.

    • rewardstring | nullRequired

      What the customer gets at the target, as set up in the dashboard.

    Option 2

    • stamp_cardsarray of StampCardRequired
      5 fields
      • pos_stamp_rule_idinteger | nullRequired

        The POS stamp rule of this card; null for the main card.

      • titlestring | nullRequired
      • detailsstring | nullRequired
      • stampsintegerRequired

        Stamps collected, rounded down.

      • targetintegerRequired

        Stamps needed for a free item.

    • vouchersarray of RewardVoucherRequired

      Value vouchers the customer can use now or later (pending ones included).

      8 fields
      • idintegerRequired
      • kindVoucherKindRequired

        One of "points""gift_card""min_spend"

      • titlestringRequired
      • amountnumberRequired

        The discount, in the business currency, rounded to cents.

      • min_spendinteger | nullRequired

        The smallest order total the voucher applies to; null when there is none.

      • active_fromstring | null · date-timeRequired

        The voucher can be used from this time; a future time means it is pending.

      • valid_untilstring | null · date-timeRequired

        null when it does not expire.

      • created_atstring · date-timeRequired
    • stamp_vouchersarray of StampVoucherRequired

      Free items earned on a stamp card.

      7 fields
      • idintegerRequired
      • titlestringRequired
      • pos_stamp_rule_idinteger | nullRequired

        The POS stamp rule it was earned under; null for the main card or a deleted rule.

      • is_rule_deletedbooleanRequired

        true when the rule was deleted after the voucher was issued; the voucher stays valid.

      • applies_tooneOfRequired

        The rule's items as they were when the voucher was issued; null for the main card (any item).

        2 variants

        Exactly one of:

        RuleScope

        • included_skusarray of stringRequired
        • excluded_skusarray of stringRequired
        • included_categoriesarray of stringRequired

          Category paths; a category includes its subcategories.

        • excluded_categoriesarray of stringRequired

        Option 2

        • expires_atstring | null · date-timeRequired

          null when it does not expire.

        • created_atstring · date-timeRequired
      • time_limited_offeroneOfRequired

        The customer's progress in the time-limited offer running now; null when none runs.

        2 variants

        Exactly one of:

        TimeLimitedOfferProgress

        • idintegerRequired
        • titlestringRequired
        • starts_atstring · date-timeRequired
        • ends_atstring · date-timeRequired
        • pointsintegerRequired

          Offer points collected, rounded down.

        • targetintegerRequired

          Offer points needed for a voucher.

        Option 2

        • time_limited_vouchersarray of TimeLimitedVoucherRequired

          Vouchers earned in a time-limited offer; listed while valid, also after the offer ended.

          9 fields
          • idintegerRequired
          • time_limited_offer_idintegerRequired
          • discount_typeTimeLimitedDiscountTypeRequired

            One of "percent""fixed"

          • discount_valuenumberRequired
          • max_itemsinteger | nullRequired

            How many items the offer discounts in total; null when there is no limit.

          • items_leftinteger | nullRequired

            Items still discountable, counted over the whole offer; null when there is no limit.

          • applies_toRuleScopeRequired

            The items a voucher applies to. Empty included lists mean any item; excluded lists always win.

            4 fields
            • included_skusarray of stringRequired
            • excluded_skusarray of stringRequired
            • included_categoriesarray of stringRequired

              Category paths; a category includes its subcategories.

            • excluded_categoriesarray of stringRequired
          • valid_untilstring · date-timeRequired
          • created_atstring · date-timeRequired
        • gift_cardoneOfRequired

          null when the customer has no gift card balance.

          2 variants

          Exactly one of:

          GiftCard

          • balancenumberRequired

            Remaining gift card balance, in the business currency, rounded to cents.

          Option 2