Support
posted this on April 18, 2011 17:13
To extract the sales and downloads from your script, all you have to do is making a GET HTTP request to the following Url:
https://www.mopapp.com/api/sales/list.json
with the following parameters on the querystring:
https://www.mopapp.com/api/sales/list.json?account=myaccountname&key=d251e0a3a6d94e169f7b2eb374938e94&version=1.0&application=129&dateTo=2010-06-10&dateFrom=2011-01-01
{
"result":{
"code":200,
"description":"Ok"
},
"data":{
"currentPage":1,
"totalPages":3,
"totalItems":1325,
"items":[
{
"id":3963949,
"application":67,
"storeAccount":23,
"store":4,
"platform":7,
"country":"ec",
"version":"2.0",
"email":"",
"device":"iPad",
"date":"2011-4-2 00:04:00",
"type":0,
"inapp": 0,
"numSales":1,
"numUpdates":0,
"numInstalls":0,
"currency":"USD",
"unitPrice":0.99,
"unitPriceUsd":0.99,
"unitPriceEur":0.70009193126367,
"revenue":0.99,
"profitNet":0.7,
"revenueUsd":0.99,
"profitUsd":0.7,
"revenueEur":0.70009193126367,
"profitEur":0.4950144968531
},
...more items...
]
}
}
If instead of making a request to list.json you call list.xml (with the exact same parameters in the querystring) you will get the response output in XML:
<?xml version="1.0" encoding="UTF-8"?> <root> <result> <code>200</code> <description><![CDATA[Ok]]></description> </result> <data> <currentPage>1</currentPage> <totalPages>3</totalPages> <totalItems>1325</totalItems> <items> <item> <id>3963949</id> <application>67</application> <storeAccount>23</storeAccount> <store>4</store> <platform>7</platform> <country>us</country> <version>2.0</version> <email></email> <device>iPad</device> <date>2011-4-2 00:04:00</date> <type>0</type>
<inapp>0</inapp> <numSales>1</numSales> <numUpdates>0</numUpdates> <numInstalls>0</numInstalls> <currency>USD</currency> <unitPrice>0.99</unitPrice> <unitPriceUsd>0.99</unitPriceUsd> <unitPriceEur>0.70009193126367</unitPriceEur> <revenue>0.99</revenue> <profit>0.7</profit> <revenueUsd>0.99</revenueUsd> <profitUsd>0.7</profitUsd> <revenueEur>0.70009193126367</revenueEur> <profitEur>0.4950144968531</profitEur> </item> ...more items... </items> </data> </root>
Here is what the output values mean:
Comments
No, you download the raw list of transactions/sales. Any aggregation or calculation must be done manually (i.e. with some spreadsheet app or database)
what is my API key?please guide me to export my data.
Hi,
please refer to the following documentation article to read about the API Key:
http://support.mopapp.com/entries/206236-how-to-enable-the-api-and-where-to-retrieve-the-api-key