# Get a List of Customer Cards by Phone Number

Returns a list of customer cards with programs that are active in this location
| Attribute | Type | Description |
|  --- | --- | --- |
| id | int | Loyalty card ID |
| balance | decimal | Loyalty card balance |
| paid_amount | decimal | Amount "Paid" |
| sold_amount | decimal | Amount "Sold" |
| visits_count | int | Number of visits |
| number | string | Card number |
| type_id | int | Loyalty card type identifier |
| salon_group_id | int | ID of the chain where the card was created |
| type | object | Object that contains the "id" and "title" fields: card type identifier and name |
| salon_group | object | Object that contains the "id" and "title" fields: identifier of the chain where the card type was created and the name of this chain |
| programs | array | Array with information about promotions linked to a loyalty card |
| rules | array | Array with information about the rules configured in the action |

The programs array consists of objects with the following fields:
| Attribute | Type | Description |
|  --- | --- | --- |
| id | int | Promotion ID |
| title | string | Action name |
| loyalty_type_id | int | Promotion type ID |
| item_type_id | int | Is cashback accrued from products |
| value_unit_id | int | Bonus field — Discount % or Fixed amount |
| group_id | int | ID of the chain where the action was created |
| loyalty_type | object | Object with information about the action |

The rules array consists of objects with the following fields:
| Attribute | Type | Description |
|  --- | --- | --- |
| id | int | Rule ID |
| loyalty_program_id | int | Identifier of the promotion to which the rule is attached |
| loyalty_type_id | int | Promotion type ID |
| value | decimal | Value from which the rule will work |

Endpoint: GET /loyalty/cards/{phone}/{chain_id}/{location_id}
Version: 1.0.0
Security: BearerPartnerUser

## Path parameters:

  - `phone` (string, required)
    Customer phone number in the format +13155550175

  - `chain_id` (number, required)
    Chain ID

  - `location_id` (number, required)
    Location ID

## Header parameters:

  - `Accept` (string, required)
    application/vnd.api.v2+json

  - `Content-Type` (string, required)
    application/json

  - `Authorization` (string, required)
    Bearer partner_token, User user_token

## Response 200 fields (application/json):

  - `id` (integer)
    Loyalty card ID

  - `balance` (number)
    Loyalty card balance

  - `points` (integer)

  - `paid_amount` (number)
    Amount Paid

  - `sold_amount` (number)
    Amount "Sold"

  - `visits_count` (integer)
    Number of visits

  - `number` (string)
    Card number

  - `type_id` (integer)
    Loyalty card type identifier

  - `salon_group_id` (integer)
    ID of the chain where the card was created

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

  - `type.id` (integer)

  - `type.title` (string)

  - `type.salon_group_id` (integer)

  - `salon_group` (object)
    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

  - `salon_group.id` (integer)

  - `salon_group.title` (string)

  - `programs` (array)
    An array with information about promotions linked to a loyalty card

  - `programs.id` (integer)
    Promotion ID

  - `programs.title` (string)
    Share name

  - `programs.value` (integer)
    The value from which the rule will work

  - `programs.loyalty_type_id` (integer)
    Promotion type ID

  - `programs.item_type_id` (integer)
    Is cashback earned on products?

  - `programs.value_unit_id` (integer)
    Bonus field. Discount % or Fixed. sum

  - `programs.group_id` (integer)
    ID of the chain where the promotion was created

  - `programs.loyalty_type` (object)
    Object with information about the promotion

  - `programs.loyalty_type.id` (integer)
    Promotion type ID

  - `programs.loyalty_type.title` (string)
    Share type name

  - `programs.loyalty_type.is_discount` (boolean)
    Discount

  - `programs.loyalty_type.is_cashback` (boolean)
    Cashback

  - `programs.loyalty_type.is_static` (boolean)
    Fixed discount

  - `programs.loyalty_type.is_accumulative` (boolean)
    Accumulative discount

  - `programs.rules` (array)
    An array with information about the rules configured in the promotion

  - `programs.rules.id` (integer)
    Rule ID

  - `programs.rules.loyalty_program_id` (integer)
    Identifier of the stock to which the rule is attached

  - `programs.rules.loyalty_type_id` (integer)
    Promotion type ID

  - `programs.rules.value` (integer)
    The value from which the rule will work

  - `programs.rules.parameter` (integer)

## Response 401 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object)
    Additional response data.

  - `meta.message` (string)
    Error message.
    Example: Authentication needed.

## Response 403 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object)
    Additional response data.

  - `meta.message` (string)
    Error message.
    Example: Access denied.

## Response 404 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object | array)
    Additional response data (empty object or empty array)
    Example: {}

