Radial Integration | 2016

Store Fulfillment > Store Fulfillment API > POST api/v4/PickTickets/PrintDocument

POST api/v4/PickTickets/PrintDocument

This method enables access to various types of printable documents on the Pick Ticket.

Request Parameters

pickTicketPrintDocumentRequest: object of type PickTicketPrintDocumentRequest

Name Description
Usage
Type
Allowed values
Required?

pickTicketId

Pick batch identifier for Pick Tickets.

String

yes

pickTicketGroupId

Unique identifier of the specific Pick Ticket Group

Integer

no

pickTicketDocumentType

Indicates the type of document to be printed

Enum – supports either text or integer.

PickTicket = 1

HoldTicket = 2

PutAwayTicket = 3

PackSlip = 4

ShippingLabel = 5

yes

Response Parameters

pickTicketPrintDocumentResponse: object of type PickTicketPrintDocumentResponse

PickTicketPrintDocumentResponse

Name Description
Usage
Type
Allowed values
Required?

pickTicketDocumentHTML

Contains the raw HTML of the document requested

String

yes

pickTicketShipMethodDocuments

Collection of ship method specific documents

Array of PickTicketShipMethodDocument

no

pickTicketPrintErrors

Collection of errors encountered attempting to print

Array of PickTicketPrintError

no

sessionToken

Session token to be used for maintaining session state across batch operations.

String

yes

baseSystemVersion

Indicates the version of the underlying Store Fulfillment core application.

String

yes

PickTicketShipMethodDocument

Name Description
Usage
Type
Allowed values
Required?

shipMethodDocumentHTML

Contains the raw HTML of the document requested for this specific ship method

String

yes

packageShipMethod

Identifier of the ship method, if applicable for the related document type

String

no

PickTicketPrintError

Name Description
Usage
Type
Allowed values
Required?

pickTicketPrintOrderNumber

Indicates the order number within the Pick Ticket that has an error

String

no

pickTicketPrintErrorMessage

Description of the error

String

yes

Example - Print all pack slips for a confirmed Pick Ticket

XML Request

Authorization: Basic am55c3QzOmpueXN0MzpVTTJZSDZGNENPVEhZWlQx
Content-Type: application/xml; charset=utf-8
Accept: application/xml

<PickTicketPrintDocumentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
xmlns="http://schemas.datacontract.org/2004/07/VendorNet.Web.Api.Contracts.V4">
   <pickTicketDocumentType>PackSlip</pickTicketDocumentType>
   <pickTicketGroupId>0</pickTicketGroupId>
   <pickTicketId>2016-05-11 15:35:32.000</pickTicketId>
</PickTicketPrintDocumentRequest>      

XML Response

<PickTicketPrintDocumentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
xmlns="http://schemas.datacontract.org/2004/07/VendorNet.Web.Api.Contracts.V4">
   <baseSystemVersion>45</baseSystemVersion>
   <sessionToken>UM2YH6F4COTHYZT1</sessionToken>
   <pickTicketDocumentHTML>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
   &lt;meta http-equiv=Content-Type content="text/html; charset=UTF-8"&gt;
   &lt;title&gt;Pickup / Hold Ticket&lt;/title&gt;
   &lt;link type="text/css" rel="stylesheet" href="file:///C:/Development/ImpDev/StdHTML/CSS/std.css" 
charset='UTF-8' /&gt;
   &lt;link type="text/css" rel="stylesheet" href="/printing/packing/CSS/std.css" 
charset='UTF-8' /&gt;

   &lt;script src="file:///C:/Development/ImpDev/StdHTML/js/packslipBase.js" 
charset='UTF-8'&gt;&lt;/script&gt;
   &lt;script src="./js/packslipBase.js" charset='UTF-8'&gt;&lt;/script&gt;
   &lt;script src="/printing/packing/js/packslipBase.js" charset='UTF-8'&gt;&lt;/script&gt;


   &lt;script language="javascript"&gt;
   &lt;/script&gt;

   &lt;style type="text/css"&gt; 
      body{font-size:8pt;}

      table.items{font-size:7pt;}
      table.items th{border:solid black 1pt;}
      table.items td {border-left:solid black 1pt; border-right:solid black 1pt;padding:0 5pt 0 5pt;}

   &lt;/style&gt;
&lt;/head&gt;

&lt;/head&gt;

&lt;object viewastext id="factory" style="display:none"
  classid="CLSID:1663ed61-23eb-11d2-b92f-008048fdd814"&gt;
&lt;/object&gt;

&lt;SPAN id="scriptXSecurityManager"&gt;&lt;/SPAN&gt;

&lt;script&gt;

function printPage(headerText){
    var factory = document.getElementById("factory");
    var header = " &amp;b" + headerText + " Page &amp;p of &amp;P pages";
    factory.printing.header = "";
   factory.printing.leftMargin = .25;
   factory.printing.rightMargin = .25;
   factory.printing.topMargin = .25;
   factory.printing.bottomMargin = .25;
   factory.printing.paperSize = "Legal";
    factory.printing.portrait = true;
    factory.printing.footer = "";
    factory.printing.Print(true); // print without prompt
    //factory.printing.WaitForSpoolingComplete();
} //printPage('');
&lt;/script&gt;



&lt;body onload="printPage('');"&gt;

&lt;/body&gt;

&lt;script&gt;
GetXmlHttpObject("scriptXSecurityManager");
&lt;/script&gt;

&lt;/html&gt;
   </shipMethodDocumentHTML>
</PickTicketShipMethodDocument>
</pickTicketShipMethodDocuments>
</PickTicketPrintDocumentResponse>

JSON Request

Authorization: Basic MTk4NTo6S1ZBRzgxRzBPSk5QNDNPVw==

{
   "pickTicketId": "2016-05-11 14:50:40.000",
   "pickTicketGroupId": 0,
   "pickTicketDocumentType": 4
}

JSON Response

{
   "pickTicketDocumentHTML": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" 
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">
\r\n<head>\r\n\t<meta http-equiv=Content-Type content=\"text/html; charset=UTF-8\">\r\n\t<title>Pickup / 
Hold Ticket</title>\r\n\t<link type=\"text/css\" rel=\"stylesheet\" 
href=\"file:///C:/Development/ImpDev/StdHTML/CSS/std.css\" 
charset='UTF-8' />\r\n\t<link type=\"text/css\" rel=\"stylesheet\" 
href=\"/printing/packing/CSS/std.css\" charset='UTF-8' />\r\n\r\n\t<script 
src=\"file:///C:/Development/ImpDev/StdHTML/js/packslipBase.js\" 
charset='UTF-8'></script>\r\n\t<script src=\"./js/packslipBase.js\" 
charset='UTF-8'></script>\r\n\t<script src=\"/printing/packing/js/packslipBase.js\" 
charset='UTF-8'></script>\r\n\r\n\r\n\t<script language=\"javascript\">\r\n\t</script>\r\n\r\n\t<style 
type=\"text/css\"> \r\n\t\tbody{font-size:8pt;}\r\n\r\n\t\ttable.items{font-size:7pt;}\r\n\t\ttable.items 
th{border:solid black 1pt;}\r\n\t\ttable.items td {border-left:solid black 1pt; border-right:solid 
black 1pt;padding:0 5pt 0 5pt;}\r\n\r\n\t</style>\r\n</head>\r\n\r\n </head>\r\n\r\n<object viewastext 
id=\"factory\" style=\"display:none\"\r\n  
classid=\"CLSID:1663ed61-23eb-11d2-b92f-008048fdd814\">\r\n</object>\r\n\r\n<SPAN 
id=\"scriptXSecurityManager\"></SPAN>\r\n\r\n<script>\r\n\r\nfunction printPage(headerText){\r\n 
   var factory = document.getElementById(\"factory\");\r\n 
   var header = \" &b\" + headerText + \" Page &p of &P pages\";\r\n 
   factory.printing.header = \"\";\r\n\tfactory.printing.leftMargin = 
.25;\r\n\tfactory.printing.rightMargin = .25;\r\n\tfactory.printing.topMargin = 
.25;\r\n\tfactory.printing.bottomMargin = .25;\r\n\tfactory.printing.paperSize = 
\"Legal\";\r\n    factory.printing.portrait = true;\r\n    factory.printing.footer = 
\"\";\r\n    factory.printing.Print(true); // print without prompt\r\n 
   //factory.printing.WaitForSpoolingComplete();\r\n} 
//printPage('');\r\n</script>\r\n\r\n\r\n\r\n<body 
onload=\"printPage('');\"></body>\r\n\r\n<script>\r\nGetXmlHttpObject(\"scriptXSecurityManager\");
\r\n</script>\r\n\r\n</html>\r\n",
   "pickTicketShipMethodDocuments": [{
      "shipMethodDocumentHTML": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" 
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html 
xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n\t<meta 
http-equiv=Content-Type content=\"text/html; charset=UTF-8\">\r\n\t<title>Pickup / 
Hold Ticket</title>\r\n\t<link type=\"text/css\" rel=\"stylesheet\" 
href=\"file:///C:/Development/ImpDev/StdHTML/CSS/std.css\" charset='UTF-8' />\r\n\t<link 
type=\"text/css\" rel=\"stylesheet\" href=\"/printing/packing/CSS/std.css\" 
charset='UTF-8' />\r\n\r\n\t<script src=\"file:///C:/Development/ImpDev/StdHTML/js/packslipBase.js\" 
charset='UTF-8'></script>\r\n\t<script src=\"./js/packslipBase.js\" 
charset='UTF-8'></script>\r\n\t<script src=\"/printing/packing/js/packslipBase.js\" 
charset='UTF-8'></script>\r\n\r\n\r\n\t<script language=\"javascript\">\r\n\t</script>\r\n\r\n\t<style 
type=\"text/css\"> 
\r\n\t\tbody{font-size:8pt;}\r\n\r\n\t\ttable.items{font-size:7pt;}\r\n\t\ttable.items 
th{border:solid black 1pt;}\r\n\t\ttable.items td {border-left:solid black 1pt; 
border-right:solid black 1pt;padding:0 5pt 0 
5pt;}\r\n\r\n\t</style>\r\n</head>\r\n\r\n<script>\r\n\tvar url;\r\n\tif 
(document.domain.toString().indexOf(\"train\") >= 0){\r\n\t\turl = 
\"https://sample.gsipartners.com\";\r\n\t}else\r\n\t\turl = 
\"https://sample.gsipartners.com\";\t\r\n\t\r\n\tdocument.write(\"<script 
src='\"+url+\"/printing/packing/remoteScriptX.js'> \\u003c/script>\");\r\n\t//document.write(\"loaded 
\" + url+\"/printing/packing/remoteScriptX.js\");\r\n</script>\r\n\r\n</head>\r\n\r\n<object 
viewastext id=\"factory\" style=\"display:none\"\r\n  
classid=\"CLSID:1663ed61-23eb-11d2-b92f-008048fdd814\">\r\n</object>\r\n\r\n<SPAN 
id=\"scriptXSecurityManager\"></SPAN>\r\n\r\n<script>\r\n\r\nfunction printPage(headerText){\r\n
    var factory = document.getElementById(\"factory\");\r\n
    var header = \" &b\" + headerText + \" Page &p of &P pages\";\r\n
    factory.printing.header = \"\";\r\n\tfactory.printing.leftMargin = 
.25;\r\n\tfactory.printing.rightMargin = .25;\r\n\tfactory.printing.topMargin = 
.25;\r\n\tfactory.printing.bottomMargin = .25;\r\n\tfactory.printing.paperSize = 
\"Legal\";\r\n    factory.printing.portrait = true;\r\n
    factory.printing.footer = \"\";\r\n 
   factory.printing.Print(true); // print without prompt\r\n
    //factory.printing.WaitForSpoolingComplete();\r\n}
 //printPage('');\r\n</script>\r\n\r\n\r\n\r\n<body 
onload=\"printPage('');\"></body>\r\n\r\n<script>\r\nGetXmlHttpObject(\"scriptXSecurityManager\");
\r\n</script>\r\n\r\n</html>\r\n",
      "packageShipMethod": "UPSN"
   }],
   "pickTicketPrintErrors": [],
   "sessionToken": "ITW21PA8Y08XJD2X",
   "baseSystemVersion": "45"
}

 

 

Copyright © 2017 Radial. All rights reserved.