View file api_docs/endpoints/block_user/content.phtml

File size: 2.01Kb
<div class="content__inner">
    <h2>Block user profile</h2>
    <p>
        Please use this <strong>(<?php echo cl_link("mobile_api/block_user"); ?>) API for access user profile blocking endpoint</strong> 
    </p>
    <h5 class="text-red">
        <b>IMPORTANT!</b>
    </h5>
    <p>
        Please note that if you request this api again, the user will be unblocked. That is, the first call blocks and the second unlocks
    </p>
    <br>
    <h4 class="table-title">Post 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>user_id</td>
                <td>User int ID</td>
                <td>
                    E.g. 12
                </td>
            </tr>
        </tbody>
    </table>
    <h4 class="table-title">Block success response</h4>
    <div class="code-holder">
        <div class="code-holder-inner">
    <pre><code class="json">{
    "code": 200,
    "message": "User profile blocked successfully",
    "data": []
}
</code></pre>
        </div>
    </div>
    <h4 class="table-title">Unblock success response</h4>
    <div class="code-holder">
        <div class="code-holder-inner">
    <pre><code class="json">{
    "code": 200,
    "message": "User profile unblocked successfully",
    "data": []
}
</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": 400,
    "message": "User ID is missing or invalid",
    "data": []
}
</code></pre>
        </div>
    </div>
</div>