Overview
REST API specification for the Mesquita online store integration. Build this API on the POS side; the website consumes it as a read-only catalog client and sends online orders.
Architecture
POS
Master
Master
↓
REST API
↓
Website
Client
Client
Base URL
BASE
https://{your-pos-host}/api/v1- Format: JSON, UTF-8
- Currency: BRL (2 decimal places)
- Timestamps: ISO 8601 UTC (e.g.
2026-07-03T14:00:00Z)
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /products | List products (paginated, incremental sync) |
| GET | /products/{sku} | Single product |
| GET | /categories | Category tree |
| GET | /inventory | Bulk stock |
| GET | /inventory/{sku} | Stock for one SKU |
| POST | /orders | Create order from website checkout |
| GET | /orders/{pos_order_id} | Order status |
Order flow
Checkout
→
Website
→
POST /orders
→
POS validates & decrements stock
→
Webhook
→
Website updated
Synchronization rules
All catalog data is managed only inside POS. The website never writes products, categories, prices, or stock.
Website CAN ONLY
- Read products (
GET /products+ webhooks) - Read categories (
GET /categories) - Read prices (included in product payload)
- Read stock (
GET /inventory+ webhooks) - Create orders (
POST /orders)
Website CANNOT
- Create, edit, or delete products
- Change stock or prices
- Create, edit, or delete categories
Recommended sync
- Primary: webhooks from POS → website (real-time)
- Fallback: scheduled GET with
updated_sinceevery 15–60 minutes - Orders: website POST on checkout; status via webhooks or GET