336 posts No! It's not a 5 minute job!
  • Elite Author: Sold more than $75,000 on Envato Market
  • Won a competition
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+14 more
WebFactory says
I must be missing something, the question is simple – how to get sales via API for just one marketplace. These two links return the same data (amount, rate, sold-at, item):
http://codecanyon.net/api/edge/webfactory/API_KEY/recent-sales.json
http://themeforest.net/api/edge/webfactory/API_KEY/recent-sales.json

So how to tell which item was sold on which marketplace? Yes I could list all items and then match … but that seems silly …

363 posts
  • Member of the Envato Team
  • Has been part of the Envato Community for over 5 years
  • Has sold $10,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
+8 more
Philo01 Envato team says

If I’m correct, this is not possible. Not 100% sure. ;)

336 posts No! It's not a 5 minute job!
  • Elite Author: Sold more than $75,000 on Envato Market
  • Won a competition
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+14 more
WebFactory says

If I’m correct, this is not possible. Not 100% sure. ;)

:( I’ll have to define a list of items and then cross-match.

18 posts
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Located in Europe
+3 more
webarto says

API should return item ID not item name, either way, you have to have array/table with item ID, item name, and marketplace it belongs to. I think that API shouldn’t return that data, overall, it is very bad.

If anyone finds it useful (without database)

$json = file_get_contents('http://codecanyon.net/api/edge/username/key/recent-sales.json');
$json = json_decode($json, true);

$marketplaces = array(
    'PHP Mobile Device Detect' => 'codecanyon',
    'Google Did You Mean PHP Class' => 'codecanyon',
);

foreach($json['recent-sales'] as $key => $value)
{
    $value['marketplace'] = $marketplaces[$value['item']];
    echo "{$value['item']} ({$value['marketplace']})", '<br />';
}
PHP Mobile Device Detect (codecanyon)
Google Did You Mean PHP Class (codecanyon)
PHP Mobile Device Detect (codecanyon)
Google Did You Mean PHP Class (codecanyon)
PHP Mobile Device Detect (codecanyon)

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by