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

# Retrieve the amount of points of a given customer



## OpenAPI

````yaml https://api.bonifiq.com.br/swagger/Private%20APIs/swagger.json get /v1/pvt/Customer/{id}/points
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/Customer/{id}/points:
    get:
      tags:
        - Customer
      summary: Retrieve the amount of points of a given customer
      operationId: Customer_Points
      parameters:
        - name: id
          in: path
          required: true
          description: Id from the client`s store, usually email address
          schema:
            type: string
          x-position: 1
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerPointsResponse'
      security:
        - Basic Authentication: []
components:
  schemas:
    CustomerPointsResponse:
      type: object
      description: Customer Points Response Model
      additionalProperties: false
      properties:
        CustomerExists:
          type: boolean
          description: If True the customer was found on the Bonifiq DB
        InternalId:
          type: string
          description: ID for this customer on the Bonifiq DB
        PointsBalance:
          type: integer
          description: Amount of points for this customer.
          format: int32
        PointsToExpire:
          type: array
          xml:
            wrapped: true
          items:
            xml:
              name: CustomerPointsToExpire
            oneOf:
              - $ref: '#/components/schemas/CustomerPointsToExpire'
        CashbackBalance:
          type: number
          description: >-
            When the cashback reward is active it returns the amount (in R$) of
            cashback the customer have

            Returns 0 when the cashback is inactive 
          format: decimal
        RedeemKey:
          type: string
          description: Returns a key for this given point change
          nullable: true
        PointHistory:
          type: array
          description: A detailed list of point transactions for the customer.
          xml:
            wrapped: true
          items:
            xml:
              name: PointDetailItem
            oneOf:
              - $ref: '#/components/schemas/PointDetailItem'
        Name:
          type: string
    CustomerPointsToExpire:
      type: object
      description: Customer Points to expire Model
      additionalProperties: false
      properties:
        Points:
          type: integer
          description: Amount of Points
          format: int32
        When:
          type: string
          description: Expiration Date of the points
          format: date-time
    PointDetailItem:
      type: object
      description: Represents a single point transaction detail.
      additionalProperties: false
      properties:
        Id:
          type: integer
          description: The unique identifier for the point transaction.
          format: int64
        IsCanceled:
          type: boolean
          description: Indicates whether this history item was canceled.
        DateReceived:
          type: string
          description: The date when the points were received or redeemed.
          format: date-time
        ExpirationDate:
          type: string
          description: The calculated expiration date for these points.
          format: date-time
          nullable: true
        Amount:
          type: integer
          description: >-
            The amount of points in this transaction (positive for received,
            negative for redeemed).
          format: int32
        CashbackAmount:
          type: number
          description: >-
            The amount of cashback associated with this transaction, if
            applicable.
          format: decimal
          nullable: true
        BranchId:
          type: string
          description: >-
            The ID of the branch associated with the point transaction (if
            applicable, e.g., from an order).
          nullable: true
        BranchName:
          type: string
          description: >-
            The name of the branch associated with the point transaction (if
            applicable, e.g., from an order).
          nullable: true
        OrderOrigin:
          description: >-
            The order origin associated with the point transaction when the
            point comes from a purchase order.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/OrderOrigin'
        OrderOriginDescription:
          type: string
          description: >-
            Human-readable description for the order origin when the point comes
            from a purchase order.
          nullable: true
        PointType:
          type: integer
          description: >-
            The type of the point transaction (e.g., Purchase, Signup, Birthday,
            etc.).
          format: int32
          nullable: true
        PointTypeDescription:
          type: string
          description: Human-readable description of the point type.
          nullable: true
    OrderOrigin:
      type: integer
      description: |-
        0 = Integration
        1 = API
        2 = Import
        3 = PDV
        4 = OfflineIntegration
      x-enumNames:
        - Integration
        - API
        - Import
        - PDV
        - OfflineIntegration
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
  securitySchemes:
    Basic Authentication:
      type: http
      description: Use API Basic Auth Keys
      name: Basic Authentication
      in: header
      scheme: basic

````