POS API
The POS (Point of Sale) API provides endpoints for retrieving products in a store’s inventory. This API is designed for point-of-sale systems to quickly search and access product information.All POS API endpoints require the
x-store-id header to identify which store’s products you want to access.Endpoint Details
Base URL:http://localhost:3000Content-Type:
application/json
Required Headers
Get Products
GET/pos/products
Retrieve a paginated list of products from a store’s inventory. Each product includes all available prices across price lists. Supports search functionality to filter products.
Requires Authentication: Bearer token in Authorization headerRequires Header:
x-store-id
Query Parameters
Success Response
Status Code:200 OK
Response Fields
Product Object
Price Object (within prices)
Pagination Object
Possible Errors
400 Bad Request: Invalid query parameters or missing required headers401 Unauthorized: Missing or invalid authentication token403 Forbidden: Insufficient permissions or invalid store access404 Not Found: Store not found
Example Requests
Get all products:Business Logic
Store Context
- All product queries are scoped to the store specified in the
x-store-idheader - The store ID must be valid and the user must have access to that store
- Products from other stores are not accessible through this endpoint
Pricing
- Each product includes all available price entries in the
pricesarray - A product may have zero or more price entries, depending on associated price lists
Search Functionality
- The search parameter filters products across multiple fields (e.g., barcode, name, reference)
- Search is case-insensitive and supports partial matching
- If no search parameter is provided, all products in the store are returned (with pagination)
Pagination
- Results are paginated by default
- Default page size is 10 items per page
- Use pagination metadata to navigate through results