{% include 'header.twig' %}
       </div>
    </div>
    <div class="inner-wrap">
      <div class="container-fluid">
  <div class="row">
    <div class="col-lg-10 col-lg-offset-1">
      <div class="well api">
        <div class="center-big-content-block">
          <h2 class="m-b-md title">API Docs</h2>
          <div class="table-responsive">
            <table class="table">
              <tbody>
                <tr>
                  <td class="width-40">HTTP Method</td>
                  <td>POST</td>
                </tr>
                <tr>
                  <td>API URL</td>
                        <td>{{ site["url"] }}/api/v2</td>
                     </tr>
                     {% if user['auth'] %}
                     <tr>
                        <td>API Key</td>
                        <td>{{ user["apikey"] }}</td>
                     </tr>
                     {% endif %}
                                <tr>
                  <td>Response format</td>
                  <td>JSON</td>
                </tr>
              </tbody>
            </table>
          </div>

                      <h4 class="m-t-md"><strong>Service list</strong></h4>
                    <div class="table-responsive">
              <table class="table">
                <thead>
                <tr>
                  <th class="width-40">Parameters</th>
                  <th>Description</th>
                </tr>
                </thead>
                <tbody>
                                  <tr>
                    <td>key</td>
                    <td>Your API key</td>
                  </tr>
                                  <tr>
                    <td>action</td>
                    <td>services</td>
                  </tr>
                                </tbody>
              </table>
        </div>
            
            <p><strong>Example response</strong></p>
<pre>
[
    {
        "service": 1,
        "name": "Followers",
        "type": "Default",
        "category": "First Category",
        "rate": "0.90",
        "min": "50",
        "max": "10000",
        "refill": true
    },
    {
        "service": 2,
        "name": "Comments",
        "type": "Custom Comments",
        "category": "Second Category",
        "rate": "8",
        "min": "10",
        "max": "1500",
        "refill": false
    }
]
</pre>
                      <h4 class="m-t-md"><strong>Add order</strong></h4>
                                          <p>
                <form class="form-inline">
                  <div class="form-group">
                    <select class="form-control input-sm" id="service_type">
                                                  <option value="0">Default</option>
                                                  <option value="10">Package</option>
                                                  <option value="2">Custom Comments</option>
                                                  <option value="15">Comment Likes</option>
                                            </select>
                  </div>
                </form>
                </p>
                                            <div id="type_0" style="display:none;">
                  <div class="table-responsive">
                  <table class="table">
                    <thead>
                    <tr>
                      <th class="width-40">Parameters</th>
                      <th>Description</th>
                    </tr>
                    </thead>
                    <tbody>
                                          <tr>
                        <td>key</td>
                        <td>Your API key</td>
                      </tr>
                                          <tr>
                        <td>action</td>
                        <td>add</td>
                      </tr>
                                          <tr>
                        <td>service</td>
                        <td>Service ID</td>
                      </tr>
                                          <tr>
                        <td>link</td>
                        <td>Link to page</td>
                      </tr>
                                          <tr>
                        <td>quantity</td>
                        <td>Needed quantity</td>
                      </tr>
                                          <tr>
                        <td>runs (optional)</td>
                        <td>Runs to deliver</td>
                      </tr>
                                          <tr>
                        <td>interval (optional)</td>
                        <td>Interval in minutes</td>
                      </tr>
                                        </tbody>
                  </table>
                  </div>
                </div>
                              <div id="type_10" style="display:none;">
                  <div class="table-responsive">
                  <table class="table">
                    <thead>
                    <tr>
                      <th class="width-40">Parameters</th>
                      <th>Description</th>
                    </tr>
                    </thead>
                    <tbody>
                                          <tr>
                        <td>key</td>
                        <td>Your API key</td>
                      </tr>
                                          <tr>
                        <td>action</td>
                        <td>add</td>
                      </tr>
                                          <tr>
                        <td>service</td>
                        <td>Service ID</td>
                      </tr>
                                          <tr>
                        <td>link</td>
                        <td>Link to page</td>
                      </tr>
                                        </tbody>
                  </table>
                  </div>
                </div>
                              <div id="type_2" style="display:none;">
                  <div class="table-responsive">
                  <table class="table">
                    <thead>
                    <tr>
                      <th class="width-40">Parameters</th>
                      <th>Description</th>
                    </tr>
                    </thead>
                    <tbody>
                                          <tr>
                        <td>key</td>
                        <td>Your API key</td>
                      </tr>
                                          <tr>
                        <td>action</td>
                        <td>add</td>
                      </tr>
                                          <tr>
                        <td>service</td>
                        <td>Service ID</td>
                      </tr>
                                          <tr>
                        <td>link</td>
                        <td>Link to page</td>
                      </tr>
                                          <tr>
                        <td>comments</td>
                        <td>Comments list separated by \r\n or \n</td>
                      </tr>
                                        </tbody>
                  </table>
                  </div>
                </div>
                              <div id="type_15" style="display:none;">
                  <div class="table-responsive">
                  <table class="table">
                    <thead>
                    <tr>
                      <th class="width-40">Parameters</th>
                      <th>Description</th>
                    </tr>
                    </thead>
                    <tbody>
                                          <tr>
                        <td>key</td>
                        <td>Your API key</td>
                      </tr>
                                          <tr>
                        <td>action</td>
                        <td>add</td>
                      </tr>
                                          <tr>
                        <td>service</td>
                        <td>Service ID</td>
                      </tr>
                                          <tr>
                        <td>link</td>
                        <td>Link to page</td>
                      </tr>
                                          <tr>
                        <td>quantity</td>
                        <td>Needed quantity</td>
                      </tr>
                                          <tr>
                        <td>username</td>
                        <td>Username of the comment owner</td>
                      </tr>
                                        </tbody>
                  </table>
                  </div>
                </div>
                          
            <p><strong>Example response</strong></p>
<pre>
{
    "order": 23501
}
</pre>
                      <h4 class="m-t-md"><strong>Order status</strong></h4>
                    <div class="table-responsive">
              <table class="table">
                <thead>
                <tr>
                  <th class="width-40">Parameters</th>
                  <th>Description</th>
                </tr>
                </thead>
                <tbody>
                                  <tr>
                    <td>key</td>
                    <td>Your API key</td>
                  </tr>
                                  <tr>
                    <td>action</td>
                    <td>status</td>
                  </tr>
                                  <tr>
                    <td>order</td>
                    <td>Order ID</td>
                  </tr>
                                </tbody>
              </table>
        </div>
            
            <p><strong>Example response</strong></p>
<pre>
{
    "charge": "0.27819",
    "start_count": "3572",
    "status": "Partial",
    "remains": "157",
    "currency": "USD"
}
</pre>
                      <h4 class="m-t-md"><strong>Multiple orders status</strong></h4>
                    <div class="table-responsive">
              <table class="table">
                <thead>
                <tr>
                  <th class="width-40">Parameters</th>
                  <th>Description</th>
                </tr>
                </thead>
                <tbody>
                                  <tr>
                    <td>key</td>
                    <td>Your API key</td>
                  </tr>
                                  <tr>
                    <td>action</td>
                    <td>status</td>
                  </tr>
                                  <tr>
                    <td>orders</td>
                    <td>Order IDs separated by comma</td>
                  </tr>
                                </tbody>
              </table>
        </div>
            
            <p><strong>Example response</strong></p>
<pre>
{
    "1": {
        "charge": "0.27819",
        "start_count": "3572",
        "status": "Partial",
        "remains": "157",
        "currency": "USD"
    },
    "10": {
        "error": "Incorrect order ID"
    },
    "100": {
        "charge": "1.44219",
        "start_count": "234",
        "status": "In progress",
        "remains": "10",
        "currency": "USD"
    }
}
</pre>
                      <h4 class="m-t-md"><strong>Create refill</strong></h4>
                    <div class="table-responsive">
              <table class="table">
                <thead>
                <tr>
                  <th class="width-40">Parameters</th>
                  <th>Description</th>
                </tr>
                </thead>
                <tbody>
                                  <tr>
                    <td>key</td>
                    <td>Your API key</td>
                  </tr>
                                  <tr>
                    <td>action</td>
                    <td>refill</td>
                  </tr>
                                  <tr>
                    <td>order</td>
                    <td>Order ID</td>
                  </tr>
                                </tbody>
              </table>
        </div>
            
            <p><strong>Example response</strong></p>
<pre>
{
    "refill": "1"
}
</pre>
                      <h4 class="m-t-md"><strong>Get refill status</strong></h4>
                    <div class="table-responsive">
              <table class="table">
                <thead>
                <tr>
                  <th class="width-40">Parameters</th>
                  <th>Description</th>
                </tr>
                </thead>
                <tbody>
                                  <tr>
                    <td>key</td>
                    <td>Your API key</td>
                  </tr>
                                  <tr>
                    <td>action</td>
                    <td>refill_status</td>
                  </tr>
                                  <tr>
                    <td>refill</td>
                    <td>Refill ID</td>
                  </tr>
                                </tbody>
              </table>
        </div>
            
            <p><strong>Example response</strong></p>
<pre>
{
    "status": "Completed"
}
</pre>
                      <h4 class="m-t-md"><strong>User balance</strong></h4>
                    <div class="table-responsive">
              <table class="table">
                <thead>
                <tr>
                  <th class="width-40">Parameters</th>
                  <th>Description</th>
                </tr>
                </thead>
                <tbody>
                                  <tr>
                    <td>key</td>
                    <td>Your API key</td>
                  </tr>
                                  <tr>
                    <td>action</td>
                    <td>balance</td>
                  </tr>
                                </tbody>
              </table>
        </div>
            
            <p><strong>Example response</strong></p>
<pre>
{
    "balance": "100.84292",
    "currency": "USD"
}
</pre>
                    <a href="/example.txt" class="btn btn-primary m-t" target="_blank">Example of PHP code</a>
        </div>
      </div>
    </div>
  </div>
</div>
    </div>
  </div>
{% include 'footer.twig' %}
