Test with a Postman collection
Use the Postman collection to run and explore Elastic Path Commerce Cloud APIs. The collection includes the relevant types of requests for each endpoint, including create, read, update, and delete.
Prerequisites
Ensure that the Postman client is installed.
Ensure to download the latest postman collection and environment from the following links:
Procedure
In Commerce Manager, go to Settings > Application Keys.
Click Create New to create a new application key. See Creating an Application Key.
note
The legacy key is still supported but it should be used only if it is already in use.
Make a note of the following values:
- Client ID
- Client secret
- API base URL
Go to Postman client on your system and import Elastic Path commerce cloud Postman Collection.
Import the Environment file in Postman.
Make a note of
authUrl
andpcmUrl
values.Update the following environment variables with the values copied from Commerce Manager and the Environment file:
client_id
client_secret
baseUrl
authUrl
pcmUrl
note
If the store is in the
useast
environment, update thebaseUrl
,authUrl
, andpcmUrl
environment variables with the values for theuseast
environment.In Postman, open authentication folder and run the Get client credentials token or the Get implicit token requests.
Click Send.
Authentication for the current session is done, and an access token is returned. You can now test the rest of your API endpoints in your Postman collection. An access token is valid for an hour, you must authenticate the session and get new tokes every time the access token expires. For more information about authentication permissions, see Client credential token and Implicit token.