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

# List Campaign Pending Points

> Lists all pending points that are currently assigned to all loyalty cards in a campaign. Once the points are added to the card, the entry is no longer returned.

>👍 Configuring pending points
>
>Pending points are configured as part of an earning rule with [POST Create earning rule](/api-reference/loyalties/create-earning-rule) or [PUT Update earning rule](/api-reference/loyalties/update-earning-rule).



## OpenAPI

````yaml /openapi/loyalties.json get /v1/loyalties/{campaignId}/pending-points
openapi: 3.0.1
info:
  title: Voucherify API - Loyalties
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /v1/loyalties/{campaignId}/pending-points:
    parameters:
      - schema:
          $ref: '#/components/schemas/ParameterCampaignId'
        name: campaignId
        in: path
        required: true
        description: Unique campaign ID.
    get:
      tags:
        - Loyalties
      summary: List Campaign Pending Points
      description: >-
        Lists all pending points that are currently assigned to all loyalty
        cards in a campaign. Once the points are added to the card, the entry is
        no longer returned.


        >👍 Configuring pending points

        >

        >Pending points are configured as part of an earning rule with [POST
        Create earning rule](/api-reference/loyalties/create-earning-rule) or
        [PUT Update earning rule](/api-reference/loyalties/update-earning-rule).
      operationId: list-campaign-pending-points
      parameters:
        - schema:
            $ref: '#/components/schemas/ParameterLimit'
          in: query
          name: limit
          description: >-
            Limit the number of the pending point entries that the API returns
            in the response.
        - schema:
            $ref: '#/components/schemas/ParameterOrderListPendingPoints'
          in: query
          name: order
          description: >-
            Orders the pending point entries according the pending point entry
            ID. The dash `-` preceding a sorting option means sorting in a
            descending order.
        - schema:
            $ref: '#/components/schemas/ParameterString'
          in: query
          name: starting_after_id
          description: >-
            A cursor for pagination. It retrieves the results starting after a
            result with the given ID.
      responses:
        '200':
          description: >-
            Returns all pending point entries for all loyalty cards in the
            campaign.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoyaltiesPendingPointsListResponseBody'
              examples:
                Example:
                  value:
                    object: list
                    data_ref: data
                    data:
                      - id: lopp_0ffdbd86f0120789f2
                        voucher_id: v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc
                        campaign_id: camp_AQZ1GLRlbGaC2dETd31VbJQ9
                        customer_id: cust_IdgAFZxYwwHctOk9ppZMu319
                        order_id: ord_0ffc73eff092dea295
                        points: 1
                        activates_at: '2025-01-16'
                        details:
                          holder_loyalty_tier:
                            id: ltr_0e30613ad01f044515
                            name: Silver Tier
                          event:
                            id: evcus_0ffc73eff212dea29f
                            type: customer.order.paid
                            group_id: v-0ffc73efe71d5053fa
                            entity_id: cust_IdgAFZxYwwHctOk9ppZMu319
                            created_at: '2025-01-15T16:51:03.745Z'
                            category: EFFECT
                            event_source:
                              channel: USER_PORTAL
                              user:
                                id: user_xyzaBcDEfgHOIJKLmn1opqr2Stu3VWX4
                          earning_rule:
                            id: ern_FQxftbKUq9E93k00Z3qkC0sX
                            source:
                              banner: Order-paid
                          order:
                            id: ord_0ffc73eff092dea295
                            source_id: dashboard-source-20250115-001
                        created_at: '2025-01-15T16:51:04.708Z'
                      - id: lopp_0ffd968aa8d207eb38
                        voucher_id: v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc
                        campaign_id: camp_AQZ1GLRlbGaC2dETd31VbJQ9
                        customer_id: cust_IdgAFZxYwwHctOk9ppZMu319
                        order_id: ord_0ffc4cf3aa55d28bae
                        points: 1
                        activates_at: '2025-01-16'
                        details:
                          holder_loyalty_tier:
                            id: ltr_0e30613ad01f044515
                            name: Silver Tier
                          event:
                            id: evcus_0ffc4cf3ad15d28bb8
                            type: customer.order.paid
                            group_id: v-0ffc4cf39e2d7d9ade
                            entity_id: cust_IdgAFZxYwwHctOk9ppZMu319
                            created_at: '2025-01-15T14:00:43.940Z'
                            category: EFFECT
                            event_source:
                              channel: API
                              api_key:
                                name: Primary
                                app_id: 3XxxX483-0YYd-XX8z-aXXX-YYY7a3d3698
                          earning_rule:
                            id: ern_FQxftbKUq9E93k00Z3qkC0sX
                            source:
                              banner: Order-paid
                          order:
                            id: ord_0ffc4cf3aa55d28bae
                            source_id: your_own_source_id_20250115-006
                        created_at: '2025-01-15T14:00:44.934Z'
                      - id: lopp_0ffd9661bd5207eb0a
                        voucher_id: v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc
                        campaign_id: camp_AQZ1GLRlbGaC2dETd31VbJQ9
                        customer_id: cust_IdgAFZxYwwHctOk9ppZMu319
                        order_id: ord_0ffc4ccac0d5d28b7a
                        points: 1
                        activates_at: '2025-01-16'
                        details:
                          holder_loyalty_tier:
                            id: ltr_0e30613ad01f044515
                            name: Silver Tier
                          event:
                            id: evcus_0ffc4ccac5d5d28b84
                            type: customer.order.paid
                            group_id: v-0ffc4ccaafdd50214b
                            entity_id: cust_IdgAFZxYwwHctOk9ppZMu319
                            created_at: '2025-01-15T14:00:02.038Z'
                            category: EFFECT
                            event_source:
                              channel: API
                              api_key:
                                name: Primary
                                app_id: 34fdc483-066d-478b-a707-be2c7a3d3698
                          earning_rule:
                            id: ern_FQxftbKUq9E93k00Z3qkC0sX
                            source:
                              banner: Order-paid
                          order:
                            id: ord_0ffc4ccac0d5d28b7a
                            source_id: your_own_source_id_20250115-005
                        created_at: '2025-01-15T14:00:02.586Z'
                    has_more: true
                    more_starting_after: lopp_0ffd9661bd5207eb0a
        '404':
          description: Returns an error if the campaign could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Campaign Not Found:
                  value:
                    code: 404
                    key: not_found
                    message: Resource not found
                    details: Cannot find campaign with id camp_AQZ1GLRlbGaC2dETd31VbJQ
                    request_id: v-0fa4dbf5ebeb92bccd
                    resource_id: camp_AQZ1GLRlbGaC2dETd31VbJQ
                    resource_type: campaign
      security:
        - X-App-Id: []
          X-App-Token: []
        - X-Voucherify-OAuth:
            - api
            - loyalties
components:
  schemas:
    ParameterCampaignId:
      type: string
      example: camp_rRsfatlwN7unSeUIJDCYedal
    ParameterLimit:
      type: integer
      minimum: 1
      maximum: 100
    ParameterOrderListPendingPoints:
      type: string
      enum:
        - id
        - '-id'
    ParameterString:
      type: string
    LoyaltiesPendingPointsListResponseBody:
      title: Loyalties Campaign Pending Points List Response Body
      type: object
      description: >-
        Response body schema for **GET**
        `/loyalties/{campaignId}/pending-points`.
      allOf:
        - $ref: '#/components/schemas/ListPendingPoints'
    Error:
      title: Error Object
      type: object
      description: Error details
      properties:
        code:
          type: integer
          description: Error's HTTP status code.
        key:
          type: string
          description: Short string describing the kind of error which occurred.
        message:
          type: string
          description: A human-readable message providing a short description of the error.
        details:
          type: string
          description: A human-readable message providing more details about the error.
        request_id:
          type: string
          example: v-0a885062c80375740f
          description: >-
            This ID is useful when troubleshooting and/or finding the root cause
            of an error response by our support team.
        resource_id:
          type: string
          description: >-
            Unique resource ID that can be used in another endpoint to get more
            details.
          example: rf_0c5d710a87c8a31f86
        resource_type:
          type: string
          description: The resource type.
          example: voucher
        error:
          type: object
          description: Includes additional information about the error.
          properties:
            message:
              type: string
              description: The message configured by the user in a validation rule.
      required:
        - code
        - message
    ListPendingPoints:
      title: Loyalties Members Pending Points List Response Body
      type: object
      description: Lists pending point entries.
      properties:
        object:
          type: string
          default: list
          description: The type of the object represented by JSON.
          enum:
            - list
        data_ref:
          type: string
          default: data
          description: >-
            Identifies the name of the attribute that contains the array of
            pending point objects.
          enum:
            - data
        data:
          type: array
          items:
            $ref: '#/components/schemas/LoyaltyPendingPoints'
          description: >-
            A dictionary that contains an array of pending point entries. Each
            entry in the array is a separate pending point object.
        has_more:
          type: boolean
          description: >-
            As query results are always limited (by the limit parameter), the
            `has_more` flag indicates if there are more records for given filter
            parameters. This lets you know if you can run another request to get
            more records returned in the results.
        more_starting_after:
          type: string
          description: >-
            Returns an ID that can be used to return another page of results.
            Use the pending point entry ID in the `starting_after_id` query
            parameter to display another page of the results starting after the
            entry with that ID.
      required:
        - object
        - data_ref
        - data
        - has_more
    LoyaltyPendingPoints:
      type: object
      title: Loyalty Pending Point Entry
      description: Contains details about the pending point entry.
      properties:
        id:
          type: string
          description: >-
            Unique identifier of the pending point entry, assigned by
            Voucherify.
          example: lopp_0ffd593d5ad207ba6b
        voucher_id:
          type: string
          description: Unique identifier of the loyalty card, assigned by Voucherify.
          example: v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc
        campaign_id:
          type: string
          description: Unique campaign identifier, assigned by Voucherify.
          example: camp_weer1c3p5ZgktqfW56RfoNaG
        customer_id:
          type: string
          description: Unique customer identifier, assigned by Voucherify.
          example: cust_IdgAFZxYwwHctOk9ppZMu319
        order_id:
          type: string
          description: Unique order identifier, assigned by Voucherify.
          example: ord_0ffc0fa65f15d2df17
        points:
          type: integer
          description: Number of points in the pending state.
        activates_at:
          type: string
          description: >-
            Date when the pending points are activated and added to the
            customer's loyalty card.
          format: date
        details:
          $ref: '#/components/schemas/LoyaltyPendingPointsDetails'
        created_at:
          type: string
          description: >-
            Timestamp representing the date and time when the pending point
            entry was created. The value is shown in the ISO 8601 format.
          format: date-time
        updated_at:
          type: string
          description: >-
            Timestamp representing the date and time when the pending point
            entry was modified. The value is shown in the ISO 8601 format.
          format: date-time
      required:
        - id
        - voucher_id
        - campaign_id
        - customer_id
        - order_id
        - points
        - activates_at
        - details
        - created_at
    LoyaltyPendingPointsDetails:
      title: Pending Point Details
      type: object
      description: Details about how the pending points were earned.
      properties:
        loyalty_tier:
          type: object
          description: >-
            The loyalty tier that is mapped for the earning rule and used in the
            pending point transaction.
          properties:
            id:
              type: string
              description: Unique identifier of the loyalty tier, assigned by Voucherify.
            name:
              type: string
              description: User-defined name of the loyalty tier.
          required:
            - id
            - name
        holder_loyalty_tier:
          type: object
          description: >-
            Loyalty tier of the loyalty card holder at the moment when the
            transaction occurred. The loyalty tier is the tier in which the
            holder was at the moment pending points were created.
          properties:
            id:
              type: string
              description: Unique identifier of the loyalty tier, assigned by Voucherify.
            name:
              type: string
              description: User-defined name of the loyalty tier.
          required:
            - id
            - name
        event:
          type: object
          description: Details about the event that created pending points.
          properties:
            id:
              type: string
              description: Unique event identifier, assigned by Voucherify.
            type:
              type: string
              description: Type of the event that triggered the creation of pending points.
              enum:
                - customer.order.paid
            group_id:
              type: string
              description: >-
                Unique identifier of the request that triggered the event,
                assigned by Voucherify.
            entity_id:
              type: string
              description: >-
                Unique identifier of the entity that triggered the event,
                assigned by Voucherify. For pending points, it is the
                `customer_id` of the customer who paid for the order.
            created_at:
              type: string
              description: >-
                Timestamp representing the date and time when the event
                occurred. The value is shown in the ISO 8601 format.
              format: date-time
            category:
              type: string
              description: Type of the event.
              enum:
                - ACTION
                - EFFECT
            event_source:
              $ref: '#/components/schemas/EventSource'
        earning_rule:
          type: object
          description: Contains information about the earning rule.
          properties:
            id:
              type: string
              description: Unique identifier of an earning rule, assigned by Voucherify.
            source:
              type: object
              required:
                - banner
              description: Contains the custom earning rule name.
              properties:
                banner:
                  type: string
                  description: >-
                    Name of the earning rule. This is displayed as a header for
                    the earning rule in the Dashboard.
          required:
            - id
            - source
        order:
          type: object
          description: Details about the order that caused adding pending points.
          properties:
            id:
              type: string
              description: Unique order identifier, assigned by Voucherify.
            source_id:
              nullable: true
              type: string
              description: User-defined order identifier.
          required:
            - id
            - source_id
      required:
        - event
        - earning_rule
        - order
    EventSource:
      type: object
      title: Event Source
      description: Contains the source of the object that initiated the event.
      required:
        - channel
      properties:
        channel:
          type: string
          description: Determines the channel that initiated the event.
          enum:
            - USER_PORTAL
            - API
            - CLIENT_API
            - INTERNAL
          example: API
        user:
          type: object
          description: Determines the Voucherify user who triggered the event.
          properties:
            id:
              type: string
              description: Unique identifier of the user.
              example: user_xyzfghSTprSTUVWXYlk6tuvXYst7FGH7
          required:
            - id
        api_key:
          type: object
          description: Determines the API key used to initiate the event.
          required:
            - name
            - app_id
          properties:
            name:
              type: string
              description: Channel name in the application keys.
            app_id:
              type: string
              description: Contains the application ID from the Voucherify API key pair.
              example: 1XXXX5XX-0XXX-XXXb-X7XX-XX2XXaXXX6XX
  securitySchemes:
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header
    X-Voucherify-OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://api.voucherify.io/v1/oauth/token
          scopes:
            api: Gives access to whole server-side API.
            vouchers: >-
              Gives access to all endpoints and methods starting with
              `v1/vouchers`.
            client_api: Gives access to whole client-side API.
            client_vouchers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/vouchers`.
            promotions: >-
              Gives access to all endpoints and methods starting with
              `/v1/promotions`.
            client_promotions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/promotions`
            campaigns: >-
              Gives access to all endpoints and methods starting with
              `v1/campaigns`.
            client_publish: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/publish`.
            exports: >-
              Gives access to all endpoints and methods starting with
              `/v1/exports`.
            publications: >-
              Gives access to all endpoints and methods starting with
              `/v1/publications`.
            client_validate: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validate`.
            validations: >-
              Gives access to all endpoints and methods starting with
              `/v1/validations`.
            client_validations: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validations`.
            qualifications: >-
              Gives access to all endpoints and methods starting with
              `/v1/qualifications`.
            client_qualifications: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/qualifications`.
            client_redeem: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redeem
            redemptions: >-
              Gives access to all endpoints and methods starting with
              `/v1/redemptions`.
            client_redemptions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redemptions`
            customers: >-
              Gives access to all endpoints and methods starting with
              `/v1/customers`.
            client_customers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/customers`.
            orders: >-
              Gives access to all endpoints and methods starting with
              `/v1/orders`.
            products: >-
              Gives access to all endpoints and methods starting with
              `/v1/products`.
            skus: >-
              Gives access to all endpoints and methods starting with
              `/v1/SKUs`.
            validation-rules: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules`.
            validation-rules-assignments: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules-assignments
            segments: >-
              Gives access to all endpoints and methods starting with
              `/v1/segments`.
            events: >-
              Gives access to all endpoints and methods starting with
              `/v1/events`.
            client_events: >-
              Gives access to all endpoints and methods starting with
              `client/v1/events`.
            rewards: >-
              Gives access to all endpoints and methods starting with
              `/v1/rewards`.
            assets: >-
              Gives access to all endpoints and methods starting with
              `/v1/assets`.
            task-results: >-
              Gives access to all endpoints and methods starting with
              `/v1/task-results`.
            loyalties: >-
              Gives access to all endpoints and methods starting with
              `/v1/loyalties`.
            client_consents: >-
              Gives access to all endpoints and methods starting with
              `client/v1/consents`.
            consents: >-
              Gives access to all endpoints and methods starting with
              `/v1/consents`.
            async-actions: >-
              Gives access to all endpoints and methods starting with
              `/v1/async-actions`.
            product-collections: >-
              Gives access to all endpoints and methods starting with
              `/v1/product-collections`.
            categories: >-
              Gives access to all endpoints and methods starting with
              `/v1/categories`.
            metadata-schemas: >-
              Gives access to all endpoints and methods starting with
              `/v1/metadata-schemas`.
            locations: >-
              Gives access to all endpoints and methods starting with
              `/v1/locations`.
            referrals: >-
              Gives access to all endpoints and methods starting with
              `/v1/referrals`.
            trash-bin: >-
              Gives access to all endpoints and methods starting with
              `/v1/trash-bin`.
            templates: >-
              Gives access to all endpoints and methods starting with
              `/v1/templates`.

````