Skip to main content
Skip table of contents

Atlassian Marketplace API - Sales Reporting

This query fetches sales information for a specific vendor and a specific plugin.

We at Scandio use a query like this to provide an overview about our current Atlassian Marketplace sales for all of our colleagues - without depending on whether they have direct access to our Marketplace account or not.

Datasource

Datasource type

REST Basic

Datasource URL

CODE
https://marketplace.atlassian.com/rest/1.0/vendors/<vendorId>/

Datasource Test URL

CODE
sales

Datasource User

(Technical) User that is allowed to access the vendor account

Datasource Password

Password of the (technical) user

Query

Query URL

CODE
sales?add-on=<PluginKey>

Converter Example

CODE
function convert(json) {
    var result = [];
    var parsedJsonObject = JSON.parse(json);
    var current, index;
    for (index in parsedJsonObject.sales) {
        // only continue if this property is not inherited
        if (parsedJsonObject.hasOwnProperty(index)) {
            current = parsedJsonObject[index];
            result.push({
                'Date': current.date,
                'Invoice': current.invoice,
                'Organisation Name': current.organisationName,
                'TechnicalContactName': current.technicalContact.name,
                'License Size': current.licenseSize,
                'Purchase Price': '$' + current.purchasePrice,
                'TechnicalContactMail': current.technicalContact.email
            });
        }
    }
    return result;
}

Template Example

CODE
<table class="aui confluenceTable pocketquery-table">
    <thead>
        <tr>
        #foreach ($column in $columns)
            #if(!$column.equals("TechnicalContactMail"))
               <th>$!column</th>
            #end
        #end
        </tr>
    </thead>
     
    <tbody>
        #foreach ($row in $result)
            <tr>
            #foreach ($column in $row)
                #if($velocityCount == 4)
                    <td>
                        <a href="mailto:$row.TechnicalContactMail">
                            $!column
                        </a>
                    </td>
                #elseif($velocityCount < 7)
                    <td>$!column</td>
                #end
            #end
            </tr>
        #end
    </tbody>
</table>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.