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

# Finds loyalty cards by member ID and state

> If the state is not specified, returns all cards for the member ID.



## OpenAPI

````yaml openapi/member-v1.json GET /v1/loyalty-cards
openapi: 3.0.4
info:
  title: MemberService.Api
  version: v1
servers:
  - url: https://{host}/member
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - Bearer: []
paths:
  /v1/loyalty-cards:
    get:
      tags:
        - Service2Service
      summary: Finds loyalty cards by member ID and state
      description: If the state is not specified, returns all cards for the member ID.
      parameters:
        - name: memberId
          in: query
          description: Member ID
          required: true
          schema:
            type: string
        - name: state
          in: query
          description: Optional loyalty card state filter
          schema:
            $ref: >-
              #/components/schemas/MemberService.Domain.Entities.LoyaltyCardState
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/MemberService.Api.Controllers.DTOs.LoyaltyCard
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
components:
  schemas:
    MemberService.Domain.Entities.LoyaltyCardState:
      enum:
        - Inactive
        - Active
      type: string
    MemberService.Api.Controllers.DTOs.LoyaltyCard:
      required:
        - cardHolderType
        - cardId
        - createdAt
        - memberId
        - state
        - type
        - updatedAt
      type: object
      properties:
        cardId:
          minLength: 1
          type: string
          description: Loyalty card ID
        memberId:
          minLength: 1
          type: string
          description: Member ID who owns the card
        state:
          $ref: '#/components/schemas/MemberService.Domain.Entities.LoyaltyCardState'
        type:
          $ref: '#/components/schemas/MemberService.Domain.Entities.LoyaltyCardType'
        createdAt:
          type: string
          description: Date and time when the card was created
          format: date-time
        updatedAt:
          type: string
          description: Date and time when the card was last updated
          format: date-time
        cardHolderType:
          minLength: 1
          type: string
          description: Type of cardholder (e.g., Member, Employee)
        displayName:
          type: string
          description: Display name for the loyalty card in the mobile app
          nullable: true
      additionalProperties: false
    LoopFoundation.Commons.Contracts.WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
    MemberService.Domain.Entities.LoyaltyCardType:
      enum:
        - Physical
        - Virtual
      type: string
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````