Create a product
Scope: inventory:products.write https://api.alladdin.com/api/v2/products
Creates a new product in your catalog. Products track inventory, pricing, and tax configuration. They can be physical goods with stock tracking or non-stockable items.
The response returns the new product id. You can then use this ID when adding line items to invoices, sales orders, and other documents.
Request body
object name string required
Product name
kind string required
Product kind: 'simple' for standard products, 'variants' for products with attributes (color/size), 'lots' for batch-tracked products, 'serialnumbers' for individually tracked products, 'pack' for product bundles.
Enum: simple lots pack variants serialnumbers description string | null optional
Product description
sku string | null optional
Stock keeping unit code
barcode string | null optional
Barcode value
price string | null optional
Unit sale price as a decimal string
default: null cost string | null optional
Unit cost price as a decimal string
default: null purchase_price string | null optional
Unit purchase price as a decimal string
default: null tags[] string[] | null optional
List of tag names
taxes[] string[] | null optional
Tax keys applied to this product. Accepts the human tax name (e.g. "IVA 21%") or the internal key (e.g. "s_iva_21"); resolved automatically.
stock number | null optional
Initial stock quantity
default: null weight number | null optional
Weight in account default unit
default: null has_stock boolean required
Whether stock tracking is enabled
for_sale boolean required
Whether the product is available for sale
for_purchase boolean required
Whether the product is available for purchase
variants[] object[] | null optional
Variants of the product (for variants, lots and serial numbers product types).
sku string | null barcode string | null price string | null cost string | null purchase_price string | null stock number | null description string | null weight number | null factory_code string | null archived boolean | null lot_number string | null
Only for LOTS products
start_date string<date> | null
Only for LOTS and serial number products. ISO 8601 format. Accepts date (YYYY-MM-DD) or datetime (e.g. 2025-01-01T00:00:00+00:00)
end_date string<date> | null
Only for LOTS and serial number products. ISO 8601 format. Accepts date (YYYY-MM-DD) or datetime (e.g. 2025-12-31T00:00:00+00:00)
pack_items[] object[] | null optional
Items included in this pack product.
product_selection string
Product ID or "productId#variantId"
units number show_start_date boolean | null optional
Show lot start date in documents. Only for LOTS products.
show_end_date boolean | null optional
Show lot end date in documents. Only for LOTS products.
warehouse_id string | null optional
Default warehouse identifier for this product
sales_channel_id string | null optional
Sales channel identifier for this product
exp_account_id string | null optional
Expense/purchases accounting account identifier for this product
Request
import requests
url = "https://api.alladdin.com/api/v2/products"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"name": "string",
"kind": "simple",
"description": "string",
"sku": "string",
"barcode": "string",
"price": "99.95",
"cost": "49.99",
"purchase_price": "20.00",
"tags": [
"string"
],
"taxes": [
"s_iva_21"
],
"stock": 10,
"weight": 0,
"has_stock": false,
"for_sale": false,
"for_purchase": false,
"variants": [
{
"sku": "string",
"barcode": "string",
"price": "19.99",
"cost": "string",
"purchase_price": "string",
"stock": 0,
"description": "string",
"weight": 0,
"factory_code": "string",
"archived": false,
"lot_number": "string",
"start_date": "2025-01-01",
"end_date": "2025-12-31"
}
],
"pack_items": [
{
"product_selection": "507f1f77bcf86cd799439011",
"units": 2
}
],
"show_start_date": false,
"show_end_date": false,
"warehouse_id": "string",
"sales_channel_id": "string",
"exp_account_id": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Responses
Response
{
"id": "507f1f77bcf86cd799439011"
}Success responses
201 Product created application/json object id string
Error responses
400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 422 Validation error application/json 429 Rate limit exceeded application/json
