Enterprise Printing Platform Web Service API Guide
About EPP's web service API
Enterprise Printing Platform (EPP) offers a web service API to enable communication between EPP and outside applications, particularly apps developed with the DSI Platform.
This web service exposes EPP functionality with HTTP request methods based on REST principles.
The web service supports logging on to EPP, making inquiries about how printers and media are set up, and updating printer media information.
While most of the calls in this guide are designed to expose EPP functionality to apps developed with DSI Platform in particular (by creating service definitions in DSI Platform) an additional call, printservice/job, can be called directly from an ERP system.
EPP web service calls
Print jobs
While the other calls in this guide are designed to expose EPP functionality to apps developed with DSI Platform in particular, printservice/job can be called directly from an ERP system.
Call | Description |
---|---|
printservice/job | Submits print requests to EPP. EPP then submits the requests to a label printer. |
User logon
This call supports logging on to EPP.
Call | Description |
---|---|
_EPPLogin | Authenticates a user ID and password and returns a 24 hour token needed for subsequent calls, except for printservice/job. |
Printer setup and label inquiries
These calls return information about how EPP is set up.
Call | Description |
---|---|
_EPPReturnAllPrinters | Returns all printers set up in EPP. |
_EPPReturnCompatiblePrinters | Returns a list of all printers set up that are compatible with your specific printing requirements. |
_EPPReturnLabelInfo | Returns information about a requested label. |
_EPPReturnPrintersAtLocation | Returns a list of all printers at a location. |
_EPPReturnsLblLoaded | Returns a list of all printers that have the label you specify. |
Media inquiries and usage
These calls support reporting media and ribbon usage to Cloud Inventory.
Call | Description |
---|---|
_EPPLabelList | Returns a list of all defined label media. |
_EPPRibbonList | Returns a list of all defined ribbon media. |
_EPPUpdateMedia | Updates a printer with label and ribbon information so that media usage can be tracked and reported to Cloud Inventory. |
printservice/job
Submits print requests to EPP in either an .xml or .uld format. EPP then submits the requests to a label printer.
While the other calls in this guide are designed to expose EPP functionality to apps developed with DSI Platform in particular, printservice/job can be called directly from an ERP system. printservice/job is also a call used in DSI Platform.
This is the only call in this guide that does not require the token returned in _EPPLogin.
If an error occurs (other than a 401 or 404 error), the call still completes successfully to EPP, but the request does not print. You can refer to error logs for more details.
Property | Value |
---|---|
Name | printservice/job |
URL | https://FullyQualifiedMachineName:9443/ DSIPrint/printservice/job |
Method | POST |
Authentication | HTTP Basic Authentication |
Header | Content-Type application/json |
Body | Label data xml or .uld file |
Returns | Status 200. Message returned: OK Status 401. Message returned: Authentication failed Status 404. Message returned: Not found |
XML file example
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE labels SYSTEM "dsi-label.dtd"> <labels _FORMAT="Gloves" _PRINTERNAME="defaultSite#R110xi" _QUANTITY="1"> <label _FORMAT="Gloves" _PRINTERNAME="defaultSite#R110xi" _QUANTITY="1"> <variable name="inputAgent">Postman</variable> <variable name="ITEM">Gloves</variable> <variable name="firstName">Bill</variable> <variable name="phone">913-867-5309</variable> <variable name="printer">EPP</variable> <variable name="ordernumber">333333333</variable> <variable name="lastname">Hill</variable> </label> </labels>
About the .uld file
The label data .uld file contains the following:
-
L: label switch, which contains the label format.
-
P: printer switch, which contains the assigned printer destination.
-
DR: data record switch, which contains information about the data record.
.uld file example
/L=NetSuiteBOL /P=R110xi /C=1 /DR=SealNo+PRONo+PalletSlip+AddShipInfo+Weight +ShippingCarrier+NoPkgs+BOLShipFrom +BillofLading+SpecialInst+TrailNo+BOLShipToAddress+BOLOrderNo 666~96427~No~Fragile~50~Yellow Freight~1~Data Systems International, Inc.~123456789~Signature Required~YF-5364~1313 Mockingbird Lane~10236
_EPPLogin
Authenticates a user ID and password and returns a 24 hour token needed for subsequent calls.
You must use _EPPLogin prior to any other calls except for printservice/job, which does not require a token. After 24 hours, you must use _EPPLogin again to receive a new valid token.
Property | Value |
---|---|
Name | _EPPLogin |
Base URL | https://FullyQualifiedMachineName:Port/DSIPrint/printservice/restLogin |
Method | GET |
Authentication | HTTP Basic Authentication |
Input parameters |
String
Username: A valid value defined in EPP
Password: A valid value that matches the Username
|
Returns |
String, JSON format
TOKEN: Returned if Username and Password are authenticated by EPP. Because this token must be renewed every 24 hours, it is best practice to call _EPPLogin in a startup app, or to save this token within an app and pass it to subsequent calls.
Error: Returned if Username and Password are not authenticated by EPP.
|
_EPPReturnAllPrinters
Returns all printers set up in EPP.
Also returns for each printer the name and description of its currently loaded label.
Property | Value |
---|---|
Name | _EPPReturnAllPrinters |
URL | https://FullyQualifiedMachineName:Port/DSIPrint/printservice/printers/all |
Method | GET |
Authentication | None |
Input parameters | String
Site: The site at which the printer is located |
Header | Token: The token received from _EPPLogin |
Returns | String, JSON format ReturnInfo: A table of multiple lines containing the following returns.
|
_EPPReturnCompatiblePrinters
Returns a list of all printers set up in EPP that are compatible with your specific printing requirements.
When you pass in the name of a specific printer, this call returns all printers that are compatible with that printer's manufacturer and printer language. This call also returns the name and description of the label loaded on each of the compatible printers.
Property | Value |
---|---|
Name | _EPPReturnCompatiblePrinters |
URL | https://FullyQualifiedMachineName:Port/DSIPrint/printservice/printers/printer |
Method | GET |
Authentication | None |
Input parameters | String PrinterName: The printer for which you want to find compatible printers
Site: The site at which the printer is located |
Header | Token: The token received from _EPPLogin |
Returns | String, JSON ReturnInfo: A table of multiple lines containing the following returns.
|
_EPPReturnLabelInfo
Returns information about a requested label.
Property | Value |
---|---|
Name | _EPPReturnLabelInfo |
URL | https://FullyQualifiedMachineName:Port/DSIPrint/printservice/printers/label |
Method | GET |
Authentication | None |
Input parameters | String Label: The label for which you want information returned |
Header | Token: The token received from _EPPLogin |
Returns | String, JSON ReturnInfo: A table of multiple lines containing the following returns.
|
_EPPReturnPrintersAtLocation
Returns a list of all EPP printers at a location.
Also returns the name and description of the label loaded on each printer.
Property | Value |
---|---|
Name | _EPPReturnPrintersAtLocation |
URL | https://FullyQualifiedMachineName:Port/DSIPrint/printservice/printers/location |
Method | GET |
Authentication | None |
Input parameters | String Location: The location for which you want a list of printers returned
Site: The site at which the printer is located |
Header | Token: The token received from _EPPLogin |
Returns | String, JSON ReturnInfo: A table of multiple lines containing the following returns.
|
_EPPReturnsLblLoaded
Returns a list of all EPP printers that have the label you specify.
Also returns for each printer the name and description of its currently loaded label.
Property | Value |
---|---|
Name | _EPPReturnsLblLoaded |
URL | https://FullyQualifiedMachineName:Port/DSIPrint/printservice/printers/labelLoaded |
Method | GET |
Authentication | None |
Input parameters | String labelLoaded: The name of the label for which you want a list of printers with the same label loaded
Site: The site at which the printer is located |
Header | Token: The token received from _EPPLogin |
Returns | String, JSON ReturnInfo: A table of multiple lines containing the following returns.
|
_EPPLabelList
Returns a list of all label media defined in EPP.
Pass in to _EPPUpdateMedia the returned label name and label description from _EPPLabelList in order to update the label media information for a specified printer.
Property | Value |
---|---|
Name | _EPPLabelList |
URL | https://FullyQualifiedMachineName:Port/DSIPrint/printservice/printers/getAllLabelMedia |
Method | GET |
Authentication | None |
Input parameters | String |
Header | Token: The token received from _EPPLogin |
Returns | String, JSON ReturnInfo: A table of multiple lines containing the following returns.
|
_EPPRibbonList
Returns a list of all ribbon media defined in EPP.
Pass in to _EPPUpdateMedia the returned ribbon name and ribbon description from _EPPRibbonList in order to update the ribbon media information for a specified printer.
Property | Value |
---|---|
Name | _EPPRibbonList |
URL | https://FullyQualifiedMachineName:Port/DSIPrint/printservice/printers/getAllRibbonMedia |
Method | GET |
Authentication | None |
Input parameters | String |
Header | Token: The token received from _EPPLogin |
Returns | String, JSON ReturnInfo: A table of multiple lines containing the following returns.
|
_EPPUpdateMedia
Updates a printer with label and ribbon information so that media usage can be tracked and reported to Cloud Inventory.
Pass in to _EPPUpdateMedia the returned label information from _EPPLabelList and the ribbon information from _EPPRibbonList in order to update the label and ribbon media information for a specified printer so that media usage can be reported from EPP to Cloud Inventory.
Property | Value |
---|---|
Name | _EPPUpdateMedia |
URL | https://FullyQualifiedMachineName:Port/DSIPrint/printservice/printers/updateMedia |
Method | POST |
Authentication | None |
Input parameters | String printerName: The name of the printer to be updated with label and ribbon media information labelMedia: The label item number of the label loaded onto the updated printer labelAmountUsed: The amount of label media that has already been used. For example, if a new roll of labels contains 200 labels and half has been used, enter 100. ribbonMedia: The ribbon item number of the ribbon loaded onto the updated printer ribbonAmountUsed: The amount of the ribbon media that has already been used. For example, if a new roll of ribbon contains 1200 feet and half has been used, enter 600.
Site: The site at which the printer is located |
Header | Token: The token received from _EPPLogin |
Returns | String, JSON ReturnInfo: If the call is successful, the following message is returned: "Function call result: Good" Error: Returned if the call cannot be made |
Loading...
There was a problem loading this topic