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

# Lists points set to expire within the specified date range (paginated).

> Retrieves a paginated list of points scheduled to expire.



## OpenAPI

````yaml https://api.bonifiq.com.br/swagger/Private%20APIs/swagger.json post /v1/pvt/Points/toexpire
openapi: 3.0.0
info:
  title: BonifiQ Private APIs
  description: >-
    # Introduction 

    This is the BonifiQ Private APIs documentation. With these endpoints you can
    interact with BonifiQ systems and enhance your program points.


    # Limitations

    These endpoints are intended to be used in backend communication so they are
    not CORS-compatible and cannot be used by in-browser frontend libraries
    (such as React, Angular, Vue, jQuery, etc)


    If are required to call BonifiQ API from a browser, please refer to our
    [Public APIs](https://api.bonifiq.com.br/apidocs/public)


    # Authentication

    These Private APis use the [Basic
    Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)
    scheme. You need both an API Token (Username) and API Key (Password) to use
    with it


    You can generate this key pair in BonifiQ admin panel, at the "API Keys"
    menu.


    # How to use this page

    ## Making calls

    You can simulate, test and make calls to API from this Swagger page. To do
    that:

    - Click on the **Authorize** button

    - Inform the Username (API Token) and Passwoird (API Key) and click on
    **Authorize**

    - From the list bellow, choose an API call and click on **Try it out**

    - Inform the required parameters (if any) and click on **Execute**


    ## Verifying requests and responses bodies

    In every API Call there is an explanation of what each field means, theirs
    types and accepted values for all Requests and Responses.


    To view this information, just go to any API Call bellow and in the
    Responses section, click on the Schema.
  version: 1.0.0
servers:
  - url: https://api.bonifiq.com.br
security: []
tags:
  - name: POS
    description: >-
      Flow methods to integrate BonifiQ with a POS system. Check the Flow
      Documentation link on the right
    externalDocs:
      description: Flow Documentation
      url: >-
        https://suporte.bonifiq.com.br/support/solutions/articles/159000319538-integrar-com-pdv
  - name: Checkout
    description: Operations related to checkout cashback redeem, refresh and removal
  - name: Customization
    description: Retrieve customizations for the loyalty program
  - name: Rewards
    description: Interact with rewards already redeemed
paths:
  /v1/pvt/Points/toexpire:
    post:
      tags:
        - Points
      summary: Lists points set to expire within the specified date range (paginated).
      description: Retrieves a paginated list of points scheduled to expire.
      operationId: Points_ToExpire
      requestBody:
        x-name: request
        description: >-
          Filter containing the optional date range (From, To) for expiration
          dates and pagination parameters (PageNumber, PageSize).
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpiringPointsRequest'
        required: true
        x-position: 1
      responses:
        '200':
          description: A paginated list of expiring points.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BaseApiListResultOfApiExpiringPointListItem
      security:
        - Basic Authentication: []
components:
  schemas:
    ExpiringPointsRequest:
      allOf:
        - $ref: '#/components/schemas/BaseExternalApiFilter'
        - type: object
          description: Request filter for retrieving expiring points via the external API.
          additionalProperties: false
          properties:
            From:
              type: string
              description: >-
                Optional start date for the expiration period (inclusive).
                Filters points expiring on or after this date.

                Expected format: ISO 8601 (e.g., "2023-10-27T00:00:00Z").
              format: date-time
              nullable: true
            To:
              type: string
              description: >-
                Optional end date for the expiration period (inclusive). Filters
                points expiring on or before this date.

                Expected format: ISO 8601 (e.g., "2023-11-27T23:59:59Z").
              format: date-time
              nullable: true
    BaseApiListResultOfApiExpiringPointListItem:
      type: object
      additionalProperties: false
      properties:
        Items:
          type: array
          xml:
            wrapped: true
          items:
            xml:
              name: ApiExpiringPointListItem
            oneOf:
              - $ref: '#/components/schemas/ApiExpiringPointListItem'
        TotalItemCount:
          type: integer
          format: int32
        PageSize:
          type: integer
          format: int32
        PageNumber:
          type: integer
          format: int32
        HasNextPage:
          type: boolean
    BaseExternalApiFilter:
      type: object
      description: Base Filter model
      additionalProperties: false
      properties:
        PageNumber:
          type: integer
          description: Pagenation number
          format: int32
        PageSize:
          type: integer
          description: Amount of items per page, Max size is 50 items per page.
          format: int32
    ApiExpiringPointListItem:
      allOf:
        - $ref: '#/components/schemas/BaseApiEntity'
        - type: object
          description: Represents a single item in the expiring points report list.
          additionalProperties: false
          properties:
            PointId:
              type: integer
              description: The ID of the point record.
              format: int32
            ExpirationDate:
              type: string
              description: The calculated date when the points will expire.
              format: date-time
              nullable: true
            Points:
              type: integer
              description: The number of points expiring.
              format: int32
            ReasonType:
              description: >-
                The reason/type why the points were granted (e.g., Purchase,
                Signup).
              oneOf:
                - $ref: '#/components/schemas/PointType'
            GenerationDate:
              type: string
              description: The date when the points were originally generated.
              format: date-time
            CustomerId:
              type: integer
              description: The ID of the customer these points belong to.
              format: int32
            CustomerName:
              type: string
              description: The name of the customer.
            CustomerEmail:
              type: string
              description: The email of the customer.
            CustomerPhone:
              type: string
              description: The phone number of the customer.
            CustomerDocument:
              type: string
              description: The document number (e.g., CPF) of the customer.
            BranchName:
              type: string
            BranchId:
              type: integer
              format: int32
            CashbackValue:
              type: number
              description: The calculated cashback value equivalent to the expiring points.
              format: decimal
            OrderOrigin:
              type: string
              description: >-
                The origin of the order associated with the points (e.g., WEB,
                PDV).
            Salesman:
              type: string
            PointMetadatas:
              type: object
              description: Point metadata key-value pairs for export.
              nullable: true
              additionalProperties:
                type: string
    BaseApiEntity:
      type: object
      x-abstract: true
      additionalProperties: false
      properties:
        Id:
          type: integer
          format: int32
    PointType:
      type: integer
      description: |-
        0 = Purchase
        1 = Signup
        2 = Birthday
        3 = Ordinary
        4 = Reward
        5 = Review
        6 = Refund
        7 = Expire
        8 = Referral
        9 = SocialMediaFollowFacebook
        10 = SocialMediaFollowInstagram
        11 = PartialOrderRefund
        12 = Quiz
        13 = CustomObjective
        14 = ReferralAffiliate
        15 = SocialMediaFollowLinkedin
        16 = SocialMediaFollowTikTok
        17 = Campaign
        18 = Participation
        19 = Fitness
      x-enumNames:
        - Purchase
        - Signup
        - Birthday
        - Ordinary
        - Reward
        - Review
        - Refund
        - Expire
        - Referral
        - SocialMediaFollowFacebook
        - SocialMediaFollowInstagram
        - PartialOrderRefund
        - Quiz
        - CustomObjective
        - ReferralAffiliate
        - SocialMediaFollowLinkedin
        - SocialMediaFollowTikTok
        - Campaign
        - Participation
        - Fitness
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
        - 16
        - 17
        - 18
        - 19
  securitySchemes:
    Basic Authentication:
      type: http
      description: Use API Basic Auth Keys
      name: Basic Authentication
      in: header
      scheme: basic

````