Searching for customer data

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;
  • documentType - optional parameter. It should be used to inform the type of document to be used in the customer search, when you want to search for a specific customer. It can receive the values "CPF" or "CNPJ". If this parameter is not informed, all clients of the provider will be returned;
  • documentNumber - optional parameter. It must be used to inform the CPF or CNPJ number of the client you want to search. Only numbers should be entered. If the parameter documentType is entered, this parameter must also be entered.

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;
    • 4 - The document type you entered is invalid;
    • 5 - The CPF or CNPJ number was not informed or is invalid;
    • 999 - Error when requesting information. Please try again.

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

  • Token - client's identification token. It can be used to query the counters of the client's printers;
  • Name - name of the customer registered with PrintWayy;
  • DocumentType - type of document registered for the customer in PrintWayy. It can be "CPF" or "CNPJ";
  • DocumentNumber - the client's CPF or CNPJ number.

Requesting data from all the provider's clients:

Requisition:

Response:

Requesting data from a specific customer:

Requisition:

Response:

 

To return to the Integration menu menu, click here.

Was this article helpful?

Related Articles