Discover the fundamentals of the Commerce API, acquire your credentials, and initiate sending requests.
This guide will walk you through making API requests using the Commerce API suite, which comprises two API collections: Shopper and Admin APIs. The Shopper APIs allow you to create a storefront, manage shopper workflows, operate your store, and display products. To make shopper requests, you will need an API key with permission to use the Shopper APIs and an anonymous or authenticated token.
If you are an administrator or operator, the Admin APIs can be used to manage refunds, subscriptions, sites, and products. You will need an API key with permission to use the Admin APIs to make admin requests. It's important to note that you can obtain an API key that provides access to both the Shopper and Admin APIs.
By the end of this guide, you will know how to obtain your API keys, import the Postman collections, and run each request. The collections provide the basic requests to submit a simple order through the Commerce API.
Before sending Commerce API requests, use the Request Demo form to start the site creation process, request API keys, or contact your account manager.
- To access Commerce API on a trial basis, state that you need a "test API key for the Commerce API suite."
- To access the Shopper APIs and the Admin APIs collections, state that your "keys need permission to use both the Shopper APIs and the Admin APIs."
Digital River will reach out to you with more information. You can use your secret key to make API calls if you already have a Commerce API account.
Digital River uses these keys to authenticate your API requests. The API key you use to authenticate the request determines whether the request is in live mode or test mode. The API returns an error if you forget to provide your key or use an incorrect or outdated key.
After you obtain your API keys, you'll want to perform some test requests. The following steps demonstrate how to do this:
- 1.Go to the Commerce API Postman Collection page on GitHub and follow the instructions to install the API demo collection.
- 2.Complete the following steps:
- 3.Click the View more actions () icon on the Commerce API Quick Start collection you just imported and select Edit.
- 4.In the Edit Collection window, select the Variables tab.
- 5.Using the Current Value fields, enter the appropriate API key for each variable, and click Update.
- apiDomain: For the production environment, enter
api.digitalriver.comin the Current Value field. For the client test environment (CTE), enter
api-cteext.digitalriver.comin the Current Value field.
- publicApiKey: Provide the public API key provided by Digital River in the Initial Value and Current Value fields.
- drjsApiKey: Provide the DigitalRiver.js key supplied by Digital River in the Initial Value and Current Value fields.
- confidentialApiKey: Provide the confidential API key supplied by Digital River in the Initial Value and Current Value fields.
- confidentialSecret: Provide the confidential secret supplied by Digital River in the Initial Value and Current Value fields.
- 6.Once you set up the variables, run each request individually or use the collection runner to run each one sequentially.
Now that you've successfully performed a series of simple test requests, you dive deeper into the Commerce API.
If you have questions or concerns or want to move forward with Digital River, please visit our website at https://www.digitalriver.com/ and click Talk To Sales.