Add a new product field

POST {{baseUrl}}/productFields

Adds a new product field. For more information, see the tutorial for adding a new custom field.

Request Body

{"name"=>"<string>", "field_type"=>"<string>", "options"=>["<object>", "<object>"]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;success&quot;:true,&quot;data&quot;:{&quot;id&quot;:32,&quot;key&quot;:&quot;397b0f545d134b479a5485041b33b0f0f3da2333&quot;,&quot;name&quot;:&quot;Color&quot;,&quot;order_nr&quot;:13,&quot;field_type&quot;:&quot;enum&quot;,&quot;add_time&quot;:&quot;2019-12-20 11:01:24&quot;,&quot;update_time&quot;:&quot;2019-12-20 11:01:24&quot;,&quot;last_updated_by_user_id&quot;:10999910,&quot;created_by_user_id&quot;:10999910,&quot;active_flag&quot;:true,&quot;edit_flag&quot;:true,&quot;index_visible_flag&quot;:true,&quot;details_visible_flag&quot;:true,&quot;add_visible_flag&quot;:true,&quot;important_flag&quot;:false,&quot;bulk_edit_allowed&quot;:true,&quot;searchable_flag&quot;:false,&quot;filtering_allowed&quot;:true,&quot;sortable_flag&quot;:true,&quot;options&quot;:[{&quot;id&quot;:9,&quot;label&quot;:&quot;red&quot;},{&quot;id&quot;:10,&quot;label&quot;:&quot;blue&quot;},{&quot;id&quot;:11,&quot;label&quot;:&quot;lilac&quot;}],&quot;mandatory_flag&quot;:false}}