API List

Endpoints

MethodPathWhoDescription
POST/api/auth/registerpubliccreate an account
POST/api/auth/loginpublicreturns JWT access + refresh token
GET/api/categoriespublicall categories (cached, ETag)
GET/api/products?category=&q=&page=&size=&sort=publicsearch with pagination
GET/api/products/{id}publicproduct detail (cached)
POST/api/admin/productsADMINcreate product
PUT/api/admin/products/{id}ADMINupdate product (evicts cache)
POST/api/admin/products/{id}/imagesADMINupload image (multipart)
GET/api/cartUSERcurrent cart with total
POST/api/cart/itemsUSERadd item
PATCH/api/cart/items/{productId}USERchange quantity
DELETE/api/cart/items/{productId}USERremove item
POST/api/ordersUSERcheckout: create order, reserve stock, start payment
GET/api/ordersUSERmy orders (paged)
GET/api/orders/{id}/invoiceUSERdownload invoice PDF
POST/api/orders/{id}/cancelUSERcancel if not shipped
POST/api/payments/webhookgateway (signed)payment success/failure callback
GET/api/admin/orders/exportADMINstream all orders as CSV
GET/actuator/health, /actuator/prometheusinfraprobes and metrics (management port)

A Full Checkout Call

Example

curl -i -X POST https://api.shopease.in/api/orders \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 5b1d7c4e-checkout-7" \
  -d '{"addressId":12,"paymentMethod":"UPI"}'

Example output

HTTP/2 201
location: /api/orders/1001
content-type: application/json
content-encoding: gzip

{"orderId":1001,"status":"PAYMENT_PENDING","items":[{"productId":3,"name":"Pixel 9","quantity":1,"price":54999.00}],
 "total":54999.00,"payment":{"provider":"razorpay","orderRef":"order_P9xk2LmQ1","upiIntent":"upi://pay?pa=shopease@icici&am=54999.00"}}

Note: The Idempotency-Key header lets the client retry safely after a network error: the server returns the same order instead of creating a second one.