Ongoing Warehouse logo

Ongoing Warehouse Developer

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

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>
        </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 str(50) Req. Your username
Password str(50) Req. Your password
GoodsOwnerId int Req. The id of the client
OrderFile object Req. An element of type OrderFile.
OrderFile
File object Req. An element of type File.
GoodsOwnerId int Req. The client ID.
OrderFileIdentificationType str Req. Determines how you want to identify the order:
- GoodsOwnerOrderNumber
- GoodsOwnerOrderId
- SystemId
GoodsOwnerOrderNumber str(50) Req.* Order number. Required if OrderFileIdentificationType = GoodsOwnerOrderNumber.
GoodsOwnerOrderId str(40) Req.* External order id. Required if OrderFileIdentificationType = GoodsOwnerOrderId.
OrderSystemId int Req.* Ongoing's internal order id. Required if OrderFileIdentificationType = SystemId.
File
FileName str(300) Req. Filename. Note that if you try to attach two files to the same order, then the two files must have different filenames. When comparing filenames, the system does a case-insensitive comparison.
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>
    <UploadOrderFileResponse xmlns="http://ongoingsystems.se/WSI" />
  </soap:Body>
</soap:Envelope>
+

Response specification

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