Client Personal Cabinet

Get User Loyalty Cards

Changed on

Returns a list of cards of an authorized user with programs, filtering cards by location chain / location

get/user/loyalty_cards/{chain_id}

Request

  • Base URL
    https://api.alteg.io/api/v1
  • URL
    https://api.alteg.io/api/v1/user/loyalty_cards/{chain_id}
  • Auth
    HTTP bearer

Path parameters

chain_idnumber required

Chain ID

Headers

Acceptstring required

application/vnd.api.v2+json

Content-Typestring required

application/json

Authorizationstring required

Bearer partner_token, User user_token. The user_token is the Booking User token returned by /user/auth or /booking/auth.

Response

OK

idinteger

Loyalty card ID

balancenumber float

Loyalty card balance

pointsinteger
paid_amountnumber float

Amount Paid

sold_amountnumber float

Amount "Sold"

visits_countinteger

Number of visits

numberstring

Card number

type_idinteger

Loyalty card type identifier

salon_group_idinteger

ID of the chain where the card was created

Example response

{
  "id": 9210520,
  "balance": 100,
  "points": 0,
  "paid_amount": 1000,
  "sold_amount": 1000,
  "visits_count": 1,
  "number": "14507109210520",
  "type_id": 10992,
  "salon_group_id": 145071,
  "type": {
    "id": 10992,
    "title": "5+2",
    "salon_group_id": 145071
  },
  "salon_group": {
    "id": 145071,
    "title": "Dough chain1."
  },
  "programs": [
    {
      "id": 18005,
      "title": "5+2",
      "value": 0,
      "loyalty_type_id": 13,
      "item_type_id": 3,
      "value_unit_id": 1,
      "group_id": 145071,
      "loyalty_type": {
        "id": 13,
        "title": "Discount for a given number of accumulated services",
        "is_discount": true,
        "is_cashback": false,
        "is_static": false,
        "is_accumulative": false
      },
      "rules": [
        {
          "id": 72803,
          "loyalty_program_id": 18005,
          "loyalty_type_id": 13,
          "value": 20,
          "parameter": 0
        },
        {
          "id": 72804,
          "loyalty_program_id": 18005,
          "loyalty_type_id": 13,
          "value": 10,
          "parameter": 0
        },
        {
          "id": 72805,
          "loyalty_program_id": 18005,
          "loyalty_type_id": 13,
          "value": 100,
          "parameter": 0
        }
      ]
    }
  ]
}

Changes