Brooklinen Cart API

Read-only view of the current session cart.

OpenAPI Specification

brooklinen-cart-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Brooklinen Shopify Storefront JSON Cart API
  version: '2026-08-02'
  summary: Read-only JSON endpoints over the Brooklinen Shopify storefront.
  description: 'Unauthenticated, read-only JSON endpoints over the Brooklinen storefront at https://www.brooklinen.com. Brooklinen documents this surface itself, in the "Read-Only Browsing (No Authentication Required)" section of https://www.brooklinen.com/agents.md (mirrored at /llms.txt), for agents that need to read store data without transacting.


    NOT A PROVIDER-PUBLISHED SPEC. Brooklinen publishes no OpenAPI document. This description was generated by the API Evangelist enrichment pipeline from (a) the endpoint list Brooklinen publishes in /agents.md and (b) live probes of each endpoint on 2026-08-02. Every path below returned HTTP 200 when probed and every schema property below was observed in a real response body — nothing here is invented. Per-operation `x-evidence` records the probe. For transactional operations (cart, checkout, order) see the UCP/MCP surface at https://www.brooklinen.com/api/ucp/mcp, described in mcp/brooklinen-mcp.yml.'
  contact:
    name: Brooklinen
    url: https://www.brooklinen.com/pages/contact
  termsOfService: https://www.brooklinen.com/policies/terms-of-service
  x-generated: '2026-08-02'
  x-method: generated
  x-source: https://www.brooklinen.com/agents.md
servers:
- url: https://www.brooklinen.com
  description: Brooklinen production storefront (Shopify)
tags:
- name: Cart
  description: Read-only view of the current session cart.
paths:
  /cart.js:
    get:
      operationId: getCart
      tags:
      - Cart
      summary: Get the current session cart
      description: Returns the cart bound to the caller's session cookie. Anonymous callers receive a new, empty cart. Transactional cart and checkout operations are on the UCP/MCP surface, not here.
      responses:
        '200':
          description: The session cart.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
        '429':
          $ref: '#/components/responses/RateLimited'
      x-evidence:
        fetched: '2026-08-02'
        url: https://www.brooklinen.com/cart.js
        http_status: 200
        content_type: text/javascript; charset=utf-8
components:
  responses:
    RateLimited:
      description: Too many requests. Brooklinen's /agents.md instructs agents to back off on 429 responses.
  schemas:
    Cart:
      type: object
      description: The session cart, as observed on /cart.js.
      properties:
        token:
          type: string
        note:
          type:
          - string
          - 'null'
        attributes:
          type: object
        original_total_price:
          type: integer
        total_price:
          type: integer
        total_discount:
          type: integer
        total_weight:
          type: number
        item_count:
          type: integer
        requires_shipping:
          type: boolean
        currency:
          type: string
        items:
          type: array
          items:
            type: object