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

Get rewards

GET
/customers/{id}/rewards

Everything the customer holds now: points, stamp cards, vouchers, stamp vouchers, time-limited offer progress and vouchers, gift card balance. The same object is sent in customer.rewards_updated. Read-only.

Path parameters

  • idintegerRequired

    The customer id.

Responses

Success
  • 200 OKRewards

    The customer's rewards.

    9 fields
    • customer_idinteger
    • currencyCurrency

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

      One of 123

    • pointsoneOf

      null when points are not used.

      2 variants

      Exactly one of:

      RewardPoints

      • balanceinteger

        Points the customer holds, rounded down.

      • targetinteger | null

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

      • rewardstring | null

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

      Option 2

      • stamp_cardsarray of StampCard
        5 fields
        • pos_stamp_rule_idinteger | null

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

        • titlestring | null
        • detailsstring | null
        • stampsinteger

          Stamps collected, rounded down.

        • targetinteger

          Stamps needed for a free item.

      • vouchersarray of RewardVoucher

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

        8 fields
        • idinteger
        • One of "points""gift_card""min_spend"

        • titlestring
        • amountnumber

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

        • min_spendinteger | null

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

        • active_fromstring | null · date-time

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

        • valid_untilstring | null · date-time

          null when it does not expire.

        • created_atstring · date-time
      • stamp_vouchersarray of StampVoucher

        Free items earned on a stamp card.

        7 fields
        • idinteger
        • titlestring
        • pos_stamp_rule_idinteger | null

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

        • is_rule_deletedboolean

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

        • applies_tooneOf

          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 string
          • excluded_skusarray of string
          • included_categoriesarray of string

            Category paths; a category includes its subcategories.

          • excluded_categoriesarray of string

          Option 2

          • expires_atstring | null · date-time

            null when it does not expire.

          • created_atstring · date-time
        • time_limited_offeroneOf

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

          2 variants

          Exactly one of:

          TimeLimitedOfferProgress

          • idinteger
          • titlestring
          • starts_atstring · date-time
          • ends_atstring · date-time
          • pointsinteger

            Offer points collected, rounded down.

          • targetinteger

            Offer points needed for a voucher.

          Option 2

          • time_limited_vouchersarray of TimeLimitedVoucher

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

            9 fields
            • idinteger
            • time_limited_offer_idinteger
            • One of "percent""fixed"

            • discount_valuenumber
            • max_itemsinteger | null

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

            • items_leftinteger | null

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

            • applies_toRuleScope

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

              4 fields
              • included_skusarray of string
              • excluded_skusarray of string
              • included_categoriesarray of string

                Category paths; a category includes its subcategories.

              • excluded_categoriesarray of string
            • valid_untilstring · date-time
            • created_atstring · date-time
          • gift_cardoneOf

            null when the customer has no gift card balance.

            2 variants

            Exactly one of:

            GiftCard

            • balancenumber

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

            Option 2

          Errors
          • 401 UnauthorizedError

            The API key is missing, invalid or revoked.

            3 fields
            • messagestring

              What went wrong. The text may change; use error_code in your code.

            • error_codestring

              Machine-readable code of the problem, for example api_key_invalid; it does not change within v1. Every error has one: internal_server_error on a 500, undefined when the error has no specific code yet. See Errors for the list.

            • error_uidstring

              Identifier of this error in Lynked's logs. Quote it when you contact Lynked support.

          • 403 ForbiddenError

            The Public API is disabled for this business.

            3 fields
            • messagestring

              What went wrong. The text may change; use error_code in your code.

            • error_codestring

              Machine-readable code of the problem, for example api_key_invalid; it does not change within v1. Every error has one: internal_server_error on a 500, undefined when the error has no specific code yet. See Errors for the list.

            • error_uidstring

              Identifier of this error in Lynked's logs. Quote it when you contact Lynked support.

          • 404 Not FoundError

            The resource does not exist or does not belong to this business.

            3 fields
            • messagestring

              What went wrong. The text may change; use error_code in your code.

            • error_codestring

              Machine-readable code of the problem, for example api_key_invalid; it does not change within v1. Every error has one: internal_server_error on a 500, undefined when the error has no specific code yet. See Errors for the list.

            • error_uidstring

              Identifier of this error in Lynked's logs. Quote it when you contact Lynked support.

          • 422 Unprocessable EntityValidationError

            The request is invalid; errors lists the problems per field.

            4 fields
            • messagestring

              All problems in one line.

            • errorsobject

              Request field path → its problems.

            • error_codestring

              undefined for validation errors for now; see Errors for the list of codes.

            • error_uidstring

              Identifier of this error in Lynked's logs. Quote it when you contact Lynked support.

          • 429 Too Many RequestsRateLimitError

            More than 120 requests per minute for this business.

            Headers
            • Retry-Afterinteger

              Seconds to wait before the next request.

            4 fields
            • messagestring

              What went wrong. The text may change; use error_code in your code.

            • error_codestring

              Machine-readable code of the problem, for example api_key_invalid; it does not change within v1. Every error has one: internal_server_error on a 500, undefined when the error has no specific code yet. See Errors for the list.

            • error_uidstring

              Identifier of this error in Lynked's logs. Quote it when you contact Lynked support.

            • retry_afterinteger

              Seconds to wait before the next request; the same value as the Retry-After header.

          • 500 Internal Server ErrorError

            Something failed on Lynked's side. Retry later; if it persists, contact Lynked support with the error_uid.

            3 fields
            • messagestring

              What went wrong. The text may change; use error_code in your code.

            • error_codestring

              Machine-readable code of the problem, for example api_key_invalid; it does not change within v1. Every error has one: internal_server_error on a 500, undefined when the error has no specific code yet. See Errors for the list.

            • error_uidstring

              Identifier of this error in Lynked's logs. Quote it when you contact Lynked support.

          Request
          curl 'https://api.lynked.ie/api/public/v1/customers/{id}/rewards' \
            -H 'Authorization: Bearer lk_live_...'
          
          Response 200 OK
          HTTP/3 200 OK
          Content-Type: application/json
          
          Body
          {
            "customer_id": 1042,
            "currency": 2,
            "points": {
              "balance": 120,
              "target": 200,
              "reward": "€5 off"
            },
            "stamp_cards": [
              {
                "pos_stamp_rule_id": 14,
                "title": "Bagels",
                "details": "Buy 5 bagels",
                "stamps": 2,
                "target": 5
              }
            ],
            "vouchers": [
              {
                "id": 881,
                "kind": "points",
                "title": "€5 off",
                "amount": 5,
                "min_spend": null,
                "active_from": "2026-01-01T12:00:00Z",
                "valid_until": "2026-12-31T23:59:59+00:00",
                "created_at": "2026-01-01T12:00:00Z"
              }
            ],
            "stamp_vouchers": [
              {
                "id": 312,
                "title": "Free bagel",
                "pos_stamp_rule_id": 14,
                "is_rule_deleted": true,
                "applies_to": {
                  "included_skus": [
                    "BAGEL-PLAIN"
                  ],
                  "excluded_skus": [],
                  "included_categories": [
                    "Bakery/Bagels"
                  ],
                  "excluded_categories": []
                },
                "expires_at": "2026-01-01T12:00:00Z",
                "created_at": "2026-01-01T12:00:00Z"
              }
            ],
            "time_limited_offer": {
              "id": 9,
              "title": "Double December",
              "starts_at": "2026-01-01T12:00:00Z",
              "ends_at": "2026-01-01T12:00:00Z",
              "points": 40,
              "target": 100
            },
            "time_limited_vouchers": [
              {
                "id": 51,
                "time_limited_offer_id": 9,
                "discount_type": "percent",
                "discount_value": 20,
                "max_items": 2,
                "items_left": 1,
                "applies_to": {
                  "included_skus": [
                    "BAGEL-PLAIN"
                  ],
                  "excluded_skus": [],
                  "included_categories": [
                    "Bakery/Bagels"
                  ],
                  "excluded_categories": []
                },
                "valid_until": "2026-01-01T12:00:00Z",
                "created_at": "2026-01-01T12:00:00Z"
              }
            ],
            "gift_card": {
              "balance": 12.5
            }
          }