Create Product
POST {{baseUrl}}/products
Products can be created within your store at Salla by providing the required data in this endpoint.
You can list available categories from List Categories endpoint.
💡 Note
✅ Created products status will be
hidden
till attaching one image at least.
✅ Created products status will beout
till adding a value in quantity parameter.
✅ Created products type cannot be changed after product created.
Request Body
{"name"=>"T-Shirt Blue111", "price"=>96.33, "status"=>"out", "product_type"=>"product", "quantity"=>4, "description"=>"textophonious", "min_amount_donating"=>1, "max_amount_donating"=>5, "sale_price"=>43, "cost_price"=>35, "sale_end"=>"2025-08-13", "require_shipping"=>false, "maximum_quantity_per_order"=>0, "weight"=>12, "weight_type"=>"kg", "sku"=>"23-4324432", "mpn"=>"45344432343", "gtin"=>"58636897", "hide_quantity"=>false, "enable_upload_image"=>true, "enable_note"=>true, "pinned"=>true, "active_advance"=>true, "subtitle"=>"Collection 2020", "promotion_title"=>"New", "metadata_title"=>"T-Shirt blue - collection 2020", "metadata_description"=>"T-Shirt blue - collection 2020", "images"=>[{"original"=>"https://salla-dev.s3.eu-central-1.amazonaws.com/nWzD/2E0Z2t6Q8FG3ca620rwqcTY2CC2j2PAGrqqeDROY.jpg", "thumbnail"=>"https://salla-dev.s3.eu-central-1.amazonaws.com/nWzD/2E0Z2t6Q8FG3ca620rwqcTY2CC2j2PAGrqqeDROY.jpg", "alt"=>"image", "default"=>true, "sort"=>5}], "options"=>[{"name"=>"option2", "display_type"=>"text", "values"=>[{"name"=>"الأزرق", "price"=>120, "quantity"=>10}, {"name"=>"الاحمر", "price"=>120, "quantity"=>10}, {"name"=>"الاصفر", "price"=>120, "quantity"=>10}]}, {"name"=>"option3", "display_type"=>"text", "values"=>[{"name"=>"كبير", "price"=>120, "quantity"=>10}, {"name"=>"صغير", "price"=>120, "quantity"=>10}, {"name"=>"متوسط", "price"=>120, "quantity"=>10}]}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"status":201,"success":true,"data":{"id":207865447,"promotion":{"title":"New","sub_title":"Collection 2020"},"sku":null,"mpn":"45344432343","gtin":"58636897","type":"product","name":"T-Shirt Blue","short_link_code":"xxwWwo","urls":{"customer":"https://salla.sa/dev-wofftr4xsra5xtlv/t-shirt-blue-collection-2020/p207865447","admin":"https://s.salla.sa/products/207865447"},"price":{"amount":43,"currency":"SAR"},"taxed_price":{"amount":43,"currency":"SAR"},"pre_tax_price":{"amount":43,"currency":"SAR"},"tax":{"amount":0,"currency":"SAR"},"description":"textophonious","quantity":4,"status":"sale","is_available":true,"views":0,"sale_price":{"amount":43,"currency":"SAR"},"sale_end":"2025-08-13","require_shipping":true,"cost_price":"35.00","weight":12,"weight_type":"kg","with_tax":true,"url":"https://salla.sa/dev-wofftr4xsra5xtlv/t-shirt-blue-collection-2020/p207865447","main_image":"https://salla-dev.s3.eu-central-1.amazonaws.com/nWzD/2E0Z2t6Q8FG3ca620rwqcTY2CC2j2PAGrqqeDROY.jpg","images":[{"id":712603963,"url":"https://salla-dev.s3.eu-central-1.amazonaws.com/nWzD/2E0Z2t6Q8FG3ca620rwqcTY2CC2j2PAGrqqeDROY.jpg","main":false,"three_d_image_url":"","alt":"image","video_url":"","type":"image","sort":5}],"sold_quantity":0,"rating":{"total":0,"count":1,"rate":0},"regular_price":{"amount":96.33,"currency":"SAR"},"max_items_per_user":0,"maximum_quantity_per_order":null,"show_in_app":true,"notify_quantity":null,"hide_quantity":false,"unlimited_quantity":false,"managed_by_branches":false,"services_blocks":{"installments":[]},"calories":null,"starting_price":null,"metadata":{"title":"T-Shirt blue - collection 2020","description":"T-Shirt blue - collection 2020"},"allow_attachments":false,"is_pinned":true,"pinned_date":"2022-06-23 01:04:38","sort":0,"enable_upload_image":true,"updated_at":"2022-06-23 01:04:38","options":[{"id":319461767,"name":"option2","description":null,"type":"text","required":false,"associated_with_order_time":0,"availability_range":false,"not_same_day_order":false,"choose_date_time":null,"from_date_time":null,"to_date_time":null,"sort":null,"advance":true,"display_type":"text","visibility":"always","translations":{"ar":{"option_name":"option2","description":null}},"values":[{"id":1663429593,"name":"الأزرق","price":{"amount":0,"currency":"SAR"},"display_value":null,"advance":true,"option_id":319461767,"image_url":null,"hashed_display_value":null,"translations":{"ar":{"option_details_name":"الأزرق"}}},{"id":1023544026,"name":"الاحمر","price":{"amount":0,"currency":"SAR"},"display_value":null,"advance":true,"option_id":319461767,"image_url":null,"hashed_display_value":null,"translations":{"ar":{"option_details_name":"الاحمر"}}},{"id":250554843,"name":"الاصفر","price":{"amount":0,"currency":"SAR"},"display_value":null,"advance":true,"option_id":319461767,"image_url":null,"hashed_display_value":null,"translations":{"ar":{"option_details_name":"الاصفر"}}}]},{"id":1826076800,"name":"option3","description":null,"type":"text","required":false,"associated_with_order_time":0,"availability_range":false,"not_same_day_order":false,"choose_date_time":null,"from_date_time":null,"to_date_time":null,"sort":null,"advance":true,"display_type":"text","visibility":"always","translations":{"ar":{"option_name":"option3","description":null}},"values":[{"id":1488209956,"name":"كبير","price":{"amount":0,"currency":"SAR"},"display_value":null,"advance":true,"option_id":1826076800,"image_url":null,"hashed_display_value":null,"translations":{"ar":{"option_details_name":"كبير"}}},{"id":714168101,"name":"صغير","price":{"amount":0,"currency":"SAR"},"display_value":null,"advance":true,"option_id":1826076800,"image_url":null,"hashed_display_value":null,"translations":{"ar":{"option_details_name":"صغير"}}},{"id":75396646,"name":"متوسط","price":{"amount":0,"currency":"SAR"},"display_value":null,"advance":true,"option_id":1826076800,"image_url":null,"hashed_display_value":null,"translations":{"ar":{"option_details_name":"متوسط"}}}]}],"skus":[{"id":112657257,"price":{"amount":43,"currency":"SAR"},"regular_price":{"amount":0,"currency":"SAR"},"sale_price":null,"stock_quantity":null,"barcode":null,"sku":null,"mpn":null,"gtin":null,"related_options":[1663429593,1488209956],"related_option_values":[1663429593,1488209956],"weight":null,"weight_type":"kg","weight_label":"١٢ كجم"},{"id":1352409706,"price":{"amount":43,"currency":"SAR"},"regular_price":{"amount":0,"currency":"SAR"},"sale_price":null,"stock_quantity":null,"barcode":null,"sku":null,"mpn":null,"gtin":null,"related_options":[1663429593,714168101],"related_option_values":[1663429593,714168101],"weight":null,"weight_type":"kg","weight_label":"١٢ كجم"},{"id":578371947,"price":{"amount":43,"currency":"SAR"},"regular_price":{"amount":0,"currency":"SAR"},"sale_price":null,"stock_quantity":null,"barcode":null,"sku":null,"mpn":null,"gtin":null,"related_options":[1663429593,75396646],"related_option_values":[1663429593,75396646],"weight":null,"weight_type":"kg","weight_label":"١٢ كجم"},{"id":2084986996,"price":{"amount":43,"currency":"SAR"},"regular_price":{"amount":0,"currency":"SAR"},"sale_price":null,"stock_quantity":null,"barcode":null,"sku":null,"mpn":null,"gtin":null,"related_options":[1023544026,1488209956],"related_option_values":[1023544026,1488209956],"weight":null,"weight_type":"kg","weight_label":"١٢ كجم"},{"id":1311543157,"price":{"amount":43,"currency":"SAR"},"regular_price":{"amount":0,"currency":"SAR"},"sale_price":null,"stock_quantity":null,"barcode":null,"sku":null,"mpn":null,"gtin":null,"related_options":[1023544026,714168101],"related_option_values":[1023544026,714168101],"weight":null,"weight_type":"kg","weight_label":"١٢ كجم"},{"id":403287670,"price":{"amount":43,"currency":"SAR"},"regular_price":{"amount":0,"currency":"SAR"},"sale_price":null,"stock_quantity":null,"barcode":null,"sku":null,"mpn":null,"gtin":null,"related_options":[1023544026,75396646],"related_option_values":[1023544026,75396646],"weight":null,"weight_type":"kg","weight_label":"١٢ كجم"},{"id":1977011575,"price":{"amount":43,"currency":"SAR"},"regular_price":{"amount":0,"currency":"SAR"},"sale_price":null,"stock_quantity":null,"barcode":null,"sku":null,"mpn":null,"gtin":null,"related_options":[250554843,1488209956],"related_option_values":[250554843,1488209956],"weight":null,"weight_type":"kg","weight_label":"١٢ كجم"},{"id":1202973808,"price":{"amount":43,"currency":"SAR"},"regular_price":{"amount":0,"currency":"SAR"},"sale_price":null,"stock_quantity":null,"barcode":null,"sku":null,"mpn":null,"gtin":null,"related_options":[250554843,714168101],"related_option_values":[250554843,714168101],"weight":null,"weight_type":"kg","weight_label":"١٢ كجم"},{"id":295177073,"price":{"amount":43,"currency":"SAR"},"regular_price":{"amount":0,"currency":"SAR"},"sale_price":null,"stock_quantity":null,"barcode":null,"sku":null,"mpn":null,"gtin":null,"related_options":[250554843,75396646],"related_option_values":[250554843,75396646],"weight":null,"weight_type":"kg","weight_label":"١٢ كجم"}],"categories":[{"id":1032561074,"name":"الفساتين","urls":{"customer":"https://salla.sa/dev-wofftr4xsra5xtlv/الفساتين/c1032561074","admin":"https://s.salla.sa/categories"},"items":[],"parent_id":0,"status":"active","sort_order":1,"update_at":{"date":"2022-04-25 19:46:26.000000","timezone_type":3,"timezone":"Asia/Riyadh"}},{"id":256950451,"name":"البلايز","urls":{"customer":"https://salla.sa/dev-wofftr4xsra5xtlv/البلايز/c256950451","admin":"https://s.salla.sa/categories"},"items":[],"parent_id":0,"status":"active","sort_order":2,"update_at":{"date":"2022-01-16 15:35:55.000000","timezone_type":3,"timezone":"Asia/Riyadh"}}],"brand":{"id":1097509908,"name":"بوما","description":"بوما وصف بالعربي","banner":"https://cdn.salla.sa/bYQEn/69QZx9DHUIQDLCoN7YAq9htHBH0tzD5luk5Rob7w.png","logo":"https://cdn.salla.sa/bYQEn/QqxF15HPwXw92PPsI7xSZ6F8ONWlOPojoWl48y4W.png","ar_char":"ب","en_char":"B"},"tags":[{"id":1366932222,"name":"tag1"},{"id":591845887,"name":"tag2"}]}}