Products API

Manage your product catalog, track inventory, and organize your services and offerings for use in quotations and storefronts.

Product Management

The Products API allows you to manage your catalog of products and services, including pricing, inventory levels, and product variants.

Create Product

POST /api/v1/products
'Response', 'content' => '{ \"id\": 456, \"name\": \"Wedding Cake\", \"description\": \"Custom wedding cake with 3 tiers\", \"slug\": \"wedding-cake-abc123\", \"price_cents\": 75000, \"currency\": \"TTD\", \"sku\": \"CAKE-WEDDING-001\", \"category\": \"Cakes\", \"track_inventory\": true, \"inventory_quantity\": 10, \"low_stock_threshold\": 2, \"is_active\": true, \"metadata\": { \"weight_kg\": 5.5, \"serves\": 50, \"preparation_time_hours\": 8 }, \"created_at\": \"2024-08-14T10:30:00Z\", \"updated_at\": \"2024-08-14T10:30:00Z\" }' ] ]" default="Request" />

List Products

GET /api/v1/products

Update Inventory

Adjust product inventory levels manually or in response to sales:

PATCH /api/v1/products/{id}/inventory
'Set Absolute', 'content' => 'PATCH /api/v1/products/456/inventory Authorization: Bearer sk_test_... Content-Type: application/json { \"quantity\": 15, \"note\": \"Stock replenishment\" }' ] ]" default="Adjust Quantity" />

Request Parameters

Parameter Type Required Description
name string Yes Product name
price_cents integer Yes Price in cents
currency string Yes 3-letter currency code
description string No Product description
sku string No Stock keeping unit
category string No Product category
track_inventory boolean No Enable inventory tracking
inventory_quantity integer No Current inventory level
metadata object No Custom key-value pairs

Inventory Management

Products with inventory tracking provide several benefits:

Automatic Updates

Inventory levels automatically decrease when products are sold through invoices or payment links.

Low Stock Alerts

Receive notifications when inventory levels fall below your defined threshold.

Out of Stock

Products automatically become unavailable when inventory reaches zero.

Manual Adjustments

Make inventory adjustments for restocking, damaged goods, or corrections.