HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Get Customer Member points History

GET https://open.shopline.io/v1/customers/:id/member_points

To get member points history of a customer
獲取顧客的會員點數紀錄

Request Sample

curl --request GET \
     --url <<api_domain>>/v1/customers/id/member_points \
     --header 'Accept: application/json'

Path Param

ParameterColumn TypeDescriptionExample
Customer IDStringCustomer ID
顧客 ID
5f47c96a86a983001614a834

Query Param

ParameterColumn TypeDescriptionExample
pageintegerpage number
per_pageintegernumber of item per page

Sample Response

{
  "items": [
    {
      "customer_id": "5f8e5dc08a8bb70a5c9cd93c",
      "point_balance": 500,
      "remarks": "Reward",
      "value": 100,
      "is_redeem": false,
      "order_id": "5f8e5dc08a8bb70a5c9cd93d",
      "order_number": "20220510031943602",
      "expire_at": "2020-10-20T03:50:00.323Z",
      "created_at": "2020-09-12T03:21:00.512Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 24,
    "total_count": 1,
    "total_pages": 1
  }
}

Response Param

FieldTypeDescriptionExample
items[].customer_idStringCustomer ID
items[].point_balanceintegerMember Point
現有點數
items[].remarkStringPoint Change Reason
點數更動原因
items[].valueintegerPoint (always +ve)
點數
items[].is_redeemis_redeemRedeemed? (true for point deduction instead of increment)
已兌換?
items[].order_idStringOrder ID
訂單 ID
"5f8e5dc08a8bb70a5c9cd93d"
items[].order_numberStringOrder Number
訂單編號
"20220510031943602"
items[].expired_atStringExpiry date, a null value means never expired
到期日期, null 表示不會到期
items[].created_atStringCreated Time
點數創建時間
paginationPagination ]Pagination Data
頁面資訊資訊