HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall/buyercall/blueprints/api_doc/templates/api_doc/index.html
<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>BuyerCall API</title>
        <link rel="stylesheet" type="text/css" href="/static/swagger/css/swagger-ui.css" >
        <link rel="stylesheet" type="text/css" href="/static/swagger/css/swagger-custom.css" >
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
        <link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font/css/materialdesignicons.min.css">

    </head>

    <body>
    <div class="swagger-ui">
        <div class="information-container-new wrapper">
            <section class="block col-12">
                <div>
                    <div class="info">
                        <hgroup class="main">
                            <img src="https://s3-us-west-2.amazonaws.com/buyercall-logo/logo_buyercall_yellow.png" style="float:left; margin-right:15px;" alt="Buyercall Logo" width="11%">
                            <h2 class="title">BuyerCall API
                                <small>
                                    <pre class="version"></pre>
                                </small>
                            </h2>
                            <pre class="base-url"></pre>
                        </hgroup>
                        <div class="description">
                            <h4 class="main-title">BuyerCall Partner API Version 2.0</h4>
                            <p>Welcome to the BuyerCall Partner API documentation. This API version is intended
                                for BuyerCall Partner clients only. In this documentation you will find all the
                                necessary API endpoints to perform operations such as outbound text messages and
                                outbound calls.<br><br />
                                Please refer to our getting started section below to get started with
                                the BuyerCall Partner API.
                                Please <a href="mailto:support@buyercall.com">email us</a>
                                if you have any questions or comments.
                            </p>
                        </div>
                    </div>
                </div>
            </section>
        </div>

        <div class="wrapper">
            <section class="block col-12 block-desktop col-12-desktop click-section section-closed">
                <section class="models section-parent">
                    <h4>
                        <span>How to Get Started</span>
                        <svg width="20" height="20" class="change-me">
                            <use xlink:href="#large-arrow"></use>
                        </svg>
                    </h4>
                    <div style="height: auto; border: none; margin: 0px; padding: 0px; display:none; font-size:14px;" class="doc-section">
                        <div style="height: auto; border: none; margin: 0px; padding: 0px;">
                            <div id="section-getting-started" class="model-container">
                                <span class="models-jump-to-path">
                                </span>
                                <span class="model-box">
                                    <span style="cursor: pointer;">
                                        <span class="model-box">
                                            <p>The BuyerCall Partner API, version 2.0, is a RESTful API that utilize
                                                standard request methods, such as POST, GET, PUT and DELETE, to perform
                                                various BuyerCall operations. It consumes
                                                and produces all data objects in JSON format. The API
                                            can only be access through a partnership authentication token.
                                                <a href="mailto:support@buyercall.com">Email us</a>
                                                if you would
                                                like to sign-up for our partner program.</p>
                                            <h5>Requirements</h5>
                                            <p>
                                                To be able to connect, implement and utilize the BuyerCall Partner API
                                                you would need to meet the following requirements:
                                                <ul>
                                                    <li>
                                                        <b>BuyerCall Partner Account Credentials</b> - You will need BuyerCall Partner account login credentials to access the
                                                        BuyerCall Partner API. If you do not have a partner account yet
                                                         <a href="mailto:support@buyercall.com">contact us</a> to
                                                        get setup.
                                                    </li>
                                            <br />
                                                    <li>
                                                        <b>Bearer Authentication Token</b> - For authentication you would need to generate a bearer token. This can be done
                                                        through the API section in the BuyerCall application. Once you've logged into
                                                        BuyerCall navigate to <code class="code">https://buyercall.com/settings/rest_api</code>. On
                                                        the rest_api page you will be able to generate a bearer token, which you will
                                                        send as part of your header request to authenticate. <b>PLEASE NOTE:</b> Once you've generate a token
                                                        you will not be able to view or retrieve the token again. It's recommended that the token be saved
                                                        somewhere safe. If you loose your token you can always generate a new one following the steps above.
                                                    </li>
                                            <br />
                                                    <li>
                                                        <b>Some programming knowledge</b> - If you plan to consume and test the API through your own application you would need
                                                        some programming knowledge and experience working with JSON objects.
                                                        However, you can still test the API, without any technical knowledge, using
                                                        the API explorer tool below.
                                                    </li>
                                                </ul>
                                            </p>
                                            <h5>Authentication</h5>
                                            <p>
                                                The BuyerCall Partner API can be utilized to access all your communication data
                                                using your own application, through a JSON HTTP interface,
                                                as specified in <a href="https://tools.ietf.org/html/rfc6750">RFC6750</a>. To access the API securely you need to
                                                generate a bearer token, if you haven't done so yet, by following the requirement steps above.
                                            </p>
                                            <h5>Example</h5>
                                            <p>For example, to retrieve partner accounts with the BuyerCall Partner API, you will have to send a GET request to the <code class="code">/api/v2/accounts/{paid}</code> endpoint of the BuyerCall application, providing the authorization token in the HTTP header and replacing <code class="code">{paid}</code> in the URL with the desired partner account Id.</p>
                                            <p>To test the API from the command-line - assuming your authorization token is <code class="code">74fc9d2d-5c39-47cd-8551-1bd73d50cf5e</code> (use your own token) and the desired partnership account Id is <code class="code">35</code> (use one of your own account Ids), try entering the following in a Unix command line:</p>
                                            <p>
                                            <kbd>curl -H "Authorize: Bearer 74fc9d2d-5c39-47cd-8551-1bd73d50cf5e" https://buyercall.com/api/v2/accounts/35</kbd>
                                            </p>
                                            <p>The result should look something like: </p>
                                            <pre class="code-background" style="color: white">
                                                {
                                                  "created_on": "2017-05-11 18:59:03",
                                                  "id": 35,
                                                  "is_active": true,
                                                  "name": "The Partnership Account of the Future",
                                                  "partner_account_code": "1234",
                                                  "updated_on": "2018-01-16 17:40:52"
                                                }
                                            </pre>
                                            <p></p>
                                            <p>On unsuccessful authentication, the output might look like: </p>
                                            <pre class="code-background" style="color: white">
                                            HTTP/1.1 400 UNAUTHORIZED
                                            Server: gunicorn/19.3.0
                                            Date: Sun, 15 May 2016 16:36:51 GMT
                                            Connection: close
                                            Content-Type: text/html; charset=utf-8
                                            Content-Length: 21
                                            WWW-Authenticate: Bearer realm="buyercall", error="invalid_token", error_description="Invalid credentials"
                                            Invalid credentials
                                            </pre>
                                            <br />
                                            <h5>What's next</h5>
                                            <p>
                                                Once you've connected successfully to the BuyerCall Partner API you can
                                                start trying the various API endpoint request methods documented below.
                                                Each endpoint section includes an
                                                API explorer tool allowing you to test the API endpoint request in
                                                real-time.

                                            </p>
                                        </span>
                                    </span>
                                </span>
                            </div>
                            <br>
                        </div>
                    </div>
                </section>
            </section>
        </div>
    </div>

    <div id="swagger-ui"></div>
    <script src="/static/swagger/js/swagger-ui-bundle.js"> </script>
    <script src="/static/swagger/js/swagger-ui-standalone-preset.js"> </script>
    <script>
        var base_url   = window.location.origin + "/api/v2/swagger.json"
        window.onload = function() {
            const ui = SwaggerUIBundle({
            url: base_url,
            //spec: answer,
            dom_id: '#swagger-ui',
            docExpansion: 'none',
            deepLinking: false,
            presets: [
              SwaggerUIBundle.presets.apis
            ],
            requestInterceptor: (req) => {
                if (!req.url.includes("swagger.json")) {
                    req.headers['Documentation'] = "true";
                }
                return req;
            },
            showMutatedRequest: false,
            tagsSorter: 'alpha',
            onComplete: function() {
                $('#operations-tag-account').parent().html('');
                $('#operations-tag-default').parent().html('');
                $('.information-container-new .base-url').html($('.information-container .base-url').html());
                $('.information-container-new .version').html($('.information-container .version').html());
                $('.information-container').html('');
                $('#operations-tag-Accounts').trigger("click");
                $('.models:eq(1)').parent().parent().html('');

                $('.click-section').on('click', function() {
                    if ($(this).hasClass('section-closed')) {
                        $(this).removeClass('section-closed').addClass('section-opened');
                        $('.doc-section').show();
                        $('.change-me').html('<use xlink:href="#large-arrow-down"></use>');
                        $('.section-parent').addClass('is-open');
                    } else {
                        $(this).removeClass('section-opened').addClass('section-closed');
                        $('.doc-section').hide();
                        $('.change-me').html('<use xlink:href="#large-arrow"></use>');
                        $('.section-parent').removeClass('is-open');
                    }
                });
                }
            })

            window.ui = ui
        }


    </script>
    <div class="wrapper swagger-ui" style="padding: 35px 0px 15px 0px; text-align: center;">
            <section class="block col-12 block-desktop col-12-desktop click-section section-closed">
                Copyright &copy; 2022
                <a href="http://buyercall.com/" target="_blank">BuyerCall</a>, powered with passion
            </section>
    </div>
    </p>
    </body>
</html>