Saltar al contenido principal
For developers & AI agents

Developers & AI agents

Public, read-only APIs and machine-readable resources for building on the Breeza cooling-sleep catalog — an OpenAPI spec, JSON search & reviews endpoints, structured errors, rate-limit headers, and agent instructions.

Overview

Breeza publishes a small, public, read-only API over its cooling-sleep catalog and customer reviews, plus a set of machine-readable resources so AI assistants and automated clients can discover, search, and cite the store reliably. Everything on this page is same-origin, needs no API key, and never modifies cart, checkout, or account state — those flows require a human shopper.

Machine-readable resources

Authentication

None. The endpoints below are public and read-only, so no key or token is required. They are rate-limited per client IP; write operations (cart, checkout, account) are not part of this contract and are intentionally excluded.

Search the catalog & journal

GET /api/search

Full-text search across products and journal articles. Returns up to 6 products (title, handle, thumbnail, cheapest price in the resolved currency) and up to 5 matching articles. Pass q (min 2 characters) and an optional two-letter country to resolve currency and language.

curl "https://www.breezasleep.com/api/search?q=cooling+blanket&country=us"

Read approved product reviews

GET /api/reviews

Paginated list of approved customer reviews for one product. Supports page, limit (max 50), sort (newest, oldest, highest, lowest, photos_first), a single-rating stars filter, and with_photos=1. Only approved reviews are ever returned.

curl "https://www.breezasleep.com/api/reviews?product_id=prod_123&sort=highest&limit=12"

Rate limits

Every response carries RFC 9331 rate-limit headers so a client can self-throttle without probing for 429s. On HTTP 429 a Retry-After (seconds) is also sent — back off for that long before retrying.

RateLimit-Limit: 30
RateLimit-Remaining: 28
RateLimit-Reset: 42
RateLimit-Policy: 30;w=60

Error format

Errors are structured JSON — never an HTML page — with a stable machine-readable code, a human message, and, where useful, a hint for recovery.

{
  "error": {
    "code": "invalid_request",
    "message": "product_id required",
    "hint": "Pass a valid Medusa product id, e.g. ?product_id=prod_123."
  },
  "message": "product_id required"
}

Codes: rate_limited, invalid_request, not_found, method_not_allowed, upstream_unavailable.

Markdown content negotiation

Request any page with Accept: text/markdown and the store returns a concise Markdown representation (with a canonical link back to the HTML) instead of the full page, following the acceptmarkdown.com convention.

curl -H "Accept: text/markdown" "https://www.breezasleep.com/es/about"

In-browser tools (WebMCP)

When an agentic browser loads the storefront, a read-only search_products tool is registered on navigator.modelContext, letting an in-page agent query the catalog through the same public search surface.

Guidelines for agents

  • These endpoints are public and read-only. Do not attempt checkout, payment, or account changes on a shopper's behalf — hand off to the linked product and cart pages instead.
  • Respect the RateLimit-* headers and Retry-After; back off rather than retrying tight.
  • Prices and currency depend on the country parameter — state the currency you resolved when quoting a price.
  • For the full “when to use Breeza” guidance, read /agent.txt.