1. Getting Started – Prerequisites
The Ultra Commerce Private API documentation can be found on Postman.
To access the Private API documentation and example collection, ask your PXM. You will be provided with a link to import the collection into your own Postman workspace (see step 2).
3. API Keys Setup
The Ultra Commerce team will automatically create a number of API keys for all new partner environments. This guide is for the creation of additional key groups and new users.
To create a new key, navigate to the Ultra Commerce admin.
Create a permission group. Navigate to the admin console → Accounts → Permission Group
- Click on ‘+ Add Permission Group’
- Name the group ‘API Keys Permission’
- Search for the name of the group you created and select the view icon → ‘Accounts’
As a private API user, you will want to ensure that all fields required for your account under ‘Data Permissions’ are set to ‘Yes’ (for example, in order to see all account data, create & update accounts through the API, you will want to make sure to check off all the related permissions).
Note: Permission groups are extremely granular and can control access to every listed component.
Within the ‘Action Permissions’ menu, ensure the ‘API Access Permissions’ is set to ‘Yes’
Further down on this page you will see a list of Admin API permissions listed. For example, if a user is not just fetching information, but also wants to update or edit info, then you would need to apply this here.
Note: Most permissions will cascade down if selected at the top level.
Next, we will be adding the user account to the permission group. From the top menu, select ‘Accounts’ → Account → select edit on the user you wish to add.
We recommend this is a separate account to your own if you have a super user account, as super user accounts cannot be assigned API Keys from the admin.
From the ‘Accounts’ window navigate down to ‘Permission Groups’ → search for ‘API’ and now select the ‘API Keys Permission’ group. Select → ‘Save’ from the top right to apply these permissions.
4. Generating Secret Keys
Within the account itself, to generate the key, select → ‘Actions’ → ‘Generate API Access Key’
Provide a name for the API key that will be generated and hit ‘Generate API Access Key’.
You should see a success message with the key info below.
Note: when sending this key info to a user, make sure it’s transmitted over a private channel.
5. Connecting to Private API
Navigate to the Private API Postman Collection → Ultra Commerce Private API.
From the variable tab in the center of the screen, input the URL, AccessKey and AccessKeysecret variables → Select ‘Save’
The URL valuable will match the admin url for your environment.
Your environment may have a Basic Authorization setup, which can be set up as variables in your collection. In this example, the ‘ServerUserName’ and ‘ServerPassword’ as shown below.
6. Selecting a Product by ID
Here’s an example request to get you started.
To access a product detail page through the API, we navigate down the collection to > ‘Product’ > ‘GET Get Product By Id’
Note: By using the correct variables in the setup will simplify the GET call parameters that you are required to input.
To find the product ID, navigate to the admin console → ‘Products’ → ‘Products’ and select the product you wish to view.
From the search bar at the top of the page, grab the ‘productID’ variable.
On the GET line, enter the value of the ‘productID’ that you are searching for,
As per the example below, you can see the Product values returned when this is correctly input.
You will see from the API response that all the same information is returned that is visible within the admin console itself.
Note: Any action of operation with the admin console can also be performed via Postman.
To see the Products listing, navigate to < GET get Products (By Default only 10 Products) and Click on send and the first 10 products will be returned as results that will be shown in the same order as you would see in the admin console.
To return more than 10, simply modify the parameter to control this.
Note: By cloning this into your own Postman collection, any changes you make will not affect the default private API collection.
Some other common actions to test would be updating or deleting SKUs or creating a new Product type for example.
Our Private API can now be used for building your own custom integrations or interfaces with which to interact with the Ultra Commerce data.