Product
This article guides you through how to manage your product data.
Read
/api/product.product
Read all your products.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/product.product -X GET -H
"access_token: XXXXXXXXXXXXXXXXX"
{
"code":200,
"data":{
"count":2,
"results":[
{
"list_price":19.90,
"weight":1.2,
"image":null,
"standard_price":10.90,
"height":0.21,
"uom_id":{
"id":1,
"name":"Unit(s)"
},
"description_purchase":null,
"default_code":"SKU-1234",
"qty_available":50.0,
"create_date":"2022-06-01 12:00:00+00:00",
"customer_reference":null,
"id":9,
"sale_ok":true,
"purchase_ok":true,
"company_id":{
"id":1,
"name":"WeShip Fulfillment GmbH"
},
"width":0.41,
"internal_stock_quant_ids":[],
"uom_po_id":{
"id":1,
"name":"Unit(s)"
},
"type":"product",
"barcode":"BC1234567890",
"write_date":"2022-06-02 06:00:00+00:00",
"active":true,
"categ_id":{
"id":2,
"name":"Packing material"
},
"name":"Box XL flat, 600x400x200mm",
"description_sale":null,
"packaging_ids":[],
"option_inbound_check":null,
"length":0.61,
"user_company_location_quantity":50.0,
"option_rebound_check":null,
"description_picking":null
},
{...}
]
}
}
/api/product.product/<id>
Read a single product with the provided ID.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/product.product/9 -X GET -H
"access_token: XXXXXXXXXXXXXXXXX"
{
"code":200,
"data":{
"list_price":19.90,
"weight":1.2,
"image":null,
"standard_price":10.90,
"height":0.21,
"uom_id":{
"id":1,
"name":"Unit(s)"
},
"description_purchase":null,
"default_code":"SKU-1234",
"qty_available":50.0,
"create_date":"2022-06-01 12:00:00+00:00",
"customer_reference":null,
"id":9,
"sale_ok":true,
"purchase_ok":true,
"company_id":{
"id":1,
"name":"WeShip Fulfillment GmbH"
},
"width":0.41,
"internal_stock_quant_ids":[],
"uom_po_id":{
"id":1,
"name":"Unit(s)"
},
"type":"product",
"barcode":"BC1234567890",
"write_date":"2022-06-02 06:00:00+00:00",
"active":true,
"categ_id":{
"id":2,
"name":"Packing material"
},
"name":"Box XL flat, 600x400x200mm",
"description_sale":null,
"packaging_ids":[],
"option_inbound_check":null,
"length":0.61,
"user_company_location_quantity":50.0,
"option_rebound_check":null,
"description_picking":null
},
"success":true
}
Create
/api/product.product
Create a single product.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/product.product -X POST -H
"access_token: XXXXXXXXXXXXXXXXX" -d '{"name": "Test Product"}'
{
"code":200,
"data":{
"list_price":null,
"weight":null,
"image":null,
"standard_price":null,
"height":null,
"uom_id":{
"id":1,
"name":"Unit(s)"
},
"description_purchase":null,
"default_code":null,
"qty_available":null,
"create_date":"2022-06-02 06:00:00+00:00",
"customer_reference":null,
"id":10,
"sale_ok":true,
"purchase_ok":true,
"company_id":{
"id":1,
"name":"WeShip Fulfillment GmbH"
},
"width":null,
"internal_stock_quant_ids":[],
"uom_po_id":{
"id":1,
"name":"Unit(s)"
},
"type":"product",
"barcode":null,
"write_date":"2022-06-02 06:00:00+00:00",
"active":true,
"categ_id":{
"id":1,
"name":"All"
},
"name":"Test Product",
"description_sale":null,
"packaging_ids":[],
"option_inbound_check":null,
"length":null,
"user_company_location_quantity":null,
"option_rebound_check":null,
"description_picking":null
},
"success":true
}
Update
/api/product.product/<id>
Update a single product.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/product.product/10 -X PUT -
H "access_token: XXXXXXXXXXXXXXXXX" -d '{"list_price": "10.50"}'
{
"code":200,
"data":{
"list_price":10.50,
"weight":null,
"image":null,
"standard_price":null,
"height":null,
"uom_id":{
"id":1,
"name":"Unit(s)"
},
"description_purchase":null,
"default_code":null,
"qty_available":null,
"create_date":"2022-06-02 06:00:00+00:00",
"customer_reference":null,
"id":10,
"sale_ok":true,
"purchase_ok":true,
"company_id":{
"id":1,
"name":"WeShip Fulfillment GmbH"
},
"width":null,
"internal_stock_quant_ids":[],
"uom_po_id":{
"id":1,
"name":"Unit(s)"
},
"type":"product",
"barcode":null,
"write_date":"2022-06-02 06:00:00+00:00",
"active":true,
"categ_id":{
"id":1,
"name":"All"
},
"name":"Test Product",
"description_sale":null,
"packaging_ids":[],
"option_inbound_check":null,
"length":null,
"user_company_location_quantity":null,
"option_rebound_check":null,
"description_picking":null
},
"success":true
}
Delete
/api/product.product/<id>
Delete a single product.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/product.product/10 -X
DELETE -H "access_token: XXXXXXXXXXXXXXXXX"
{"code": 200, "data": {"id": 10}, "success": true}
Properties
product.product
Properties related to the product.product table.
| Field | Data type | Description | |
|---|---|---|---|
| active | Product is active and not archived | ||
| barcode | Unique barcode | ||
| categ_id |
Specific category assigned to the product product.category |
||
| company_id |
Owner of the product res.company |
||
| create_date |
Datetime of when the proudct was created. |
||
| customer_reference | Custom reference number | ||
| default_code | Article number, usually SKU | ||
| description_picking | Additional picking information | ||
| description_purchase | Additional purchase information | ||
| description_sale | Additional sale information | ||
| id | Unique identifier of the customer | ||
| height | Height as cm, including packaging. | ||
| length | Length as cm, including packaging. | ||
| list_price | Default sale price | ||
| name | Name | ||
| option_inbound_check | All inbounds with this product are double-checked by us | ||
| option_rebound_check | All returns with this product are double-checked by us | ||
| purchase_ok | Product can be purchased | ||
| qty_available | Current stock in all warehouses. | ||
| sale_ok | Product can be sold | ||
| standard_price | Default purchase price | ||
| uom_id |
Unit of measurement for sale product.uom |
||
| uom_po_id |
Unit of measurement for purchase product.uom |
||
| weight | Weight as kg, including packaging | ||
| width | Width as cm, including packaging | ||
| write_date |
Datetime of when the proudct was last edited |
product.category
Properties related to the product.category table.
| Field | Data type | Description | |
|---|---|---|---|
| id | Unique identifier of the product category | ||
| name | Name |
product.uom
Properties related to the product.uom table.
| Field | Data type | Description | |
|---|---|---|---|
| id | Unique identifier of the unit of measurement | ||
| name | Name |