File size: 2.73Kb
<div class="content__inner">
<h2>Get notifications / Mentions</h2>
<p>
Please use this <strong>(<?php echo cl_link("mobile_api/get_notifications"); ?>) API for accessing the endpoint of fetching user notifications & mentions</strong>
</p>
<br>
<h4 class="table-title">Get parameters</h4>
<table class="table table-bordered">
<thead>
<tr>
<th width="15%">Field</th>
<th width="25%">Value</th>
<th width="45%">Remarks</th>
</tr>
</thead>
<tbody>
<tr>
<td>session_id</td>
<td>Access token ID</td>
<td>
E.g. de25cc16eb00960f076...
</td>
</tr>
<tr>
<td>type</td>
<td>Notification type (notifs/mentions)</td>
<td>
E.g. `notifs`
</td>
</tr>
<tr>
<td>page_size</td>
<td>Total records limit for each request</td>
<td>
Recommended: 20
</td>
</tr>
<tr>
<td>offset</td>
<td>Last record offset ID</td>
<td>
This is only needed when loading records of the pagination system.
</td>
</tr>
</tbody>
</table>
<h4 class="table-title">Success response</h4>
<div class="code-holder">
<div class="code-holder-inner">
<pre><code class="json">{
"code": 200,
"message": "Fetched successfully",
"data": [
{
"id": 36,
"notifier_id": 73,
"recipient_id": 7,
"status": "0",
"subject": "subscribe",
"entry_id": 73,
"json": "[]",
"time": "19 hours ago",
"username": "thomas_dugelman",
"avatar": "http://colibri.loc/upload/default/avatar.png",
"verified": "1",
"name": "Thomas Dugelman",
"url": "http://colibri.loc/@thomas_dugelman"
},
{...}
]
}
</code></pre>
</div>
</div>
<h4 class="table-title">Error responses</h4>
<div class="code-holder">
<div class="code-holder-inner">
<pre><code class="json">{
"code": 401,
"data": [],
"message": "Unauthorized Access"
}
{
"code": 404,
"message": "No data found",
"data": []
}
{
"code": 400,
"message": "The type of notification is missing or invalid. Please check your details",
"data": []
}
</code></pre>
</div>
</div>
</div>