Skip to main content
Skip table of contents

[Internal] Atlassian Marketplace API - Sales Reporting

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

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


Datasource type

REST Basic

Datasource URL<vendorId>/

Datasource Test URL


Datasource User

User permitted to access the vendor account

Datasource Password

Password of the account


Query URL


Example parameters

  • AppKey: de.scandio.confluence.plugins.pocketquery

Raw result

    "_links": {
    "transactions": [
            "transactionId": "AT-1111111111",
            "addonLicenseId": "2222222222",
            "licenseId": "SEN-333333333",
            "addonKey": "de.scandio.confluence.plugins.pocketquery",
            "addonName": "PocketQuery - SQL & REST for Confluence",
            "lastUpdated": "...",
            "customerDetails": {
                "company": "Company Example",
                "country": "Sweden",
                "region": "EMEA",
                "technicalContact": {
                    "email": "",
                    "name": "Jim Morrison"
                "billingContact": {
                    "email": "",
                    "name": "Jimmy Page"

Converter Examples

The simplest converter would just return the transactions array.

function convert(json) {
	return JSON.parse(json).transactions;

However, this will just return all the data, including the nested objects. These will just display as [object Object] - not very useful. A better converter will look like this:

function convert(json) {
	var transactions = JSON.parse(json).transactions;
	return {
		return {
			'ID': transaction.transactionId,
			'Date': transaction.purchaseDetails.saleDate,
			'Organisation Name':,
			'Tier': transaction.purchaseDetails.tier,
			'Purchase Price': '$' + transaction.purchaseDetails.purchasePrice

The output will look something like this:

Template Example

Let’s assume we want to create email links for the TechnicalContactMail column. We can do so by changing the default template slightly. In this example, we’re using the implicit $velocityCount variable to check for the index of our TechnicalContactEmail column.

<table class="aui confluenceTable pocketquery-table">
        #foreach ($column in $columns)
            <th class="confluenceTh">$!column</th>

        #foreach ($row in $result)
            #foreach ($column in $row)
                #if ($velocityCount == 5)
                    <td class="confluenceTd">
                        <a href="mailto:$!column">
                    <td class="confluenceTd">$!column</td>

The emails in our result will now be links:

JavaScript errors detected

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

If this problem persists, please contact our support.