v1 · stable
MarketSquare API
RESTful endpoints with JSON payloads, cursor-based pagination, and idempotency keys on writes. Rate limits: 60 req/min per token, 600 req/min per seller account.
Authentication
POST
/v1/auth/sessionCreate a session token
Request
{ "email": "ava@marketsquare.co", "provider": "magic_link" }Response 200
{ "token": "sess_a1b2c3", "expires_in": 3600 }DELETE
/v1/auth/sessionRevoke the current session
Response 200
{ "revoked": true }Products
GET
/v1/productsList products with filters, sort, and pagination
Response 200
{ "data": [{ "id": "p1", "title": "Handthrown Terracotta Mug", "price": 28, "seller": "Elena Marín" }], "page": 1, "total": 132 }POST
/v1/productsCreate a product (seller)
Request
{ "title": "Ceramic Bowl", "price": 42, "stock": 12 }Response 200
{ "id": "p_new", "status": "active" }PATCH
/v1/products/:idUpdate product
Request
{ "price": 45 }Response 200
{ "ok": true }DELETE
/v1/products/:idDelete product
Response 200
{ "deleted": true }Orders
POST
/v1/ordersCreate an order
Request
{ "items": [{ "productId": "p1", "qty": 1 }], "address": "..." }Response 200
{ "id": "o_1032", "status": "pending", "total": 34 }GET
/v1/orders/:idFetch order
Response 200
{ "id": "o_1032", "status": "shipped" }POST
/v1/orders/:id/statusUpdate order status (seller)
Request
{ "status": "shipped" }Response 200
{ "ok": true }Messaging
GET
/v1/threadsList threads for the current user
Response 200
{ "data": [{ "id": "t1", "subject": "About the mug" }] }POST
/v1/threads/:id/messagesSend a message
Request
{ "text": "Yes, still in stock." }Response 200
{ "id": "m_x", "at": 1721539200000 }Admin
POST
/v1/admin/sellers/:id/verifyMark seller verified
Response 200
{ "verified": true }POST
/v1/admin/disputes/:id/resolveResolve dispute
Request
{ "resolution": "refund" }Response 200
{ "status": "resolved" }