Products
The Products API allows you to manage products in the POS inventory system. You can create, read, update, and delete products, as well as search by name and retrieve products formatted for select dropdowns.Endpoints
POST /api/pos/producto
Create a new product in the system.Unit of measurement for sales (max 10 characters)
Category code (max 10 characters, can be null)
Product name (max 60 characters)
Short description (max 60 characters)
Long description (max 255 characters)
Sale price (must be greater than 0)
Stock quantity (must be greater than 0)
Priority level: ‘L’ (Low) or ‘F’ (Fast/High)
Product image file (multipart/form-data)
Response
Generated product code
Success message
cURL
Example response
Example response
GET /api/pos/producto
Get all products with pagination.Page number for pagination (default: 1)
Response
Current page number
Number of items per page
Total count of products
Array of product objects
cURL
Example response
Example response
GET /api/pos/producto/search
Search products by name.Product name to search for
Page number for pagination (default: 1)
Response
Current page number
Number of items per page
Total count of matching products
Array of matching product objects
cURL
Example response
Example response
GET /api/pos/producto/type
Get products formatted for select dropdowns.Response
Array of simplified product objects for dropdowns
cURL
Example response
Example response
GET /api/pos/producto/:id
Get a specific product by ID.Product code/ID
Response
Product object with all details
cURL
Example response
Example response
PUT /api/pos/producto/:id
Update an existing product.Product code/ID to update
Unit of measurement for sales (max 10 characters)
Category code (max 10 characters, can be null)
Product name (max 60 characters)
Short description (max 60 characters)
Long description (max 255 characters)
Sale price (must be greater than 0)
Stock quantity (must be greater than 0)
Priority level: ‘L’ (Low) or ‘F’ (Fast/High)
Promotion percentage (0-100)
Product status: ‘ACT’ (Active), ‘INA’ (Inactive), or ‘SUS’ (Suspended)
Product image file (multipart/form-data)
Response
Success message
cURL
Example response
Example response
DELETE /api/pos/producto/:id
Delete a product by ID.Product code/ID to delete
Response
Returns 204 No Content on success.cURL