Skip to main content

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:3000
Content-Type: application/json

Required Headers

The x-store-id header is required for all POS endpoints. Requests without this header will be rejected.

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 header
Requires 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 headers
  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Insufficient permissions or invalid store access
  • 404 Not Found: Store not found

Example Requests

Get all products:
Search products by barcode:
Search products by name:

Business Logic

Store Context

  • All product queries are scoped to the store specified in the x-store-id header
  • 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 prices array
  • 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