Member Points

Bulk Update Member Points

Changed on

Bulk update multiple user member points records. <br> 批量更新多個 users 點數

post/member_points/bulk_update

Request

  • Base URL
    https://open.shopline.io/v1
  • URL
    https://open.shopline.io/v1/member_points/bulk_update
  • Auth
    HTTP bearer

Request body

user_idsstring[] required

List of user IDs to update. <br> user ID 的列表,指定要更新的 user

valueinteger required

The value to set for each user's member points. <br> 要給予每個 user 的點數數量

remarksstring required

Remarks for the member points update. <br> 點數更新的備註

performer_idstring

The User ID of the performer making the update. Optional. <br> 執行者 User ID

email_target1 | 3

Allowed 1 & 3. 1 means not send, 3 means send all. <br> 電子郵件是否發送,1為不發送,3為發送

sms_notification_target1 | 2 | 3

Allowed 1~3. 1 means not send, 2 means send with verified, 3 means send all. <br> 簡訊是否發送通知,1為不發送,2為發送至驗證手機,3為全部發送

expire_datestring date nullable

Expiry date in YYYY-MM-DD format. null means never expires. If not provided, the global expiry rule will be applied. Requires feature flag member_points_expiry_enhancement. <br> 點數到期日(YYYY-MM-DD 格式)。傳 null 代表永不過期,不傳則沿用全域到期規則。 需啟用 member_points_expiry_enhancement 功能。

include_blacklistedboolean

Whether to include blacklisted (login/order-banned, status=blacklisted) customers as recipients. Default false. <br> 是否將黑名單(禁止登入下單,status=blacklisted)顧客納入發放對象,預設 false

Example request

{
  "user_ids": [
    "6512a1b2c3d4e5f601234567",
    "6512a1b2c3d4e5f601234568"
  ],
  "value": 100,
  "remarks": "Holiday bonus",
  "performer_id": "performer1",
  "email_target": 1,
  "sms_notification_target": 1,
  "expire_date": "2026-12-31"
}

Response

Successfully updated the member points. <br> 成功更新點數記錄

resultboolean required

True when the batch was accepted and queued. This confirms acceptance only, not that every point grant has completed yet.

job_idstring required

ID of the queued batch job that grants the points. Report it to the merchant so they can trace the batch in SHOPLINE Admin.

Example response

{
  "result": true,
  "job_id": "67596dd037cdd80016e58022"
}

Changes

    • breaking

      request body became required

    • breaking

      the request property's minItems was increased to 1

    • breaking

      the request property's minLength was increased from 0 to 1

    • breaking

      the / request property's minLength was increased from 0 to 1

    • breaking

      the request property format changed from no format to date

    • breaking

      the request property type changed from number to integer

    • warning

      the request property's maxLength was set to 50

    • warning

      the request property's max was set to 999999.00

    • warning

      the request property's min was set to 1.00

    • warning

      removed the optional property from the response with the status

    • info

      the request property default value false was added

    • info

      the response property became required for the status

    • info

      added the required property to the response with the status