Update Customer Store Credits
Function
To update customer store credits with open API
使用 open API 更新顧客購物金
URL
POST <<api_domain>>/v1/customers/:id/store_credits
Request Parameters
Parameter | Value | Description | Example |
|---|---|---|---|
id *Required |
| Customer ID | |
value |
| Credits to be added or deducted
| |
remarks |
| Reason for adding or deducting credits
| |
expires_at |
| Validity Period
| |
email_target |
| Notification with Email
| |
sms_notification_target |
| Notification with SMS
| |
Response fields
Field | Column Type | Descritption | Example |
|---|---|---|---|
customer_id |
| Customer unique ID. | 58d3440869702d39b7060000 |
credit_balance |
| Current Customer Credit | 500 |
remarks |
| Reason for adding or deducting credits | add 100 store credits |
value |
| Credits to be added or deducted | 100 |
end_at |
| Validity Period | 2021-11-30T00:00:00.000+00:00 |
Request Example
Create a Customer.
curl -X POST \
https://oapi.shoplinestg.com/v1/customers/:id/store_credits \
-H 'Accept: application/json' \
-H 'Authorization: Bearar access_token' \
-H 'Content-Type: application/json' \
-d '{
"value": 100,
"remarks": "add 100 store credits",
"expires_at": "2021-11-30"
}'Response Example
{
"customer_id": "58d3440869702d39b7060000",
"credit_balance": 500,
"remarks": "add 100 store credits",
"value": 100,
"end_at": "2021-11-30T00:00:00.000+00:00"
}Updated 13 days ago