Ongoing Warehouse logo

Ongoing Warehouse Developer

ProcessInOrder

This function is used for creating and updating inorders. It can also be used for canceling inorders that have not yet been handled.

Note that by default, the function expects that an article will never appear on two or more distinct order lines on the same order. Please see this article if your integration requires several order lines with the same article.

Tags: ProcessInOrder, InOrder, InOrderInfo, WayOfDeliveryType, InOrderType, TermsOfDeliveryType, InOrderCustomer, InOrderSupplier, InOrderLine, InOrderLineArticleItem, Warehouse, ProcessInOrderResult

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/ProcessInOrder"

<?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>
      <ProcessInOrder xmlns="http://ongoingsystems.se/WSI">
         <GoodsOwnerCode>string</GoodsOwnerCode>
         <UserName>string</UserName>
         <Password>string</Password>
         <co>
            <InOrderInfo>
               <InOrderIdentification>ExternalOrderCode or GoodsOwnerOrderNumber or SystemId</InOrderIdentification>
               <InOrderOperation>Create or CreateOrUpdate or Remove</InOrderOperation>
               <InOrderId>int</InOrderId>
               <GoodsOwnerOrderNumber>string</GoodsOwnerOrderNumber>
               <SupplierOrderNumber>string</SupplierOrderNumber>
               <BatchNumber>string</BatchNumber>
               <GoodsOwnerReference>string</GoodsOwnerReference>
               <ReferenceNumber>string</ReferenceNumber>
               <WayOfDelivery>string</WayOfDelivery>
               <OrderRemark>string</OrderRemark>
               <InDate>dateTime</InDate>
               <OrderDate>dateTime</OrderDate>
               <BatchDate>dateTime</BatchDate>
               <Container>string</Container>
               <OrderStatusCreated>int</OrderStatusCreated>
               <OrderStatusUpdated>int</OrderStatusUpdated>
               <WayOfDeliveryType>
                  <WayOfDeliveryTypeOperation>CreateOrUpdate or CreateOrFind or Find</WayOfDeliveryTypeOperation>
                  <WayOfDeliveryTypeIdentification>Code or Name</WayOfDeliveryTypeIdentification>
                  <Code>string</Code>
                  <Name>string</Name>
               </WayOfDeliveryType>
               <InOrderType>
                  <InOrderTypeOperation>Find or CreateOrFind</InOrderTypeOperation>
                  <InOrderTypeIdentification>InOrderTypeCode or InOrderTypeName</InOrderTypeIdentification>
                  <InOrderTypeCode>string</InOrderTypeCode>
                  <InOrderTypeName>string</InOrderTypeName>
               </InOrderType>
               <InOrderIsReturnType>boolean</InOrderIsReturnType>
               <InvoiceNumber>string</InvoiceNumber>
               <TermsOfDeliveryType>
                  <TermsOfDeliveryTypeOperation>CreateOrUpdate or Find</TermsOfDeliveryTypeOperation>
                  <TermsOfDeliveryTypeIdentification>Code or Name</TermsOfDeliveryTypeIdentification>
                  <Code>string</Code>
                  <Name>string</Name>
               </TermsOfDeliveryType>
               <FreeText1>string</FreeText1>
               <FreeText2>string</FreeText2>
               <FreeText3>string</FreeText3>
               <FreeText4>string</FreeText4>
               <FreeText5>string</FreeText5>
               <Warehouse>
                  <InOrderWarehouseIdentification>WarehouseName</InOrderWarehouseIdentification>
                  <InOrderWarehouseOperation>Find</InOrderWarehouseOperation>
                  <WarehouseName>string</WarehouseName>
               </Warehouse>
               <CustomsDeclaredDate>dateTime</CustomsDeclaredDate>
               <InOrderFreeDecimal1>decimal</InOrderFreeDecimal1>
               <InOrderFreeDecimal2>decimal</InOrderFreeDecimal2>
               <InOrderFreeBool1>boolean</InOrderFreeBool1>
               <InOrderFreeBool2>boolean</InOrderFreeBool2>
            </InOrderInfo>
            <InOrderCustomer>
               <InOrderCustomerIdentification>CustomerNumber or FullNameAndAdress</InOrderCustomerIdentification>
               <InOrderCustomerOperation>Find or CreateOrUpdate</InOrderCustomerOperation>
               <CustomerNumber>string</CustomerNumber>
               <Name>string</Name>
               <AddressName>string</AddressName>
               <Address>string</Address>
               <Address2>string</Address2>
               <Address3>string</Address3>
               <PostCode>string</PostCode>
               <City>string</City>
               <TelePhone>string</TelePhone>
               <AddressEmail>string</AddressEmail>
               <MobilePhone>string</MobilePhone>
               <CountryCode>string</CountryCode>
            </InOrderCustomer>
            <InOrderSupplier>
               <InOrderSupplierIdentificationType>SupplierNumber or FullNameAndAdress or SupplierName</InOrderSupplierIdentificationType>
               <InOrderSupplierOperation>CreateOrUpdate or Find</InOrderSupplierOperation>
               <SupplierNumber>string</SupplierNumber>
               <SupplierName>string</SupplierName>
               <Address>
                  <Name>string</Name>
                  <Address>string</Address>
                  <Address2>string</Address2>
                  <Address3>string</Address3>
                  <PostCode>string</PostCode>
                  <City>string</City>
                  <TelePhone>string</TelePhone>
                  <Remark>string</Remark>
                  <Email>string</Email>
                  <MobilePhone>string</MobilePhone>
                  <IsEuCountry>boolean</IsEuCountry>
                  <CountryStateCode>string</CountryStateCode>
                  <CountryCode>string</CountryCode>
                  <DeliveryInstruction>string</DeliveryInstruction>
                  <IsVisible>boolean</IsVisible>
                  <NotifyBySMS>boolean</NotifyBySMS>
                  <NotifyByEmail>boolean</NotifyByEmail>
                  <NotifyByTelephone>boolean</NotifyByTelephone>
               </Address>
            </InOrderSupplier>
            <GoodsOwner>
               <GoodsOwnerIdentification>SystemId or GoodsOwnerCode</GoodsOwnerIdentification>
               <GoodsOwnerCode>string</GoodsOwnerCode>
               <GoodsOwnerId>int</GoodsOwnerId>
               <FinancialCode>string</FinancialCode>
               <GoodsLocationCode>string</GoodsLocationCode>
            </GoodsOwner>
            <CommunicationInfo>
               <FromSystemName>string</FromSystemName>
               <ToSystemName>string</ToSystemName>
               <MessageId>string</MessageId>
            </CommunicationInfo>
            <InOrderLines>
               <InOrderLine>
                  <OrderLineIdentification>ExternalOrderLineCode or ArticleNumber or ArticleName or ExternalOrderLineId or SystemId</OrderLineIdentification>
                  <ArticleIdentification>SystemId or ArticleNumber or ProductCode or ArticleName</ArticleIdentification>
                  <OrderLineSystemId>int</OrderLineSystemId>
                  <ExternalOrderLineCode>string</ExternalOrderLineCode>
                  <ExternalOrderLineId>string</ExternalOrderLineId>
                  <InvoiceNumber>string</InvoiceNumber>
                  <Indate>dateTime</Indate>
                  <OrderLineComment>string</OrderLineComment>
                  <ArticleSystemId>int</ArticleSystemId>
                  <ArticleNumber>string</ArticleNumber>
                  <ArticleName>string</ArticleName>
                  <ArticleCode>string</ArticleCode>
                  <CurrencyCode>string</CurrencyCode>
                  <NumberOfItems>decimal</NumberOfItems>
                  <RowPrice>decimal</RowPrice>
                  <SupplierNumberOfItems>decimal</SupplierNumberOfItems>
                  <RowBatchNo>string</RowBatchNo>
                  <Items xsi:nil="true" />
                  <ProductCode>string</ProductCode>
                  <ArticleDef xsi:nil="true" />
               </InOrderLine>
               <InOrderLine>
                  <OrderLineIdentification>ExternalOrderLineCode or ArticleNumber or ArticleName or ExternalOrderLineId or SystemId</OrderLineIdentification>
                  <ArticleIdentification>SystemId or ArticleNumber or ProductCode or ArticleName</ArticleIdentification>
                  <OrderLineSystemId>int</OrderLineSystemId>
                  <ExternalOrderLineCode>string</ExternalOrderLineCode>
                  <ExternalOrderLineId>string</ExternalOrderLineId>
                  <InvoiceNumber>string</InvoiceNumber>
                  <Indate>dateTime</Indate>
                  <OrderLineComment>string</OrderLineComment>
                  <ArticleSystemId>int</ArticleSystemId>
                  <ArticleNumber>string</ArticleNumber>
                  <ArticleName>string</ArticleName>
                  <ArticleCode>string</ArticleCode>
                  <CurrencyCode>string</CurrencyCode>
                  <NumberOfItems>decimal</NumberOfItems>
                  <RowPrice>decimal</RowPrice>
                  <SupplierNumberOfItems>decimal</SupplierNumberOfItems>
                  <RowBatchNo>string</RowBatchNo>
                  <Items xsi:nil="true" />
                  <ProductCode>string</ProductCode>
                  <ArticleDef xsi:nil="true" />
               </InOrderLine>
            </InOrderLines>
         </co>
      </ProcessInOrder>
   </soap:Body>
</soap:Envelope>
+

Request specification

ProcessInOrder
GoodsOwnerCode str(400) Req. The name/code of your client
UserName str(50) Req. Username
Password str(50) Req. Password
co object Req. The InOrder object
InOrder
InOrderInfo object Req. Defines inorder head information
InOrderCustomer object Defines a customer associated with the inorder
InOrderSupplier object Defines a supplier associated with the inorder
GoodsOwner object Omit Only for internal purposes, don't use
CommunicationInfo object Omit Deprecated, don't use
InOrderLines object Req. Containing elements of InOrderLine. Defines articles and amount advised
InOrderInfo
InOrderIdentification enum Req. Defines what you want to identify the inorder by (what is unique). Most integrations will use GoodsOwnerOrderNumer.
 - ExternalOrderCode (deprecated, don't use)
 - GoodsOwnerOrderNumber
 - SystemId
InOrderOperation enum Req. Defines the operation:
 - CreateOrUpdate
 - Create
 - Remove

Note 1: the recommended operation is CreateOrUpdate.

Note 2: if you use Create, then you run the risk of creating duplicate inorders. See this page for more info.
InOrderId int Req.* Ongoing id (SystemId). Required if InOrderIdentification = SystemId
GoodsOwnerOrderNumber str(50) Req.* Order number. Required if InOrderIdentification = GoodsOwnerOrderNumber
SupplierOrderNumber str(50) Supplier order number
BatchNumber str(50) Inorder batch
GoodsOwnerReference str(100) Goods owner reference
ReferenceNumber str(50) Reference number
WayOfDelivery str(50) Way of delivery
OrderRemark str(1000) Remark/comment about the order
InDate datetime Expected date of arrival to warehouse. If left empty, the system will use today's date
OrderDate datetime Date when the order was placed
BatchDate datetime Deprecated, don't use
Container str(50) Container number
OrderStatusCreated int Status the inorder should get when created
OrderStatusUpdated int Status the inorder should get when updated
WayOfDeliveryType object Enables a way of delivery type with code and name
InOrderType object Enables defining a type for the order
InOrderIsReturnType bool True if the inorder represents a return
InvoiceNumber str(100) Invoice number of inorder
TermsOfDeliveryType object Enables a terms of delivery type with code and name
FreeText1 str(300) Free text 1
FreeText2 str(50) Free text 2
FreeText3 str(50) Free text 3
FreeText4 str(50) Free text 4
FreeText5 str(50) Free text 5
InOrderFreeDecimal1 dec Free decimal 1
InOrderFreeDecimal2 dec Free decimal 2
InOrderFreeBool1 bool Free bool 1
InOrderFreeBool2 bool Free bool 2
CustomsDeclaredDate datetime Date when inorder was declared to customs
Warehouse object Identifies which warehouse the inorder is supposed to go to
WayOfDeliveryType
WayOfDeliveryTypeOperation enum Req. Defines the operation
 - CreateOrUpdate
 - Find
WayOfDeliveryTypeIdentification enum Req. Defines what you want to identify the type by
 - Code
 - Name
Code str(50) Req.* Way of delivery type code. Required if WayOfDeliveryTypeIdentification = Code
Name str(100) Req.* Way of delivery type name. Required if WayOfDeliveryTypeIdentification = Name
InOrderType
InOrderTypeOperation Req. enum Defines the operation
 - Find
 - CreateOrFind
InOrderTypeIdentification Req. enum Defines what you want to identify the type by
 - InOrderTypeCode
 - InOrderTypeName
InOrderTypeCode Req.* str(50) Inorder type code. Required if OrderTypeIdentification = InOrderTypeCode
InOrderTypeName Req.* str(50) Inorder type name. Required if OrderTypeIdentification = InOrderTypeName
TermsOfDeliveryType
TermsOfDelieryTypeOperation enum Req. Defines the operation
 - CreateOrUpdate
 - Find
TermsOfDeliveryTypeIdentification enum Req. Defines what you want to identify the type by
 - Code
 - Name
Code str(50) Req.* Terms of delivery type code. Required if TermsOfDeliveryTypeIdentification = Code
Name str(100) Req.* Terms of delivery type name. Required if TermsOfDeliveryTypeIdentification = Name
InOrderCustomer
InOrderCustomerIdentification enum Req. Defines what you want to identify the customer by (what is unique)
 - CustomerNumber
 - FullNameAndAdress
InOrderCustomerOperation enum Defines the operation
 - Find
 - CreateOrUpdate
CustomerNumber str(50) Req.* Customer number. Required if InOrderCustomerIdentification = CustomerNumber
Name str(200) Name of the customer
AddressName str(200) Name of the address
Address str(200) Address line 1
Address2 str(200) Address line 2
Address3 str(200) Address line 3
PostCode str(50) Post code/zip
City str(200) City
TelePhone str(50) Telephone number (non cellular)
AddressEmail str(300) Email address
MobilePhone str(50) Mobile phone number (cellular)
CountryCode str(2) The two-letter ISO 3166-1 alpha-2 code of the country.
InOrderSupplier
InOrderSupplierIdentificationType enum Req. Defines what you identify the Supplier by
 - SupplierNumber
 - FullNameAndAdress
 - SupplierName
InOrderSupplierOperation enum Req. Defines the operation
 - CreateOrUpdate
 - Find
SupplierNumber str(200) Req.* Supplier number. Required if InOrderSupplierIdentificationType = SupplierNumber or SupplierOperation = CreateOrUpdate
SupplierName str(200) Req.* Supplier name. Required if InOrderSupplierIdentificationType = SupplierName or SupplierOperation = CreateOrUpdate
Address object Req.* Address of the supplier. Required if SupplierIdentificationType = FullNameAndAdress See ProcessArticle for specification of the supplier Address object
InOrderLine
OrderLineIdentification enum Req. Defines what you want to identify the inorder line by
 - ExternalOrderLineCode
 - ArticleNumber
 - ArticleName
 - ExternalOrderLineId
 - SystemId
Most integrations use ArticleNumber or ExternalOrderLineCode. We also have a separate article with more information about order line identification.
ArticleIdentification enum Req. Defines what you want to identify the article by
 - ArticleNumber
 - SystemId
 - ProductCode
 - ArticleName
Most integrationse use ArticleNumber.
OrderLineSystemId int Req.* Ongoing inorder line id. Required if OrderLineIdentification = SystemId
ExternalOrderLineCode str(40) Req.* External inorder line code. Insert row number of your system if needed. Preferred over ExternalOrderLineId Required if OrderLineIdentification = ExternalOrderLineCode
ExternalOrderLineId str(30) Req.* External inorder line id. Insert inorder line id of your system if needed. Not preferred. Use only ExternalOrderLineCode if you don't need two id fields. Required if OrderLineIdentification = ExternalOrderLineId
InvoiceNumber str(100) Invoice number of the inorder line
Indate datetime Expected date of arrival to the warehouse
OrderLineComment str(150) Inorder line comment
ArticleSystemId int Req.* Ongoing article id. Required if ArticleIdentification = SystemId
ArticleNumber str(100) Req.* Article number. Required if ArticleIdentification = ArticleNumber
ArticleName str(200) Req.* Article name. Required if ArticleIdentification = ArticleName
ArticleCode str(200) Omit Deprecated, don't use
CurrencyCode str(20) Currency code of the order line, in ISO 4217. E.g. SEK, NOK or EUR
NumberOfItems dec Req. Number of advised items on this inorder line
RowPrice dec Price of the inorder line
SupplierNumberOfItems dec Supplier number of items
RowBatchNo str(100) Batch no of this inorder line
Items object Containing elements of InOrderLineArticleItem. Enabling advising specific article items with detailed info
ProductCode str(200) Req.* Article product code. Required if ArticleIdentification = ProductCode
ArticleDef object An ArticleDefinition. This field allows you to send in various article data (such as weight, country of origin, etc) together with the inorder.

Note: article data you send in this object will overwrite any the article data which might already exist in the system.
InOrderLineArticleItem
Serial str(128) Serial no of item
ContainerNo str(50) Container no of item
Volume dec Volume of item, in m3
Weight dec Weight of item, in kg
Length dec Length of item, in m
Width dec Width of item, in m
Height dec Height of item, in m
InOrderLineArticleItemStatus object Article item status
> InOrderLineArticleItemStatusIdentification enum Req. Defines what you want to identify the article item status by
 - ArticleItemStatusId
 - ArticleItemStatusCode
> ArticleItemStatusId int Req.* Article item status id. Required if InOrderLineArticleItemStatusIdentification = ArticleItemStatusId
> ArticleItemStatusCode str(50) Req.* Article item status code. Required if InOrderLineArticleItemStatusIdentification = ArticleItemStatusCode
Batch str(50) Batch no of item
ExpiryDate datetime Expiry date of item
ProductionDate datetime Production date of item
Comment str(400) Comment
NumberOfItems dec Number of items that this article item represents
Warehouse
InOrderWarehouseIdentification str Req. Must be fixed string "WarehouseName"
InOrderWarehouseOperation str Req. Must be fixed string "Find"
WarehouseName str Req Name of the warehouse

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>
      <ProcessInOrderResponse xmlns="http://ongoingsystems.se/WSI">
        <ProcessInOrderResult>
          <ErrorMessage>string</ErrorMessage>
          <GoodsOwnerOrderNumber>string</GoodsOwnerOrderNumber>
          <OrderId>int</OrderId>
          <InOrderId>int</InOrderId>
          <ArticleDefId>int</ArticleDefId>
          <Success>boolean</Success>
          <Message>string</Message>
        </ProcessInOrderResult>
      </ProcessInOrderResponse>
    </soap:Body>
  </soap:Envelope>
+

Response specification

ProcessInOrderResult
ErrorMessage str(*) Error message
GoodsOwnerOrderNumber str(50) Goodsowner order number
OrderId int Not used
InOrderId int Ongoing system id of the inorder
ArticleDefId int Not used
Success bool True if success
Message str(*) Process message