Currently it is not possible to upload files to FetchApp's servers via the API, but we do allow you to attach self-hosted files to products using the API.


You can attach self-hosted files using the item_urls array (key of url and name for each item in the array):


FetchAppAPI::Product.create(sku: "CJ0001", name: "Carrot Juice", item_urls: [{url: 'http://s3.aws/download.mp3', name: 'audio'}, {url: 'http://s3.aws/download.mp4', name: 'video'}])



In terms of XML structure, it will look like the following:


<product>
  <sku>TEST34343</sku>
  <name>Carrot Juice2</name>
  <price type="float">10.00</price>
  <item_urls type="array">
    <item_url>
      <url>
          https://www.dropbox.com/s/g
      </url>
      <name>
          aaaa
      </name>
    </item_url>
  </item_urls>    
</product>



For more information on the FetchApp API, please refer here:


https://www.fetchapp.com/pages/help-api2