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

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;success&quot;:true,&quot;data&quot;:{&quot;id&quot;:1,&quot;name&quot;:&quot;Regular Pencil&quot;,&quot;code&quot;:&quot;MPENCIL&quot;,&quot;description&quot;:null,&quot;unit&quot;:&quot;&quot;,&quot;tax&quot;:0,&quot;category&quot;:null,&quot;active_flag&quot;:true,&quot;selectable&quot;:true,&quot;first_char&quot;:&quot;r&quot;,&quot;visible_to&quot;:&quot;3&quot;,&quot;owner_id&quot;:{&quot;id&quot;:10100010,&quot;name&quot;:&quot;Example User&quot;,&quot;email&quot;:&quot;example@test.com&quot;,&quot;has_pic&quot;:true,&quot;pic_hash&quot;:&quot;5df5332929fab76702207f38b29a5d82&quot;,&quot;active_flag&quot;:true,&quot;value&quot;:10100010},&quot;files_count&quot;:null,&quot;add_time&quot;:&quot;2019-12-19 11:36:49&quot;,&quot;update_time&quot;:&quot;2019-12-26 13:35:17&quot;,&quot;billing_frequency&quot;:&quot;one-time&quot;,&quot;billing_frequency_cycles&quot;:null,&quot;prices&quot;:[{&quot;id&quot;:1,&quot;product_id&quot;:1,&quot;price&quot;:5,&quot;currency&quot;:&quot;EUR&quot;,&quot;cost&quot;:2,&quot;overhead_cost&quot;:3,&quot;notes&quot;:&quot;this is a note&quot;}]},&quot;related_objects&quot;:{&quot;user&quot;:{&quot;10100010&quot;:{&quot;id&quot;:10100010,&quot;name&quot;:&quot;Example User&quot;,&quot;email&quot;:&quot;example@test.com&quot;,&quot;has_pic&quot;:true,&quot;pic_hash&quot;:&quot;5df5332929fab76702207f38b29a5d82&quot;,&quot;active_flag&quot;:true}}}}