Fetching printer information via integration

Parameters

  • api_token - mandatory parameter. Integration token of the outsourcing provider for which you want to fetch data. This token can be obtained from the menu Settings > Integration, on the PrintWayy website;
  • company_token - optional parameter. Token to identify from which client the data should be fetched. Each client registered in PrintWayy has its own token. The token of each customer can be queried through the customer information search method, detailed earlier. If this parameter is not entered, the parameter serialNumbers becomes mandatory;
  • serialNumbers - optional parameter. It should be used to enter the serial number of the printer you want to fetch data from. You can enter more than one serial number per request, separating them with commas. If you do not enter this parameter, all the client's printers will be searched;
  • initialDate - optional parameter. It corresponds to the initial date that you want to search the counters. It must be informed in the DD-MM-YYYY format. If this parameter is not entered, the current date of PrintWayy's server will be used as initial date;
  • endDate - optional parameter. If a search start date is informed, the end date must be informed. It must be entered in the format DD-MM-YYYY. If this parameter is not entered, the current date of PrintWayy's server will be used as end date.

Format of responses

All responses to requests will have the following fields, which indicate whether the request has been fulfilled or not:

  • Success - Boolean value indicating whether the request was successful or not;
  • Code - code that indicates the result of the request. The possible return codes are:
    • 0 - Successful request;
    • 1 - The API token has not been entered or is incorrect;
    • 2 - The client company token was not entered or is incorrect;
    • 3 - The date period you entered is invalid;
    • 999 - Error when requesting information. Please try again.

When the request processing finds one or more devices according to the parameters passed, in addition to the above fields, the following information will be returned for each printer:

  • SerialNumber - serial number of the equipment;
  • Department - name of the department where the machine is located, if it is configured in PrintWayy;
  • Location - Current location of the printer;
  • AssetNumber - Asset number of the equipment;
  • Contract - Name of the contract associated with the printer.
  • IPAddress - IP address of the equipment, if it is monitored over the network;
  • GeneralCountStartDateOfCapture - date and time of the first capture of the general counter, considering the initial date of the informed period;
  • GeneralCountEndDateOfCapture - date and time of the last capture of the general counter, considering the end date of the informed period;
  • GeneralCountStart - value of the general counter at the first capture;
  • GeneralCountEnd - value of the general counter at the last capture;
  • MonoCountStartDateOfCapture - date and time of the first capture of the B&W counter, considering the initial date of the informed period;
  • MonoCountEndDateOfCapture - date and time of the last capture of the B&W counter, considering the end date of the informed period;
  • MonoCountStart - B&W counter value at the first capture;
  • MonoCountEnd - B&W counter value at the last capture;
  • ColorCountStartDateOfCapture - date and time of the first capture of the color counter, considering the initial date of the informed period;
  • ColorCountEndDateOfCapture - date and time of the last capture of the color counter, considering the end date of the informed period;
  • ColorCountStart - color counter value at the first capture;
  • ColorCountEnd - value of the color counter at the last capture;
  • ScanCountStartDateOfCapture - date and time of the first capture of the scan counter, considering the initial date of the informed period;
  • ScanCountEndDateOfCapture - date and time of the last capture of the scan counter, considering the end date of the informed period;
  • ScanCountStart - value of the scan counter at the first capture;
  • ScanCountEnd - value of the scan counter at the last capture;
  • A3MonoCountStartDateOfCapture - date and time of the first capture of the A3 B&W counter, considering the initial date of the informed period;
  • A3MonoCountEndDateOfCapture - date and time of the last capture of the A3 B&W counter, considering the end date of the informed period;
  • A3MonoCountStart - A3 B&W counter value at the first capture;
  • A3MonoCountEnd - A3 B&W counter value at the last capture;
  • A3ColorCountStartDateOfCapture - date and time of the first capture of the A3 color counter, considering the initial date of the informed period;
  • A3ColorCountEndDateOfCapture - date and time of the last capture of the A3 color counter, considering the end date of the informed period;
  • A3ColorCountStart - value of the A3 color counter at the first capture;
  • A3ColorCountEnd - value of the A3 color counter at the last capture;
  • A3CountStartDateOfCapture - date and time of the first capture of the A3 counter, considering the initial date of the informed period;
  • A3CountEndDateOfCapture - date and time of the last capture of the A3 counter, considering the end date of the informed period;
  • A3CountStart - value of the A3 counter at the first capture;
  • A3CountEnd - value of the A3 counter at the last capture;

Remarks

  • Depending on the date range entered in the request, it is possible that in the response there is more than one occurrence of the same printer. This occurs in cases where a printer is removed from the client and is later monitored again, on the same client. PrintWayy handles this situation separately, creating two separate records for each monitoring. This way, when searching, the same printer will appear more than once in the same response;
  • You should pay attention to the dates that are returned in the responses to the requests. The dates always correspond to the last information of counters received for the printer searched and, for this reason, will not always match the date range informed in the request. For example, when making a request with a date range between 10/01/2015 and 10/15/2015 for a particular printer, and this printer last received counters on 09/25/2015, the counters from 09/25/2015 will be returned in the response, and this is the start and end date that will be in the response. This situation can even indicate that there is a problem in monitoring the equipment, given that the last data received were only on 09/25/2015.

Requesting information from a single printer, without informing a date period

(In this case, the last counters the printer received are returned)

Requisition:

Response:

Requesting information from a printer that has more than one pass at the same client in the searched range

(In this case, two occurrences are returned for the same equipment)

Requisition:

Response:

Search where the date range is wrong and the code in the response tells you that there is a date error

Requisition:

Response:

 

To return to the Integration menu menu, click here.

Was this article helpful?

Related Articles