Update Customer Member Points
Function
Using open API to update customer member points
URL
POST <<api_domain>>/v1/customers/:id/member_points
若要使用此 API ,請確認店家是否已經開啟會員點數總開關以及設定點數規則Please make sure the "Member Points Toggle" has been set to "ON" and the point-earning rules has been set up before using this API.
Request Parameters
Parameter | Column Type | Description | Example |
|---|---|---|---|
id *Required |
| Customer ID |
|
value |
| Points to be added or deducted
|
|
remarks |
| Reason for adding or deducting member points
| |
email_target | integer | Notification with Email | 1=NOT_SEND全部不送 |
sms_notification_target | integer | Notification with SMS | 1=NOT_SEND全部不送
|
Response Fields
Field | Column Type | Descritption | Example |
|---|---|---|---|
customer_id |
| Customer ID | 5e0047dfc4101900263b1450 |
point_balanc |
| Current Customer's Member Points | 200 |
remarks |
| Reason for adding or deducting credits | add 100 member points |
value |
| Points to be added or deducted | 100 |
end_at |
| Expiry Date of added/deducted points
| 2021-09-14T16: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 '{
"id": "5e0047dfc4101900263b1450",
"value": 100,
"remarks": "add 100 member points",
}'Response Example
Also same with Get Order
{
"customer_id": "5e0047dfc4101900263b1450",
"point_balance": 200,
"remarks": "add 100 member points",
"value": 100,
"end_at": "2021-09-14T16:00:00.000+00:00"
}Error Message
Content | Description |
|---|---|
| Response with this message in following situations: |
| Response with this message when value is 0 |
| Response with this message when value is not available
|
| If you send a remarks with more than 50 characters |
| If you send a remark with empty value |
| If you doesn't send remarks value or field
|
| If the token you use has no authority to add/deduct points. |
| If you don't have member points function |
| If you haven't setup the member points rules. |
Updated 13 days ago