BJ Printworks & Souvenirs

Inventory Management API — Siargao & Surigao Print Shop & Souvenir Store

Interactive Swagger Docs


API Endpoints

Auth

MethodEndpointDescription
POST/api/auth/registerRegister a new user
POST/api/auth/loginLogin
GET/api/auth/meGet current user
POST/api/auth/logoutLogout
PUT/api/auth/users/:id/roleUpdate user role (admin only)
GET/api/auth/usersGet all users (admin only, ?search=&status=&page=&limit=)
PUT/api/auth/users/:id/approveApprove a user (admin only)
PUT/api/auth/users/:id/rejectReject a user (admin only)
POST/api/auth/googleAuthenticate with Google
POST/api/auth/forgot-passwordRequest password reset OTP
POST/api/auth/reset-passwordReset password with OTP
PUT/api/auth/profileUpdate current user's profile

Categories

MethodEndpointDescription
GET/api/categoriesGet all categories (?search=&page=&limit=)
POST/api/categoriesCreate a category (with optional skuPrefix)
PUT/api/categories/:idUpdate a category (with optional skuPrefix)
DELETE/api/categories/:idSoft-delete a category

Products

MethodEndpointDescription
GET/api/productsGet all products (?search=&category=&isCustomizable=&page=&limit=)
GET/api/products/:idGet a single product
POST/api/productsCreate a product (SKU auto-generated from skuPrefix if omitted)
POST/api/products/importBulk import products (max 500, category matched by name)
PUT/api/products/:idUpdate a product
DELETE/api/products/:idSoft-delete a product

Orders

MethodEndpointDescription
GET/api/ordersGet all orders (?search=&status=&page=&limit=)
GET/api/orders/:idGet a single order
POST/api/ordersCreate an order (decrements stock)
PUT/api/orders/:idUpdate an order
DELETE/api/orders/:idSoft-delete an order

Tech Stack