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

# Redeem Loyalty Reward

> Redeem points for a reward option. This endpoint creates voucher data in redemption payload.



## OpenAPI

````yaml POST /customer/api/open/v1/loyalty/customers/{customerId}/redeem
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}/redeem:
    post:
      tags:
        - Loyalty - Customer
      summary: Redeem reward and create voucher
      description: >-
        Redeem points for a reward option. This endpoint creates voucher data in
        redemption payload.
      operationId: redeemCustomerReward
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - rewardOptionId
                - rewardName
                - pointsCost
              properties:
                rewardOptionId:
                  type: string
                rewardName:
                  type: string
                pointsCost:
                  type: integer
                  minimum: 1
                voucherCode:
                  type: string
                voucherProvider:
                  type: string
                voucherExternalId:
                  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/RedeemRewardResponse'
components:
  schemas:
    RedeemRewardResponse:
      type: object
      properties:
        wallet:
          $ref: '#/components/schemas/LoyaltyWallet'
        redemption:
          $ref: '#/components/schemas/RedemptionItem'
        ledger:
          oneOf:
            - $ref: '#/components/schemas/LedgerEntry'
            - type: 'null'
        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
    RedemptionItem:
      type: object
      properties:
        id:
          type: string
        companyId:
          type: integer
        customerId:
          type: string
        customer:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
            companyId:
              type:
                - integer
                - 'null'
            name:
              type:
                - string
                - 'null'
            email:
              type:
                - string
                - 'null'
            phoneNumber:
              type:
                - string
                - 'null'
        walletId:
          type: string
        rewardOptionId:
          type:
            - string
            - 'null'
        rewardName:
          type:
            - string
            - 'null'
        status:
          type: string
        pointsReserved:
          type: string
        pointsCommitted:
          type: string
        voucherCode:
          type:
            - string
            - 'null'
        voucherProvider:
          type:
            - string
            - 'null'
        voucherExternalId:
          type:
            - string
            - 'null'
        reserveExpiresAt:
          type:
            - string
            - 'null'
          format: date-time
        commitAt:
          type:
            - string
            - 'null'
          format: date-time
        releasedAt:
          type:
            - string
            - 'null'
          format: date-time
        failureReason:
          type:
            - string
            - 'null'
        idempotencyKey:
          type: string
        metadata:
          type:
            - object
            - 'null'
          additionalProperties: true
        createdById:
          type:
            - integer
            - 'null'
        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

````