Debug apps with Postman
Last updated
Last updated
Postman is an application that lets you send HTTP requests to ShopBase API endpoints. It can be a useful tool for getting started with the ShopBase API or for debugging your apps.
To make authorized requests to the ShopBase API from Postman, you need to generate private API credentials
The scopes you grant when generating your API credentials will give Postman the equivalent permissions. Proceed with caution when granting write access.
Step 1: To generate private API credentials, create a private app:
Consider skipping this part if you are already familiar with the content.
Step 2: Send your API Credentials into Postman's New Tab :
Click +
to create a new tab.
Click Authorization.
From the Type drop-down menu, select Basic auth.
In the Username and Password fields, enter your store's private API key and password respectively.
After you've authenticated your request, you need to specify the applicable HTTP method and API endpoint URL before you can send it. For example, you can use Postman to retrieve your store information:
From the request method drop-down menu, select GET.
Enter the store API endpoint, where <store-names>
is the name of your store:
3.Click Send.
If the request was formatted correctly, then the store information is returned:
Instead of entering your credentials in the Authorization section of Postman, you can paste a URL that includes your API key and password directly into the URL bar. The format of the URL is as follows, where <store-name>
is the domain of your store:
When you click Send, the data is returned to Postman in the body of the response.
Whenever you need support with your API call, you can contact our support team and send us the CURL request using the below instruction.
Please create a new private app or generate a new private key once the support process is done to ensure the security of your app.
Create the API request with Postman (Step 2: Send your API Credentials into Postman's New Tab in Get your ShopBase API credentials)
Select Code (</>) button on the top right.
Select cURL (Code Generation Settings).
Use the copy button and send the code to ShopBase Support.
After you've successfully sent an API request with Postman, you can save it into a collection. Collections group together related API calls and are a great way to organize your work in Postman.
To save an API request to a collection:
In the tab for the API call you've just sent, click the arrow next to Save.
Click Save As, then enter a Request name. You can also enter an optional description for the request.
Click Create collection.
Enter a name for your collection, then click the checkmark.
Select the name of your collection.
Click Save to (Name of your collection).
You can access your saved collections from the Collections tab in the sidebar.
Looking for a quick start? You can find details about all supported APIs in the Admin API reference.
After you've created a collection, you can add calls to help organize your API calls. For this example, you'll add a call that posts a product to your store.
To create a call and add it to your collection:
Click +
to open a new tab.
From the Type drop-down menu, select Basic Auth.
In the Username and Password fields, enter your store's private API key and password respectively.
From the API actions drop-down menu, select POST.
Enter the API endpoint for adding a product, where <@store_url>
is the URL of your store:
Click Body.
Select raw, then in the drop-down menu, select JSON (application/json).
In your browser, go to the Product reference
Scroll down to the Create a new product POST call and copy the JSON of the IPod Nano - White, 8GB product.
Paste the JSON in the Body of your Postman request.
11. Click Send. If the request is properly formatted, then the product response JSON will be returned to Postman.
Shopbase prevents HTTP Basic Auth POST requests that have cookies, which can cause POST calls to fail. If your POST call fails, then you should try clearing your cookies.
Also note that the request headers automatically update to include Content-Type:application/json:
12. After the call has sent successfully, click the arrow next to Save. 13. Select the name of your collection. 14. Click Save to (Name of your collection).
You can add as many API calls to a collection as you want. You can access your saved collections from the Collections tab in the sidebar.
Browse the Postman documentation to learn about collections and other features in more detail. You can also use Postman to help you build a public ShopBase app.