Examples by country
📦 Managing products
Create new products
Products can be anything you buy or sell, it could be merchandise or services. A product can have an available quantity on multiple warehouses and show different prices based on price lists.
- Endpoint: https://apifacto.com/v1/products
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer \<token>
- Accept: /
Merchandise or service
The type field (required) indicates whether the product is a variable product:
0: standard product.1: variable product master.
The product is created as merchandise (with inventory control) when inventories is sent or when type is 1.
If inventories is not sent and type is 0, the product is created as a service.
To create merchandise with initial stock, send the warehouse (product_location_id) and the available quantity in
inventories.details. Warehouses can be retrieved with the /product_locations endpoint.
Synchronization with your online store
If the account has an active WooCommerce, Shopify or Jumpseller integration, active products (status = 1) with a
SKU are sent to the store and matched by SKU. The initial stock is synchronized too. To be synchronized, the product
must have a price in price list 1.
With ecommerce_status (optional) you can choose how the product is created in WooCommerce:
publish: published (default).draft: draft, so you can complete photos, description, categories and attributes before publishing it.
Product updates (PUT) and deletions (DELETE) are also sent to the store.
{
"name": "papas fritas lays",
"invoicing_details": "",
"additional_details": "",
"model": "",
"brand": "",
"status": 1,
"sku": "33",
"measure_unit": null,
"type": 0,
"embedded_quantity_barcode": null,
"embedded_quantity_barcode_decimals": null,
"additional_data_1": "aaa",
"additional_data_2": "bbb",
"additional_data_3": "ccc",
"favorite": 1,
"product_category_id": null,
"ecommerce_status": "draft",
"cost": {
"currency_id": 39,
"value": 2344
},
"price": [
{
"product_price_list_id": 1,
"unit_net": 1680.672269,
"unit_tax": 319.327731,
"unit_total": 2000,
"currency_id": "39",
"sales_commission_percentage": null,
"taxes": [
{
"tax_type_id": "387",
"tax_percentage": 19,
"tax_amount": 319.327731
}
]
}
],
"inventories": {
"details": [
{
"product_location_id": 1,
"available_quantity": 25
}
],
"total_available": 25,
"total_reserved": 0
}
}
Create new product categories
Products can optionally belong to a category. Categories can also have a hierarchy by having a parent category.
- Endpoint: https://apifacto.com/v1/product_categories
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer \<token>
- Accept: /
{
"account_id": 39,
"name": "categoria ejemplo API 3",
"parent_product_category_id": null
}
Create new product locations
Locations can be warehouses, shipping vehicles, stores or any other place where you store products.
- Endpoint: https://apifacto.com/v1/product_locations
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer \<token>
- Accept: /
{
"account_id": 39,
"name": "bodega pruebas",
"status": 1,
"company_branch_id": 1
}
Create new product price list
Price lists allow you to define different prices for the same product in order to provide custom pricing to your customers.
- Endpoint: https://apifacto.com/v1/product_price_lists
- Method: POST
- Required headers:
- Content-Type: application/json
- Authorization: Bearer \<token>
- Accept: /
{
"account_id": 39,
"name": "new product price list"
}