Products
POST https://api.ecartapi.com/api/v2/products
Creates a new product and add to the store product list.
Request Body
{"product"=>{"name"=>"iPhone", "description"=>"It's the small iMac with a big idea: Video.", "sku"=>"IPON001GOLD", "price"=>"140", "quantity"=>"10", "condition"=>"new", "vendorId"=>"1", "categoryId"=>"1", "productType"=>"simple", "status"=>{"visibility"=>"both", "status"=>"active", "active"=>"true"}, "dimensions"=>{"weight"=>"1"}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string | ||
Content-Type | string |
RESPONSES
status: OK
{"success":true,"product":{"id":"21","sku":"IPON001GOLD","name":null,"subName":null,"upc":null,"description":null,"currency":null,"productType":"simple","quantity":null,"price":"140","cost":null,"discount":null,"dimensions":{"width":null,"height":null,"length":null,"weight":"1"},"units":{"width":"cm","height":"cm","length":"cm","weight":"kg"},"category":{"id":"1","name":null,"all":null},"tags":[],"status":{"id":null,"visibility":"both","active":"false","status":"1","ecartapiId":"2","ecartapi":"inactive","hasOptions":null},"variants":[{"id":"43","productId":"21","barcode":null,"name":null,"price":"140","currency":null,"sku":"IPON001GOLD","fulfillmentService":null,"option1":null,"option2":null,"option3":null,"dimensions":{"width":null,"height":null,"length":null,"weight":"1"},"units":{"width":null,"height":null,"length":null,"weight":"kg"},"inventory":{"itemId":null,"quantity":"10"},"status":{"active":null},"requireShipping":null,"bundled":null,"imageId":null,"imageUrl":null,"dates":{"createdAt":null,"updatedAt":null},"ecartapiUrl":"http://localhost:3000/api/v2/products/21/variants/43"}],"options":[{"id":null,"name":null,"values":[null],"public_name":null}],"associatedItems":[],"logistic":{"mode":null,"type":null,"free":"false","direction":null,"dimensions":null},"images":[],"imageUrl":null,"condition":"new","link":null,"dates":{"createdAt":"2022-12-27 20:14:37","updatedAt":"2022-12-27 20:14:37"},"vendor":"Studio Design","sellOutStock":true}}