Discover/SanMar API
live

SanMar APIsanmar.com

Search and browse SanMar's wholesale apparel catalog via API. Get product details, MSRP, color variants, sizes, and category listings for 3 endpoints.

Endpoint health
verified 3d ago
search_products
get_category_listing
get_product_detail
3/3 passing latest checkself-healing
Endpoints
3
Updated
26d ago

What is the SanMar API?

The SanMar API exposes 3 endpoints that cover the full SanMar wholesale apparel catalog — from keyword and style-number search via search_products to per-category browsing and granular product detail pages. A single get_product_detail call returns MSRP, available sizes, color variant codes and thumbnails, gallery images, and companion products for any product ID found in search or listing results.

Try it
Page number (0-based).
Number of results per page.
Search keyword, style number, or brand name.
api.parse.bot/scraper/24a1a132-75ec-4306-914b-082c2353bcae/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/24a1a132-75ec-4306-914b-082c2353bcae/search_products?page=0&limit=3&query=polo' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace sanmar-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: SanMar Product API — search apparel, browse categories, inspect details."""
from parse_apis.sanmar_product_api import SanMar, ProductNotFound

client = SanMar()

# Search for polo shirts — limit= caps total items fetched across all pages.
for product in client.productsummaries.search(query="polo", limit=5):
    print(product.name, product.brand, product.style_number)

# Drill into a single search result to get full details.
summary = client.productsummaries.search(query="Sport-Tek", limit=1).first()
if summary:
    detail = summary.details()
    print(detail.name, detail.msrp, detail.available_sizes)
    for variant in detail.variants[:3]:
        print(f"  variant: {variant.name} ({variant.code})")

# Browse a category by constructing it from its path.
category = client.category("Polos-Knits/c/polosknits")
for item in category.list_products(brand="Port Authority", limit=3):
    print(item.name, item.status, item.url)

# Typed error handling: catch a not-found product.
try:
    missing = client.products.get(product_id="00000_NonExistent")
    print(missing.name)
except ProductNotFound as exc:
    print(f"Product not found: {exc.product_id}")

print("exercised: productsummaries.search / summary.details / category.list_products / products.get")
All endpoints · 3 totalmissing one? ·

Full-text search over SanMar's wholesale apparel catalog by keyword, style number, or brand name. Returns paginated results with product summaries. Paginates via zero-based page counter; each page returns up to `limit` items. The total result count is available in the pagination object.

Input
ParamTypeDescription
pageintegerPage number (0-based).
limitintegerNumber of results per page.
queryrequiredstringSearch keyword, style number, or brand name.
Response
{
  "type": "object",
  "fields": {
    "total": "integer total number of matching products",
    "products": "array of product summary objects with product_id, name, style_number, brand, description, categories, image_url, thumbnail_url, price_guest, status, url",
    "pagination": "object with page, perPage, totalEntries, totalPages, totalProducts"
  },
  "sample": {
    "data": {
      "total": 598,
      "products": [
        {
          "url": "https://www.sanmar.com/p/9060_TrueNavy",
          "name": "Sport-Tek® PosiCharge® Competitor™ Polo",
          "brand": "Sport-Tek",
          "status": "REGULAR",
          "image_url": "https://cdnp.sanmar.com/medias/sys_master/images/h9d/h53/31344427270174/624Wx724H_9060_TrueNavy-0-ST550TrueNavyModelFront8/624Wx724H-9060-TrueNavy-0-ST550TrueNavyModelFront8.jpg",
          "categories": [
            "Polos/Knits",
            "Polos/Knits|Essentials"
          ],
          "product_id": "9060_TrueNavy",
          "description": "Our #1 performance tee fabric—offered in a color-locking, moisture-wicking polo.",
          "price_guest": null,
          "style_number": "ST550",
          "thumbnail_url": "https://cdnp.sanmar.com/medias/sys_master/images/hca/h4f/31344427139102/90W_9060_TrueNavy-0-ST550TrueNavyModelFront8/90W-9060-TrueNavy-0-ST550TrueNavyModelFront8.jpg"
        }
      ],
      "pagination": {
        "page": 0,
        "perPage": 48,
        "totalPages": 13,
        "totalEntries": 598,
        "totalProducts": 598,
        "totalSpotlightContent": 0
      }
    },
    "status": "success"
  }
}

About the SanMar API

What the API Covers

The SanMar API provides structured access to SanMar's wholesale apparel catalog across three endpoints. search_products accepts a free-text query — a keyword like 'polo', a style number like 'ST550', or a brand name like 'Port Authority' — and returns paginated results including product_id, name, style_number, brand, description, image_url, and thumbnail_url. The pagination object on every listing response exposes totalEntries, totalPages, and perPage so you can walk the full result set.

Category Browsing

get_category_listing lets you pull products by category path (e.g. 'T-Shirts/c/tshirts' or 'Polos-Knits/c/polosknits') and optionally narrow by brand using the brand parameter. Both listing endpoints use 0-based page indexing and an optional limit param to control page size. Response shapes are identical to search_products, making it straightforward to treat search and category results uniformly.

Product Detail

get_product_detail takes a product_id (e.g. '9060_TrueNavy') obtained from any listing call and returns the full product record: msrp, style_number, description, available_sizes as a size-range label, a variants array with color code, name, and thumbnail, a gallery_images array of full-size image URLs, and a companions array linking related products. The product_id format encodes both item and color, so each color variant has its own detail record.

Reliability & maintenanceVerified

The SanMar API is a managed, monitored endpoint for sanmar.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when sanmar.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official sanmar.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
3d ago
Latest check
3/3 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a wholesale apparel product search tool using style numbers and brand queries from search_products.
  • Populate a reseller catalog by iterating category paths via get_category_listing with brand filtering.
  • Display color swatch selectors and size range labels by parsing the variants and available_sizes fields from get_product_detail.
  • Track MSRP changes over time by periodically fetching msrp from get_product_detail for a set of product IDs.
  • Build a uniform program configurator that surfaces companion products using the companions array on each product detail.
  • Generate product image galleries for an e-commerce front-end using gallery_images and thumbnail_url fields.
  • Audit brand assortment across categories by combining get_category_listing brand filtering with style number extraction.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does SanMar offer an official developer API?+
Yes. SanMar provides an official B2B web services API (SOAP/REST) documented at sanmar.com for registered resellers, covering inventory, purchase orders, and pricing. The Parse API covers the public-facing product catalog without requiring a B2B account.
How does `get_product_detail` handle color variants — does one call return all colors?+
Each product_id encodes an item-and-color pair (e.g. '9060_TrueNavy'), so each color variant has its own detail record. To cover all colors for a style, retrieve the variants array from one detail call, then request a separate get_product_detail call per variant code.
Does the API return real-time inventory levels or wholesale pricing?+
No. The API returns msrp (suggested retail price) and catalog fields like available_sizes and variants, but does not expose inventory counts or wholesale/tier pricing. Those fields require a SanMar B2B account and their official trade API. You can fork this API on Parse and revise it to add an endpoint that pulls inventory or wholesale price data once you have the required credentials.
What category paths can I pass to `get_category_listing`?+
The category_path parameter mirrors SanMar's URL structure, for example 'T-Shirts/c/tshirts' or 'Polos-Knits/c/polosknits'. If omitted, the endpoint returns all products across categories. You can discover valid paths by browsing sanmar.com and copying the URL segment after the domain.
Does the API cover SanMar's closeout or sale items?+
Not currently. The API covers the main catalog via search_products and get_category_listing with standard category paths. Closeout and promotional sections are not exposed as distinct endpoints. You can fork this API on Parse and revise it to add a category path or filter targeting those sections.
Page content last updated . Spec covers 3 endpoints from sanmar.com.
Related APIs in EcommerceSee all →
hanes.com API
Search and browse Hanes clothing products across categories like men's, women's, and sale items, and retrieve detailed information including sizes, colors, and real-time availability. Find exactly what you're looking for with product variants and comprehensive details to compare options before purchase.
hm.com API
Search H&M's US product catalog by keyword and instantly retrieve detailed information like prices, product images, available sizes, and real-time stock availability. Perfect for comparing items, tracking product details, or building shopping applications powered by H&M's current inventory data.
marisa.com.br API
Search and browse Marisa.com.br's fashion inventory to discover products by category, view detailed item information, and see what other shoppers are currently searching for. Access the complete category structure and identify trending products to stay updated on popular styles from this leading Brazilian fashion retailer.
urbanoutfitters.com API
Search Urban Outfitters' catalog to find products and browse categories, then view detailed information including prices, descriptions, color and size availability for each item. Check current sale counts and discover what's trending across the store's product lineup.
abercrombie.com API
Search and browse Abercrombie & Fitch products across categories, new arrivals, and clearance items while retrieving detailed product information like pricing and availability. Access curated collections and find exactly what you're looking for with powerful search capabilities.
thenorthface.com API
Search and browse The North Face's full product catalog by category, then access detailed information including specifications, pricing, and real-time inventory levels for any item. Find exactly what you're looking for with powerful product search and get complete product details in one place.
shop.sanrio.co.jp API
Search and browse Sanrio products by category, character, and keyword, while viewing detailed product information including pricing and availability from the official Sanrio Online Shop. Get autocomplete suggestions and discover new product releases to find the perfect Sanrio merchandise.
gap.com API
Search and browse Gap's product catalog by keyword or category, retrieve detailed product information including pricing, available sizes, colors, and customer reviews, get product recommendations, locate nearby Gap retail stores, and explore the full site navigation and category tree.