Retrieve a List of Products
Overview
This guide shows how to retrieve a list of products from the ShipMonk API using the GET /v1/products endpoint.
Prerequisites
- ShipMonk API Key (Account Settings > General Settings > Stores > ShipMonk API > Integration API Settings)
- Base URL:
https://api.shipmonk.com
Endpoint Details
GET https://api.shipmonk.com/v1/products
Authentication
Include your API key in the request header:
--header 'Api-Key: YOUR_API_KEY'Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
search | string | No | - | Search term to filter products |
page | integer | No | 1 | Page number (must be > 0) |
pageSize | integer | No | 50 | Number of items per page (max: 500) |
sortBy | string | No | "id" | Field to sort by |
sortOrder | string | No | "ASC" | Sort order: "ASC" or "DESC" |
status | string | No | - | Filter by status: "active", "disabled", or "blacklisted" |
dateCreatedStart | date-time | No | - | Filter by creation date (start) |
dateCreatedEnd | date-time | No | - | Filter by creation date (end) |
dateUpdatedStart | date-time | No | - | Filter by update date (start) |
dateUpdatedEnd | date-time | No | - | Filter by update date (end) |
For additional definitions and terminology, review our API field definitions here.
Example Request
curl --request GET \
--url 'https://api.shipmonk.com/v1/products?page=1&pageSize=50&sortOrder=ASC' \
--header 'Api-Key: YOUR_API_KEY'import requests
url = "https://api.shipmonk.com/v1/products"
headers = {"Api-Key": "YOUR_API_KEY"}
params = {"page": 1, "pageSize": 50}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(data)const options = {
method: 'GET',
headers: {'Api-Key': 'YOUR_API_KEY'}
};
fetch('https://api.shipmonk.com/v1/products?page=1&pageSize=50', options)
.then(response => response.json())
.then(data => console.log(data))
.catch(err => console.error(err));Response Format
{
"data": [
{
"id": "product_id",
"sku": "product_sku",
"name": "Product Name",
...
}
],
"total": 150,
"pages": 3,
"page": 1
}Response Fields
data: Array of product objectstotal: Total number of products matching the querypages: Total number of pages availablepage: Current page number
Steps to Retrieve Products
- Obtain your API key
-
Construct the request
- Set the base URL:
Production:
https://api.shipmonk.com/v1/productsSandbox:https://sandbox.shipmonk.com/v1/products - Add query parameters as needed (pagination, filters, sorting)
- Include the
Api-Keyheader with your API key
- Set the base URL:
Production:
-
Make the GET request
- Send the request to the endpoint
- Wait for the response
-
Parse the response
- Check for successful status code (200)
- Extract the
dataarray containing products - Note pagination info:
total,pages,page
-
Handle pagination (if needed)
- Check if
pages>page - Make additional requests with incremented
pageparameter - Continue until all pages are retrieved
- Check if
-
Error handling
- Catch network errors
- Handle authentication failures (401)
- Handle rate limiting (429)
- Validate response structure
Common Queries
Get all active products
curl --request GET \
--url 'https://sandbox.shipmonk.dev/v1/products?page=1&pageSize=50&sortBy=null&status=active' \
--header 'Api-Key: YOUR_API_KEY' \
--header 'accept: application/json'Get recently updated products
curl --request GET \
--url 'https://sandbox.shipmonk.dev/v1/products?dateUpdatedStart=2025-01-01T00:00:00Z&sortBy=dateUpdated&sortOrder=DESC' \
--header 'Api-Key: YOUR_API_KEY' \
--header 'accept: application/json'Updated about 1 month ago
What’s Next