Ongoing WMS logo

Ongoing WMS Developer

CreatePrintJob

Ongoing WMS has a printer service which can be installed in the warehouse. This allows printouts to be sent to printers in the warehouse. This function allows you to add printouts to the print queue.

Tags: CreatePrintJob, PrintJob, CreatePrintJobResult, CreatePrintJobError

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

<?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>
    <CreatePrintJob xmlns="http://ongoingsystems.se/Automation">
      <UserName>string</UserName>
      <Password>string</Password>
      <PrintJob>
        <ReportId>int</ReportId>
        <IdsToPrint>
          <int>int</int>
          <int>int</int>
        </IdsToPrint>
        <PrintAsUser>
          <UserName>string</UserName>
          <UserId>int</UserId>
        </PrintAsUser>
        <PrintAsComputer>
          <ComputerName>string</ComputerName>
          <ComputerId>int</ComputerId>
        </PrintAsComputer>
        <PrintAsGoodsOwner>
          <GoodsOwnerId>int</GoodsOwnerId>
        </PrintAsGoodsOwner>
      </PrintJob>
    </CreatePrintJob>
  </soap:Body>
</soap:Envelope>
+

Request specification

CreatePrintJob
UserName str(50) Req. Your username.
Password str(50) Req. Your password.
PrintJob obj Req. Object of type PrintJob. Defines the print job that you want to create.
PrintJob
ReportId int Req. The report which will be printed. Ask the warehouse to provide you with this ID.
> IdsToPrint int[] Req. The IDs of the things you want to print. For instance, if you want to print delivery note for some orders, then this list should contain a list of OrderIds.
PrintAsUser obj If you specify this object, then the printouts will be added to the queue as if they were coming from the the specified user. This can affect which printer is used.
> UserName str The user name.
> UserId int The user id.
PrintAsComputer obj If you specify this object, then the printouts will be added to the queue as if they were coming from the specified computer. This can affect which printer is used.
> ComputerName str The computer name.
> ComputerId int The computer ID.
PrintAsGoodsOwner obj If you specify this object, then the printouts will be added to the queue as if they were coming from the specified goods owner. This can affect which printer is used.
> GoodsOwnerId int The goods owner ID.

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>
    <CreatePrintJobResponse xmlns="http://ongoingsystems.se/Automation">
      <CreatePrintJobResult>
        <Success>boolean</Success>
        <PrintJobId>int</PrintJobId>
        <Message>string</Message>
        <Errors>
          <CreatePrintJobError>
            <Message>string</Message>
            <ErrorType>UnknownError or LogonError or ReportIdNotFound or UserNotFound or ComputerNotFound or PrinterNotFound or GoodsOwnerNotFound</ErrorType>
          </CreatePrintJobError>
          <CreatePrintJobError>
            <Message>string</Message>
            <ErrorType>UnknownError or LogonError or ReportIdNotFound or UserNotFound or ComputerNotFound or PrinterNotFound or GoodsOwnerNotFound</ErrorType>
          </CreatePrintJobError>
        </Errors>
      </CreatePrintJobResult>
    </CreatePrintJobResponse>
  </soap:Body>
</soap:Envelope>
+

Response specification

CreatePrintJobResult
Success bool True if successful, false otherwise.
PrintJobId int The ID of the print job.
Message str Message.
Errors object A list of CreatePrintJobError objects
CreatePrintJobError
Message str(*) Message explaining the error.
ErrorType string The type of error:
  • UnknownError
  • LogonError
  • ReportIdNotFound
  • UserNotFound
  • ComputerNotFound
  • PrinterNotFound
  • GoodsOwnerNotFound