Skip to main content

sgrRetornaDocumentos

Returns documents that can be linked to new trips.

SoapAction

PARAMETERS

FieldTypeReq.Description
keyaccessstringYesKey returned by the sgrLogin method.
cdpasintegerYesPAS code, returned by the sgrListaPASUsuario method
cdclienteintegerYesCustomer code, returned by the sgrListaEmpresasPASUsuario method.
cdtranspintegerNoTransport company code. This code is returned by the sgrListaTransportadoras method.
cdsituacaodocintegerNoDocument status code. Enter 0 to search for new documents, 7 to search for pending documents. If you fill in the field with another value, the search will return both new and pending documents.
nrdocstringNoDocument number.
nrcnpjcpfstringNoRecipient's CPF/CNPJ.
nrcontrolecliente1stringNoCustomer control.
nrcontrolecliente2stringNoCustomer control.
nrcontrolclient3stringNoCustomer control.
nrcontrolclient4stringNoClient control.
nrcontrolclient5stringNoClient control.
nrcontrolclient6stringNoCustomer control.

METHOD RETURN:

ReturnDataset: If the parameters are filled in correctly, the property will return two tables:

FieldTypeDescription
CDDOCintegerDocument code
NRDOCstringDocument number
CDTRANSPintegerTransport company code
DSNOMETRANSPstringTransport company name
NRCGCCPFstringRecipient's CPF/CNPJ
DSNOMEDESTINATIOstringRecipient's name
DSRUAstringRecipient's address
NRRUAchar(6)Recipient's address number
DSBAIRROstringRecipient's address neighborhood
CDCIDintegerRecipient's city code
DSNOMECIDstringRecipient's city name
DSSIGLAUFchar(2)Recipient's state (abbreviation)
NRCONTROLLER1stringCustomer control 1
NRCONTROLLER2stringCustomer control 2
NRCONTROLECLIENTE3stringClient control 3
NRLACRESIFstringClient control 4
NRLACREARMADORstringClient control 5
DSNAVIOstringClient control 6
FLSITUATIONsmallintDocument status
DSSITUACAODOCstringDescription
VLVALUEmoneyDocument value
CDPAISORIGINintegerCountry of origin code
DTPREVISTAdatetimeExpected document date
DSCOMPLRUAstringAddress complement
NRFONE1char(12)Recipient's phone number 1
NRFONE2char(12)Recipient's phone number 2
VLLATrealLatitude of address
VLLONGrealLongitude of address
VLQTDEPECASintegerNumber of pieces in document
VLQTDEVOLintegerDocument volume quantity
DTPREVISTASAIDAdatetimeExpected departure date
FLTPOPERsmallintType of operation
VLSEQDESTstringDestination sequence
CDPAISORIGINEMITTERintegerIssuer's country of origin code
NRCGCCPFEMITENTEstringCPF/CNPJ of the issuer
FLTPDOCsmallintDocument type
CDPFJintegerRecipient code
CDEMITENTintegerIssuer code
CDEMBARCADORintegerShipper code
FieldTypeDescription
CDDOCintegerDocument code
CDPRODintegerProduct code
VLPRODCARGArealProduct value

ReturnDescription: If there is an error when executing the method, the property will display:

ErrorDescription
There was an error performing the search.This error may be caused by an incorrect parameter, the field to be corrected will be indicated in the returnDataset property. This means you need to check the parameters and run the method again. It may also indicate a timeout or a dropped connection to the database. It is necessary to pass on the data entered, as well as the name of the method, the issue time and the customer code to the following e-mail address: [email protected] so that the error can be validated.