Ettajer for Developers

API

Versioned REST under /api/v1. Same Bearer auth as MCP. AI designs themes — commerce writes stay on Ettajer.

Stable v1

Compatible additions may ship without a new version. Breaking changes need /api/v2.

Shared services

REST and MCP call the same auth, scope, and tenant checks.

No commerce writes

Products, cart, and checkout are not writable through this API.

Response contract

Success  { "data": … }
List     { "data": { "products": […] }, "pagination": { "nextCursor", "hasMore", "limit" } }
Error    { "error": { "code", "message", "details?", "requestId" } }

Headers

X-Request-Id, X-RateLimit-*. Mutations accept Idempotency-Key. On 429: Retry-After.

Rate limiting

RATE_LIMIT_BACKEND=memory is not multi-instance safe. Use Redis with Upstash in production.

Core endpoints

Full machine contract: OpenAPI JSON.

Context

  • GET/api/v1/context

    Store snapshot + workflow.next

  • GET/api/v1/store

    Store profile

  • GET/api/v1/store/settings

    Settings & branding

Catalog (read)

  • GET/api/v1/products

    Cursor pagination

  • GET/api/v1/products/:id

    One product

  • GET/api/v1/collections

    List collections

  • GET/api/v1/collections/:id

    One collection

Commerce (read)

  • GET/api/v1/orders

    Read-only

  • GET/api/v1/orders/:id

    One order

  • GET/api/v1/customers

    Read-only

  • GET/api/v1/checkout

    Checkout summary

Themes

  • GET/api/v1/themes/schema

    Canonical schema

  • GET/api/v1/themes

    List drafts

  • POST/api/v1/themes

    Create draft

  • GET/api/v1/themes/:id

    Read theme

  • POST/api/v1/themes/:id/batch

    Fail-closed batch

  • POST/api/v1/themes/:id/preview-token

    Signed preview

  • POST/api/v1/themes/:id/publish

    Requires themes:publish

Media & navigation

  • GET/api/v1/media

    List media

  • POST/api/v1/media

    Register URL

  • GET/api/v1/navigation

    Read nav

  • PATCH/api/v1/navigation

    Update nav

MCP

  • POST/api/v1/mcp

    JSON-RPC tools & resources

Get a token

Create an app in the console, then call /api/v1 with Bearer auth.

Open console