Crear un producto
inventory:products.writehttps://api.holded.com/api/v2/productsCrea un nuevo producto en tu catálogo. Los productos controlan el inventario, los precios y la información fiscal.
Cuerpo de la petición
Product name
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.
simplelotspackvariantsserialnumbersProduct description
Stock keeping unit code
Barcode value
Unit sale price as a decimal string
nullUnit cost price as a decimal string
nullUnit purchase price as a decimal string
nullList of tag names
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.
Initial stock quantity
nullWeight in account default unit
nullWhether stock tracking is enabled
Whether the product is available for sale
Whether the product is available for purchase
Variants of the product (for variants, lots and serial numbers product types).
Only for LOTS products
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)
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)
Items included in this pack product.
Product ID or "productId#variantId"
Show lot start date in documents. Only for LOTS products.
Show lot end date in documents. Only for LOTS products.
Default warehouse identifier for this product
Sales channel identifier for this product
Expense/purchases accounting account identifier for this product
Petición
import requests
url = "https://api.holded.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())Respuestas
Respuesta
{
"id": "507f1f77bcf86cd799439011"
}Respuestas exitosas
201Producto creadoapplication/jsonRespuestas de error
400Solicitud incorrectaapplication/json401API key inválida o no proporcionadaapplication/json403Permisos insuficientesapplication/json422Error de validaciónapplication/json429Límite de solicitudes excedidoapplication/json