Ongoing Warehouse logo

Ongoing Warehouse Developer

UploadArticleDefFile

This function allows you to attach files to articles. This is most commonly used to upload an image of the article.

Note that if you want to attach several files to one article, then you must specify a unique identifier for each file in the BatchNo field. If you upload a file to the system and leave the BatchNo empty, then the system will overwrite any file which has already been uploaded for the article.

Tags: UploadArticleDefFile, File

Request XML

POST /xxx/Service.asmx HTTP/1.1
Host: api.ongoingsystems.se
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ongoingsystems.se/WSI/UploadArticleDefFile"

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <UploadArticleDefFile xmlns="http://ongoingsystems.se/WSI">
      <UserName>string</UserName>
      <Password>string</Password>
      <GoodsOwnerId>int</GoodsOwnerId>
      <ArticleNo>string</ArticleNo>
      <BatchNo>string</BatchNo>
      <File>
        <FileName>string</FileName>
        <FileBytes>base64Binary</FileBytes>
        <MimeType>string</MimeType>
        <FileId>int</FileId>
      </File>
    </UploadArticleDefFile>
  </soap:Body>
</soap:Envelope>
+

Request specification

UploadArticleDefFile
UserName str(50) Req. Your username
Password str(50) Req. Your password
GoodsOwnerId int Req. The id of the client
ArticleNo str(100) Req. The article number.
BatchNo str(50) Req. If you want to attach several different files to one article, this field should be a unique identifier for each file. Otherwise, you can leave this field empty.
File object Req. An element of type File
File
FileName str(300) Req. Filename.
FileBytes string Req. The contents of the file, encoded using Base64.
MimeType str(50) Req. The MIME type of the file, specifying what kind of file it is.
FileId int Req. Should always be the fixed value -1.

Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <UploadArticleDefFileResponse xmlns="http://ongoingsystems.se/WSI" />
  </soap:Body>
</soap:Envelope>
+

Response specification

The UploadArticleDefFileResponse element is an empty element. If the upload fails for any reason, the HTTP error code will not be 200.