Riwayat Langganan
Menampilkan aktivitas poin dan kuota milik Author, mulai dari yang terbaru. Nilai negatif menunjukkan pengurangan.
GET
/api/langganan/riwayat
Parameter Request
Query string
-
pageinteger Opsional - Nomor halaman mulai dari 1.
-
per_pageinteger Opsional - Jumlah per halaman 1–50. Default 20.
Contoh Request dan Respons
Request · cURL
curl --request GET "https://www.winnicode.com/api/langganan/riwayat" \
--header "Accept: application/json" \
--header "Authorization: Bearer TOKEN_SANCTUM_ANDA"
Respons · HTTP 200
{
"data": [
{
"id": 101,
"type": "package_exchange",
"points": -20,
"balance_after": 80,
"quota_change": 15,
"remaining_quota_after": 15,
"subscription_id": 42,
"description": "Paket Reguler aktif dengan 15 kuota artikel.",
"created_at": "2026-11-27T09:00:00+07:00"
}
],
"links": {
"first": "https://www.winnicode.com/api/langganan/riwayat?page=1",
"last": "https://www.winnicode.com/api/langganan/riwayat?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://www.winnicode.com/api/langganan/riwayat?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "https://www.winnicode.com/api/langganan/riwayat",
"per_page": 20,
"to": 1,
"total": 1
}
}
Status Respons
403- Akses memerlukan role aktif Author untuk sesi cookie atau role Author dan scope terkait untuk Bearer token.