---
title: "Returns the customer's paginated points and tier history"
method: POST
path: "/v1/pvt/Customer/{id}/history"
tags: ["Customer"]
---

# Returns the customer's paginated points and tier history

`POST /v1/pvt/Customer/{id}/history`

## Request

- Base URL: `https://api.bonifiq.com.br`
- URL: `https://api.bonifiq.com.br/v1/pvt/Customer/{id}/history`
- Auth: HTTP basic

This endpoint includes tier changes. If 'IsTierHistory' is true, disregard the use of 'PointType' and use 'TierUpdate' instead.
            
On success, returns HTTP 200 with `hasError: false`, `items` and pagination metadata.
An existing customer with no history returns an empty `items` array.
If the customer is not found, returns HTTP 400 (Bad Request) with `hasError: true`
and `errorMessages: ["Customer not found"]`, rather than HTTP 404 or a successful empty list.
This list response does not expose `errorCode` or `customerId` as an error field;
callers should check the HTTP status and `hasError`, and read `errorMessages` for details.
Pagination metadata in an error response does not represent a successful query.

## Path parameters

- `id` string, required

## Query parameters

- `PageNumber` integer
- `PageSize` integer

## Response `200`

Customer found; returns the requested history page, which may be empty.

- BaseExternalApiListResponseOfPointHistoryResponse: Base List response model methods
  - `Items` object[], nullable: Collection with the found entities on the bonifiq DB.
    - `Date` string, date-time: Date when the point was given or taken
    - `Points` integer: 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
    - `Title` string: Quick description of the event
    - `PointType` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19: 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
    - `IsCanceled` boolean: If true this points was used and canceled afterwards
    - `CouponCode` string, nullable: If this reward contains a coupon this field represents it
    - `CouponRefunded` boolean: true if the coupon was refunded and cannot be used
    - `CouponIsUsed` boolean: True if the coupon was used in a purchase and cannot be used again
    - `CouponIsAvailable` boolean: If true the Coupon in the field `CouponCode` can be used in a purchase
    - `CashbackDescription` string, nullable
    - `CashbackValue` number: If cashback is enabled this field will contain the value of the cashback otherwise it will be zero
    - `IsTierHistory` boolean: If true the fields is about tier change
    - `TierUpdate` 0 | 1: 0 = Upgrade 1 = Downgrade
    - `TierName` string, nullable: Tier name that was applied
    - `Metadatas` object[]: List of metadata associated with this point. A metadata can came from when inserting an order or redeeming a reward
      - `Name` string
      - `Value` string
  - `TotalItemCount` integer: Total of rewards Configurations founds.
  - `PageSize` integer: Pagination size
  - `PageNumber` integer: Actual Page Number
  - `HasNextPage` boolean: true if there is another page to be load.
  - `HasError` boolean: If true the request had an error.
  - `ErrorMessages` string[]: List with the error messages

---

[API](https://skmtc.dev/bonifiq/apis/bonifiq-private-apis.md) - [All operations](https://skmtc.dev/bonifiq/apis/bonifiq-private-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/bonifiq/apis/bonifiq-private-apis/revisions/bac0977b23d5?raw)
