Crea un nuevo producto.
Envía máximo 3 opciones.
Ejemplo de options: "options": [ { "name": "Talla", "values": ["SM", "LG", "XL", "MD"] }, { "name": "Color", "values": ["Red", "Blue"] } ] Para las variantes, combina los valores de las opciones.
Ejemplo de variants: "variants": [ { "price": 12, "wholesale_price": 10, "sku": "VAR-001", "option1": "SM", "option2": "Red" }, { "price": 14, "wholesale_price": 10, "sku": "VAR-002", "option1": "LG", "option2": "Red" }, { "price": 25, "wholesale_price": 13, "sku": "VAR-003", "option1": "XL", "option2": "Blue" } ] operationId: createProduct
Security
api-key
- Shops API Production serverhttps://mercately.shop/api/v1/products
curl -i -X POST \
https://mercately.shop/api/v1/products \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{
"product": {
"title": "string",
"description": "string",
"sku": "string",
"quantity": 0,
"active": true,
"price": 0,
"subcategory_id": "string",
"image_urls": [
"string"
],
"options": [
{
"name": "string",
"values": [
"string"
]
}
],
"variants": [
{
"price": 0,
"wholesale_price": 0,
"sku": "string",
"quantity": 0,
"image": "string",
"variant_url": "string",
"option1": "string",
"option2": "string",
"option3": "string"
}
]
}
}'Response
{ "message": "Producto creado con éxito", "product": { "web_id": "FzOWVvUwbC", "title": "Product 001", "description": "Product 001", "quantity": 20, "price": "1.5", "active": true, "url": null, "sku": "p004", "wholesale_price": "0.0", "images": [ … ], "subcategory": { … }, "category": { … }, "product_variants": [ … ], "product_variant_combinations": [ … ] } }