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

# Returns the latest known forecast and granted purchase points for each order.

> Data comes from the latest completed daily snapshot. Date filters always use the order placement date.
Pending items contain Forecast and no Grant. Granted items contain Grant and preserve Forecast when the
order was observed as pending in an earlier snapshot. Historical grants may not have a Forecast. Grant
keeps the persisted granted values; NetPoints, NetCashback and Reversal reflect later point reversals.



## OpenAPI

````yaml https://api.bonifiq.com.br/swagger/Private%20APIs/swagger.json get /v1/pvt/Reports/ListPurchasePoints
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
    description: Production
  - url: https://backend--homolog.previewqa.bonifique.com.br
    description: Sandbox
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/Reports/ListPurchasePoints:
    get:
      tags:
        - Reports
      summary: >-
        Returns the latest known forecast and granted purchase points for each
        order.
      description: >-
        Data comes from the latest completed daily snapshot. Date filters always
        use the order placement date.

        Pending items contain Forecast and no Grant. Granted items contain Grant
        and preserve Forecast when the

        order was observed as pending in an earlier snapshot. Historical grants
        may not have a Forecast. Grant

        keeps the persisted granted values; NetPoints, NetCashback and Reversal
        reflect later point reversals.
      operationId: Reports_ListPurchasePoints
      parameters:
        - name: from
          in: query
          schema:
            type: string
            format: date-time
          x-position: 1
        - name: to
          in: query
          schema:
            type: string
            format: date-time
          x-position: 2
        - name: state
          in: query
          schema:
            oneOf:
              - nullable: true
                oneOf:
                  - $ref: '#/components/schemas/PurchasePointReportState'
          x-position: 3
        - name: isOrderReadyToGrant
          in: query
          schema:
            type: boolean
            nullable: true
          x-position: 4
        - name: isCancelledOrReversed
          in: query
          schema:
            type: boolean
            nullable: true
          x-position: 5
        - name: orderOriginalId
          in: query
          schema:
            type: string
            nullable: true
          x-position: 6
        - name: customerOriginalId
          in: query
          schema:
            type: string
            nullable: true
          x-position: 7
        - name: campaignIds
          in: query
          style: form
          explode: true
          schema:
            type: array
            nullable: true
            xml:
              name: ArrayOfint
              wrapped: true
            items:
              type: integer
              format: int32
              xml:
                name: int
          x-position: 8
        - name: attributionSource
          in: query
          schema:
            oneOf:
              - nullable: true
                oneOf:
                  - $ref: '#/components/schemas/PurchasePointReportAttributionSource'
          x-position: 9
        - name: pageNumber
          in: query
          schema:
            type: integer
            format: int32
            default: 1
          x-position: 10
        - name: pageSize
          in: query
          schema:
            type: integer
            format: int32
            default: 10
          x-position: 11
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportPurchasePointsResponse'
      security:
        - Basic Authentication: []
components:
  schemas:
    PurchasePointReportState:
      type: integer
      description: |-
        0 = Granted
        1 = Pending
      x-enumNames:
        - Granted
        - Pending
      enum:
        - 0
        - 1
    PurchasePointReportAttributionSource:
      type: integer
      description: |-
        0 = Exact
        1 = Inferred
      x-enumNames:
        - Exact
        - Inferred
      enum:
        - 0
        - 1
    ReportPurchasePointsResponse:
      type: object
      additionalProperties: false
      properties:
        HasPublishedSnapshot:
          type: boolean
        SnapshotStartedAt:
          type: string
          format: date-time
          nullable: true
        SnapshotCompletedAt:
          type: string
          format: date-time
          nullable: true
        LatestRunStatus:
          type: string
          nullable: true
        StatusMessage:
          type: string
          nullable: true
        IsInitialLoadComplete:
          type: boolean
        HasPendingWork:
          type: boolean
        LastSuccessfulSyncAt:
          type: string
          format: date-time
          nullable: true
        Summary:
          $ref: '#/components/schemas/ReportPurchasePointsSummary'
        Items:
          type: array
          xml:
            wrapped: true
          items:
            xml:
              name: ReportPurchasePointItem
            oneOf:
              - $ref: '#/components/schemas/ReportPurchasePointItem'
        TotalItemCount:
          type: integer
          format: int32
        PageSize:
          type: integer
          format: int32
        PageNumber:
          type: integer
          format: int32
        HasNextPage:
          type: boolean
    ReportPurchasePointsSummary:
      type: object
      additionalProperties: false
      properties:
        PendingPoints:
          type: integer
          format: int32
        PendingCashback:
          type: number
          format: decimal
        PendingOrderCount:
          type: integer
          format: int32
        GrantedPoints:
          type: integer
          format: int32
        GrantedCashback:
          type: number
          format: decimal
        GrantedOrderCount:
          type: integer
          format: int32
        CancelledOrReversedPoints:
          type: integer
          format: int32
        CancelledOrReversedCashback:
          type: number
          format: decimal
        CancelledOrReversedOrderCount:
          type: integer
          format: int32
    ReportPurchasePointItem:
      type: object
      additionalProperties: false
      properties:
        State:
          type: string
        IsCancelledOrReversed:
          type: boolean
        OrderOriginalId:
          type: string
          nullable: true
        OrderState:
          type: string
        OrderPlacementDate:
          type: string
          format: date-time
        OrderCompletedDate:
          type: string
          format: date-time
          nullable: true
        OrderCancelledDate:
          type: string
          format: date-time
          nullable: true
        OrderTotal:
          type: number
          format: decimal
        Customer:
          $ref: '#/components/schemas/ReportPurchasePointCustomer'
        Forecast:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ReportPurchasePointForecast'
        Grant:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ReportPurchasePointGrant'
    ReportPurchasePointCustomer:
      type: object
      additionalProperties: false
      properties:
        OriginalId:
          type: string
          nullable: true
        PublicId:
          type: string
          nullable: true
        Name:
          type: string
          nullable: true
        Email:
          type: string
          nullable: true
        Document:
          type: string
          nullable: true
        Phone:
          type: string
          nullable: true
    ReportPurchasePointForecast:
      type: object
      additionalProperties: false
      properties:
        CalculatedAt:
          type: string
          format: date-time
          nullable: true
        AvailableAt:
          type: string
          format: date-time
          nullable: true
        IsReadyToGrant:
          type: boolean
        Points:
          type: integer
          format: int32
        Cashback:
          type: number
          format: decimal
        Campaigns:
          type: array
          xml:
            wrapped: true
          items:
            xml:
              name: ReportPurchasePointCampaignAllocation
            oneOf:
              - $ref: '#/components/schemas/ReportPurchasePointCampaignAllocation'
    ReportPurchasePointGrant:
      type: object
      additionalProperties: false
      properties:
        PointId:
          type: integer
          format: int32
        GrantedAt:
          type: string
          format: date-time
          nullable: true
        Points:
          type: integer
          format: int32
        Cashback:
          type: number
          format: decimal
        NetPoints:
          type: integer
          format: int32
        NetCashback:
          type: number
          format: decimal
        IsCashbackEstimated:
          type: boolean
        Reversal:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ReportPurchasePointReversal'
        Campaigns:
          type: array
          xml:
            wrapped: true
          items:
            xml:
              name: ReportPurchasePointCampaignAllocation
            oneOf:
              - $ref: '#/components/schemas/ReportPurchasePointCampaignAllocation'
    ReportPurchasePointCampaignAllocation:
      type: object
      additionalProperties: false
      properties:
        CampaignId:
          type: integer
          format: int32
        CampaignName:
          type: string
        CampaignType:
          type: string
          nullable: true
        BonusPoints:
          type: integer
          format: int32
        BonusCashback:
          type: number
          format: decimal
        AttributionSource:
          type: string
    ReportPurchasePointReversal:
      type: object
      additionalProperties: false
      properties:
        Points:
          type: integer
          format: int32
        Cashback:
          type: number
          format: decimal
        IsFull:
          type: boolean
  securitySchemes:
    Basic Authentication:
      type: http
      description: Use API Basic Auth Keys
      scheme: basic

````