+44 20 881 67284

38,550,775 Royalty Free Stock Photos

How to use the Fotolia API

Method: user/getSalesData

This method allows to retrieve sales data ordered by date, latest first.


This method requires authentication with a valid session token.

HTTP method

This method is called with HTTP method GET.


Argument Type Element (array) Valid Values Default Value Detail
sales_type int
  • all
  • subscription
  • standard
  • extended
all Type of sales you want to get access to
offset int any positive integer 0 Sales selection offset
limit int any positive integer not bigger than 100 50 Sales selection limit
id int existing media id Restrict sales data to this particular media id

Returned Values

Element (path) Name Type Description
/ id int media ID
/ license string sold license
/ sale_type string sale type (extended, subscription or standard)
/ sale_date string sale date following ISO 8601 standard: YYYY-MM-DD HH:II:SS (without timezone)
/ commission float earned credits
/ withholdings float withholdings (if any)

Example Query

GET http://API_KEY:SESSION_TOKEN@api.fotolia.com/Rest/1/user/getSalesData?sales_type=standard&offset=0&limit=1

Example Response

        "sale_date":"2008-05-26 15:47:59",

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.
100: Missing Media ID
The media ID is missing. Media ID is required for this method.
101: Invalid Media ID
The media ID passed is not valid or doesn't correspond to any media.