### Get Review Response Example Source: https://docs.appfigures.com/api/reference/v2/reviews Example of a GET request to retrieve the response for a specific review. This shows the structure of the response data. ```json // GET /reviews/41318011046LoNasTPqn1FQlLn8jsznb1A/response { "content": "😃 Glad you like the app, and thank you for the suggestion. It's already on our roadmap.", "timestamp": "2020-03-29T17:27:01", "external_account": { "storfront_id": "apple:ios", "type": "itunes_connect", "name": "dev@example.com" }, "user": { "id": 123456, "name": "Appfigures User" } } ``` -------------------------------- ### Financial Report Request Example Source: https://docs.appfigures.com/api/reference/v2/sales Example GET request for generating a financial report. Supports monthly granularity and filtering by products, countries, and in-app purchases. ```http GET /reports/sales/_?group_by={group_by}&start_date={start_date}&end_date={end_date}&granularity=monthly&products={product_ids}&countries={countries}&dataset=financial&include_inapps={include_inapps}&format={format}_ ``` -------------------------------- ### Example Response for Apple Product Source: https://docs.appfigures.com/api/reference/v2/products-2 This is an example JSON response for a product retrieved from the Apple App Store. ```http // GET /products/apple/335060889 ``` ```json { "id": 5985606, "name": "Rdio", "developer": "Rdio", "icon": "http://a1857.phobos.apple.com/us/r1000/081/Purple/v4/f5/6b/0d/f56b0d3b-5a5c-013d-bc08-1c7cc9aed3a3/mzl.mlvhudjt.75x75-65.png", "vendor_identifier": "335060889", "ref_no": 335060889, "sku": "", "store_id": 1, "store": "apple", "release_date": "2009-12-17T00:00:00", "added_date": "2011-11-29T16:04:22", "updated_date": "2013-05-22T14:00:00", "version": "2.2.3", "source": null, "type": "unknown", "devices": [ "Handheld", "Tablet" ], "price": { "currency": "USD", "price": "0.00" } } ``` -------------------------------- ### Example Product Response Source: https://docs.appfigures.com/api/reference/v2/products-2 This is an example of the JSON response when retrieving a product's metadata. It includes general information and pricing details. ```json { "id": 212135374, "name": "Rdio", "developer": "Rdio", "icon": "http://ecx.images-amazon.com/images/I/51IPlKhP19L._SL160_SL150_.png", "vendor_identifier": "B004T76OR8", "package_name": "B004T76OR8", "store_id": 3, "store": "amazon_appstore", "release_date": "2000-01-01T00:00:00", "added_date": "2012-05-30T19:16:43", "updated_date": "2013-07-02T21:00:00", "version": "2.6.3", "source": null, "type": "unknown", "devices": [ "Handheld" ], "price": { "currency": "USD", "price": "0.00" } } ``` -------------------------------- ### Featured Counts Response Examples Source: https://docs.appfigures.com/api/reference/v2/featured Examples showing daily granularity with and without empty data entries. ```json // GET /featured/counts/?end=2017-03-20&count=1&granularity=daily // notice how this date was pushed back because this is date // that has data before and closest to the given end date [ { "date_range": [ "2016-11-05", "2016-11-05" ], "products": [ { "product_id": 6567539, "featured_count": 1 } ] } ] ``` ```json // GET /featured/counts/?end=2016-03-20&count=1 // &granularity=daily&show_empty=true // notice how this time the date is equal to 'today' // and there is no data now that show_empty = true/ [ { "date_range": [ "2016-03-20", "2016-03-20" ], "products": [] } ] ``` -------------------------------- ### Example Response for Google Play Product Source: https://docs.appfigures.com/api/reference/v2/products-2 This is an example JSON response for a product retrieved from the Google Play Store. ```http // GET /products/google_play/com.rdio.android.ui ``` ```json { "id": 5555936, "name": "Rdio", "developer": "Rdio", "icon": "https://lh3.ggpht.com/L3w6B50SgmFOt8q_poF25XArA6EOJJSf7SOjBe9kPftnPVq8uS9JgtmJAwLVp_pN7ig", "vendor_identifier": "com.rdio.android.ui", "package_name": "com.rdio.android.ui", "store_id": 2, "store": "google_play", "release_date": "2000-01-02T00:00:00", "added_date": "2011-12-02T23:21:16", "updated_date": "2013-06-04T19:00:00", "version": "Varies with device", "source": null, "type": "unknown", "devices": [ "Handheld" ], "price": { "currency": "USD", "price": "0.00" } } ``` -------------------------------- ### Retrieve Installed SDKs Request Source: https://docs.appfigures.com/api/reference/v2/sdks Use this GET request to fetch all mobile SDKs associated with a specific product ID. ```http GET /products/{product_id}/sdks ``` -------------------------------- ### Retrieve Root Resource Response Source: https://docs.appfigures.com/api/reference/v2/root Example JSON response returned by the GET / endpoint. ```json // GET / { status: "200", message: "OK", see: "http://docs.appfigures.com/api", version: "2.0", user: { id: 1980123, name: "Marshal E.", email: "bigfudge@gmail.com" }, usage: { daily_used: 125, daily_limit: 1000 }, sequence: 28, source: "100" } ``` -------------------------------- ### GET /products/{product_id}/sdks Source: https://docs.appfigures.com/api/reference/v2/sdks Retrieves a list of all mobile SDKs installed in a specific application identified by its product ID. ```APIDOC ## GET /products/{product_id}/sdks ### Description Lists all mobile SDKs installed by an app identified by the product_id. ### Method GET ### Endpoint /products/{product_id}/sdks ### Parameters #### Path Parameters - **product_id** (String) - Required - The unique identifier of the product. ### Response #### Success Response (200) - **id** (String) - The unique ID of this SDK across our platform. - **found_on** (Date) - The earlier date we detected the SDK in the app. - **last_updated** (Date) - The most recent this status of this SDK in this app changed. - **active** (Bool) - Whether the SDK is currently installed, or if it was uninstalled. #### Response Example [ { "id": "chartboost", "found_on": "2017-01-05T06:01:54", "last_updated": "2017-01-05T06:01:54", "active": true }, { "id": "admob", "found_on": "2015-03-04T07:35:45", "last_updated": "2018-02-01T01:01:54", "active": false } ] ``` -------------------------------- ### Retrieve Product Search Response Source: https://docs.appfigures.com/api/reference/v2/products-2 Example response from a GET request to the product search endpoint, including metadata and category details. ```json // GET /products/search/embark?meta=true [ { "id": 6725579, "name": "Embark NYC Subway – New York City", "developer": "Embark, Inc.", "icon": "http://a1.mzstatic.com/us/r1000/101/Purple2/v4/75/17/1f/75171fa5-6f04-dca8-a439-f8b01bbec3e5/mzl.xxcfhuch.100x100-75.jpg", "vendor_identifier": "450991137", "ref_no": 450991137, "sku": "", "store_id": 1, "store": "apple", "release_date": "2011-07-31T00:00:00", "added_date": "2011-12-18T16:03:40", "updated_date": "2013-08-07T09:04:29", "version": "1.5.3", "source": null, "type": "unknown", "devices": [ "Handheld", "Tablet" ], "price": { "currency": "USD", "price": "0.00" }, "meta": { "en": [ { "key": "description", "language": "en", "value": "Embark NYC Subway makes it easy to get around New York. Embark even works without cellular signal! Features: – Offline trip planning between subway stations – Interactive MTA Subway map – *snip*" }, { "key": "view_url", "language": "en", "value": "http://itunes.apple.com/app/embark-nyc-subway-new-york/id450991137?uo=5" } . . . ] }, "categories": [ { "store": "apple", "store_id": 1, "device": "handheld", "device_id": 1, "name": "Travel", "id": 6003, "parent_id": null, "parent": null, "main": false }, . . . ] } ``` -------------------------------- ### Example Product Response Source: https://docs.appfigures.com/api/reference/v2/products-2 This is an example of the JSON response when retrieving product information. It contains various details about the product, including its ID, name, version, and source information. ```json // GET /products/212135374?store=apple { "42": { "id": 42, "name": "Fob Finder Pro", "developer": "Consolidated Fob", "icon": "http://a4.mzstatic.com/us/r1000/030/Purple/75/f4/1a/mzl.fjpeofny.100x100-75.jpg", "vendor_identifier": "300101010", "ref_no": 300101010, "sku": null, "store_id": 1, "store": "apple", "release_date": "2008-11-15T05:00:00", "added_date": "2011-11-28T19:06:11", "updated_date": "2013-06-26T09:02:44", "version": "1.2", "source": { "external_account_id": 32, "added_timestamp": "2009-01-02T17:50:00", "active": true, "hidden": false, "type": "own" }, "type": "unknown", "devices": [ "Handheld", "Tablet" ], "children": [], "features": [], "parent_id": null, "price": { "currency": "USD", "price": "1.00" } }, . . . } ``` -------------------------------- ### Example Ad Spend Totals Response Source: https://docs.appfigures.com/api/reference/v2/ad-spend Example JSON response for ad spend totals for the last 30 days. Includes metrics like installs, clicks, impressions, and cost. ```json { "installs": 1000, "clicks": 15000, "impressions": 239012, "cost": "12123.94", "cpc": "0.86", "cpa": "12.94", "ctr": "0.06", "date": "2018-05-08" } ``` -------------------------------- ### Example User List Response Source: https://docs.appfigures.com/api/reference/v2/users An example of the JSON response when listing users, including metadata and a list of user objects with their details. ```json GET /users?count=10&page=1 { "metadata": { "resultset": { "count": 10, "page": 1, "total_count": 17, "total_pages": 2 } }, "results": [ { "active": true, "currency": "USD", "region": "us", "is_owner": false, "share_of_profit": "1.00", "last_login": "2021-12-21T11:12:13", "timezone": "Eastern Standard Time", "account": { "id": 12345678, "company": "Appfigures", "auto_import": true, "last_import": "2021-09-23T00:00:00", "plan": "Explore", "plan_id": 1, "is_premium": true }, "id": 34567812, "role": "admin", "name": "John", "email": "john@smith.com", "products": null, "avatar_url": "https://secure.gravatar.com/avatar/", "date_format": "MM/dd/yy", "entitlements": [ "sales", "ads", "alerts", "toplists", "ranks", "reviews", "featured", "autoimport" ] }, ... ] } ``` -------------------------------- ### Example Response for Amazon Appstore Product Source: https://docs.appfigures.com/api/reference/v2/products-2 This is an example JSON response for a product retrieved from the Amazon Appstore. ```http // GET /products/amazon/B004T76OR8 ``` ```json { "id": 212135374, "name": "Rdio", "developer": "Rdio", "icon": "http://ecx.images-amazon.com/images/I/51IPlKhP19L._SL160_SL150_.png", "vendor_identifier": "B004T76OR8", "package_name": "B004T76OR8", "store_id": 3, "store": "amazon_appstore", "release_date": "2000-01-01T00:00:00", "added_date": "2012-05-30T19:16:43", "updated_date": "2013-07-02T21:00:00", "version": "2.6.3", "source": null, "type": "unknown", "devices": [ "Handheld" ], "price": { "currency": "USD", "price": "0.00" } } ``` -------------------------------- ### Sales by Date and Product Report Example Source: https://docs.appfigures.com/api/reference/v2/sales Example response structure for a sales report grouped by dates and then by products. Shows sales data for each product on specific dates. ```json // GET /reports/sales?group_by=dates,products?start_date=-30 { "2020-09-03": { "12345": { "date": "2016-11-24", "product_id": 12345, "downloads": 11, "re_downloads": 15, "net_downloads": 11, "updates": 0, "revenue": "0.00", "gross_revenue": "0.00", "returns_amount": "0", "returns": 0, "gift_redemptions": 0, "promos": 0, "edu_revenue": "0.00" "gross_returns_amount": "0.00", "gross_edu_revenue": "0.00", "uninstalls": 0, }, ... }, "2020-09-04": { "294956": { "date": "2016-11-25", "product_id": 123456, "downloads": 10, "re_downloads": 9, "net_downloads": 10, "updates": 1, "revenue": "0.00", "gross_revenue": "0.00", "returns_amount": "0", "returns": 0, "gift_redemptions": 0, "promos": 0, "edu_revenue": "0.00" "gross_returns_amount": "0.00", "gross_edu_revenue": "0.00", "uninstalls": 0, }, ... }, ... } ``` -------------------------------- ### Sales by Product Report Example Source: https://docs.appfigures.com/api/reference/v2/sales Example response structure for a sales report grouped by products. Includes download, revenue, and product details. ```json // GET /reports/sales/?group_by=products&start=2017-05-20&end=2017-05-25 { "12345": { "downloads": 45, "re_downloads": 30, "updates": 0, "returns": 45, "net_downloads": 0, "promos": 0, "revenue": "0.64", "gross_revenue": "0.99", "returns_amount": "501.22", "edu_downloads": 0, "gifts": 0, "gift_redemptions": 0, "edu_revenue": "0.00" "gross_returns_amount": "0.00", "gross_edu_revenue": "0.00", "uninstalls": 4, "product_id": 12345, "product": { "id": 12345, "name": "Awesome app", "developer": "Jeff", "icon": "https://lh3.ggpht.com/jeffs-icon", "vendor_identifier": "com.jeff.mva", "package_name": "com.jeff.mva", "store_id": 2, "store": "google_play", "release_date": "2016-12-01T00:00:00", "added_date": "2016-12-01T20:22:05", "updated_date": "2017-06-04T03:00:00", "version": "4.0.2", "source": { "external_account_id": 77, "added_timestamp": "2012-02-27T19:09:36", "active": true, "hidden": false, "type": "own" }, "type": "unknown", "devices": [ "Handheld" ], "children": [], "features": [], "parent_id": null } }, . . . } ``` -------------------------------- ### Keyword Stats Example Response Source: https://docs.appfigures.com/api/reference/v2/aso-keyword-ranks Example of a successful response from the /aso/stats endpoint including query parameters. ```json // GET /aso/stats? products=333918141896& countries=US& granularity=hourly& start=2021-02-03T00:00:00& end=2021-02-09T17:00:00& device=handheld { "avg_position": 21, "avg_position_delta": 9, "highest": 1, "highest_delta": 0, "lowest": 43, "lowest_delta": 15, "top_5": 1, "top_25": 2, "top_100": 2, "ranked_keywords": 5, "total_keywords": 5, "positive": 4, "negative": 0, "unranked_keywords": 0, "unchanged": 1 } ``` -------------------------------- ### Sales by Product and Date Report Example Source: https://docs.appfigures.com/api/reference/v2/sales Example response structure for a sales report grouped by products and then by dates. Shows sales data for each product on specific dates. ```json // GET /reports/sales?group_by=products,dates&start_date=-30 { "12345": { "2020-09-03": { "date": "2016-11-24", "country": null, "iso": null, "product_id": 12345, "downloads": 11, "re_downloads": 10, "net_downloads": 11, "updates": 0, "revenue": "0.00", "gross_revenue": "0.00", "returns_amount": "0", "returns": 0, "gift_redemptions": 0, "promos": 0, "edu_revenue": "0.00" "gross_returns_amount": "0.00", "gross_edu_revenue": "0.00", "uninstalls": 0 }, ... }, "123456": { "2020-09-03": { "date": "2016-11-24", "product_id": 123456, "downloads": 28, "re_downloads": 30, "net_downloads": 29, "updates": 6, "revenue": "19.02", "revenue": "27.20", "returns_amount": "0", "returns": 1, "gift_redemptions": 0, "promos": 0, "edu_revenue": "0.00" "gross_returns_amount": "0.00", "gross_edu_revenue": "0.00", "uninstalls": 2 }, ... } } ``` -------------------------------- ### Example User Details Response Source: https://docs.appfigures.com/api/reference/v2/users An example of the JSON response when retrieving details for a specific user, showing all user-related fields and nested account information. ```json // GET /users/john@fobsdirect.com { "active": true, "currency": "USD", "region": "US", "is_owner": false, "share_of_profit": "1.00", "last_login": "2021-09-23T13:02:47", "timezone": "Eastern Standard Time", "account": { "id": 42, "company": "Smith's", "auto_import": "N/A", "last_import": "2021-09-23T00:00:00", "plan": "explore" }, "id": 12345678, "role": "admin", "name": "John", "email": "john@smith.com", "date_format": "MM/dd/yy", "products": [ ... ] } ``` -------------------------------- ### Revenue Totals Example Response Source: https://docs.appfigures.com/api/reference/v2/revenue Example JSON response for a revenue totals request. ```json // /reports/revenue?start_date=-30 { "returns": "170.71", "edu": "5481.19", "ads": "25980.75", "sales": "12506.15", "iap": "6711.91", "subscriptions": "11661.84", "total": "50509.29", "gross_sales": "798.11", "gross_iap": "2947.29", "gross_subscriptions": "12020.66", "gross_edu": "0.00", "gross_returns": "25.10", "gross_total": "4262.28" } ``` -------------------------------- ### Usage Report Response Example Source: https://docs.appfigures.com/api/reference/v2/usage Example JSON response structure for a usage report grouped by network. ```json // GET /reports/usage?group_by=network { "apple:analytics": { "sessions": 3589097152, "avg_optin_rate": "0.43", ... "storefront": "apple:analytics", "store": "apple" }, "flurry_analytics": { "sessions": 1540311105, ... "storefront": "flurry_analytics", "store": "flurry_analytics" }, "google_analytics": { "sessions": 1251311105, ... "storefront": "google_analytics", "store": "google_analytics" } } ``` -------------------------------- ### Post Review Response Example Source: https://docs.appfigures.com/api/reference/v2/reviews Example of a POST request to reply to a review. Note that this endpoint returns a 202 Accepted status due to its asynchronous nature. ```http POST /reviews/{review_id}/response ``` ```json // POST /reviews/41308033046LxPasT0qn1FCl7n8jsznb1A/response { content: "Hey! Thank you 😄 We're glad to hear you're enjoying the game! Play on!" } ``` -------------------------------- ### Example Featured Summary Report Response Source: https://docs.appfigures.com/api/reference/v2/featured This is an example response for the featured summary report, showing product IDs mapped to their feature details including start/end dates, countries, and paths. ```json // GET /featured/summary/2016-01-01/2017-01-01 { "5923605": { "product_id": 5923605, "start": "2016-06-22T00:00:00", "end": "2016-12-09T00:00:00", "countries": [ "ID", "SA", "TW" ], "paths": [ [ "apple", "Unknown", "Handheld", "Paid", "Games/Family", "what's hot" ], [ "apple", "Unknown", "Handheld", "Paid", "Games/Kids", "what's hot" ], [ "apple", "Unknown", "Tablet", "Paid", "Games/Family (iPad)", "what's hot" ], [ "apple", "Unknown", "Tablet", "Paid", "Games/Kids (iPad)", "what's hot" ] ] }, . . . } ``` -------------------------------- ### GET /data/sdks Source: https://docs.appfigures.com/api/reference/v2/data Retrieves a list of supported SDKs. ```APIDOC ## GET /data/sdks ### Description Retrieves a list of supported SDKs. ### Method GET ### Endpoint /data/sdks ### Response #### Success Response (200) - **id** (string) - SDK ID - **code** (integer) - SDK code - **name** (string) - SDK name - **tags** (array) - SDK tags - **active** (boolean) - Active status - **description** (string) - SDK description - **tracked_platforms** (array) - List of tracked platforms #### Response Example [ { "id": "adcolony", "code": 1, "name": "AdColony", "tags": ["ads"], "active": true } ] ``` -------------------------------- ### Example Sales Report Data Source: https://docs.appfigures.com/api/reference/v2/sales This is an example of the raw data structure returned for a sales report, showing various metrics like downloads, revenue, and returns. ```json // GET /reports/sales/ { "downloads": 155299, "re_downloads": 133092, "updates": 91156, "returns": 56, "net_downloads": 155243, "promos": 2, "revenue": "26188.63", "gross_revenue": "37412.32", "returns_amount": "609.21", "edu_downloads": 54, "gifts": 36, "gift_redemptions": 0, "edu_revenue": "0.00", "gross_returns_amount": "0.00", "gross_edu_revenue": "0.00", "uninstalls": 1811 } ``` -------------------------------- ### iOS Ratings Report Example Source: https://docs.appfigures.com/api/reference/v2/reports-ratings This example shows the expected JSON response for an iOS app's ratings report over the last 30 days. It includes detailed breakdowns of ratings by star, new ratings, averages, and percentages. ```json { "breakdown": [ 98019, 28197, 92923, 339374, 4766539 ], "new": [ 1860, 492, 1233, 5268, 86944 ], "average": "4.81", "total": 5325052, "new_average": "4.83", "new_total": 95797, "positive": 5105913, "negative": 126216, "neutral": 92923, "new_positive": 92212, "new_negative": 2352, "new_neutral": 1233, "one_star_percent": "0.02", "two_star_percent": "0.01", "three_star_percent": "0.02", "four_star_percent": "0.06", "five_star_percent": "0.90" } ``` -------------------------------- ### Search Ads API Response Example Source: https://docs.appfigures.com/api/reference/v2/search-ads-intelligence Represents the structure of a successful GET request to the search-ads endpoint. ```json // GET /search-ads? &term=games &country=US { "metadata": { "resultset": { "count": 10, "page": 1, "total_count": 30, "total_pages": 3 } }, "results": [{ "impressions": 24, "countries": [{ "country": "US", "impressions": 24 }], "keyword_id": "9cfa7aefcc61936b70aaec6729329eda", "keyword_term": "games", "product_id": 333741399334, "product_name": "SudoBlox: Sudoku Block Puzzle" }, ... } ``` -------------------------------- ### Example Ranks Report Response Source: https://docs.appfigures.com/api/reference/v2/ranks This is an example JSON response for a ranks report, showing the start and end dates, a list of dates, and data for each series including country, category, product ID, positions, and deltas. ```json { "start_date": "2017-06-05T00:00:00", "end_date": "2017-06-07T00:00:00", "dates": [ "2017-06-05T00:00:00", "2017-06-06T00:00:00", "2017-06-07T00:00:00" ], "data": [ { "country": "US", "category": { "store": "apple", "store_id": 1, "device": "handheld", "device_id": 1, "name": "Games/Family", "subtype": "paid", "id": 7009, "parent_id": 6014 }, "product_id": 5923605, "positions": [ 186, 179, null ], "deltas": [ -3, 2, null ] }, . . . } ``` -------------------------------- ### Retrieve Full Featured Category Data Source: https://docs.appfigures.com/api/reference/v2/featured Example JSON response for a GET request to the featured full endpoint. ```json // GET /featured/full/5923605/2016-06-22/2016-07-22 { "187899": { "country": "AR", "base_category": { "store": "apple", "store_id": 1, "device": "Handheld", "device_id": 1, "name": "Games/Family", "subtype": "Paid", "id": 7009 }, "viewed_from": "Desktop", "crumbs": [ "what's hot" ], "start_date": "2016-06-27T00:00:00", "end_date": "2016-06-27T00:00:00", "highest_position": 56, "lowest_position": 56, "positions": [ { "start": "2016-06-27T00:00:00", "end": "2016-06-27T00:00:00", "position": 56 } ] }, . . . } ``` -------------------------------- ### Example SDKs Response Source: https://docs.appfigures.com/api/reference/v2/sdks An array of objects representing the SDKs found in the app, including their unique ID, detection date, and active status. ```json GET /products/2810106945/sdks [ { "id": "chartboost", "found_on": "2017-01-05T06:01:54", "last_updated": "2017-01-05T06:01:54", "active": true }, { "id": "admob", "found_on": "2015-03-04T07:35:45", "last_updated": "2018-02-01T01:01:54", "active": false }, ... ] ``` -------------------------------- ### C# API Client with Personal Access Token Source: https://docs.appfigures.com/code-samples This C# code demonstrates how to create a simple API client to interact with the Appfigures API using a Personal Access Token for authentication. It includes methods to fetch product lists and sales reports. ```csharp using System; using System.IO; using System.Net; using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace ApiClient { class Program { static void Main(string[] args) { Console.WriteLine(" --- Products --- "); AppfiguresApi client = new AppfiguresApi("PERSONAL_ACCESS_TOKEN"); var products = client.MakeRequest("products/mine"); foreach(var product in products){ Console.WriteLine(product.Value["name"]); } Console.WriteLine("\n--- Sales Over Past 7 Days ---"); var sevenDaySales = client.MakeRequest("/reports/sales?group_by=dates&start_date=-7"); foreach (var date in sevenDaySales) { var sales = date.Value; Console.WriteLine(String.Format("{0}: {1,-4}(${2:C})", date.Key, sales["downloads"], sales["revenue"])); } } } class AppfiguresApi { private static readonly Uri BaseUrl = new Uri("https://api.appfigures.com/v2/"); public readonly String AccessToken; public AppfiguresApi(String accessToken) { this.AccessToken = accessToken; } public JObject MakeRequest(String path) { Uri fullUri = new Uri(BaseUrl, path); WebRequest request = WebRequest.Create(fullUri); request.PreAuthenticate = true; request.Headers.Add("Authorization", $"Bearer {this.AccessToken}"); Console.Write(request.Headers["Authorization"]); WebResponse response = request.GetResponse(); using (StreamReader responseReader = new StreamReader(response.GetResponseStream())) { return JObject.ReadFrom(new JsonTextReader(responseReader)) as JObject; } } } } ``` -------------------------------- ### API Request with Personal Access Token Source: https://docs.appfigures.com/api/authentication/personal-access-tokens Pass your Personal Access Token in the Authorization header as a Bearer token to authenticate API requests. This example shows a GET request to the API root. ```http GET https://api.appfigures.com/v2/ Authorization: Bearer pat_1234 << Response 200 OK { "status": "200", "message": "OK", "see": "http://docs.appfigures.com/api", "version": "2.0", "user": { "id": 42, "name": "Test User", "email": "test@test.com", "avatar_url": "https://secure.gravatar.com/avatar/dbe9de53f77958ee4ff7e19697a58990?d=mm" }, . . . snip . . . } ``` -------------------------------- ### Get Subscription Data (No Grouping) Source: https://docs.appfigures.com/api/reference/v2/subscriptions Use this endpoint to retrieve a summary of subscription metrics. Specify a start date to filter the data. The response provides a flat object with key subscription metrics. ```http GET /reports/subscriptions?start_date=-30 { "active_subscriptions": 0, "active_free_trials": 0, "new_subscriptions": 0, "cancelled_subscriptions": 0, "new_trials": 0, "trial_conversion_rate": "0.00", "mrr": "0.00", "actual_revenue": "0.00", "renewals": 0, "first_year_subscribers": 0, "non_first_year_subscribers": 0, "reactivations": 0, "transitions_out": 0, "trial_cancellations": 0, "transitions_in": 0, "activations": 0, "cancellations": 0, "trial_conversions": 0, "churn": "0.0000", "gross_revenue": "0.00", "gross_mrr": "0.00", "active_grace": 0, "new_grace": 0, "grace_drop_off": 0, "grace_recovery": 0, "new_trial_grace": 0, "trial_grace_drop_off": 0, "trial_grace_recovery": 0 } ``` -------------------------------- ### Get Paid Keywords for an App Source: https://docs.appfigures.com/api/reference/v2/search-ads-intelligence Retrieve keywords an app appeared in paid search results for within a specified date range. Requires app ID, country codes, and a start date. Results are paginated. ```http GET /search-ads/products_?{filters}_ ``` ```http GET /search-ads/products? start_date=-30 &product=334288907959 &countries=US,GB &count=10 { "metadata": { "resultset": { "count": 10, "page": 1, "total_count": 2339, "total_pages": 234 } }, "results": [{ "countries": [{ "country": "GB", "impressions_share": "5.29" }, { "country": "US", "impressions_share": "6.32" }], "keyword_id": "689e68c4024c2e61e1e02ff6d0182a54", "keyword_term": "nba games for free", "product_id": 334288907959, "product_name": "Bubble Shooter Pop!", "impressions_share": "5.79" }] } ``` -------------------------------- ### Example Response After Product Update Source: https://docs.appfigures.com/api/reference/v2/products-2 This is the JSON response after successfully updating a product's source settings. It reflects the changes made to the `active` and `hidden` fields within the `source` object. ```json // PUT /products/31175 with above request body { id: 31175, name: "Plane Finder", . . . version: " 2.0.1 ", source: { external_account_id: 23830, added_timestamp: "2012-02-27T19:09:36", active: false, hidden: true, type: "own" }, . . . } ``` -------------------------------- ### GET /reports/usage - Getting Totals Source: https://docs.appfigures.com/api/reference/v2/usage Retrieves aggregated usage data based on specified filters. This endpoint is useful for getting a combined overview of your app's usage. ```APIDOC ## GET /reports/usage - Getting Totals ### Description Retrieves aggregated usage data based on specified filters. This endpoint is useful for getting a combined overview of your app's usage. ### Method GET ### Endpoint /reports/usage ### Parameters #### Query Parameters - **start_date** (Date) - Optional - Date (yyyy-mm-dd), inclusive, to start reporting from. Default: the beginning of time. - **end_date** (Date) - Optional - Date (yyyy-mm-dd), inclusive, to stop reporting. Default: today. - **group_by** (List) - Optional - One or more pivots separated by a comma (,). Available pivots: network, product, country, and date. Default: all active products in account. - **products** (List) - Optional - One or more products to include in the response separated by a comma (,). Default: all active products in account. - **countries** (List) - Optional - One or more countries to limit the report to separated by a comma (,). See /data/countries for all available countries. Default: include all countries. - **format** (String) - Optional - Output format: `JSON` or `CSV`. Defaults to `JSON`. ### Response #### Success Response (200) - The response will depend on whether you requested data for multiple networks or a single one. See metrics by network table above, or examples below. #### Response Example ```json { "apple:analytics": { "sessions": 3589097152, "avg_optin_rate": "0.43", "storefront": "apple:analytics", "store": "apple" }, "flurry_analytics": { "sessions": 1540311105, "storefront": "flurry_analytics", "store": "flurry_analytics" }, "google_analytics": { "sessions": 1251311105, "storefront": "google_analytics", "store": "google_analytics" } } ``` ``` -------------------------------- ### Featured History Response Example Source: https://docs.appfigures.com/api/reference/v2/featured Example JSON response for a featured history request. ```json // GET /featured/history/5923605/187899 [ { "time": "2016-06-27T00:00:00", "position": 56 } ] ``` -------------------------------- ### GET /users/{email or user_id} Source: https://docs.appfigures.com/api/reference/v2/users Get detailed information for a specific user by their email or ID. ```APIDOC ## GET /users/{email or user_id} ### Description Retrieve detailed profile information for a specific user. Requires account:read scope. ### Method GET ### Endpoint /users/{email or user_id} ### Parameters #### Path Parameters - **email** (String) - Required - The email address of the user to look up. ### Response #### Success Response (200) - **active** (Bool) - Whether or not the user is active - **currency** (String) - User's preferred currency - **role** (String) - Permission level (viewer, admin) - **name** (String) - Full name - **email** (String) - Email address #### Response Example { "active": true, "currency": "USD", "role": "admin", "name": "John", "email": "john@smith.com" } ``` -------------------------------- ### Make Authenticated API Requests Source: https://docs.appfigures.com/api/reference/v2/oauth Examples of how to include the Authorization header in HTTP requests to the Appfigures API. ```http GET https://api.appfigures.com/v2/products/mine HTTP/1.1 Authorization: OAuth oauth_signature_method=PLAINTEXT, oauth_consumer_key=mykey, oauth_token=accesstoken, oauth_signature=dogbert&accesskey ``` ```bash curl -XGET 'https://api.appfigures.com/v2/products/mine' \ -H'Authorization: OAuth oauth_signature_method=PLAINTEXT, oauth_consumer_key=mykey, oauth_token=accesstoken, oauth_signature=dogbert&accesskey' ``` -------------------------------- ### Retrieve Usage by Network, Date, and Product Source: https://docs.appfigures.com/api/reference/v2/usage Fetches usage metrics grouped by network, date, and product ID. ```json // GET /reports/usage/?group_by=networks,dates,products { "apple:analytics": { "2017-10-01": { "100000000000001": { "sessions": 109275, "avg_optin_rate": "0.32", ... "storefront": "apple:analytics", "store": "apple", "date": "2017-10-02", "product_id": 100000000000001 }, "100000000000002": { ... } } "2017-10-02": { ... }, }, "google_analytics": { "2017-10-01": { ... } }, ... } ``` -------------------------------- ### Get Product by Appfigures ID Source: https://docs.appfigures.com/api/reference/v2/products-2 Retrieve detailed metadata for a specific product using its unique Appfigures-assigned ID. This is useful for fetching information about a known product. ```http GET /products/212135374 ```