Edward Ocampo-Gooding 07/17/2009

Admin Resources Now Countable

After listening to early adopters of the Shopify API in the Developer Forums, we’ve rolled out the ability to issue count requests on resources like


The count requests look like and take the same conditions and parameters you’d give to the existing find request you’re used to – they just return a count of how many orders, products or other resource you’re querying for.

Here’s an example of how to ask how many orders have yet to be shipped:

We’ve also added counting to the ShopifyAPI library that comes with the shopify_app plugin, so you can now write
  ShopifyAPI::Order.count(:status => "unshipped")
and you’ll get back just what you expect.

Check out the updated docs in http://api.shopify.com and the open-source shopify_app plugin at Github.