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>
        <FileWillBeDeletedAt>dateTime</FileWillBeDeletedAt>
      </File>
    </UploadArticleDefFile>
  </soap:Body>
</soap:Envelope>

Request specification

UploadArticleDefFile
UserName string(50) Req. Your username
Password string(50) Req. Your password
GoodsOwnerId int Req. The id of your client
ArticleNo string(100) 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.
BatchNo string(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 File Req. An element of type File
File
FileName string(300) The filename.
FileBytes base64Binary The contents of the file, encoded using Base64.
MimeType string(50) The MIME type of the file, specifying what kind of file it is.
FileId int Should always be -1.
FileWillBeDeletedAt dateTime The date when the file will be deleted (may be null).

Response XML

<?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

If the call fails, it will return an HTTP error code other than 200.