We are basing our API on a REST styled design. API location Each REC domain/site will have the API accessible at the following address: http(s)://{domain}/api/v1/

so to access resources you would do: http(s)://{domain}/api/v1/{resource}.{format}

e.g. To get to a list of products: http://store.com/api/v1/products.json

also you can drill down levels on some resources to get a specific item, or a subset of another resource filtered by this one. e.g. To get to a specific product:http://store.com/api/v1/products/773.json

To get to a list of categories: http://store.com/api/v1/categories.json

To get to a specific category: http://store.com/api/v1/categories/84.json

The API is a sub directory on each store. This is because we may not be in control of all sub-domains and allows us to package it easier as part of the main code.

The version number will also be part of the URL, making it mandatory for developers to specify the version of the API they are using. This will avoid breaking code. (e.g. Facebook's API made this an optional URL param, unfortunately this has resulted in many Facebook apps breaking as new versions get released because they didn't specify a version, which we will aim to avoid at all costs).