> ## 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 customer point transaction history

> Retrieves paginated list of point transactions for the authenticated customer, ordered by ID descending (most recent first). Each transaction includes details about points earned or spent, transaction type, status (PENDING, APPROVED, REJECTED), associated order information, and timestamps. Useful for displaying transaction history to customers.



## OpenAPI

````yaml /loyalty/storefront-api-swagger.json get /loyalty/cp/api/transaction-by-shop
openapi: 3.0.1
info:
  description: >
    These endpoints are called **from the shop's storefront, in the shopper's
    browser**, through the Shopify App Proxy:

    `https://{store-domain}/apps/loyalty/cp/api/...`. Shopify signs every
    proxied request and attaches the logged-in

    customer (`logged_in_customer_id`), and that signature is the only
    credential these endpoints accept.


    - **No API key, no Bearer token, no customer ID parameter.** The customer is
    the one logged in to the storefront. Accept referral offer also works for a
    shopper who isn't signed in.

    - Requests sent straight to `loyalty-admin.appstle.com` (including this
    page's "Try it" button, Postman, or a server)
      have no App Proxy signature and are rejected with **401 Unauthorized**.
    - Non-GET requests must also send `X-Requested-With: XMLHttpRequest`.

    - If the merchant changed the proxy path in Advanced Settings, replace
    `/apps/loyalty` with that path.


    **Headless storefronts and server-to-server integrations** can't use the App
    Proxy. Use the Admin APIs instead

    (`/api/external/**` with the `X-API-Key` header, passing `customerId` or
    `customerEmail` explicitly).
  title: Storefront APIs
  version: 0.0.1
servers:
  - description: >-
      Shop's storefront domain (App Proxy). Must be called from the storefront
      by a logged-in customer.
    url: https://{storeDomain}/apps
    variables:
      storeDomain:
        default: your-store.myshopify.com
security: []
tags:
  - description: >-
      Storefront APIs for the signed-in customer to enroll, enable the loyalty
      program, view their loyalty profile, sync metafields, and update profile
      attributes.
    name: Customer Enrollment & Profile
  - description: >-
      Storefront APIs for the signed-in customer to view point transactions,
      claim social-media reward points, and record store visits.
    name: Points & Earn Rules
  - description: >-
      Storefront APIs for the signed-in customer to redeem loyalty points for
      rewards or discount codes.
    name: Redemptions & Discount Codes
  - description: >-
      Storefront APIs for managing the signed-in customer's referral activity:
      generating referral URLs, sending invites, viewing referral history, and
      accepting referral offers.
    name: Referrals
  - description: >-
      Storefront APIs for retrieving product and collection data, proxied
      through the Shopify Storefront API for loyalty widgets.
    name: Product Catalog
paths:
  /loyalty/cp/api/transaction-by-shop:
    get:
      tags:
        - Points & Earn Rules
      summary: Get customer point transaction history
      description: >-
        Retrieves paginated list of point transactions for the authenticated
        customer, ordered by ID descending (most recent first). Each transaction
        includes details about points earned or spent, transaction type, status
        (PENDING, APPROVED, REJECTED), associated order information, and
        timestamps. Useful for displaying transaction history to customers.
      operationId: getAllPointTransactionsByCustomer
      parameters:
        - description: Zero-based page index (0..N)
          in: query
          name: page
          schema:
            default: 0
            minimum: 0
            type: integer
        - description: The size of the page to be returned
          in: query
          name: size
          schema:
            default: 20
            minimum: 1
            type: integer
      responses:
        '200':
          content:
            application/json:
              example:
                - createAt: '2025-01-15T10:30:00Z'
                  customerId: 67890
                  id: 12345
                  note: Points earned for purchase
                  pointType: EARNED
                  points: 50
                  shop: example-store.myshopify.com
                  spentAmount: 99.99
                  status: APPROVED
                  transactionRule: ORDER_PLACED
              schema:
                items:
                  $ref: '#/components/schemas/PointTransaction'
                type: array
          description: >-
            Point transactions retrieved successfully with pagination headers
            (X-Total-Count, Link)
        '401':
          description: Customer not authenticated
components:
  schemas:
    PointTransaction:
      properties:
        autoApprovalDays:
          format: int32
          type: integer
        contractId:
          type: string
        createAt:
          format: date-time
          type: string
        creditExpireAt:
          format: date-time
          type: string
        customerId:
          format: int64
          type: integer
        displayName:
          type: string
        earnRuleId:
          format: int64
          type: integer
        earnRuleName:
          type: string
        id:
          format: int64
          type: integer
        imported:
          type: boolean
        note:
          type: string
        orderFinancialStatus:
          type: string
        orderFulfillmentStatus:
          type: string
        orderId:
          format: int64
          type: integer
        orderLineItemId:
          format: int64
          type: integer
        orderName:
          type: string
        pointType:
          enum:
            - DEBIT
            - CREDIT
          type: string
        points:
          format: double
          type: number
        reason:
          type: string
        redeemRuleName:
          type: string
        redeemRuleRuleId:
          format: int64
          type: integer
        reviewReference:
          type: string
        rewardType:
          enum:
            - STORE_CREDIT
            - DISCOUNT_CODE
            - POINTS
          type: string
        shop:
          type: string
        spentAmount:
          format: double
          type: number
        status:
          enum:
            - APPROVED
            - PENDING
            - REJECTED
          type: string
        transactionRule:
          enum:
            - ADJUSTMENT
            - EARN_RULE
            - REDEEM_RULE
            - REFERRAL
            - REDEEM_REVERSAL
          type: string
      required:
        - customerId
        - pointType
        - points
      type: object

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.