Add a product
POST {{baseUrl}}/products
Adds a new product to the Products inventory. For more information, see the tutorial for adding a product.
Request Body
{"name"=>"<string>", "code"=>"<string>", "description"=>"<string>", "unit"=>"<string>", "tax"=>0, "active_flag"=>true, "selectable"=>true, "visible_to"=>"<string>", "owner_id"=>"<integer>", "prices"=>["<object>", "<object>"], "billing_frequency"=>"one-time", "billing_frequency_cycles"=>nil}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"success":true,"data":{"id":1,"name":"Regular Pencil","code":"MPENCIL","description":null,"unit":"","tax":0,"category":null,"active_flag":true,"selectable":true,"first_char":"r","visible_to":"3","owner_id":{"id":10100010,"name":"Example User","email":"example@test.com","has_pic":true,"pic_hash":"5df5332929fab76702207f38b29a5d82","active_flag":true,"value":10100010},"files_count":null,"add_time":"2019-12-19 11:36:49","update_time":"2019-12-26 13:35:17","billing_frequency":"one-time","billing_frequency_cycles":null,"prices":[{"id":1,"product_id":1,"price":5,"currency":"EUR","cost":2,"overhead_cost":3,"notes":"this is a note"}]},"related_objects":{"user":{"10100010":{"id":10100010,"name":"Example User","email":"example@test.com","has_pic":true,"pic_hash":"5df5332929fab76702207f38b29a5d82","active_flag":true}}}}