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

# Add points to customer

> Add loyalty points to a customer's balance. Delegates to LoyaltyUser.add_points(). All async side effects (Z$ distribution, RFM, wallet push) preserved.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/customers/{id}/points/add/
openapi: 3.0.3
info:
  title: Zupy API v2
  version: 2.0.0
  description: >-
    Zupy API v2 — versioned, gateway-aware API with envelope responses, RFC 7807
    errors, and multi-auth support (JWT, API Key, Device Key).
servers:
  - url: https://api.zupy.com
    description: Production
security: []
tags:
  - name: Authentication
    description: OTP request and verification endpoints
  - name: Customers
    description: Customer management, points, history, and data operations
  - name: Loyalty Programs
    description: Loyalty program configuration and details
  - name: Rewards
    description: Loyalty reward catalog (definitions redeemed with points)
  - name: Companies
    description: Company information and loyalty configuration
  - name: Coupons
    description: >-
      Issued coupons (RewardRedemption) — both loyalty-reward redemptions and
      marketing claims
  - name: Wallet
    description: Apple Wallet pass generation and notifications
  - name: Webhooks
    description: Partner integration webhook endpoints
  - name: Webhook Management
    description: Configure and test outbound webhook delivery
paths:
  /api/v2/customers/{id}/points/add/:
    post:
      tags:
        - Customers
      summary: Add points to customer
      description: >-
        Add loyalty points to a customer's balance. Delegates to
        LoyaltyUser.add_points(). All async side effects (Z$ distribution, RFM,
        wallet push) preserved.
      operationId: customers_points_add_create
      parameters:
        - in: path
          name: id
          schema:
            type: string
          description: Unique identifier for this customer.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PointsAddRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PointsAddRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PointsAddRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PointsOperationResponse'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
      security:
        - apiKeyAuth: []
components:
  schemas:
    PointsAddRequest:
      type: object
      description: Request parameters for adding points to a customer's loyalty balance.
      properties:
        amount:
          type: integer
          minimum: 1
        reason:
          type: string
          default: ''
          maxLength: 255
      required:
        - amount
    PointsOperationResponse:
      type: object
      description: Result of a points operation (add or reduce) with updated balance.
      properties:
        customer_id:
          type: string
          readOnly: true
        operation:
          type: string
          readOnly: true
        amount:
          type: integer
          readOnly: true
        balance_before:
          type: integer
          readOnly: true
        balance_after:
          type: integer
          readOnly: true
        activity_id:
          type: string
          readOnly: true
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
      required:
        - activity_id
        - amount
        - balance_after
        - balance_before
        - created_at
        - customer_id
        - operation
    Error:
      type: object
      description: RFC 7807 Problem Details error response.
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        instance:
          type: string
      required:
        - detail
        - instance
        - status
        - title
        - type
    ValidationError:
      type: object
      description: RFC 7807 error with validation errors array.
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        instance:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/FieldError'
      required:
        - detail
        - errors
        - instance
        - status
        - title
        - type
    FieldError:
      type: object
      description: Individual field error in a validation error response.
      properties:
        field:
          type: string
        detail:
          type: string
      required:
        - detail
        - field
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Per-company partner API key (zupy_pk_…). Validated by Zupy against the
        company integration key hash (Story 14.x); send it on every request as
        the X-API-Key header. Scoped read-write to the owning company's data.

````