Skip to content

Latest commit

 

History

History
179 lines (144 loc) · 13.3 KB

get-app-acquisitions.md

File metadata and controls

179 lines (144 loc) · 13.3 KB
ms.assetiddescriptiontitlems.datems.topickeywordsms.localizationpriority
C1E42E8B-B97D-4B09-9326-25E968680A0F
Use this method in the Microsoft Store analytics API to get aggregate acquisition data for an application during a given date range and other optional filters.
Get app acquisitions
03/23/2018
article
windows 10, uwp, Store services, Microsoft Store analytics API, app acquisitions
medium

Get app acquisitions

Use this method in the Microsoft Store analytics API to get aggregate acquisition data in JSON format for an application during a given date range and other optional filters. This information is also available in the Acquisitions report in Partner Center.

Prerequisites

To use this method, you need to first do the following:

  • If you have not done so already, complete all the prerequisites for the Microsoft Store analytics API.
  • Obtain an Azure AD access token to use in the request header for this method. After you obtain an access token, you have 60 minutes to use it before it expires. After the token expires, you can obtain a new one.

Request

Request syntax

MethodRequest URI
GEThttps://manage.devcenter.microsoft.com/v1.0/my/analytics/appacquisitions

Request header

HeaderTypeDescription
AuthorizationstringRequired. The Azure AD access token in the form Bearer <token>.

Request parameters

ParameterTypeDescriptionRequired
applicationIdstringThe Store ID of the app for which you want to retrieve acquisition data.Yes
startDatedateThe start date in the date range of acquisition data to retrieve. The default is the current date.No
endDatedateThe end date in the date range of acquisition data to retrieve. The default is the current date.No
topintThe number of rows of data to return in the request. The maximum value and the default value if not specified is 10000. If there are more rows in the query, the response body includes a next link that you can use to request the next page of data.No
skipintThe number of rows to skip in the query. Use this parameter to page through large data sets. For example, top=10000 and skip=0 retrieves the first 10000 rows of data, top=10000 and skip=10000 retrieves the next 10000 rows of data, and so on.No
filterstringOne or more statements that filter the rows in the response. Each statement contains a field name from the response body and value that are associated with the eq or ne operators, and statements can be combined using and or or. String values must be surrounded by single quotes in the filter parameter. For example, filter=market eq 'US' and gender eq 'm'.

You can specify the following fields from the response body:

  • acquisitionType
  • ageGroup
  • storeClient
  • gender
  • market
  • osVersion
  • deviceType
  • orderName
No
aggregationLevelstringSpecifies the time range for which to retrieve aggregate data. Can be one of the following strings: day, week, or month. If unspecified, the default is day.No
orderbystringA statement that orders the result data values for each acquisition. The syntax is orderby=field [order],field [order],.... The field parameter can be one of the following strings:
  • date
  • acquisitionType
  • ageGroup
  • storeClient
  • gender
  • market
  • osVersion
  • deviceType
  • orderName

The order parameter is optional, and can be asc or desc to specify ascending or descending order for each field. The default is asc.

Here is an example orderby string: orderby=date,market

No
groupbystringA statement that applies data aggregation only to the specified fields. You can specify the following fields:
  • date
  • applicationName
  • acquisitionType
  • ageGroup
  • storeClient
  • gender
  • market
  • osVersion
  • deviceType
  • orderName

The returned data rows will contain the fields specified in the groupby parameter as well as the following:

  • date
  • applicationId
  • acquisitionQuantity

The groupby parameter can be used with the aggregationLevel parameter. For example: &groupby=ageGroup,market&aggregationLevel=week

No

Request example

The following example demonstrates several requests for getting app acquisition data. Replace the applicationId value with the Store ID for your app.

GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/appacquisitions?applicationId=9NBLGGGZ5QDR&startDate=1/1/2015&endDate=2/1/2015&top=10&skip=0 HTTP/1.1Authorization: Bearer <your access token>GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/appacquisitions?applicationId=9NBLGGGZ5QDR&startDate=8/1/2015&endDate=8/31/2015&skip=0&filter=market eq 'US' and gender eq 'm' HTTP/1.1Authorization: Bearer <your access token>

Response

Response body

ValueTypeDescription
ValuearrayAn array of objects that contain aggregate acquisition data for the app. For more information about the data in each object, see the acquisition values section below.
@nextLinkstringIf there are additional pages of data, this string contains a URI that you can use to request the next page of data. For example, this value is returned if the top parameter of the request is set to 10000 but there are more than 10000 rows of acquisition data for the query.
TotalCountintThe total number of rows in the data result for the query.

Acquisition values

Elements in the Value array contain the following values.

ValueTypeDescription
datestringThe first date in the date range for the acquisition data. If the request specified a single day, this value is that date. If the request specified a week, month, or other date range, this value is the first date in that date range.
applicationIdstringThe Store ID of the app for which you are retrieving acquisition data.
applicationNamestringThe display name of the app.
deviceTypestringOne of the following strings that specifies the type of device on which the acquisition occurred:
  • PC
  • Phone
  • Console-Xbox One
  • Console-Xbox Series X
  • IoT
  • Holographic
  • Unknown
orderNamestringThe name of the order.
storeClientstringOne of the following strings that indicates the version of the Store where the acquisition occurred:
  • Windows Phone Store (client)
  • Microsoft Store (client) (or Windows Store (client) if querying for data before March 23, 2018)
  • Microsoft Store (web) (or Windows Store (web) if querying for data before March 23, 2018)
  • Volume purchase by organizations
  • Other
osVersionstringOne of the following strings that specifies the OS version on which the acquisition occurred:
  • Windows Phone 7.5
  • Windows Phone 8
  • Windows Phone 8.1
  • Windows Phone 10
  • Windows 8
  • Windows 8.1
  • Windows 10
  • Windows 11
  • Unknown
marketstringThe ISO 3166 country code of the market where the acquisition occurred.
genderstringOne of the following strings that specifies the gender of the user who made the acquisition:
  • m
  • f
  • Unknown
ageGroupstringOne of the following strings that specifies the age group of the user who made the acquisition:
  • less than 13
  • 13-17
  • 18-24
  • 25-34
  • 35-44
  • 44-55
  • greater than 55
  • Unknown
acquisitionTypestringOne of the following strings that indicates the type of acquisition:
  • Free
  • Trial
  • Paid
  • Promotional code
  • Iap
  • Subscription Iap
  • Private Audience
  • Pre Order
  • Xbox Game Pass (or Game Pass if querying for data before March 23, 2018)
  • Disk
  • Prepaid Code
acquisitionQuantitynumberThe number of acquisitions that occurred during the specified aggregation level.

Request and Response example

The following code snippets demonstrates some example request and JSON response body for those request.

Sample Request

GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/appacquisitions?applicationId=9NBLGGGZ5QDR HTTP/1.1Authorization: Bearer <your access token>

Sample Response

{ "Value": [ { "applicationId": "9NBLGGGZ5QDR", "date": "2022-07-29", "acquisitionQuantity": 7, "purchasePriceUSDAmount": 0.0, "purchasePriceLocalAmount": 0.0, "purchaseTaxUSDAmount": 0.0, "purchaseTaxLocalAmount": 0.0 }, ], "TotalCount": 1, "DataFreshnessTimestamp": "2022-07-29T08:42:00" }

Sample Request

GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/appacquisitions?applicationId=9NBLGGGZ5QDR&startDate=8/1/2021&endDate=12/21/2021&skip=0&filter=market&groupby=date,applicationName,acquisitionType,ageGroup,storeClient,gender,market,osVersion,deviceType HTTP/1.1Authorization: Bearer <your access token>

Sample Response

 { "Value": [ { "applicationId": "9NBLGGGZ5QDR", "applicationName": "Contoso Demo", "acquisitionType": "Free", "storeClient": "Microsoft Store (client)", "gender": "f", "market": "TW", "osVersion": "Windows 10", "deviceType": "PC", "date": "2021-08-01", "acquisitionQuantity": 1, "purchasePriceUSDAmount": 0.0, "purchasePriceLocalAmount": 0.0, "purchaseTaxUSDAmount": 0.0, "purchaseTaxLocalAmount": 0.0 }, { "applicationId": "9NBLGGGZ5QDR", "applicationName": "Contoso Demo", "acquisitionType": "Free", "storeClient": "Microsoft Store (client)", "gender": "Unknown", "market": "BR", "osVersion": "Windows 10", "deviceType": "PC", "date": "2021-08-01", "acquisitionQuantity": 1, "purchasePriceUSDAmount": 0.0, "purchasePriceLocalAmount": 0.0, "purchaseTaxUSDAmount": 0.0, "purchaseTaxLocalAmount": 0.0 }, ], "TotalCount": 2, "DataFreshnessTimestamp": "2022-07-29T08:42:00" }

Related topics

close