UploadOrderFile

This function allows you to attach files to orders.

A possible use-case for this is if there are documents which you want the warehouse to print and send along with an order. You can use this function to attach the documents to the order. The warehouse can then print the documents when required.

Note: If you are uploading something which doesn't have to be stored for all time, please specify the field FileWillBeDeletedAt. For instance, if you are uploading shipping labels, then these can usually be deleted after 30 days.

Tags: UploadOrderFile, OrderFile, 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/UploadOrderFile"

<?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>
    <UploadOrderFile xmlns="http://ongoingsystems.se/WSI">
      <UserName>string</UserName>
      <Password>string</Password>
      <OrderFile>
        <File>
          <FileName>string</FileName>
          <FileBytes>base64Binary</FileBytes>
          <MimeType>string</MimeType>
          <FileId>int</FileId>
          <FileWillBeDeletedAt>dateTime</FileWillBeDeletedAt>
        </File>
        <GoodsOwnerId>int</GoodsOwnerId>
        <OrderFileIdentificationType>GoodsOwnerOrderNumber or GoodsOwnerOrderId or SystemId</OrderFileIdentificationType>
        <GoodsOwnerOrderNumber>string</GoodsOwnerOrderNumber>
        <GoodsOwnerOrderId>string</GoodsOwnerOrderId>
        <OrderSystemId>int</OrderSystemId>
      </OrderFile>
    </UploadOrderFile>
  </soap:Body>
</soap:Envelope>

Request specification

UploadOrderFile
UserName string(50) Req. Your username
Password string(50) Req. Your password
OrderFile OrderFile Req. An element of type OrderFile.
OrderFile
File File Req. An element of type File.
GoodsOwnerId int Req. The client ID.
OrderFileIdentificationType enum Req. Determines how you want to identify the order:
- GoodsOwnerOrderNumber
- GoodsOwnerOrderId
- SystemId
GoodsOwnerOrderNumber string(50) Order number. Required if OrderFileIdentificationType = GoodsOwnerOrderNumber.
GoodsOwnerOrderId string(40) External order id. Required if OrderFileIdentificationType = GoodsOwnerOrderId.
OrderSystemId int Ongoing WMS' internal order id. Required if OrderFileIdentificationType = SystemId.
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>
    <UploadOrderFileResponse 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.