ES | EN

📄 MIPYME Documents

Creates a new product

POST
Endpoint URL https://apifacto.com/v1/products
Adds a new product with the provided details.

Merchandise or service: the product is created as merchandise (with inventory control) when type = 1 or when inventories are sent; otherwise it is created as a service.

Ecommerce sync: if the account has an active ecommerce integration (WooCommerce, Shopify or Jumpseller), active products with a SKU are sent to the store (matched by SKU), and the initial stock is synchronized too. Use ecommerce_status = draft to create the product as a draft in WooCommerce.

Parameters

No parameters.

Request body — fields

FieldTypeRequiredDescription
namestringAlways requiredProduct name.
invoicing_detailsstringOptional—
additional_detailsstringOptional—
modelstringOptional—
brandstringOptional—
statusintegerOptional1 = Active, 0 = Inactive. Only active products are synchronized with the ecommerce integration.
skustringOptionalProduct SKU. Must be unique among active products. Required to synchronize the product with the ecommerce integration.
barcodestringOptional—
measure_unitstringOptional—
typeintegerAlways required0 = Standard product
1 = Variable product master
With type = 1 the product is always created as merchandise.
embedded_quantity_barcodeintegerOptional—
embedded_quantity_barcode_decimalsintegerOptional—
additional_data_1stringOptional—
additional_data_2stringOptional—
additional_data_3stringOptional—
favoriteintegerOptional—
ecommerce_statusenum(publish, draft)OptionalOptional. Status used when the product is created in the WooCommerce store: publish (default) or draft.
product_category_idintegerOptionalProduct category ID (see /product_categories).
costobjectOptionalProduct cost. Stored for merchandise.
cost.currency_idintegerOptional—
cost.valuenumberOptional—
pricearray<object>Optional—
price[].product_price_list_idintegerOptionalPrice list ID (see /product_price_lists). To synchronize the product with the ecommerce integration it must have a price in price list 1.
price[].unit_netnumberOptional—
price[].unit_taxnumberOptional—
price[].unit_totalnumberOptional—
price[].currency_idintegerOptional—
price[].sales_commission_percentagenumberOptional—
price[].taxesarray<object>Optional—
price[].taxes[].tax_type_idstringOptional—
price[].taxes[].tax_percentagenumberOptional—
price[].taxes[].tax_amountnumberOptional—
inventoriesobjectOptionalInitial stock per product location. When sent, the product is created as merchandise.
inventories.total_availablenumberOptional—
inventories.total_reservednumberOptional—
inventories.detailsarray<object>Optional—
inventories.details[].product_location_idstringOptionalProduct location (warehouse) ID (see /product_locations).
inventories.details[].available_quantitynumberOptional—
inventories.details[].reserved_quantitynumberOptional—

Request body — JSON example

{
    "name": "string",
    "invoicing_details": "string",
    "additional_details": "string",
    "model": "string",
    "brand": "string",
    "status": 0,
    "sku": "string",
    "barcode": "string",
    "measure_unit": "string",
    "type": 0,
    "embedded_quantity_barcode": 0,
    "embedded_quantity_barcode_decimals": 0,
    "additional_data_1": "string",
    "additional_data_2": "string",
    "additional_data_3": "string",
    "favorite": 0,
    "ecommerce_status": "string",
    "product_category_id": 0,
    "cost": {
        "currency_id": 0,
        "value": 0
    },
    "price": [
        {
            "product_price_list_id": 0,
            "unit_net": 0,
            "unit_tax": 0,
            "unit_total": 0,
            "currency_id": 0,
            "sales_commission_percentage": 0,
            "taxes": [
                {
                    "tax_type_id": "...",
                    "tax_percentage": "...",
                    "tax_amount": "..."
                }
            ]
        }
    ],
    "inventories": {
        "total_available": 0,
        "total_reserved": 0,
        "details": [
            {
                "product_location_id": "string",
                "available_quantity": 0,
                "reserved_quantity": 0
            }
        ]
    }
}

Responses

201 Product created successfully.