# MindSeat API

Public JSON API for [mindseat.co](https://mindseat.co/) — rent remote-work equipment in Bali. No authentication, no API key.
Machine description: [https://mindseat.co/openapi.json](https://mindseat.co/openapi.json). Site overview for agents: [https://mindseat.co/llms.txt](https://mindseat.co/llms.txt).
The same operations are exposed as MCP tools at `https://mindseat.co/mcp` (Streamable HTTP, stateless).

## GET /api/products
Returns `{ packages: Product[], items: Product[] }` — what THIS brand lists, at this brand's prices. Only active products.
`priceMonth` / `priceWeek` are USD integers. Availability is not published: it is settled on WhatsApp, so never tell a
customer an item is in or out of stock. Use `id` as `productId` when ordering.

## GET /api/pricing
Returns the pricing rules: `weeklyRatio` (weekly = round(monthly × ratio)) and the long-term discount tiers
`tier1Months`/`tier1Pct`, `tier2Months`/`tier2Pct` (upfront payment only). Read them instead of hard-coding numbers.

## POST /api/orders
Only `customer.name` is required: the customer writes to us from their own WhatsApp, so we learn the number there, and the
delivery address is usually settled in the chat. Body:

```json
{
  "customer": { "name": "Ada", "email": "ada@example.com", "area": "Canggu" },
  "startDate": "2026-10-01",
  "durationUnit": "month",
  "durationCount": 2,
  "lines": [{ "productId": "the-essential", "qty": 1 }, { "productId": "32-uhd-4k", "qty": 1 }],
  "notes": "Deliver after 2 pm please"
}
```

Response `201`: `{ id, total, currency: "USD", whatsappUrl, subtotal, discountPct, discount, discountNote, breakdown }`.
Prices are computed on the server from the database. The order is **not confirmed** until the customer opens
`whatsappUrl` and sends the prefilled message to MindSeat; staff reply there to arrange delivery and payment.
Errors: `400 { error }` for validation problems or a product this brand does not list.

## Pricing rules (live values)
- Minimum rental 1 week (7 days), then any number of days. A week is 7 days, a month 30.
- Per line: under 30 days, days × weekly ÷ 7, never more than one month's price; from 30 days, days × monthly ÷ 30. Example: 10 days of a $99/month, $40/week package = $57; 26 days = $99; 35 days = $116.
- Weekly price = round(monthly × 0.4).
- Long-term discount on the subtotal, upfront payment only: 3+ months −15 %, 6+ months −20 %.

## Contact
WhatsApp +62 811-3888-8555 · support@mindseat.co · Canggu, Bali, Indonesia.
