ProcessProductionOrder

Used for creating and updating production orders.

Tags: ProcessProductionOrder, ProductionOrder, ProductionOrderLine, ProductionOrderType, ProductionOrderLineSpecification, ProductionSpecificationArticleLine, Article_ProductionSpecificationArticleLine, ProcessProductionOrderResponse, ProcessProductionOrderResult, ProcessProductionOrderError

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

<?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>
    <ProcessProductionOrder xmlns="http://ongoingsystems.se/WSI">
      <GoodsOwnerCode>string</GoodsOwnerCode>
      <UserName>string</UserName>
      <Password>string</Password>
      <ProductionOrder>
        <ProductionOrderIdentification>ProductionOrderNumber</ProductionOrderIdentification>
        <ProductionOrderNumber>string</ProductionOrderNumber>
        <ProductionOrderComment>string</ProductionOrderComment>
        <ProductionDate>dateTime</ProductionDate>
        <ExpiryDate>dateTime</ExpiryDate>
        <ProductionOrderLines>
          <ProductionOrderLine>
            <ProductionOrderLineIdentification>ProductionOrderLineNumber</ProductionOrderLineIdentification>
            <ToProduceNumberOfItems>decimal</ToProduceNumberOfItems>
            <ArticleNumber>string</ArticleNumber>
            <ProductionOrderLineComment>string</ProductionOrderLineComment>
            <ProductionOrderLineNumber>string</ProductionOrderLineNumber>
            <MinDaysToExpiryDate>int</MinDaysToExpiryDate>
            <Specification>
              <Lines>
                <ProductionSpecificationArticleLine>
                  <Article>
                    <ArticleIdentification>ArticleNumber or ProductCode or ArticleSystemId</ArticleIdentification>
                    <ArticleNumber>string</ArticleNumber>
                    <ArticleName>string</ArticleName>
                    <ProductCode>string</ProductCode>
                    <ArticleSystemId>int</ArticleSystemId>
                  </Article>
                  <ToConsumeNumberOfItems>decimal</ToConsumeNumberOfItems>
                  <Comment>string</Comment>
                  <LineNumber>string</LineNumber>
                  <BatchNo>string</BatchNo>
                  <Serial>string</Serial>
                </ProductionSpecificationArticleLine>
                <ProductionSpecificationArticleLine>
                  <Article>
                    <ArticleIdentification>ArticleNumber or ProductCode or ArticleSystemId</ArticleIdentification>
                    <ArticleNumber>string</ArticleNumber>
                    <ArticleName>string</ArticleName>
                    <ProductCode>string</ProductCode>
                    <ArticleSystemId>int</ArticleSystemId>
                  </Article>
                  <ToConsumeNumberOfItems>decimal</ToConsumeNumberOfItems>
                  <Comment>string</Comment>
                  <LineNumber>string</LineNumber>
                  <BatchNo>string</BatchNo>
                  <Serial>string</Serial>
                </ProductionSpecificationArticleLine>
              </Lines>
            </Specification>
            <ProductionOrderLineProduceBatchNo>string</ProductionOrderLineProduceBatchNo>
            <ProductionOrderLineProduceSerial>string</ProductionOrderLineProduceSerial>
          </ProductionOrderLine>
          <ProductionOrderLine>
            <ProductionOrderLineIdentification>ProductionOrderLineNumber</ProductionOrderLineIdentification>
            <ToProduceNumberOfItems>decimal</ToProduceNumberOfItems>
            <ArticleNumber>string</ArticleNumber>
            <ProductionOrderLineComment>string</ProductionOrderLineComment>
            <ProductionOrderLineNumber>string</ProductionOrderLineNumber>
            <MinDaysToExpiryDate>int</MinDaysToExpiryDate>
            <Specification>
              <Lines>
                <ProductionSpecificationArticleLine>
                  <Article>
                    <ArticleIdentification>ArticleNumber or ProductCode or ArticleSystemId</ArticleIdentification>
                    <ArticleNumber>string</ArticleNumber>
                    <ArticleName>string</ArticleName>
                    <ProductCode>string</ProductCode>
                    <ArticleSystemId>int</ArticleSystemId>
                  </Article>
                  <ToConsumeNumberOfItems>decimal</ToConsumeNumberOfItems>
                  <Comment>string</Comment>
                  <LineNumber>string</LineNumber>
                  <BatchNo>string</BatchNo>
                  <Serial>string</Serial>
                </ProductionSpecificationArticleLine>
                <ProductionSpecificationArticleLine>
                  <Article>
                    <ArticleIdentification>ArticleNumber or ProductCode or ArticleSystemId</ArticleIdentification>
                    <ArticleNumber>string</ArticleNumber>
                    <ArticleName>string</ArticleName>
                    <ProductCode>string</ProductCode>
                    <ArticleSystemId>int</ArticleSystemId>
                  </Article>
                  <ToConsumeNumberOfItems>decimal</ToConsumeNumberOfItems>
                  <Comment>string</Comment>
                  <LineNumber>string</LineNumber>
                  <BatchNo>string</BatchNo>
                  <Serial>string</Serial>
                </ProductionSpecificationArticleLine>
              </Lines>
            </Specification>
            <ProductionOrderLineProduceBatchNo>string</ProductionOrderLineProduceBatchNo>
            <ProductionOrderLineProduceSerial>string</ProductionOrderLineProduceSerial>
          </ProductionOrderLine>
        </ProductionOrderLines>
        <ProductionOrderOperation>CreateOrUpdate or Remove</ProductionOrderOperation>
        <ProductionOrderType>
          <ProductionOrderTypeOperation>Find or CreateOrFind</ProductionOrderTypeOperation>
          <ProductionOrderTypeIdentification>ProductionOrderTypeCode or ProductionOrderTypeName</ProductionOrderTypeIdentification>
          <ProductionOrderTypeCode>string</ProductionOrderTypeCode>
          <ProductionOrderTypeName>string</ProductionOrderTypeName>
        </ProductionOrderType>
        <ProductionOrderFreeBoolean1>boolean</ProductionOrderFreeBoolean1>
        <ProductionOrderFreeBoolean2>boolean</ProductionOrderFreeBoolean2>
        <ProductionOrderFreeText1>string</ProductionOrderFreeText1>
      </ProductionOrder>
    </ProcessProductionOrder>
  </soap:Body>
</soap:Envelope>

Request specification

ProcessProductionOrder
GoodsOwnerCode string(400) Req. The name/code of your client
UserName string(50) Req. Your username
Password string(50) Req. Your password
ProductionOrder ProductionOrder Req. The ProductionOrder object
ProductionOrder
ProductionOrderIdentification enum Req. Defines how you want to identify the production order.
 - ProductionOrderNumber
ProductionOrderNumber string(50) Production order number in the goods owners system.
ProductionOrderComment string(200) Comment to warehouse.
ProductionDate dateTime When the production is expected to be done.
ExpiryDate dateTime Expiry date of the produced goods
ProductionOrderLines ProductionOrderLine[] Containing information about the articles to produce as elements of ProductionOrderLine.
ProductionOrderOperation enum Defines the operation:
 - CreateOrUpdate
 - Remove

ProductionOrderType ProductionOrderType Determines what type of production order this is
ProductionOrderFreeBoolean1 boolean Custom boolean field. By default not used for anything.
ProductionOrderFreeBoolean2 boolean Custom boolean field. By default not used for anything.
ProductionOrderFreeText1 string(300) Custom free text field. By default not used for anything.
ProductionOrderLine
ProductionOrderLineIdentification enum Req. Defines how to find the order line on the original order.
 - ProductionOrderLineNumber
ToProduceNumberOfItems decimal Req. The number of items to produce.
ArticleNumber string(100) Req. The article number of the article to produce. The article must have been defined as a production article in Ongoing WMS.
ProductionOrderLineComment string(100) Comment to warehouse.
ProductionOrderLineNumber string(50) Req. Required if ProductionOrderLineIdentification = ProductionOrderLineNumber
MinDaysToExpiryDate int Defines the minimum amount of days that the sub articles are allowed to have until expiry when consuming them.
Specification ProductionOrderLineSpecification An object of type ProductionOrderLineSpecification. In most cases, this object should be null. If you specify null here, Ongoing WMS will take the specification of the production article from the article registry in Ongoing WMS.

In some cases, the "recipe" for the production article is not static and needs to be different for different production orders. If you specify this field, then Ongoing WMS will use it as the "recipe" for the production article.
ProductionOrderLineProduceBatchNo string(50) Batch of the produced goods.
ProductionOrderLineProduceSerial string(128) Serial number of the produced goods.
ProductionOrderType
ProductionOrderTypeOperation enum An element of type ProductionOrderTypeOperation.
ProductionOrderTypeIdentification enum An element of type ProductionOrderTypeIdentification.
ProductionOrderTypeCode string
ProductionOrderTypeName string
ProductionOrderLineSpecification
Lines ProductionSpecificationArticleLine[] A list of ProductionSpecificationArticleLine.
ProductionSpecificationArticleLine
Article Article_ProductionSpecificationArticleLine An object of type Article_ProductionSpecificationArticleLine, which specifies which article this line refers to.
ToConsumeNumberOfItems decimal The number of items to consume during production.
Comment string(400) Comment.
LineNumber string(100) Line number. Must be public for each production order.
BatchNo string(50) Specify which batch to consume.
Serial string(128) Specify which serial number to consume.
Article_ProductionSpecificationArticleLine
ArticleIdentification enum Defines what you want to identify the article by
 - ArticleNumber
 - ProductCode
 - ArticleSystemId
Most integrationse use ArticleNumber.
ArticleNumber string Article number.
ArticleName string Article name
ProductCode string Product code
ArticleSystemId int Article system id

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>
    <ProcessProductionOrderResponse xmlns="http://ongoingsystems.se/WSI">
      <ProcessProductionOrderResult>
        <ProductionOrderId>int</ProductionOrderId>
        <Success>boolean</Success>
        <ProcessProductionOrderErrors>
          <ProcessProductionOrderError>
            <Message>string</Message>
            <ErrorType>LogonError or ProductionOrderNumberNotSupplied or UnknownError or NonExistingArticleSupplied or ToProduceNumberOfItemsNotAPositiveValue or ErrorUpdatingProductionOrderLine or NoneProductionArticleSupplied or NoProductionOrderLineSpecificationLines or SpecificationLineIsMissingLineNumber or SpecificationLineNumbersAreNotUnique or SpecificationLineIsMissingArticleIdentificationField or NoSpecificationLinesSpecified or SpecificationLineNumberIsConsumedAndArticleCanNotBeChanged</ErrorType>
          </ProcessProductionOrderError>
          <ProcessProductionOrderError>
            <Message>string</Message>
            <ErrorType>LogonError or ProductionOrderNumberNotSupplied or UnknownError or NonExistingArticleSupplied or ToProduceNumberOfItemsNotAPositiveValue or ErrorUpdatingProductionOrderLine or NoneProductionArticleSupplied or NoProductionOrderLineSpecificationLines or SpecificationLineIsMissingLineNumber or SpecificationLineNumbersAreNotUnique or SpecificationLineIsMissingArticleIdentificationField or NoSpecificationLinesSpecified or SpecificationLineNumberIsConsumedAndArticleCanNotBeChanged</ErrorType>
          </ProcessProductionOrderError>
        </ProcessProductionOrderErrors>
      </ProcessProductionOrderResult>
    </ProcessProductionOrderResponse>
  </soap:Body>
</soap:Envelope>

Response specification

ProcessProductionOrderResponse
ProcessProductionOrderResult ProcessProductionOrderResult
ProcessProductionOrderResult
ProductionOrderId int Ongoing WMS internal id for the production order.
Success boolean If operation was successful or not.
ProcessProductionOrderErrors ProcessProductionOrderError[] A list of errors which have occured.
ProcessProductionOrderError
Message string Error message.
ErrorType enum Provides a set of known error codes.
 - LogonError
 - ProductionOrderNumberNotSupplied
 - UnknownError
 - NonExistingArticleSupplied
 - ToProduceNumberOfItemsNotAPositiveValue
 - ErrorUpdatingProductionOrderLine
 - NoneProductionArticleSupplied