> ## 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 a timeline history of points usage from the customer

> This endpoint includes tier changes. If 'IsTierHistory' is true, disregard the use of 'PointType' and use 'TierUpdate' instead.



## OpenAPI

````yaml https://api.bonifiq.com.br/swagger/Private%20APIs/swagger.json post /v1/pvt/Customer/{id}/history
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}/history:
    post:
      tags:
        - Customer
      summary: Returns a timeline history of points usage from the customer
      description: >-
        This endpoint includes tier changes. If 'IsTierHistory' is true,
        disregard the use of 'PointType' and use 'TierUpdate' instead.
      operationId: Customer_History
      parameters:
        - name: id
          in: path
          required: true
          description: Id from the client`s store, usually email address
          schema:
            type: string
          x-position: 1
        - name: PageNumber
          in: query
          description: Pagenation number
          schema:
            type: integer
            format: int32
          x-position: 2
        - name: PageSize
          in: query
          description: Amount of items per page, Max size is 50 items per page.
          schema:
            type: integer
            format: int32
          x-position: 3
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BaseExternalApiListResponseOfPointHistoryResponse
      security:
        - Basic Authentication: []
components:
  schemas:
    BaseExternalApiListResponseOfPointHistoryResponse:
      type: object
      description: Base List response model methods
      additionalProperties: false
      properties:
        Items:
          type: array
          description: Collection with the found entities on the bonifiq DB.
          nullable: true
          xml:
            wrapped: true
          items:
            xml:
              name: PointHistoryResponse
            oneOf:
              - $ref: '#/components/schemas/PointHistoryResponse'
        TotalItemCount:
          type: integer
          description: Total of rewards Configurations founds.
          format: int32
        PageSize:
          type: integer
          description: Pagination size
          format: int32
        PageNumber:
          type: integer
          description: Actual Page Number
          format: int32
        HasNextPage:
          type: boolean
          description: true if there is another page to be load.
        HasError:
          type: boolean
          description: If true the request had an error.
        ErrorMessages:
          type: array
          description: List with the error messages
          xml:
            wrapped: true
          items:
            type: string
            xml:
              name: string
    PointHistoryResponse:
      type: object
      additionalProperties: false
      properties:
        Date:
          type: string
          description: Date when the point was given or taken
          format: date-time
        Points:
          type: integer
          description: >-
            Amount of points received or used. For points received (such as
            points for purchase) it will be positive. For points taken (such as
            points used in purchases) it will be negative
          format: int32
        Title:
          type: string
          description: Quick description of the event
        PointType:
          description: |-
            0 - Purchase points
            1 - Account creation points
            2 - Birthday points
            3 - Admin-generated points. Can be either positive or negative
            4 - Points used in a reward
            5 - Review points
            6 - Points refunded (for cancelled purchases)
            7 - Points expired
            8 - Points for referral 
          oneOf:
            - $ref: '#/components/schemas/PointType'
        IsCanceled:
          type: boolean
          description: If true this points was used and canceled afterwards
        CouponCode:
          type: string
          description: If this reward contains a coupon this field represents it
          nullable: true
        CouponRefunded:
          type: boolean
          description: true if the coupon was refunded and cannot be used
        CouponIsUsed:
          type: boolean
          description: True if the coupon was used in a purchase and cannot be used again
        CouponIsAvailable:
          type: boolean
          description: >-
            If true the Coupon in the field `CouponCode` can be used in a
            purchase
        CashbackDescription:
          type: string
          nullable: true
        CashbackValue:
          type: number
          description: >-
            If cashback is enabled this field will contain the value of the
            cashback otherwise it will be zero
          format: decimal
        IsTierHistory:
          type: boolean
          description: If true the fields is about tier change
        TierUpdate:
          description: |-
            0 - Upgrade
            1 - Downgrade
                        
          oneOf:
            - $ref: '#/components/schemas/CustomerTierUpdate'
        TierName:
          type: string
          description: Tier name that was applied
          nullable: true
        Metadatas:
          type: array
          description: >-
            List of metadata associated with this point. A metadata can came
            from when inserting an order or redeeming a reward
          xml:
            wrapped: true
          items:
            xml:
              name: PointHistoryResponseMetadata
            oneOf:
              - $ref: '#/components/schemas/PointHistoryResponseMetadata'
    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
    CustomerTierUpdate:
      type: integer
      description: |-
        0 = Upgrade
        1 = Downgrade
      x-enumNames:
        - Upgrade
        - Downgrade
      enum:
        - 0
        - 1
    PointHistoryResponseMetadata:
      type: object
      additionalProperties: false
      properties:
        Name:
          type: string
        Value:
          type: string
  securitySchemes:
    Basic Authentication:
      type: http
      description: Use API Basic Auth Keys
      name: Basic Authentication
      in: header
      scheme: basic

````