GetPrinters - UPDATED

  • Web Service URL: https://[SERVER_ADDRESS]/GeneralWS/GeneralData2.asmx

  • MPS Version: From 5.5.0

Description

This method returns a list of all printers in the company specified in the call.

Syntax

public string GetPrinters(string properties)

Setting Properties

The content of string properties must be text in JSON format containing the properties listed below. For example:

{"DealerName":"dealer","DealerUserEmail":"user@example.com","DealerUserPassword":"k1BAv1w=="}

You don't need to worry about whether property names are uppercase or lowercase; the Web Service is Case-Insensitive.

Properties accepted by the method

Property

Type

Required

Allows null

Allows empty

Maximum size

Description

DealerName

Text

Yes

-

-

-

Provider name

DealerUserEmail

Text

Yes

-

-

-

Provider user email

DealerUserPassword

Text

Yes

-

-

-

Encrypted user password

EnterpriseID

Number

Yes

-

-

-

Company ID number. Obtained via the GetEnterprises method

SerialNumber

Text

No

-

-

-

Printer serial number. This only needs to be entered if you want to filter by serial number. Obtained using the GetPrinters method

FilterField (novo)

Text

No

No

No

-

Allows you to specify a specific field to apply a data filter, returning only results that match the filter. You must specify the field followed by the equal sign “=” and the value to search for, e.g., “FilterField”:“field=desiredSearchValue”. See the return table below for the allowed fields and values

FieldsList

Text

No

Yes

Yes

-

List of fields that will be returned by the method. They must be specified separated by a semicolon (;). Example: PrinterDeviceID;SiteID;SiteName. If no fields are specified, the response will contain the fields shown in bold in the table below

Return fields recognized in FieldsList

Field Name

Allows Filtering²

Description

EnterpriseID¹

-

Company ID in the system

EnterpriseName¹

-

Company name in the system

PrinterDeviceID

Yes

Printer ID in the system. This ID is valid only for the company specified in the request, as the same ID may be used by another company

SiteID

Yes

Site ID where the printer is located

SiteName

-

Name of the site where the printer is located

SiteDivisionID

Yes

Department ID of the department to which the printer belongs (-1 for printers without a defined department)

SiteDivisionName

-

Name of the department to which the printer belongs (empty for printers without a department)

PrinterName

-

Printer name

BrandName

-

Printer manufacturer name

ModelName

-

Printer model name

SerialNumber

-

Printer serial number

AddressName

-

Printer IP address

AddressMac

-

Printer MAC address

Location

-

Printer location

Engaged

Yes

Indicates whether the printer is under contract; True for printers under contract and False for printers not under contract

EnabledBilling

Yes

Indicates whether accounting for pages is enabled on the printer; True when enabled and False when disabled

EnabledCounters

Yes

Indicates whether counter monitoring is enabled on this printer; True when enabled and False when disabled

IsSuspended

Yes

Indicates whether the printer is suspended; True when suspended and False when not suspended

ReceivedDataWhenSuspended

-

Indicates whether the printer received data via NSL files after being suspended; True if it did and False if it did not

ReplacementFlowDisabled

-

Indicates whether the printer is forced to be removed from the replenishment flow; True if it is forced and False if it is not

Disconnected

-

Indicates the printer's operating mode; True if it is in manual mode and False if it is in automatic mode

ContractNumber

Yes

Contract number assigned to the printer

AssetNumber

Yes

Asset number assigned to the printer

ContactData

-

Printer contact information

FirmwareVersion

-

Printer firmware version (if the printer has more than one firmware version, the default separator is the character ‘¬’. Example: “A3PE0Y0-000¬A3PE0Y0-111”)

LastNSLDate

-

Date of the last printer meter reading

CustomFields¹

-

When requested, all active configurable fields for the provider are returned

¹ Available only starting with version 5.10.0.

² Fields allowed for use in the FilterField property, available starting with version 5.71.0.

Response

Click here to learn more about the response format.

Possible error codes

Click here to view the possible error codes that may be returned and learn the reasons behind them.

Restrictions

  • To execute this method, the specified user must be a Company Administrator or Company Website Administrator for the company to which the printers belong.