Skip to main content
Manage inventory products that are consumed by services, with automatic stock tracking and low-stock alerts.

Create Product

Requires authentication.
Create a new inventory product.
POST /api/v1/merchant/products
curl -X POST 'https://api.example.com/api/v1/merchant/products' \
  --cookie "session_token=your_session_token" \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Shampoo",
    "description": "Professional salon shampoo",
    "price": {"amount": 2500, "currency": "USD"},
    "unit": "ml",
    "max_amount": 5000,
    "current_amount": 3500
  }'
name
string
required
Product name
description
string
required
Product description (can be empty string)
price
object
Product cost or retail price
unit
string
required
Unit of measurement (e.g., “ml”, “g”, “oz”, “pieces”)
max_amount
integer
required
Maximum stock level (0-10,000,000,000)
current_amount
integer
required
Current stock level (0-10,000,000,000)

Response

Returns 201 Created on success.

Update Product

Requires authentication.
Update an existing product’s information and stock levels.
PUT /api/v1/merchant/products/{id}
curl -X PUT 'https://api.example.com/api/v1/merchant/products/1' \
  --cookie "session_token=your_session_token" \
  --header 'Content-Type: application/json' \
  --data '{
    "id": 1,
    "name": "Premium Shampoo",
    "description": "Professional salon shampoo - updated formula",
    "price": {"amount": 2800, "currency": "USD"},
    "unit": "ml",
    "max_amount": 6000,
    "current_amount": 4200
  }'
id
integer
required
Product ID
id
integer
required
Product ID (must match path parameter)
Other body parameters are the same as create.

Delete Product

Requires authentication.
Delete a product. Note that products currently in use by services cannot be deleted.
DELETE /api/v1/merchant/products/{id}
curl -X DELETE 'https://api.example.com/api/v1/merchant/products/1' \
  --cookie "session_token=your_session_token"
id
integer
required
Product ID to delete
Returns 200 OK on success, or 400 Bad Request if the product is in use.

Get All Products

Requires authentication.
Retrieve all products with their associated services.
GET /api/v1/merchant/products
curl -X GET 'https://api.example.com/api/v1/merchant/products' \
  --cookie "session_token=your_session_token"
Returns an array of products:
id
integer
Product ID
name
string
Product name
description
string
Product description
price
object
Product price
unit
string
Unit of measurement
max_amount
integer
Maximum stock level
current_amount
integer
Current stock level
services
array
Services that use this product

Stock Management

Products are automatically consumed when services are performed. The system:
  1. Tracks product usage per service (defined in service settings)
  2. Decrements stock when bookings are completed
  3. Alerts when stock falls below threshold
  4. Shows low stock products on the dashboard

Low Stock Alerts

Products appear in the dashboard’s low_stock_products when inventory is running low. The fill ratio indicates current stock as a percentage of max:
{
  "id": 1,
  "name": "Shampoo",
  "max_amount": 5000,
  "current_amount": 750,
  "unit": "ml",
  "fill_ratio": 0.15
}

Stock Calculations

When a service using products is booked:
// Example: Service uses 50ml shampoo per appointment
// Current stock: 3500ml
// After booking: 3500 - 50 = 3450ml
The system prevents bookings when required products are out of stock.

Product Units

Common unit types:
  • Volume: ml, l, oz, fl oz
  • Weight: g, kg, oz, lb
  • Count: pieces, units, applications
  • Custom: Any text string describing the unit

Best Practices

  1. Consistent Units: Use the same unit system throughout your catalog
  2. Appropriate Scale: Choose units that make sense for your usage (ml instead of l for small quantities)
  3. Clear Names: Use descriptive product names that identify the specific item
  4. Regular Updates: Update stock levels regularly through the update endpoint
  5. Price Tracking: Use the price field to track product costs for profitability analysis

Integration with Services

Products are linked to services through the service endpoints:
// In service creation/update
{
  "used_products": [
    {"id": 1, "amount_used": 50},
    {"id": 2, "amount_used": 20}
  ]
}
This creates automatic inventory deduction:
  • Product #1: 50 units per service
  • Product #2: 20 units per service
See the Services documentation for details on linking products to services.

Build docs developers (and LLMs) love