Documentation Index
Fetch the complete documentation index at: https://docs.jethings.com/llms.txt
Use this file to discover all available pages before exploring further.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
search | string | No | Search term to filter products (e.g., by barcode, name, or product reference) |
Success Response
Status Code:200 OK
Response Fields
Product Object
| Field | Type | Description |
|---|---|---|
id | string | Unique product identifier |
name | string | null | Product name (can be null) |
image | string | URL to the product image |
quantity | number | Available quantity in stock |
prices | array | List of price entries for the product across price lists |
createdAt | string (ISO 8601) | Product creation timestamp |
updatedAt | string (ISO 8601) | Last update timestamp |
Price Object (within prices)
| Field | Type | Description |
|---|---|---|
priceListId | string | Price list identifier |
priceListName | string | Human-readable price list name |
price | number | Price value for this product in the given price list |
Pagination Object
| Field | Type | Description |
|---|---|---|
page | number | Current page number |
limit | number | Number of items per page |
total | number | Total number of items |
totalPages | number | Total number of pages |
hasNext | boolean | Whether there is a next page |
hasPrev | boolean | Whether there is a previous page |
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