Creating product with template

POST {{api-url}}/product/{{tenant}}/products/

Creates a new product.


Required scopes

  • product.product_create
  • product.product_publish

    Note: Only required if you want to publish the product when creating it.

Request Body

{"name"=>"T-shirt Puma", "code"=>"TS050a", "description"=>"T-shirt 100% cotton", "taxClasses"=>{"PL"=>"STANDARD"}, "published"=>false, "mixins"=>{"productTemplateAttributes"=>{"color"=>"RED", "size"=>"L"}, "productCustomAttributes"=>{"pricingMeasurePrice"=>10, "unitPricingMeasure"=>{"value"=>1, "unitCode"=>"PC"}, "unitPricingBaseMeasure"=>{"value"=>1, "unitCode"=>"PC"}, "pricingMeasure"=>{"value"=>1, "unitCode"=>"PC"}, "orderUnit"=>"PC", "minOrderQuantity"=>1, "maxOrderQuantity"=>100, "defaultOrderQuantity"=>1}}, "metadata"=>{"mixins"=>{"productCustomAttributes"=>"https://res.cloudinary.com/saas-ag/raw/upload/schemata/productCustomAttributesMixIn.v29.json"}}, "template"=>{"id"=>"{{product-template-id}}", "version"=>1}}

HEADERS

KeyDatatypeRequiredDescription
Content-Languagestring
Content-Typestring

RESPONSES

status: Created

{"id":"61f9289906dc0733d29455db","yrn":"urn:yaas:saasag:caasproduct:product:saastest2;61f9289906dc0733d29455db","link":"https://product.k8s-stage.emporix.io/saastest2/products/61f9289906dc0733d29455db"}