Skip to content

Get a List of Customer Cards by Phone Number

Request

Returns a list of customer cards with programs that are active in this location

AttributeTypeDescription
idintLoyalty card ID
balancedecimalLoyalty card balance
paid_amountdecimalAmount "Paid"
sold_amountdecimalAmount "Sold"
visits_countintNumber of visits
numberstringCard number
type_idintLoyalty card type identifier
salon_group_idintID of the chain where the card was created
typeobjectObject that contains the "id" and "title" fields: card type identifier and name
salon_groupobjectObject that contains the "id" and "title" fields: identifier of the chain where the card type was created and the name of this chain
programsarrayArray with information about loyalty programs linked to a loyalty card
rulesarrayArray with information about the rules configured in the action

The programs array consists of objects with the following fields:

AttributeTypeDescription
idintLoyalty Program ID
titlestringAction name
loyalty_type_idintLoyalty program type ID
item_type_idintIs cashback accrued from products
value_unit_idintBonus field — Discount % or Fixed amount
group_idintID of the chain where the action was created
loyalty_typeobjectObject with information about the action

The rules array consists of objects with the following fields:

AttributeTypeDescription
idintRule ID
loyalty_program_idintIdentifier of the loyalty program to which the rule is attached
loyalty_type_idintLoyalty program type ID
valuedecimalValue from which the rule will work
Security
BearerPartnerUser
Path
phonestringrequired

Customer phone number in the format +13155550175

chain_idnumberrequired

Chain ID

location_idnumberrequired

Location ID

Headers
Acceptstringrequired

application/vnd.api.v2+json

Content-Typestringrequired

application/json

Authorizationstringrequired

Bearer partner_token, User user_token

curl -i -X GET \
  'https://developer.alteg.io/_mock/en/b2b-v1/openapi/loyalty/cards/{phone}/{chain_id}/{location_id}' \
  -H 'Accept: string' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: string'

Responses

OK

Bodyapplication/json
idinteger, (int32)

Loyalty card ID

Example:9210520
balancenumber, (float)

Loyalty card balance

Example:100
pointsinteger, (int32)
Example:0
paid_amountnumber, (float)

Amount Paid

Example:1000
sold_amountnumber, (float)

Amount "Sold"

Example:1000
visits_countinteger, (int32)

Number of visits

Example:1
numberstring

Card number

Example:"14507109210520"
type_idinteger, (int32)

Loyalty card type identifier

Example:10992
salon_group_idinteger, (int32)

ID of the chain where the card was created

Example:145071
typeobject

An object that contains the "id" and "title" fields: card type identifier and card type name, respectively

Example:
{ "id": 10992, "title": "5+2", "salon_group_id": 145071 }
salon_groupobject

An object that contains the "id" and "title" fields: the identifier of the chain where the card type was created and the name of this chain

Example:
{ "id": 145071, "title": "Dough chain1." }
programsArray of objects

An array with information about loyalty programs linked to a loyalty card

Example:
[ { "id": 18005, "title": "5+2", "value": 0, "loyalty_type_id": 13, "item_type_id": 3, "value_unit_id": 1, "group_id": 145071, "loyalty_type": { … }, "rules": [ … ] } ]
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": [ { … } ] }