View file api_docs/endpoints/create_swift/includes/register-view.phtml

File size: 1.93Kb
<div class="content__inner">
    <h2>Register swift view</h2>
    <p>
        Please use this <strong>(<?php echo cl_link("mobile_api/reg_swift_view"); ?>)</strong> API endpoint for registering swift views
    </p>
    <p>
        This endpoint is needed in order to send a request to the server when the swift is opened so that the system registers the swift view.
    </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>​Swift user ID</td>
                <td>
                    E.g. `10`
                </td>
            </tr>
            <tr>
                <td>swid</td>
                <td>​Swift hash id</td>
                <td>
                    E.g. `zpad2HalsbsLGhdI`
                </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": "Swift view registered 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,
        "data":[],
        "message": "User ID is not valid or missing"
    }
    </code></pre>
        </div>
    </div>
</div>