mirror of
https://git.meshkee.com/Meshkee/backend.git
synced 2026-08-11 22:30:59 +04:30
Expose published customer listings under /tenants/:host/user-products (list, search, details, technical-info) and document them in the website API pack. Co-authored-by: Cursor <cursoragent@cursor.com>
129 lines
4.6 KiB
HTML
129 lines
4.6 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
<title>Meshkee Website API</title>
|
||
<style>
|
||
:root {
|
||
--bg: #0f1419;
|
||
--panel: #1a222c;
|
||
--text: #e8eef4;
|
||
--muted: #9aa8b5;
|
||
--accent: #3d9cf0;
|
||
--line: #2a3542;
|
||
}
|
||
* { box-sizing: border-box; }
|
||
body {
|
||
margin: 0;
|
||
font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
|
||
background: radial-gradient(1200px 600px at 10% -10%, #1b3a57 0%, var(--bg) 55%);
|
||
color: var(--text);
|
||
line-height: 1.55;
|
||
}
|
||
main {
|
||
max-width: 760px;
|
||
margin: 0 auto;
|
||
padding: 3rem 1.25rem 4rem;
|
||
}
|
||
h1 { font-size: 2rem; margin: 0 0 0.5rem; letter-spacing: -0.02em; }
|
||
h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }
|
||
p, li { color: var(--muted); }
|
||
strong { color: var(--text); }
|
||
code {
|
||
font-family: "IBM Plex Mono", ui-monospace, monospace;
|
||
background: #0b1015;
|
||
padding: 0.1rem 0.35rem;
|
||
border-radius: 4px;
|
||
color: #cde3f7;
|
||
font-size: 0.92em;
|
||
}
|
||
.panel {
|
||
background: var(--panel);
|
||
border: 1px solid var(--line);
|
||
border-radius: 12px;
|
||
padding: 1rem 1.1rem;
|
||
margin: 1rem 0;
|
||
}
|
||
a.btn {
|
||
display: inline-block;
|
||
margin: 0.35rem 0.5rem 0.35rem 0;
|
||
padding: 0.65rem 1rem;
|
||
border-radius: 8px;
|
||
background: var(--accent);
|
||
color: #061018;
|
||
text-decoration: none;
|
||
font-weight: 600;
|
||
}
|
||
a.btn.secondary {
|
||
background: transparent;
|
||
color: var(--text);
|
||
border: 1px solid var(--line);
|
||
}
|
||
.eyebrow { color: var(--accent); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<main>
|
||
<div class="eyebrow">Meshkee · Global storefront contract</div>
|
||
<h1>Website API</h1>
|
||
<p>
|
||
One API for <strong>every</strong> Meshkee business website. Not tied to a single domain.
|
||
Set your site’s apex host (e.g. <code>sanihome.ir</code>) and reuse the same endpoints.
|
||
</p>
|
||
|
||
<div class="panel">
|
||
<p style="margin:0 0 0.75rem"><strong>Global links</strong> (share these with designers & AI tools):</p>
|
||
<a class="btn" href="/docs/website/openapi.json">OpenAPI JSON</a>
|
||
<a class="btn secondary" href="/docs/website/Meshkee-Website-API.postman_collection.json">Download Postman</a>
|
||
<a class="btn secondary" href="/docs/website/AI_PROMPT.md">AI prompt</a>
|
||
<a class="btn secondary" href="/docs/website/SMS.md">Partner SMS</a>
|
||
</div>
|
||
|
||
<h2>Base URL</h2>
|
||
<p><code>https://api.meshkee.com/api/v1</code></p>
|
||
<p>Optional per-site alias (same backend): <code>https://api.<domain>/api/v1</code></p>
|
||
|
||
<h2>How tenants work</h2>
|
||
<ol>
|
||
<li>Variable <code>domain</code> = website apex only (no <code>www</code>/<code>api</code>/<code>customer</code>/<code>business</code>).</li>
|
||
<li><code>GET /tenants/{domain}</code> → <code>businessId</code>.</li>
|
||
<li>Public pages: <code>/tenants/{domain}/...</code> (no auth) — products, <strong>user-products</strong>, blogs, portfolios, store-items, etc.</li>
|
||
<li>Cart / orders / favorites: <code>/businesses/{businessId}/...</code> + Bearer JWT.</li>
|
||
</ol>
|
||
|
||
<h2>User products (customer listings)</h2>
|
||
<p>
|
||
Marketplace-style stock listings created by customers. Public read-only under
|
||
<code>/tenants/{domain}/user-products</code> (list / details / technical-info).
|
||
See OpenAPI tag <strong>User Products</strong>.
|
||
</p>
|
||
|
||
<h2>For a new website AI / designer</h2>
|
||
<ol>
|
||
<li>Open <a href="/docs/website/AI_PROMPT.md">AI_PROMPT.md</a> and paste it into the AI chat.</li>
|
||
<li>Replace <code><WEBSITE_DOMAIN></code> with that site’s apex.</li>
|
||
<li>Import the Postman collection (set <code>domain</code>, run Resolve tenant).</li>
|
||
<li>Or feed <code>openapi.json</code> to the AI / codegen tool.</li>
|
||
</ol>
|
||
|
||
<h2>Import Postman</h2>
|
||
<p>
|
||
Postman → Import → Link → paste<br />
|
||
<code>https://api.meshkee.com/docs/website/Meshkee-Website-API.postman_collection.json</code>
|
||
</p>
|
||
|
||
<h2>Partner SMS gateway</h2>
|
||
<p>
|
||
External backends (e.g. Balout) can send transactional SMS through Meshkee → Gama.
|
||
Server-to-server only — API key per allowlisted domain. See
|
||
<a href="/docs/website/SMS.md">SMS.md</a>.
|
||
</p>
|
||
<div class="panel">
|
||
<p style="margin:0"><code>POST /api/v1/public/sms/send</code></p>
|
||
<p style="margin:0.5rem 0 0">Header <code>X-Api-Key</code> + body <code>{ domain, to, message }</code></p>
|
||
</div>
|
||
</main>
|
||
</body>
|
||
</html>
|