v1

latestOpenAPI 3.0.02026-07-26318168886.7 KB
Membership Tiers

Get Customer Membership Tier History

To get customer's membership tier action logs (e.g. level up, level down)<br> 獲取顧客的會員等級活動記錄(例如升級、降級)

get/customers/{id}/membership_tier/action_logs

Path parameters

idstring required

Customer's ID<br>顧客ID<br><br>Can only input 1 customer id at once<br>一次只能輸入一筆 customer id

Query parameters

pageinteger

Page Number<br>頁數

per_pageinteger

Numbers of records per Page<br>每頁顯示 n 筆資料

Response

OK

Example response

{
  "items": [
    {
      "key": "updated_user_membership_tier",
      "data": {
        "previous_user_membership_tier": {
          "_id": "6056c6da27e412004a2bff36",
          "name_translations": {
            "zh-hant": "VIP 1"
          }
        },
        "updated_user_membership_tier": {
          "_id": "6084cd45d7954900481bc48a",
          "name_translations": {
            "zh-hant": "VIP 2"
          }
        },
        "changes": {
          "membership_tier_id": [
            "6056c6da27e412004a2bff36",
            "6084cd45d7954900481bc48a"
          ],
          "tier_expires_at": [
            null,
            null
          ]
        },
        "fulfilled_rule": {
          "_id": "6084cd45d7954900481bc48b",
          "condition_interval": {
            "type": "single_purchase",
            "time_unit": "month"
          },
          "created_at": null,
          "effect_interval": {
            "type": "unlimited",
            "time_unit": "month"
          },
          "effect_type": "upgrade",
          "total_spending": {
            "cents": 1111,
            "currency_iso": "TWD"
          },
          "updated_at": null
        }
      },
      "merchant_id": "60c1e027a47d91004377f100",
      "status": "active",
      "performer_name": "shop",
      "performer_type": "User",
      "performer_id": "60c1e027a47d91004377f129",
      "target_ids": [
        "60c1e027a47d91004377f129"
      ],
      "target_type": "User",
      "created_at": "2021-11-02T04:06:13.304Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 24,
    "total_count": 1,
    "total_pages": 1
  }
}