Get Customer Store Credit History
Function
To get store credit history of a customer
獲取顧客的商店購物金紀錄
URL
Get <<api_domain>>/v1/customers/:id/store_credits
Request Parameters
Parameter | Type | Description | Example |
---|---|---|---|
:id *required | String | Customer ID 顧客 ID | 5f47c96a86a983001614a834 |
Response Fields
Field | Type | Description | Example |
---|---|---|---|
items | Store Credit History[] | Store credit history data 商店購物金紀錄 | Please check the link on the left |
pagination | Pagination ] | Pagination Data 頁面資訊資訊 | Please check the link on the left |
Response Example
{
"items": [
{
"_id": "60cc4152adce28001a608f00",
"customer_id": "5d8aeef5a7c9dd1c75263b98",
"credit_balance": 2,
"remarks": "10 credits",
"value": 99,
"fulfillment_balance": null,
"end_at": null,
"performer_id": "5d8aed1bb31a6800336a548f",
"performer_name": "philip+postman",
"type": "manual_credit",
"created_at": "2021-06-18T06:46:42.517Z",
"customer_ref_user_id": null,
"status": "active",
"is_redeem": true,
"order_id": null,
"value_dollar": {
"cents": 99,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$99",
"dollars": 99.0
},
"user_credit_rule_id": null,
"order_wapos_id": null,
"order_number": null,
"merchant_order_number": null,
"order_created_by": null
},
...
{
"_id": "5d8affeede2a771c5bf098da",
"customer_id": "5d8aeef5a7c9dd1c75263b98",
"credit_balance": 10,
"remarks": "10 credits",
"value": 10,
"fulfillment_balance": null,
"end_at": "2020-11-30T00:00:00.000+00:00",
"performer_id": "5d8aed1bb31a6800336a548f",
"performer_name": "philip+postman",
"type": "manual_credit",
"created_at": "2019-09-25T05:49:34.992Z",
"customer_ref_user_id": null,
"status": "expired",
"is_redeem": false,
"order_id": null,
"value_dollar": {
"cents": 10,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$10",
"dollars": 10.0
},
"user_credit_rule_id": null,
"order_wapos_id": null,
"order_number": null,
"merchant_order_number": null,
"order_created_by": null
}
],
"pagination": {
"current_page": 1,
"per_page": 24,
"total_pages": 1,
"total_count": 7
}
}
{
"items": [
{
"_id": "6229c918144b53004ad62e8f",
"customer_id": "62258363b9675500171c4e2e",
"credit_balance": 2340,
"remarks": "2222",
"value": 50,
"fulfillment_balance": 0,
"end_at": null,
"performer_id": "61235f9b0add5d00441a5118",
"performer_name": "Sadmin_SandyShop",
"type": "manual_credit",
"created_at": "2022-03-10T09:47:04.574Z",
"customer_ref_user_id": null,
"status": "active",
"is_redeem": false,
"order_id": null,
"value_dollar": {
"cents": 50,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$50",
"dollars": 50.0
},
"user_credit_rule_id": null,
"order_wapos_id": null,
"order_number": null,
"merchant_order_number": null,
"order_created_by": null
},
{
"_id": "6229c874144b530044d62e8e",
"customer_id": "62258363b9675500171c4e2e",
"credit_balance": 2290,
"remarks": "tedt",
"value": 100,
"fulfillment_balance": 100,
"end_at": "2022-03-20T15:59:59.999+00:00",
"performer_id": "61235f9b0add5d00441a5118",
"performer_name": "Sadmin_SandyShop",
"type": "manual_credit",
"created_at": "2022-03-10T09:44:20.475Z",
"customer_ref_user_id": null,
"status": "active",
"is_redeem": false,
"order_id": null,
"value_dollar": {
"cents": 100,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$100",
"dollars": 100.0
},
"user_credit_rule_id": null,
"order_wapos_id": null,
"order_number": null,
"merchant_order_number": null,
"order_created_by": null
},
{
"_id": "6229c7f4144b53004ad62e8e",
"customer_id": "62258363b9675500171c4e2e",
"credit_balance": 2190,
"remarks": "asddas",
"value": 2100,
"fulfillment_balance": 0,
"end_at": null,
"performer_id": "61235f9b0add5d00441a5118",
"performer_name": "Sadmin_SandyShop",
"type": "manual_credit",
"created_at": "2022-03-10T09:42:12.499Z",
"customer_ref_user_id": null,
"status": "active",
"is_redeem": false,
"order_id": null,
"value_dollar": {
"cents": 2100,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$2,100",
"dollars": 2100.0
},
"user_credit_rule_id": null,
"order_wapos_id": null,
"order_number": null,
"merchant_order_number": null,
"order_created_by": null
},
{
"_id": "622983c1144b530044eab481",
"customer_id": "62258363b9675500171c4e2e",
"credit_balance": 90,
"remarks": "1111",
"value": 10,
"fulfillment_balance": 0,
"end_at": null,
"performer_id": "61235f9b0add5d00441a5118",
"performer_name": "Sadmin_SandyShop",
"type": "manual_credit",
"created_at": "2022-03-10T04:51:13.855Z",
"customer_ref_user_id": null,
"status": "active",
"is_redeem": true,
"order_id": null,
"value_dollar": {
"cents": 10,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$10",
"dollars": 10.0
},
"user_credit_rule_id": null,
"order_wapos_id": null,
"order_number": null,
"merchant_order_number": null,
"order_created_by": null
},
{
"_id": "6229839a144b530047eab481",
"customer_id": "62258363b9675500171c4e2e",
"credit_balance": 100,
"remarks": "szdad",
"value": 100,
"fulfillment_balance": 90,
"end_at": "2022-03-20T15:59:59.999+00:00",
"performer_id": "61235f9b0add5d00441a5118",
"performer_name": "Sadmin_SandyShop",
"type": "manual_credit",
"created_at": "2022-03-10T04:50:34.756Z",
"customer_ref_user_id": null,
"status": "active",
"is_redeem": false,
"order_id": null,
"value_dollar": {
"cents": 100,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$100",
"dollars": 100.0
},
"user_credit_rule_id": null,
"order_wapos_id": null,
"order_number": null,
"merchant_order_number": null,
"order_created_by": null
},
{
"_id": "6225849da5c5c501c9bc34f9",
"customer_id": "62258363b9675500171c4e2e",
"credit_balance": 0,
"remarks": "",
"value": 50,
"fulfillment_balance": 0,
"end_at": null,
"performer_id": null,
"performer_name": null,
"type": "applied_credit",
"created_at": "2022-03-07T04:05:49.903Z",
"customer_ref_user_id": null,
"status": "active",
"is_redeem": true,
"order_id": "6225849da5c5c501c9bc34f1",
"value_dollar": {
"cents": 50,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$50",
"dollars": 50.0
},
"user_credit_rule_id": null,
"order_wapos_id": null,
"order_number": "20220307040549844",
"merchant_order_number": null,
"order_created_by": "shop"
},
{
"_id": "62258380a5c5c501c5bc34f0",
"customer_id": "62258363b9675500171c4e2e",
"credit_balance": 50,
"remarks": null,
"value": 50,
"fulfillment_balance": 0,
"end_at": null,
"performer_id": "60eeb3fee7812d00400a4b0f",
"performer_name": null,
"type": "welcome_credit",
"created_at": "2022-03-07T04:01:04.344Z",
"customer_ref_user_id": null,
"status": "active",
"is_redeem": false,
"order_id": null,
"value_dollar": {
"cents": 50,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "NT$50",
"dollars": 50.0
},
"user_credit_rule_id": null,
"order_wapos_id": null,
"order_number": null,
"merchant_order_number": null,
"order_created_by": null
}
],
"pagination": {
"current_page": 1,
"per_page": 24,
"total_pages": 1,
"total_count": 7
}
}
Updated 12 months ago