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

# Enroll customer in loyalty program



## OpenAPI

````yaml /loyalty/admin-api-swagger.json post /api/external/enroll-customer
openapi: 3.0.1
info:
  description: ''
  title: Admin APIs
  version: 0.0.1
servers:
  - url: https://loyalty-admin.appstle.com
security: []
tags:
  - description: >-
      Admin APIs for enrolling customers into the loyalty program, retrieving
      customer loyalty details, and updating profile information such as birth
      date.
    name: Customer Enrollment & Profile
  - description: >-
      Admin APIs for managing customer point balances, transaction history,
      point earning rules, top customers leaderboard, and approving pending
      transactions.
    name: Points & Earn Rules
  - description: >-
      Admin APIs for redeeming customer points, managing redemption rules, and
      validating or updating discount codes generated through loyalty
      redemptions.
    name: Redemptions & Discount Codes
  - description: >-
      Admin APIs for retrieving storefront widget label translations consumed by
      the loyalty widget on the merchant's storefront.
    name: Storefront Widgets & Labels
paths:
  /api/external/enroll-customer:
    post:
      tags:
        - Customer Enrollment & Profile
      summary: Enroll customer in loyalty program
      operationId: enrollCustomer
      parameters:
        - description: API key for authentication
          in: header
          name: X-API-Key
          required: true
          schema:
            type: string
        - description: Shopify customer ID to enroll in loyalty program
          in: query
          name: customer_id
          required: true
          schema:
            format: int64
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  message: Customer added successfully
                type: string
          description: Customer successfully enrolled in loyalty program
        '400':
          content:
            application/json:
              schema:
                example:
                  error: Customer ID is required
                type: string
          description: >-
            Invalid request - Missing or invalid customer ID. Common causes:
            customer_id parameter missing, customer_id is not a valid number, or
            customer doesn't exist in Shopify.
        '401':
          content:
            application/json:
              schema:
                example:
                  error: Invalid API key
                type: string
          description: >-
            Unauthorized - Invalid or missing X-API-Key. Verify your API key is
            correct and included in the X-API-Key header.
      security:
        - X-API-Key: []
components: {}

````