getUserAdvancedStats
This methods allows you to get sales/views/income statistics from your account.
Authentication
This method requires authentication.
Arguments
| Argument | Type | Valid Values | Default Value | Detail |
|---|---|---|---|---|
api_key |
string | Valid Values | required | you need a valid api key to use the API |
session_id |
string | Valid session ID | required | authentified session ID( use loginUser to create a session ID) |
type |
string | member_viewed_photos, member_downloaded_photos, member_bought_photos, member_earned_credits, all |
required | Type of data to retrieve |
time_range |
string | day, week, month, quarter, year |
required | Group by clause |
easy_date_period |
string | all, today, yesterday, one_day, two_days, three_days, one_week, one_month |
Valid values for simple date statistics | |
start_date |
string | YYYY-MM-DD ( ex : 2007-10-15) | Start date | |
end_date |
string | YYYY-MM-DD ( ex : 2007-10-16) | End date |
Returned Values
| Element (path) | Name | Type | Description |
|---|---|---|---|
| /[n]/ | date value |
string | depends on the 'displayed_period' value : it can be "2007-09-31" for a displayed_period by "day" or "2007-09" for displayed_period by "month". See Example Response. |
Example Query
<?xml version="1.0" encoding="utf-8"?>
<methodCall>
<methodName>xmlrpc.getUserAdvancedStats</methodName>
<params>
<param>
<value>
<string>YOU_API_KEY</string>
</value>
</param>
<param>
<value>
<string>YOUR_SESSION_ID</string>
</value>
</param>
<param>
<value>
<string>member_viewed_photos</string>
</value>
</param>
<param>
<value>
<string>week</string>
</value>
</param>
<param>
<value>
<string>one_month</string>
</value>
</param>
</params>
</methodCall>
Example Response when relevant
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>2007-36</name>
<value>
<string>2</string>
</value>
</member>
<member>
<name>2007-38</name>
<value>
<string>1</string>
</value>
</member>
<member>
<name>Total</name>
<value>
<string>3</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
Error Codes
001: Service currently unavailable- The requested service is temporarily unavailable.
002: Failed to parse request- The XML-RPC request document could not be parsed.
010: Missing API Key- The API key passed is missing.
011: Invalid API Key- The API key passed is not valid or has expired.
020: Missing Session ID- The session ID passed is missing. A valid session ID is needed to access this method
021: Invalid Session ID- The session ID passed is not valid. Please login to get a valid session ID.
031: Invalid Method- This method does not exist in the method list.
032: Method not Available- This method is not available for this API Key.
6001: Invalid time range- The time range is not in the valid range list.
6002: Invalid type of statistics- The statistics type is not in the valid types list.
6003:Invalid date format, must be like YYYY-MM-DD- The date is not valid, format is not respected
6004: Invalid easy date period- The date period is not in the valid periods list.



Fotolia US
Fotolia España
Fotolia France
Fotolia UK
Fotolia Deutschland
Fotolia Italia
Fotolia Portugal
Fotolia Polska
Fotolia Brasil
Fotolia 日本
Fotolia Europe
Fotolia Turkey
Fotolia China