Product Endpoints
Products are related to enterprises. Each enterprise can have many products, but each product can belong to only one enterprise.
Product Object
Property Name | Type |
---|---|
id | integer |
name | string |
description | string |
reference | string |
price | number |
cost | number |
max_discount | number |
stock | integer |
active | boolean |
product_category_id | integer |
services | integer |
vat_id | integer |
taxes | integer |
category | object ( Product Category ) |
vat | object ( Vat ) |
rates | Array of object ( Rates ) |
EXAMPLE
{
"id": 1,
"reference": "ProductAPI",
"price": 15,
"cost": 2,
"max_discount": null,
"stock": 1,
"active": true,
"product_category_id": 1,
"services": null,
"vat_id": 1,
"taxes": null,
"name": "Product API",
"description": "Product API description",
"category": {
"id": 1,
"name": "CategoryAPI",
"reference": "C_API",
"parent_id": 0,
"childs": []
},
"vat": {
"id": 1,
"vat": "21.00",
"erp_flag": ""
},
"rates": [
{
"id": 1,
"sku": "ProductAPI_rate_1",
"cost": 1.00,
"price": 5.00,
"services": 0.00,
"primary": 1
}
]
}
Vat Object
Property Name | Type |
---|---|
id | integer |
vat | string |
erp_flag | string |
vat
{
"id": 1,
"vat": "21.00",
"erp_flag": ""
}
Rate Object
Property Name | Type |
---|---|
id | integer |
sku | string |
cost | number |
price | number |
services | number |
primary | integer |
rate
{
"id": 1,
"sku": "ProductAPI_rate_1",
"cost": 1.00,
"price": 5.00,
"services": 0.00,
"primary": 1
}