# Get client loyalty summary

Returns everything the client can pay with or earn from at the Location in one call:
gift cards, Memberships, loyalty cards and referral program settings. Gift cards and
Memberships are matched by the client's phone number among those valid at this Location.

Use the status filters to get, for example, only active Memberships before booking.
The Business User needs the permission to manage the Location and access to loyalty
(or to client loyalty data).

Endpoint: GET /locations/{location_id}/client/{client_id}/loyalty
Version: 1.0.0
Security: BearerPartnerUser

## Security:

  - `BearerPartnerUser` (unknown)
    http bearer Bearer {PartnerToken}, User {UserToken}

## Path parameters:

  - `location_id` (integer, required)
    Location ID

  - `client_id` (integer, required)
    Client ID

## Query parameters:

  - `abonement_status_slugs[]` (array)
    Return only Memberships with these statuses

  - `certificate_status_slugs[]` (array)
    Return only gift cards with these statuses

## Header parameters:

  - `Accept` (string, required)

  - `Content-Type` (string, required)

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

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `success` (boolean)

  - `data` (object)

  - `data.certificates` (array)
    Gift cards

  - `data.certificates.id` (integer)

  - `data.certificates.number` (string)
    Gift card code

  - `data.certificates.balance` (number)
    Remaining balance

  - `data.certificates.default_balance` (number)
    Initial balance

  - `data.certificates.type_id` (integer)
    Gift card type ID

  - `data.certificates.status_id` (integer)

  - `data.certificates.created_date` (string)

  - `data.certificates.expiration_date` (string | null)

  - `data.certificates.goods_transaction_id` (integer)
    ID of the sale (Product transaction) of the gift card

  - `data.certificates.type` (object)
    Gift card type

  - `data.certificates.status` (object)
    Status with `id`, `slug` (`created`, `active`, `expired`, `redeemed`) and `title`

  - `data.certificates.salon_group` (object)
    Chain the gift card belongs to (`id`, `title`)

  - `data.abonements` (array)
    Memberships

  - `data.abonements.id` (integer)

  - `data.abonements.number` (string)
    Membership code

  - `data.abonements.balance_string` (string)
    Remaining visits as display text

  - `data.abonements.created_date` (string)

  - `data.abonements.activated_date` (string | null)

  - `data.abonements.expiration_date` (string | null)

  - `data.abonements.is_frozen` (boolean)

  - `data.abonements.freeze_period` (integer)

  - `data.abonements.is_united_balance` (boolean)
    Whether one visit balance is shared by all Services

  - `data.abonements.united_balance_services_count` (integer)
    Remaining visits of a shared balance

  - `data.abonements.goods_transaction_id` (integer)
    ID of the sale (Product transaction) of the Membership

  - `data.abonements.status` (object)
    Status with `id`, `slug` (`created`, `active`, `expired`, `wasted`), `title` and `extended_title`

  - `data.abonements.balance_container` (object)
    Remaining visits per Service or Service Category (`links`)

  - `data.abonements.type` (object)
    Membership Type

  - `data.abonements.salon_group` (object)
    Chain the Membership belongs to (`id`, `title`)

  - `data.loyalty_cards` (array)
    Loyalty cards of the client with their type, Chain and programs

  - `data.referral_settings` (array)
    Referral program settings of the Location's Chains

  - `data.referral_settings.id` (integer)

  - `data.referral_settings.is_enabled` (boolean)

  - `data.referral_settings.salon_group` (object)
    Chain (`id`, `title`)

  - `data.referral_settings.discount_loyalty_program` (object | null)
    Loyalty program applied to the referrer

  - `data.referral_settings.cashback_loyalty_program` (object | null)
    Cashback program of the referral program

  - `meta` (array)

## Response 401:

  - `401` (unknown)
    Unauthorized

## 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:

  - `403` (unknown)
    Forbidden

## 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:

  - `404` (unknown)
    Client not found in this Location

## 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: {}

