Crear producto
curl --request POST \
--url https://api.filexpress.app/api/external/products \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Refresco 350ml",
"sku": "BEB-001",
"price_before_taxes": 1.11,
"cost": 0.7,
"tax_method": "is_taxed",
"composition_type": "simple",
"product_type": "phisical",
"product_category_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"product_measurement_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"branch_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"availability": 100,
"limit_availability": 10,
"tax_ids": [
"9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Refresco 350ml',
sku: 'BEB-001',
price_before_taxes: 1.11,
cost: 0.7,
tax_method: 'is_taxed',
composition_type: 'simple',
product_type: 'phisical',
product_category_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
product_measurement_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
branch_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
availability: 100,
limit_availability: 10,
tax_ids: ['9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11']
})
};
fetch('https://api.filexpress.app/api/external/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/products"
payload = {
"name": "Refresco 350ml",
"sku": "BEB-001",
"price_before_taxes": 1.11,
"cost": 0.7,
"tax_method": "is_taxed",
"composition_type": "simple",
"product_type": "phisical",
"product_category_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"product_measurement_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"branch_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"availability": 100,
"limit_availability": 10,
"tax_ids": ["9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filexpress.app/api/external/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Refresco 350ml',
'sku' => 'BEB-001',
'price_before_taxes' => 1.11,
'cost' => 0.7,
'tax_method' => 'is_taxed',
'composition_type' => 'simple',
'product_type' => 'phisical',
'product_category_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'product_measurement_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'branch_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'availability' => 100,
'limit_availability' => 10,
'tax_ids' => [
'9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"name": "Refresco 350ml",
"sku": "BEB-001",
"price_before_taxes": 1.11,
"cost": 0.7,
"tax_method": "is_taxed",
"composition_type": "simple",
"product_type": "phisical",
"product_category_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"product_measurement_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"availability": 100,
"limit_availability": 10,
"taxes": [
{
"id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"name": "IVA",
"number_code": "20",
"tax_type": "percentage",
"percent": 0.13
}
]
},
"message": "Data retrieved successfully."
}{
"status": false,
"message": "Invalid API Key."
}{
"status": false,
"message": "This integration does not have the 'hr.employees' permission.",
"required_scope": "hr.employees"
}{
"success": false,
"message": "Validation Error.",
"data": {
"email": [
"The email field is required."
]
}
}{
"status": false,
"message": "Rate limit exceeded. Please try again later.",
"rate_limit": 100
}Crear producto
Crea un producto simple, con porciones o con receta.
Permiso requerido: products
POST
/
products
Crear producto
curl --request POST \
--url https://api.filexpress.app/api/external/products \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Refresco 350ml",
"sku": "BEB-001",
"price_before_taxes": 1.11,
"cost": 0.7,
"tax_method": "is_taxed",
"composition_type": "simple",
"product_type": "phisical",
"product_category_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"product_measurement_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"branch_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"availability": 100,
"limit_availability": 10,
"tax_ids": [
"9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Refresco 350ml',
sku: 'BEB-001',
price_before_taxes: 1.11,
cost: 0.7,
tax_method: 'is_taxed',
composition_type: 'simple',
product_type: 'phisical',
product_category_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
product_measurement_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
branch_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
availability: 100,
limit_availability: 10,
tax_ids: ['9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11']
})
};
fetch('https://api.filexpress.app/api/external/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/products"
payload = {
"name": "Refresco 350ml",
"sku": "BEB-001",
"price_before_taxes": 1.11,
"cost": 0.7,
"tax_method": "is_taxed",
"composition_type": "simple",
"product_type": "phisical",
"product_category_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"product_measurement_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"branch_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"availability": 100,
"limit_availability": 10,
"tax_ids": ["9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filexpress.app/api/external/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Refresco 350ml',
'sku' => 'BEB-001',
'price_before_taxes' => 1.11,
'cost' => 0.7,
'tax_method' => 'is_taxed',
'composition_type' => 'simple',
'product_type' => 'phisical',
'product_category_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'product_measurement_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'branch_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'availability' => 100,
'limit_availability' => 10,
'tax_ids' => [
'9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"name": "Refresco 350ml",
"sku": "BEB-001",
"price_before_taxes": 1.11,
"cost": 0.7,
"tax_method": "is_taxed",
"composition_type": "simple",
"product_type": "phisical",
"product_category_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"product_measurement_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"availability": 100,
"limit_availability": 10,
"taxes": [
{
"id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"name": "IVA",
"number_code": "20",
"tax_type": "percentage",
"percent": 0.13
}
]
},
"message": "Data retrieved successfully."
}{
"status": false,
"message": "Invalid API Key."
}{
"status": false,
"message": "This integration does not have the 'hr.employees' permission.",
"required_scope": "hr.employees"
}{
"success": false,
"message": "Validation Error.",
"data": {
"email": [
"The email field is required."
]
}
}{
"status": false,
"message": "Rate limit exceeded. Please try again later.",
"rate_limit": 100
}Authorizations
API Key de la integración (Integraciones → Nueva Integración).
Body
application/json
Tratamiento de IVA.
Available options:
is_taxed, is_exent, is_not_subject Composición.
Available options:
simple, with_portions, with_recipe Tipo.
Available options:
phisical, service, both Existencia.
Existencia mínima.
Impuestos del producto (GET /taxes/branch/{branch_id}). En gravados envía al menos el IVA. En actualización: omitido = se conservan; [] = se quitan.
Requerido con porciones.
Requerido con porciones.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Producto creado