API Documentation
REST API for integration with your sales channels, warehouses and ERP functions.
Base URL: https://api.stogly.com
Authentication
Authentication is done using a Bearer token. First login, then include the token in the Authorization header. Authorization: Bearer <token>.
POST /api/auth/login
curl -X POST https://api.stogly.com/api/auth/login \
-H 'Content-Type: application/json' \
-d '{ "email": "demo@stogly.com", "password": "demo123" }'Response includes a JWT token and user information.
Products
- GET /api/products — list products
- GET /api/products/:id — product details
- POST /api/products — create
- PUT /api/products/:id — update
- DELETE /api/products/:id — delete
curl https://api.stogly.com/api/products \ -H 'Authorization: Bearer <token>'
Orders
- GET /api/orders — list orders (filters: status, startDate, endDate)
- GET /api/orders/:id — order details
- POST /api/orders — create order
- PUT /api/orders/:id/status — change status
Warehouses
- GET /api/warehouses — list
- GET /api/warehouses/:id — details
- POST /api/warehouses — create
- PUT /api/warehouses/:id — update
- DELETE /api/warehouses/:id — delete
Suppliers
- GET /api/suppliers — list
- GET /api/suppliers/:id — details
- POST /api/suppliers — create
- PUT /api/suppliers/:id — update
- DELETE /api/suppliers/:id — delete
Sales Channels
- GET /api/sales-channels — list
- GET /api/sales-channels/:id — details
- POST /api/sales-channels — create
- PUT /api/sales-channels/:id — update
- DELETE /api/sales-channels/:id — delete
- POST /api/sales-channels/:id/connect — connect
- POST /api/sales-channels/:id/disconnect — disconnect
- POST /api/sales-channels/:id/sync — sync
- GET /api/sales-channels/:id/statistics — statistics
- GET /api/sales-channels/:id/sync-history — sync history
Notifications
- POST /api/notifications/sms — send SMS notification
- POST /api/notifications/email — send email notification
Currency
- GET /api/currency/rates — list exchange rates
- POST /api/currency/convert — convert amount
- PUT /api/currency/rates — update rates
Webhooks
Support for Shopify, WooCommerce and local couriers (D Express, BEX, Post Express).
For full instructions and signature validation see the repository or contact support.
Notes
- All requests (except login/logout) require a Bearer token.
- CORS is enabled for local development (5173/5174).
- Response time may vary, default timeout is 30 seconds.