Spend Loyalty Points

Last Updated on : 2024-01-12 02:44:07download

Users spend loyalty points at the specified store.

API address

POST: /v1.0/cloud/ecm/store/point/spend

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
mall_codeString trueThe code of the specified mall.
shop_codeString trueThe code of the specified store.
user_idString trueThe user ID (UID).
point_numInteger trueThe number of loyalty points.

Return parameter

Parameter nameTypeDescription
tidStringThe link ID.
successBooleanIndicates whether the operation is successful.
tLongThe timestamp.

Request example

POST: /v1.0/cloud/ecm/store/point/spend
  "mall_code": "8h*****",
  "shop_code": "Pd*****",
  "user_id": "sh*****",
  "point_num": 10

Return example

    "tid": "c4*****",
    "t": 1703732219617,
    "success": true

Error code

For more information, see error code.

Error codeError messageDescription
21000000unknown errorAn unknown error occurs.
21000001user not foundThe user does not exist.
21000002mall not existThe mall does not exist.
21000003shop not existThe store does not exist.
21000004app not foundThe app does not exist.
21000005invalid paramThe request parameter is invalid.
21000006insufficient pointsThere are insufficient loyalty points available.