cURL
curl --request GET \ --url https://api.zangsho.com/v1/subscriptions/events \ --header 'Authorization: Bearer <token>'
{ "data": [ { "id": 123, "customer_id": 123, "event_type": "created", "source": "api", "old_amount": "<string>", "new_amount": "<string>", "amount_change": "<string>", "old_plan": "<string>", "new_plan": "<string>", "occurred_at": "2023-11-07T05:31:56Z", "created_at": "2023-11-07T05:31:56Z" } ], "meta": { "current_page": 123, "from": 123, "last_page": 123, "per_page": 123, "to": 123, "total": 123 } }
使用 Laravel Sanctum Token 進行認證。
Token 可在商家後台的「API 設定」頁面取得。
頁碼
x >= 1
每頁筆數(最大 100)
1 <= x <= 100
篩選特定客戶的事件
篩選事件類型
created
upgrade
downgrade
cancel
reactivated
訂閱事件列表
Show child attributes