Users

Important: This version of the API has been deprecated an is no longer supported. v1.1 will be completely deactivated on May 31st, 2015.
The /users resource allows access to user settings for the current user (used to authenticate), as well as sub-users, provided the user used to authenticate has the Admin role.

Getting details for a user

Request

GET /users/{email}

Arguments

email
The user’s email address

Response

currency The user’s preferred currency. Also the currency all monetary reports will be reported in.
region us or gb. The user’s preferred region for date and time format.
is_owner True if this user created the account, false otherwise.
share_of_profit The user’s share of the profit, represented as a float between 0.01 and 1.00
last_login Date of the user’s last login to the site
timezone The user’s preferred timezone. Also the timezone ranks reports will be reported in.
account An object representing the user’s account. See table below for details.
id The user’s Appfigures ID
role The permission level of this user. Possible values are: viewer, admin. Some resources cannot be accessed by viewer users. Requests to those resources will result in a 403 Forbidden error.
name The user’s full name
email The user’s email address.
products An array of products that this user has access to. Scroll down to the next method for more details about the product object.
date_format A format to match the user’s region.
Account
id The account’s Appfigures ID
company Account’s company name
auto_import A string representing the status of auto import for all linked iTunes Connect accounts
last_import The date of the last successful imported file for any of the iTunes Connect accounts linked to this account
plan The account’s plan: free, premium, publisher. Some resources cannot be accessed by users who are on the free plan. These resources will result in a 403 Forbidden error.

Example Response

// GET /users/john@apple.com

{
  "currency": "USD",
  "region": "US",
  "is_owner": true,
  "share_of_profit": "1.00",
  "last_login": "2010-11-21T18:14:22",
  "timezone": "Eastern Standard Time",
  "account": {
    "id": 123456,
    "name": null,
    "company": "Company",
    "auto_import": "1 On 1 Off",
    "last_import": "2010-11-21T06:00:25",
    "plan": "publisher"
  },
  "id": 11234,
  "role": "admin",
  "name": "John",
  "email": "john@apple.com",
  "products": [
    {
      "product_type": "app",
      "name": "an iOS app",
      "id": 364608,
      ...
    },
    ...
  ],
  "date_format": "MM/dd/yy",
}

Listing a User’s Products

Request

GET /users/{email}/products

Arguments

email
The user’s email address

Response

id An Appfigures generated id of the product
parent_id Only for in-apps: The Appfigures generated id this in-app belongs to
in_apps An array containing the ids of all in-apps purchases for this product
product_type Type of product. Possible values are: app, in_app, book.
Note: In-app purchases do not have ranks or reviews.
added_timestamp Date the product was first added to the Appfigures account
name Full name of the product
icon The URL of the icon
active Whether this product is active and tracked by Appfigures. Requests for inactive products will result in a 403 Forbidden response.
hidden A visibility flag set by the user to show or hide the product on Appfigures.com. The flag is exposed so that 3rd party developers can extend the experience users are already used to on the site.
sku The SKU or package name of the product.
store_id Id of the app store where this product is sold. Possible values:
0: iOS
1: Google Checkout
2: Mac
3: Google Play 4: Amazon Appstore
store_name Name of the app store where this product is sold.
external_account_id The id of the external account this app was imported through.
ref_no The product’s id in the app store (AppleId for iOS/Mac apps, null for Android apps).
addons An array containing additional features this product has. Currently the only possible value is “iads”.

Example Response

// GET /users/john@apple.com/apps

{
    "364604": {
      "product_type": "app",
      "added_timestamp": "2010-04-02T07:00:18",
      "name": "another iOS app",
      "id": 364604,
      "parent_id": 0,
      "icon": "",
      "active": false,
      "hidden": false,
      "has_iads": false,
      "sku": "com.appfigures.ios",
      "store_id": 0,
      "external_account_id": 58901,
      "store_name": "apple",
      "ref_no": "300934198",
      "addons": [
        "iads"
      ]
    },
    "620153": {
      "product_type": "app",
      "added_timestamp": "2009-06-28T07:00:00",
      "name": "just an Android app",
      "id": 620153,
      "parent_id": 0,
      "icon": "http://...icon.jpg",
      "active": true,
      "hidden": false,
      "has_iads": false,
      "sku": "com.appfigures.android",
      "store_id": 3,
      "external_account_id": 58901,
      "store_name": "androidmarket",
      "ref_no": "null",
      "addons": []
    },
    "364606": {
      "product_type": "inapp",
      "added_timestamp": "2010-07-15T00:00:00",
      "name": "An in-app purchase",
      "id": 364606,
      "parent_id": 320459,
      "icon": "",
      "active": true,
      "hidden": false,
      "has_iads": false,
      "sku": "com.appfigures.inapp",
      "store_id": 0,
      "external_account_id": 18901,
      "store_name": "apple",
      "ref_no": "400931111",
      "addons": []
    },
    "364607": {
      "product_type": "book",
      "added_timestamp": "2010-04-02T07:00:18",
      "name": "an iBook",
      "id": 364607,
      "parent_id": 0,
      "icon": "",
      "active": false,
      "hidden": false,
      "has_iads": false,
      "sku": "com.appfigures.book",
      "store_id": 0,
      "external_account_id": 18901,
      "store_name": "apple",
      "ref_no": "400100113",
      "addons": []
    },
    ...
}

Listing a User’s Linked Accounts

Request

GET /users/{email}/external_accounts

Arguments

email
The user’s email address

Response

id the Appfigures id of this linked account
account id The user’s account id
nickname An internal name for the account
username the account’s username
auto_import Whether the itc account is set to auto import reports
has_iads Whether this itc account has iAds enabled
active Whether this itc account has iAds enabled
type A string identifier for the type of linked account. Possible values: itunesconnect, androidmarket. This is different then store_id/store_name for products and is rather the channel from which data is imported.

Example Response

// GET /users/john@apple.com/ext_accounts

{
      1085: {
          "id": 1085
          "account_id": 1001
          "nickname": "Personal iTC"
          "username": "john@apple.com"
          "auto_import": true
          "has_iads": true,
          "active": true,
          "type": "itunesconnect"
      },
      19811: {
          "id": 19811
          "account_id": 1001
          "nickname": "Company iTC"
          "username": "info@johnsco.com"
          "auto_import": true
          "has_iads": false,
          "active": true,
          "type": "androidmarket"
      },
      ...
}