Storefront API
Customer profile
Self-service — current customer and order history.
All endpoints in this section require both a publishable key and a customer JWT.
X-Sellvik-Key: <publishable-key>
Authorization: Bearer <customer-jwt>Get current customer
GET /api/v1/store/customers/meResponse
{
"id": "u1b2c3d4-...",
"name": "Rafiul Hassan",
"email": "rafiul@example.com",
"phoneNumber": "+8801711000000",
"imageUrl": null,
"createdAt": "2026-05-20T10:00:00.000Z"
}Update profile
PATCH /api/v1/store/customers/meRequest body
Any subset of:
{
"name": "Rafiul H.",
"phoneNumber": "+8801711111111",
"imageUrl": "https://example.com/avatar.png"
}Email cannot be changed via this endpoint (it's the auth identifier). Password change is a separate flow (not yet exposed in v1).
Response
200 with the updated customer object.
List orders
GET /api/v1/store/customers/me/ordersReturns the authenticated customer's order history, newest first. Cursor-paginated.
Query parameters
| Name | Type | Default | Notes |
|---|---|---|---|
limit | integer (1–100) | 20 | Page size. |
cursor | string | — | From previous page. |
status | enum | — | Filter by order status (any of the lifecycle values). |
Response
{
"items": [
{
"id": "ord_a1b2c3...",
"orderNumber": "ACME-1042",
"status": "DELIVERED",
"subtotal": "2980.00",
"shippingCost": "60.00",
"discountAmount": "0.00",
"total": "3040.00",
"paymentMethod": "COD",
"items": [
{ "id": "oi...", "productId": "...", "name": "Emerald Kurti", "quantity": 2, "price": "1490.00", "total": "2980.00" }
]
}
],
"nextCursor": null
}Get single order
GET /api/v1/store/customers/me/orders/{orderId}404 not_found if the order doesn't exist or belongs to a different
customer (we don't reveal which).
Response
Same shape as a list item, with full detail (shipping address, tracking info if shipped, etc.).