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

# Adjust Loyalty Points

> Manually add or deduct points from customer wallet.



## OpenAPI

````yaml POST /customer/api/open/v1/loyalty/customers/{customerId}/points/adjust
openapi: 3.1.0
info:
  title: Customer Loyalty API
  description: Loyalty wallet, redemption, and history endpoints from customer service.
  version: 1.0.0
servers:
  - url: https://api.bitbybit.studio
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /customer/api/open/v1/loyalty/customers/{customerId}/points/adjust:
    post:
      tags:
        - Loyalty - Customer
      summary: Add or deduct loyalty points
      description: Manually add or deduct points from customer wallet.
      operationId: adjustCustomerPoints
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - direction
                - points
                - reason
              properties:
                direction:
                  type: string
                  enum:
                    - add
                    - deduct
                points:
                  type: integer
                  minimum: 1
                reason:
                  type: string
                idempotencyKey:
                  type: string
                metadata:
                  type: object
                  additionalProperties: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AdjustPointsResponse'
components:
  schemas:
    AdjustPointsResponse:
      type: object
      properties:
        wallet:
          $ref: '#/components/schemas/LoyaltyWallet'
        ledger:
          $ref: '#/components/schemas/LedgerEntry'
        idempotencyKey:
          type: string
    LoyaltyWallet:
      type: object
      properties:
        id:
          type: string
        companyId:
          type: integer
        customerId:
          type: string
        availablePoints:
          type: string
        reservedPoints:
          type: string
        lifetimeEarnedPoints:
          type: string
        lifetimeBurnedPoints:
          type: string
        version:
          type: string
        lastLedgerAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    LedgerEntry:
      type: object
      properties:
        id:
          type: string
        companyId:
          type: integer
        customerId:
          type: string
        walletId:
          type: string
        entryType:
          type: string
        pointsDelta:
          type: string
        availableAfter:
          type: string
        reservedAfter:
          type: string
        referenceType:
          type: string
        referenceId:
          type: string
        idempotencyKey:
          type: string
        note:
          type:
            - string
            - 'null'
        metadata:
          type:
            - object
            - 'null'
          additionalProperties: true
        occurredAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        createdById:
          type:
            - integer
            - 'null'
  securitySchemes:
    ApiKeyAuth:
      description: API key for authentication. Create one in Settings > Developer.
      name: x-api-key
      in: header
      type: apiKey

````