Skip to main content
Easy Digital Downloads Documentation
Documentation, Reference Materials, and Tutorials for Easy Digital Downloads

EDD REST API – Introduction

Since v1.5, Easy Digital Downloads includes a complete RESTful API that allows store data to be retrieved remotely in either a jSON or XML format. The API includes methods for retrieving info about store products, store customers, store sales, and store earnings.

The API is accessed via the  edd-api end point of your store, like so: 

http://yoursite.com/edd-api/

NOTE: If you are getting a 404 error when visiting that link above, you may need to re-save your permalinks. Do this by going to Dashboard → Settings → Permalinks → Save.

In order to access the API, you will need to provide a valid public API key and also a valid token. An API key and token can be generated for any user by going to  Downloads → Tools → API Keys:

The secret key is used for internal authentication and should never be used directly to access the API.

Individual users may go to their own profile and find their own key:

Once you have an API key, you can begin utilizing the EDD API. Both the API key and the token need to be appended to the URL as query parameters, like so:

http://yoursite.com/edd-api/?key=&token=

Paging Parameters

By default, the EDD API will return 10 results per page for the customers, sales, and products queries.

If a query has 20 results, the first ten will be displayed by default, but then the second 10 can be accessed by adding  &page=2 to the query string, like so:

http://yoursite.com/edd-api/sales/?key=c281cf0a95be875d9eeb284fb004c938&token=5f9432f3ffa5945755ebc66179810d70&page=2

You can change the number of results returned by using the  number parameter. This example will return 25 results per page:

http://yoursite.com/edd-api/sales/?key=c281cf0a95be875d9eeb284fb004c938&token=5f9432f3ffa5945755ebc66179810d70&number=25

If you want to retrieve all results (no paging), set  number to -1.