Rest API v2

Product

This article guides you through how to manage your product data.

Read

/api/product.product

Read all your products.

GET
                                        
                                            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.

GET
                                        
                                            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.

POST
                                        
                                            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.

PUT
                                        
                                            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.

DELETE
                                        
                                            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
Boolean
Product is active and not archived
barcode
Char
Required
Unique barcode
categ_id
Object
Read-Only
Specific category assigned to the product
product.category
company_id
Object
Read-Only
Owner of the product
res.company
create_date
Datetime
Read-Only
Datetime of when the proudct was created.
customer_reference
Char
Custom reference number
default_code
Char
Required
Article number, usually SKU
description_picking
Char
Additional picking information
description_purchase
Char
Additional purchase information
description_sale
Char
Additional sale information
id
Int
Read-Only
Unique identifier of the customer
height
Float
Required
Height as cm, including packaging.
length
Float
Required
Length as cm, including packaging.
list_price
Float
Default sale price
name
Char
Required
Name
option_inbound_check
Boolean
All inbounds with this product are double-checked by us
option_rebound_check
Boolean
All returns with this product are double-checked by us
purchase_ok
Boolean
Product can be purchased
qty_available
Float
Read-Only
Current stock in all warehouses.
sale_ok
Boolean
Product can be sold
standard_price
Float
Default purchase price
uom_id
Object
Unit of measurement for sale
product.uom
uom_po_id
Object
Unit of measurement for purchase
product.uom
weight
Float
Required
Weight as kg, including packaging
width
Float
Required
Width as cm, including packaging
write_date
Datetime
Read-Only
Datetime of when the proudct was last edited

product.category

Properties related to the product.category table.

Field Data type Description
id
Int
Read-Only
Unique identifier of the product category
name
Char
Required
Name

product.uom

Properties related to the product.uom table.

Field Data type Description
id
Int
Read-Only
Unique identifier of the unit of measurement
name
Char
Required
Name