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.

Tags: UploadOrderFile, OrderFile, File, UploadOrderFileResponse, AutomationUploadOrderFileResult, AutomationUploadedOrderFile

Request XML

POST /xxx/Automation.asmx HTTP/1.1
Host: api.ongoingsystems.se
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ongoingsystems.se/Automation/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/Automation">
      <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/Automation">
      <UploadOrderFileResult>
        <UploadedOrderFile>
          <FileId>int</FileId>
        </UploadedOrderFile>
      </UploadOrderFileResult>
    </UploadOrderFileResponse>
  </soap:Body>
</soap:Envelope>

Response specification

UploadOrderFileResponse
UploadOrderFileResult AutomationUploadOrderFileResult
AutomationUploadOrderFileResult
UploadedOrderFile AutomationUploadedOrderFile An object containing info about the uploaded file
AutomationUploadedOrderFile
FileId int Ongoing WMS internal ID