HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

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

ParameterTypeDescriptionExample
:id
*required
StringCustomer ID
顧客 ID
5f47c96a86a983001614a834

Response Fields

FieldTypeDescriptionExample
itemsStore Credit History[]Store credit history data
商店購物金紀錄
Please check the link on the left
paginationPagination ]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
    }
}