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

# Get all point earning rules



## OpenAPI

````yaml /loyalty/admin-api-swagger.json get /api/external/point-earn-rules
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/point-earn-rules:
    get:
      tags:
        - Points & Earn Rules
      summary: Get all point earning rules
      operationId: getAllPointEarnRules
      parameters:
        - description: API key for authentication
          in: header
          name: X-API-Key
          required: true
          schema:
            type: string
        - description: 'Include inactive rules in response (default: false)'
          in: query
          name: includeInactive
          required: false
          schema:
            default: false
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PointEarnRuleDTO'
          description: Successfully retrieved point earning rules
        '401':
          description: Unauthorized - Invalid or missing X-API-Key
      security:
        - X-API-Key: []
components:
  schemas:
    PointEarnRuleDTO:
      properties:
        activityType:
          enum:
            - REGULAR
            - REFERRAL
            - VIP
          type: string
        addAdditionalPoints:
          type: boolean
        additionalPoints:
          format: double
          type: number
        allowedCustomerTags:
          type: string
        allowedOrderTags:
          type: string
        allowedProductTags:
          type: string
        appliesOn:
          enum:
            - ONE_TIME
            - SUBSCRIPTION
            - BOTH
          type: string
        applyOnImportedCustomer:
          type: boolean
        autoApprovalDays:
          format: int32
          type: integer
        basePoints:
          format: double
          type: number
        collectionData:
          type: string
        collectionId:
          format: int64
          type: integer
        createAt:
          format: date-time
          type: string
        customerFacingIconUrl:
          type: string
        customerFacingLabel:
          type: string
        customerNotification:
          type: string
        disableForOnSellProduct:
          type: boolean
        disablePointsForDiscountedProduct:
          type: boolean
        earnLimit:
          format: int32
          type: integer
        earnType:
          enum:
            - STORE_CREDIT
            - DISCOUNT_CODE
            - POINTS
          type: string
        eligibleForFirstOrder:
          type: boolean
        enableBirthdayPromo:
          type: boolean
        enableInterval:
          type: boolean
        excludeCollections:
          type: string
        excludeOrderTags:
          type: string
        excludeProducts:
          type: string
        excludeVariantIds:
          type: string
        givePointsToGuestCustomers:
          type: boolean
        historicPurchaseDuration:
          enum:
            - NONE
            - ALL
            - ONE_HOUR
            - ONE_DAY
            - ONE_MONTH
            - THREE_MONTH
            - ONE_YEAR
          type: string
        id:
          format: int64
          type: integer
        includeShippingPoints:
          type: boolean
        includeSubtotal:
          type: boolean
        includeTax:
          type: boolean
        manuallyApprovePoints:
          type: boolean
        maximumPoints:
          format: int32
          type: integer
        minimumOrderValue:
          format: double
          type: number
        name:
          type: string
        platformType:
          enum:
            - POS_ONLY
            - ONLINE_STORE
            - BOTH
          type: string
        pointBasedOn:
          enum:
            - QUANTITY
            - AMOUNT_SPEND
            - FLAT_PURCHASE
          type: string
        pointsProvided:
          format: double
          type: number
        productData:
          type: string
        productId:
          format: int64
          type: integer
        promoPointsMultiplier:
          format: double
          type: number
        refundNotificationLabel:
          type: string
        restrictCustomerTags:
          type: string
        restrictProductTags:
          type: string
        rewardAssignType:
          enum:
            - DYNAMIC
            - FIXED
          type: string
        rewardInterval:
          enum:
            - DAY
            - WEEK
            - MONTH
            - YEAR
            - LIFETIME
          type: string
        rollBackPointsOnUnsubscribe:
          type: boolean
        ruleEndDate:
          format: date-time
          type: string
        ruleStartDate:
          format: date-time
          type: string
        serial:
          format: int32
          type: integer
        shop:
          type: string
        socialUrl:
          type: string
        status:
          enum:
            - ACTIVE
            - INACTIVE
          type: string
        translations:
          type: string
        triggeredCount:
          format: int64
          type: integer
        type:
          enum:
            - PURCHASE
            - VISIT_SHOP
            - REFERRAL
            - CREATE_ACCOUNT
            - FACEBOOK_PAGE_LIKE
            - FOLLOW_TWITTER
            - FOLLOW_INSTAGRAM
            - BIRTHDAY
            - LEAVE_REVIEW
            - SUBSCRIBE_NEWSLETTER
            - BUY_PRODUCT
            - BUY_PRODUCT_FROM_COLLECTION
            - LEAVE_REVIEW_STAMPED_IO
            - LEAVE_REVIEW_LOOX_IO
            - LEAVE_REVIEW_JUDGE_ME
            - LEAVE_REVIEW_PRODUCT_REVIEWS
            - SUBSCRIPTION
            - YOUTUBE
            - TIKTOK
            - OKENDO
            - HELPFULL_PRODUCT_REVIEWS
            - RIVYO_PRODUCT_REVIEWS
            - REVIEWS_IO
            - QUANTITY_BASED_POINTS
            - SUBSCRIBE_SMS
            - VISIT_PINTEREST
            - AIR_REVIEWS
            - STATIC_EARN_RULE
            - SHARE_ON_FACEBOOK
            - SHARE_ON_X
            - FIXED_REWARD
          type: string
        updateAt:
          format: date-time
          type: string
        variantId:
          format: int64
          type: integer
        vipTierId:
          format: int64
          type: integer
      required:
        - basePoints
        - customerNotification
        - includeShippingPoints
        - includeSubtotal
        - includeTax
        - name
        - status
        - type
      type: object

````