> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yume.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Get loyalties



## OpenAPI

````yaml /openapi/main.json get /v1/crm/loyalties/{id}/
openapi: 3.0.3
info:
  title: Yume API — Основное
  version: 1.0.0
  description: Базовые сущности и бизнес-логика CRM.
servers:
  - url: https://api.yume.cloud
    description: Production
  - url: https://api.stage.yume.cloud
    description: Stage
security: []
paths:
  /v1/crm/loyalties/{id}/:
    get:
      tags:
        - loyalties
      summary: Get loyalties
      operationId: loyalties_retrieve
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
        - $ref: '#/components/parameters/TenantId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Loyalty'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    Loyalty:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        apple_design:
          allOf:
            - $ref: '#/components/schemas/LoyaltyAppleDesign'
          readOnly: true
        google_design:
          allOf:
            - $ref: '#/components/schemas/LoyaltyGoogleDesign'
          readOnly: true
        name:
          type: string
          nullable: true
          maxLength: 255
        percent:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          title: Процент
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          title: Цена
        grant_limit:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        event_limit:
          type: string
          nullable: true
        delivery_limit:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        tenant:
          type: integer
      required:
        - apple_design
        - google_design
        - id
        - price
    LoyaltyAppleDesign:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        loyalty:
          type: integer
          readOnly: true
        background_color:
          type: string
          pattern: ^#[0-9A-Fa-f]{6}$
          maxLength: 7
        foreground_color:
          type: string
          pattern: ^#[0-9A-Fa-f]{6}$
          maxLength: 7
        label_color:
          type: string
          pattern: ^#[0-9A-Fa-f]{6}$
          maxLength: 7
        strip_color:
          type: string
          maxLength: 7
        logo_text:
          type: string
          maxLength: 64
        suppress_strip_shine:
          type: boolean
        description:
          type: string
          maxLength: 255
        logo:
          type: string
          format: uri
          pattern: (?:png|jpg|jpeg)$
        logo_2x:
          type: string
          format: uri
          readOnly: true
          nullable: true
        logo_1x:
          type: string
          format: uri
          readOnly: true
          nullable: true
        icon:
          type: string
          format: uri
          pattern: (?:png|jpg|jpeg)$
        icon_2x:
          type: string
          format: uri
          readOnly: true
          nullable: true
        icon_1x:
          type: string
          format: uri
          readOnly: true
          nullable: true
        strip_image:
          type: string
          format: uri
          nullable: true
          pattern: (?:png|jpg|jpeg)$
        strip_image_2x:
          type: string
          format: uri
          readOnly: true
          nullable: true
        strip_image_1x:
          type: string
          format: uri
          readOnly: true
          nullable: true
      required:
        - icon
        - icon_1x
        - icon_2x
        - id
        - logo
        - logo_1x
        - logo_2x
        - loyalty
        - strip_image_1x
        - strip_image_2x
    LoyaltyGoogleDesign:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        loyalty:
          type: integer
          readOnly: true
        hex_background_color:
          type: string
          pattern: ^#[0-9A-Fa-f]{6}$
          maxLength: 7
        program_name:
          type: string
          maxLength: 64
        rewards_tier:
          type: string
          maxLength: 7
        rewards_tier_label:
          type: string
          maxLength: 9
        secondary_rewards_tier:
          type: string
          maxLength: 7
        secondary_rewards_tier_label:
          type: string
          maxLength: 9
        account_id_label:
          type: string
          maxLength: 15
        account_name_label:
          type: string
          maxLength: 15
        program_logo:
          type: string
          format: uri
          pattern: (?:png|jpg|jpeg)$
        hero_image:
          type: string
          format: uri
          nullable: true
          pattern: (?:png|jpg|jpeg)$
        text_modules: {}
        links_module: {}
      required:
        - id
        - loyalty
        - program_logo
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````