+44 20 881 67284

38,388,574 Royalty Free Stock Photos

How to use the Fotolia API

Method: user/getUserAdvancedStats

This methods allows you to get sales/views/income statistics from your account.


This method requires authentication with a valid session token.

HTTP method

This method is called with HTTP method GET.


Argument Type Valid Values Default Value Detail
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

GET http://API_KEY:SESSION_TOKEN@api.fotolia.com/Rest/1/user/getUserAdvancedStats?type=member_viewed_photos&time_range=week&easy_date_period=one_month

Example Response when relevant


Error Codes

001: Service currently unavailable
The requested service is temporarily unavailable.
002: Failed to parse request
The request 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 Token
The session token passed is missing. A valid session token is needed to access this method
021: Invalid Session Token
The session token passed is not valid. Please login to get a valid session token.
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.
6005: Statistics need to be generated, please try again later
The statistics for the member need to be generated and are not currently available, please try again in about 15 minutes