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

# Top-up loyalty card

> Add some amount to the loyalty card for the specified POS system and location.



## OpenAPI

````yaml /openapi.yaml post /v2/pos/{posSystemId}/loyaltyCard/addAmount
openapi: 3.0.1
info:
  title: ClearLine POS API
  description: >-
    Point of Sale integration API for ClearLine Marketing Platform. This API
    enables POS systems to send transaction data, manage customer interactions,
    and integrate with marketing campaigns.
  version: v1
servers:
  - url: https://public-api-demo.clearline.me
    description: ClearLine API Server
security: []
paths:
  /v2/pos/{posSystemId}/loyaltyCard/addAmount:
    post:
      tags:
        - Loyalty Cards (v2)
      summary: Top-up loyalty card
      description: >-
        Add some amount to the loyalty card for the specified POS system and
        location.
      operationId: PosV2LoyaltyCard_AddLoyaltyCardAmount
      parameters:
        - name: posSystemId
          in: path
          description: POS system
          required: true
          schema:
            type: string
      requestBody:
        description: Request
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PosLoyaltyCardAddAmountRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              loyaltyCardId: loy_1038574
              loyaltyCardUserId: lus_74447
              loyaltyCardLocationId: lloc_33483
              amount: '10'
              ambassadorId: ''
          application/json:
            schema:
              $ref: '#/components/schemas/PosLoyaltyCardAddAmountRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              loyaltyCardId: loy_1038574
              loyaltyCardUserId: lus_74447
              loyaltyCardLocationId: lloc_33483
              amount: '10'
              ambassadorId: ''
          text/json:
            schema:
              $ref: '#/components/schemas/PosLoyaltyCardAddAmountRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              loyaltyCardId: loy_1038574
              loyaltyCardUserId: lus_74447
              loyaltyCardLocationId: lloc_33483
              amount: '10'
              ambassadorId: ''
          application/*+json:
            schema:
              $ref: '#/components/schemas/PosLoyaltyCardAddAmountRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              loyaltyCardId: loy_1038574
              loyaltyCardUserId: lus_74447
              loyaltyCardLocationId: lloc_33483
              amount: '10'
              ambassadorId: ''
          application/xml:
            schema:
              $ref: '#/components/schemas/PosLoyaltyCardAddAmountRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              loyaltyCardId: loy_1038574
              loyaltyCardUserId: lus_74447
              loyaltyCardLocationId: lloc_33483
              amount: '10'
              ambassadorId: ''
          text/xml:
            schema:
              $ref: '#/components/schemas/PosLoyaltyCardAddAmountRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              loyaltyCardId: loy_1038574
              loyaltyCardUserId: lus_74447
              loyaltyCardLocationId: lloc_33483
              amount: '10'
              ambassadorId: ''
          application/*+xml:
            schema:
              $ref: '#/components/schemas/PosLoyaltyCardAddAmountRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              loyaltyCardId: loy_1038574
              loyaltyCardUserId: lus_74447
              loyaltyCardLocationId: lloc_33483
              amount: '10'
              ambassadorId: ''
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/PosLoyaltyCardAddAmountResponseApiResponse
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PosLoyaltyCardAddAmountResponseApiResponse
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/PosLoyaltyCardAddAmountResponseApiResponse
            application/xml:
              schema:
                $ref: >-
                  #/components/schemas/PosLoyaltyCardAddAmountResponseApiResponse
            text/xml:
              schema:
                $ref: >-
                  #/components/schemas/PosLoyaltyCardAddAmountResponseApiResponse
      security:
        - BearerAuth: []
        - ImplicitAuth: []
components:
  schemas:
    PosLoyaltyCardAddAmountRequest:
      required:
        - amount
        - loyaltyCardId
        - loyaltyCardLocationId
        - loyaltyCardUserId
        - posLocationId
      type: object
      properties:
        posLocationId:
          minLength: 1
          type: string
          description: The POS location identifier
        loyaltyCardId:
          minLength: 1
          type: string
          description: Loyalty card unique identifier
        loyaltyCardUserId:
          minLength: 1
          type: string
          description: Loyalty card user unique identifier
        loyaltyCardLocationId:
          minLength: 1
          type: string
          description: Loyalty card external location id
        amount:
          type: integer
          description: Amount of stamps or points
          format: int32
        ambassadorId:
          type: string
          description: Ambassador identifier
          nullable: true
      additionalProperties: false
      description: Request model for adding amount to loyalty card
    PosLoyaltyCardAddAmountResponseApiResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PosLoyaltyCardAddAmountResponse'
      additionalProperties: false
    PosLoyaltyCardAddAmountResponse:
      type: object
      additionalProperties: false
      description: Response model for adding amount to loyalty card
  securitySchemes:
    BearerAuth:
      type: http
      description: |-

        JWT Authorization header using the Bearer scheme.

        Enter **_JWT Bearer token only_** in the text input below.
      scheme: bearer
      bearerFormat: JWT
    ImplicitAuth:
      type: oauth2
      description: Implicit scheme
      flows:
        implicit:
          authorizationUrl: https://logindemo.clearline.me/connect/authorize
          scopes:
            clearline_api: Grants access to Clearline API endpoints.

````