Verifying purchases with Envato API

Since the API documentation is pretty much useless and provides no example response, can someone please provide me with a JSON demo of what an API call to /buyer/purchases would return?

I wish to add easy purchase verification into my upcoming PHP apps for automatic updates and easier support.

Cheers.

(the ‘item’ element is the same as returned during individual item api query, including full item description)

{
  "buyer": {
    "id": 123456,
    "username": "buyer_name_here"
  },
  "author": {
    "id": 1234,
    "username": "dtbaker"
  },
  "purchases": [
    {
      "amount": "59.00",
      "sold_at": "2016-01-18T09:21:08+11:00",
      "item": {
        "id": 33333333333,
        "name": "name",
        "description": "desc",
        "site": "themeforest.net",
        "classification": "wordpress/creative",
        "classification_url": "http://themeforest.net/category/wordpress/creative",
        "price_cents": 5900,
        "number_of_sales": 102,
        "author_username": "dtbaker",
        "author_url": "http://themeforest.net/user/dtbaker",
        "author_image": "https://0.s3.envato.com/files/111547951/dtbaker-php-scripts-wordpress-themes-and-plugins.png",
        "url": "http://themeforest.net/item/beautiful-watercolor-hand-painted-creative-wordpress/14157442",
        "summary": "Widget Ready: Yes, Compatible Browsers: IE10, IE11, Firefox, Safari, Opera, Chrome, Edge, Compatible With: WooCommerce 2.4.x, Visual Composer 4.8.x, Software Version: WordPress 4.4.2, WordPress 4.4.1, WordPress 4.4, Columns: 2",
        "rating": 4.71,
        "rating_count": 7,
        "updated_at": "2016-03-02T03:00:00+11:00",
        "published_at": "2016-01-12T06:34:43+11:00",
        "trending": true,
        "attributes": [],
        "tags": [],
        "previews": {
          "live_site": {
            "href": "/item/beautiful-watercolor-hand-painted-creative-wordpress/full_screen_preview/14157442",
            "type": "live_site"
          },
          "icon_with_landscape_preview": {
            "icon_url": "https://0.s3.envato.com/files/164095185/creative-hand-drawn-watercolor-wordpress-theme.png",
            "landscape_url": "https://0.s3.envato.com/files/173394366/1.a-very-unique-handpainted-creative-WordPress-website-theme.__large_preview.png",
            "type": "icon_with_landscape_preview"
          },
          "landscape_preview": {
            "landscape_url": "https://0.s3.envato.com/files/173394366/1.a-very-unique-handpainted-creative-WordPress-website-theme.__large_preview.png",
            "type": "landscape_preview"
          },
          "icon_preview": {
            "icon_url": "https://0.s3.envato.com/files/164095185/creative-hand-drawn-watercolor-wordpress-theme.png",
            "type": "icon_preview"
          }
        },
        "wordpress_theme_metadata": {
          "theme_name": "Beautiful Watercolor",
          "author_name": "dtbaker",
          "version": "1.6.12",
          "description": "Beautiful Watercolor WordPress theme by dtbaker"
        }
      },
      "license": "Regular License",
      "support_amount": "0.00",
      "supported_until": "2016-07-19T00:21:08+10:00",
      "code": "e4e0942b-1212-1212-1212-121212121212"
    },
    {
      "amount": "58.00",
      "sold_at": "2014-11-14T08:19:32+11:00",
      "item": {
        "id": 123434344,
        "name": "name",
        "description": "desc",
        "site": "themeforest.net",
        "classification": "wordpress/ecommerce/woocommerce",
        "classification_url": "http://themeforest.net/category/wordpress/ecommerce/woocommerce",
        "price_cents": 5900,
        "number_of_sales": 513,
        "author_username": "dtbaker",
        "author_url": "http://themeforest.net/user/dtbaker",
        "author_image": "https://0.s3.envato.com/files/111547951/dtbaker-php-scripts-wordpress-themes-and-plugins.png",
        "url": "http://themeforest.net/item/boutique-kids-creative-wordpress-woocommerce/9367833",
        "summary": "High Resolution: Yes, Widget Ready: Yes, Compatible Browsers: IE9, IE10, IE11, Firefox, Safari, Opera, Chrome, Compatible With: WPML, WooCommerce 2.2.x, Software Version: WordPress 4.2, WordPress 4.1, WordPress 4.0, Columns: 2",
        "rating": 4.23,
        "rating_count": 22,
        "updated_at": "2016-03-01T08:50:52+11:00",
        "published_at": "2014-11-12T18:57:06+11:00",
        "trending": false,
        "attributes": [],
        "tags": [],
        "previews": {
          "live_site": {
            "href": "/item/boutique-kids-creative-wordpress-woocommerce/full_screen_preview/9367833",
            "type": "live_site"
          },
          "icon_with_landscape_preview": {
            "icon_url": "https://0.s3.envato.com/files/166458805/thumb_boutique.png",
            "landscape_url": "https://0.s3.envato.com/files/129807750/1.creative-kids-boutique-clothing-store-shop-woocommerce-wordpress-theme.__large_preview.jpg",
            "type": "icon_with_landscape_preview"
          },
          "landscape_preview": {
            "landscape_url": "https://0.s3.envato.com/files/129807750/1.creative-kids-boutique-clothing-store-shop-woocommerce-wordpress-theme.__large_preview.jpg",
            "type": "landscape_preview"
          },
          "icon_preview": {
            "icon_url": "https://0.s3.envato.com/files/166458805/thumb_boutique.png",
            "type": "icon_preview"
          }
        },
        "wordpress_theme_metadata": {
          "theme_name": "Boutique Kids",
          "author_name": "dtbaker",
          "version": "1.22",
          "description": "Boutique Kids WordPress Theme by dtbaker"
        }
      },
      "license": "Regular License",
      "support_amount": "0.00",
      "supported_until": null,
      "code": "e4e0942b-1212-1212-1212-121212121212"
    }
  ]
}
2 Likes

Thank you thank you thank you!