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

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

ParameterTypeRequiredDefaultDescription
searchstringNo-Search term to filter products
pageintegerNo1Page number (must be > 0)
pageSizeintegerNo50Number of items per page (max: 500)
sortBystringNo"id"Field to sort by
sortOrderstringNo"ASC"Sort order: "ASC" or "DESC"
statusstringNo-Filter by status: "active", "disabled", or "blacklisted"
dateCreatedStartdate-timeNo-Filter by creation date (start)
dateCreatedEnddate-timeNo-Filter by creation date (end)
dateUpdatedStartdate-timeNo-Filter by update date (start)
dateUpdatedEnddate-timeNo-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 objects
  • total: Total number of products matching the query
  • pages: Total number of pages available
  • page: Current page number

Steps to Retrieve Products

  1. Obtain your API key
  2. Construct the request

    • Set the base URL: Production: https://api.shipmonk.com/v1/products Sandbox: https://sandbox.shipmonk.com/v1/products
    • Add query parameters as needed (pagination, filters, sorting)
    • Include the Api-Key header with your API key
  3. Make the GET request

    • Send the request to the endpoint
    • Wait for the response
  4. Parse the response

    • Check for successful status code (200)
    • Extract the data array containing products
    • Note pagination info: total, pages, page
  5. Handle pagination (if needed)

    • Check if pages > page
    • Make additional requests with incremented page parameter
    • Continue until all pages are retrieved
  6. 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'


What’s Next