Storeden Help Center

search through the guides and find what you need.

Adding a product via XML


To add a product to your online shop, you need to generate an XML feed in this format:


<urn:products xsi:type="urn:Item">
    <groupUID xsi:type="xsd:integer">30</groupUID>
    <category xsi:type="xsd:string">DONNA#SCARPE</category>
    <brand xsi:type="xsd:string">Acme Inc.</brand>
    <title xsi:type="xsd:string">Titolo del prodotto di esempio</title>
    <description xsi:type="xsd:string">
      <![CDATA[<p>Descrizione del prodotto, anche in html</p>]]>
    <taxable xsi:type="xsd:integer">0</taxable>
    <quantity xsi:type="xsd:integer">10</quantity>
    <price xsi:type="xsd:float">259.00</price>
    <discount xsi:type="xsd:integer">10</discount>
    <weight xsi:type="xsd:integer">1</weight>
      <w xsi:type="xsd:integer">15</w>
      <h xsi:type="xsd:integer">30</h>
      <z xsi:type="xsd:integer">100</z>
    <highview xsi:type="xsd:integer">0</highview>
    <sku xsi:type="xsd:string">TRACK_19aBN</sku>
      <image xsi:type="xsd:string">http://domain.tld/products/acme-inc/00001.jpg</image>
      <image xsi:type="xsd:string">http://domain.tld/products/acme-inc/00002.jpg</image>
      <image xsi:type="xsd:string">http://domain.tld/products/acme-inc/00003.jpg</image>
      <image xsi:type="xsd:string">http://domain.tld/products/acme-inc/00004.jpg</image>
          <key xsi:type="xsd:string">37</key>
          <count xsi:type="xsd:integer">2</count>
          <price xsi:type="xsd:float">0</price>
          <sku xsi:type="xsd:string">CRS0025_NERO_37</sku>
          <key xsi:type="xsd:string">38</key>
          <count xsi:type="xsd:integer">1</count>
          <price xsi:type="xsd:float">0</price>
          <sku xsi:type="xsd:string">CRS0025_NERO_38</sku>
        <var_name xsi:type="xsd:string">Taglia</var_name>
          <value xsi:type="xsd:string">37</value>
          <value xsi:type="xsd:string">38</value>
          <value xsi:type="xsd:string">39</value>

Inside the <urn:products> tag, you can add the product's feed.


The SKU code is the primary key of the product. Each update will be performed using the product's code.


Store ID when updating products.


The <taxable> tag identifies whether the product's price includes sales tax or not (0 => Tax included in the price; 1 => Tax excluded).

Item discount

The <discount> tag identifies whether a discount should be applied before its displayed or not. Only integers can be entered in this field. If set to 0, no discount will be applied.


Enter the category tree separated by #. If there is no category tree, it will be created.


The dimensions entered in the XML feed refer to the packaging. They are used to calculate shipping costs (W => Length, H => Height, Z => Width).


For product variants, the quantity of the product available for purchase by consumers is set in the <count> tag in the <var_composite> structure. As result, the<quantity> field will be ignored. If the product does not have variants, the <var> tag and all its content can be omitted from the feed; the available quantity will be managed by the <quantity> tag.


$xml_params = file_get_contents('products_feed.xml');
$headers = array(
  "Content-type: text/xml;charset=\"utf-8\"",
  "Accept: text/xml",
  "Cache-Control: no-cache",
  "Pragma: no-cache"

$auth_user = 'YourEmail';
$auth_password = 'YourPassword';

/** PRECHECK **/
if ($auth_user == '' || $auth_password == '') {
  throw new Exception('No Auth key found');

$url = '';

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, 'StoredenExternalApi');
curl_setopt($ch, CURLOPT_USERPWD, $auth_user.":".$auth_password);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_params);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$str_result = curl_exec($ch);



Coming soon! Once the feed upload is complete, the system will process the feed in background.

Was this article helpful?
0 out of 0 found this helpful


Don't wait, start now to sell with Storeden

Try it for free