> ## 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/Public%20APIs/swagger.json get /v1/pub/Customer/{id}/points
openapi: 3.0.0
info:
  title: BonifiQ Public APIs
  description: "# Introduction \nThis is the BonifiQ Public APIs documentation. With these endpoints you can interact with BonifiQ systems and enhance your program points.\n\nThese Public endpoints are intended to be used in a frontend, browser-based enviroment such as with jQuery, React, Vue, etc\n\n# Limitations\nThese Public endpoints are very limited, as they are not as much secure as the [Private APIs](https://api.bonifiq.com.br/apidocs/private).\n\nPrivate informations such as e-mails, document number, phones, program points usage, etc are very limited as responses from this APIs. \n\nIf your requirement is in a more broad scenario, requiring more security or access to more information please use our [Private APIs](https://api.bonifiq.com.br/apidocs/private)\n\n# Authentication\nTo make a call from this APIs you need an API Token. This Token can be generated in BonifiQ admin panel, at the API Keys menu.\n\nAfter generating this API Token, you need to pass it from the X-BQ-ApiToken http header for every request. \n\nAs an example, for using it with a Java Script ```fetch``` call you would do:\n```\nfetch('https://api.bonifiq.com.br/v1/pub/customer/1/points', {\n\t\tmethod: 'GET',\n\t\theaders: {\n\t\t\t'X-BQ-APITOKEN': 'YOUR_API_TOKEN'\n\t\t},\n\t}).then(response => response.json()).then(response => console.log(response))\n```\n\n# How to use this page\n## Making calls\nYou can simulate, test and make calls to API from this Swagger page. To do that:\n- Click on the **Authorize** button\n- Inform the API Token and click on **Authorize**\n- From the list bellow, choose an API call and click on **Try it out**\n- Inform the required parameters (if any) and click on **Execute**\n\n## Verifying requests and responses bodies\nIn every API Call there is an explanation of what each field means, theirs types and accepted values for all Requests and Responses.\n\nTo 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: Customization
    description: Retrieve customizations for the loyalty program
paths:
  /v1/pub/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
          schema:
            type: string
          x-position: 1
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerPointsResponse'
      security:
        - TokenAuthentication: []
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
          items:
            $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.
          items:
            $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: ''
      x-enumNames:
        - Integration
        - API
        - Import
        - PDV
        - OfflineIntegration
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
  securitySchemes:
    TokenAuthentication:
      type: apiKey
      description: API Tokeen
      name: X-BQ-ApiToken
      in: header

````