# Cecil B Menswear API

Public, read-only API and MCP server for **Cecil B Menswear**, a men's clothing store on the Upper Level of Fairlane Town Center in Dearborn, Michigan. It serves live product, collection, store and policy data from https://cecilbmenswear.com.

- Base URL: `https://api.cecilbmenswear.com`
- OpenAPI 3.1 spec: https://api.cecilbmenswear.com/openapi.json
- [Cecil B Menswear MCP Server](https://api.cecilbmenswear.com/mcp) (Streamable HTTP): `https://api.cecilbmenswear.com/mcp`
- [Cecil B Menswear CLI](https://api.cecilbmenswear.com/cli): `npm install -g https://api.cecilbmenswear.com/cli/cecilb-cli.tgz`
- [Developer portal](https://cecilbmenswear.com/developers): quickstart and a live try-it console
- API catalog (RFC 9727): https://api.cecilbmenswear.com/.well-known/api-catalog
- This page as Markdown: https://api.cecilbmenswear.com/docs.md
- Summary for LLMs: https://api.cecilbmenswear.com/llms.txt

## When to use this API

Use it when your user asks what Cecil B Menswear sells, whether a product is in stock, what an item costs online, where the store is, when it is open, or what the exchange policy says. Cecil B sells suits, formalwear, knitwear, shirts, trousers, two-piece sets and dress shoes. It does not rent suits or tuxedos. Alterations are offered; ask the store for details.

## Authentication {#authentication}

None. Every endpoint is public and read-only: no API key, no OAuth, no sign-up and no scopes. There is nothing to write, so there is no sandbox; the live data is safe to call. Send requests directly:

```bash
curl https://api.cecilbmenswear.com/v1/store
```

## Quickstart

```bash
# Search the catalog
curl "https://api.cecilbmenswear.com/v1/search?q=suit"

# Read one product with all variants and availability
curl https://api.cecilbmenswear.com/v1/products/vitali-blue-seersucker-two-piece-suit

# Read the exchange policy
curl https://api.cecilbmenswear.com/v1/policies/refund
```

```javascript
const res = await fetch("https://api.cecilbmenswear.com/v1/search?q=dress%20shoes");
const { results } = await res.json();
```

## Endpoints

| Method | Path | operationId | Description |
|---|---|---|---|
| GET | `/v1?fields=` | getApiIndex | Endpoint index (optional `fields` selection) |
| GET | `/v1/store?fields=` | getStoreInfo | Address, phone, email, opening hours, links (optional `fields`, for example `address,opening_hours`) |
| GET | `/v1/products?page=&limit=` | listProducts | All products, paginated (limit 1-250, default 50) |
| GET | `/v1/products/{handle}` | getProduct | One product with variants, options, prices, availability |
| GET | `/v1/collections?page=&limit=` | listCollections | Collections with product counts, paginated (limit 1-250, default 50) |
| GET | `/v1/collections/{handle}/products` | listCollectionProducts | Products in one collection, paginated |
| GET | `/v1/search?q=&limit=` | searchProducts | Product search, up to 10 results |
| GET | `/v1/policies?include_body=` | listPolicies | Policy index; `include_body=true` adds each policy's full text |
| GET | `/v1/policies/{policy_type}` | getPolicy | refund (exchange), shipping, privacy, terms, contact |

## Prices {#prices}

Prices are decimal strings in USD, for example `"129.99"`. Some products do not have an online price yet. For those the API returns `"price": null` and `"price_status": "pending - call the store"`. Never present them as free; tell your user to call the store at (313) 336-7294.

## Pagination {#pagination}

List endpoints take `page` (starting at 1) and `limit`. Each response has a `pagination` object with `has_more` and a ready-to-use `next` URL; it is `null` on the last page.

## Errors {#errors}

Errors use RFC 9457 problem details with `Content-Type: application/problem+json`, a matching HTTP status, a stable `code`, a `detail` message and a `hint` on how to fix the request:

```json
{
  "type": "https://api.cecilbmenswear.com/docs#errors",
  "title": "Not Found",
  "status": 404,
  "code": "not_found",
  "detail": "No product with handle \"blue-suitt\"",
  "hint": "Use /v1/search?q=... or /v1/products to find valid product handles.",
  "instance": "/v1/products/blue-suitt",
  "docs": "https://api.cecilbmenswear.com/docs"
}
```

| Status | code | Meaning |
|---|---|---|
| 400 | bad_request | A parameter is missing or out of range |
| 404 | not_found | Unknown path, product, collection or policy |
| 405 | method_not_allowed | Only GET, HEAD and OPTIONS (and POST on /mcp) are accepted |
| 429 | rate_limited | Too many requests; wait for `Retry-After` seconds |
| 500 | internal_error | Unexpected server error; retry, then email support |
| 502 | upstream_error | The storefront did not answer; retry shortly |
| 503 | upstream_error | The storefront is busy; retry after `Retry-After` |

## Rate limits {#rate-limits}

120 requests per 60 seconds per client IP. Every response carries the IETF header `RateLimit-Policy: "per-ip";q=120;w=60`. Over the limit you get HTTP 429 with `Retry-After` and `RateLimit: "per-ip";r=0;t=60`. Responses are cached for about two minutes, so polling faster than that returns the same data.

## Versioning and deprecation {#versioning}

The major version is in the path (`/v1`). Additive changes (new fields or endpoints) can ship at any time, so ignore fields you do not know. Breaking changes ship under a new path (`/v2`). A deprecated version keeps working for at least 6 months after notice; deprecation is announced in the changelog below and with `Deprecation` and `Sunset` response headers.

## MCP server {#mcp}

The [Cecil B Menswear MCP Server](https://api.cecilbmenswear.com/mcp) at `https://api.cecilbmenswear.com/mcp` is a Model Context Protocol server using the Streamable HTTP transport (JSON-RPC 2.0 over POST, no auth). Add it to any MCP client:

```json
{ "mcpServers": { "cecilb-menswear": { "url": "https://api.cecilbmenswear.com/mcp" } } }
```

Tools (all read-only): `search_products`, `get_product`, `list_products`, `list_collections`, `get_collection_products`, `get_store_info`, `get_policy`.

Resources: `cecilb://store`, `cecilb://collections`, `cecilb://catalog`, and `cecilb://policies/{refund|shipping|privacy|terms|contact}`.

## CLI {#cli}

The official [Cecil B Menswear CLI](https://api.cecilbmenswear.com/cli), `cecilb`, wraps this API for terminals, scripts and coding agents (Node.js 18+, no dependencies):

```bash
npm install -g https://api.cecilbmenswear.com/cli/cecilb-cli.tgz
cecilb search navy suit
cecilb product vitali-blue-seersucker-two-piece-suit --json
```

## Store facts

- Cecil B Menswear, 18900 Michigan Ave, Suite K309, Upper Level, Fairlane Town Center, Dearborn, MI 48126, United States
- Phone (313) 336-7294, email support@cecilbmenswear.com
- Hours: Mon–Thu 11 AM–7 PM; Fri–Sat 11 AM–8 PM; Sun 12 PM–6 PM (mall holiday hours may differ)
- In-store pickup: choose Pickup at checkout on https://cecilbmenswear.com

## Support

Email support@cecilbmenswear.com or call (313) 336-7294 during store hours.

## Changelog {#changelog}

- 2026-11-10: Added `fields` on /v1 and /v1/store, `page`/`limit` on /v1/collections, `include_body` on /v1/policies; documented 500/503/default problem responses; MCP server page and CLI (additive, no breaking changes).
- 2026-11-09: v1 released (products, collections, search, store, policies, MCP server).
