Skip to main content

sgrRetornaAECompartilhada

Returns the data of a specific Shipment Authorization, where this SA can belong to the informed customer or to the shippers who are registered for this customer.

SoapAction

PARAMETERS

FieldTypeRequired?Description
keyaccessstringYesKey returned by the sgrLogin method.
cdpasintegerYesPAS code, returned by the sgrListPASUser method
cdclienteintegerYesCustomer code, returned by the sgrListaEmpresasPASUsuario method.
cdviagintegerYesShipment authorization number.

METHOD RETURN:

ReturnDataset: If the parameters are correctly filled in, the sgrData object property will be composed of the following tables: sgrTrip, sgrProducts and sgrDocuments.

sgrTrip:

FieldTypeDescription
CDVIAGintegerShipment Authorization Number
CDCLIintegerCustomer code
DSNOMEstringCustomer name
CDOPINICIOintegerCode of the user who initiated the trip
DSOPINICIOstringName of user who started the trip
CDOPENCERROUintegerCode of the user who ended the trip
DSOPENCERROUstringName of the user who ended the trip
NRPLACACARRETAstringLicense plate number 1
NRPLACACARRETA2stringLicense plate number of trailer 2
CHASSICARRETA2stringchassis number of trailer 2
CHASSICARRETAstringchassis number of trailer 1
FLSITUATIONintegerShipment authorization status code
DSFLSITUATIONstringSA status (New, In progress, Completed, Canceled)
DTPREVINIdatetimeExpected date/time to start the trip
DTPREVFIMdatetimeEstimated date/time for end of trip
DTINIdatetimeTrip start date/time
DTFIMdatetimeTrip end date/time
VLCARGEfloatCargo value
CDCIDORIGintegerCity of origin code
DSCIDORIGEMstringName of city of origin
ESTADOORIstringState of origin
CDCIDDESTstringDestination city code
DSCIDDESTINATIONstringDestination city name
ESTADODESstringDestination state
CDOPINCLintegerCode of the user who included the AE
DSOPINCLstringName of the user who included the AE
CDOPintegerCode of the last user who changed the AE
DSOPALTEROUstringName of the last user who changed the AE
NRPLACACAVALOstringHorse license plate number
CHASSICAVALOstringHorse's chassis number
DTINCLdatetimeAE inclusion date-time
DTALTERdatetimeDate-Time of last SA change
HORSE MODELstringHorse model
TRAILER MODELstringTrailer model 1
MODELOCARRETA2stringModel of trailer 2
MARCACAVALOstringHorse brand
MARCACARRETAstringTrailer brand 1
MARCACARRETA2stringTrailer brand 2
HORSE YEARwholeHorse year
ANOCARRETAintegerYear of trailer 1
ANOCARRETA2wholeYear of trailer 2
HORSEstringhorse color
TRAILERstringTRAILER1 color
CORCARRETA2stringColor of trailer 2
TPCARCAVALOstringHorse body type
TPCARCARRETAstringCart body type 1
TPCARCARRETA2stringBody type of trailer 2
NRCPFMOT1stringDriver's CPF number 1
DSMOTORISTA1stringDriver's name 1
RGMOT1stringDriver's ID number 1
EMISRGMOT1stringDriver's ID issuing agency 1
NRCPFMOT2stringDriver's CPF number 2
DSMOTORISTA2stringDriver 2's name
RGMOT2stringDriver's ID number 2
EMISRGMOT2stringDriver 2's ID issuing agency
CDROTAintegerRoute code
DSROTAstringRoute name
CDTRANSPintegerCarrier code
DSNOMETRANSPstringCarrier Name
CDENDRASTRstringHorse tracker number
CDEMPRASTREAintegerTracking Company Code
DSNOMEEMPRASTREAstringTracking company name
CDGERRISCOCLIintegerManagement rule code
DSNOMEREGRAstringManagement rule description
NRFONECELstringDriver's cell phone
DSMOTIVOCANCELAstringDescription
CDEMBARCADORintegerShipper code
NOMEBARCADORstringName of the shipper
NRCONTROLECARGOstringField for free use by the customer (20 characters).
VINCMOT1stringDriver 1 link type code
DSVINCMOT1stringDescription
VINCMOT2stringDriver 2 link type code
DSVINCMOT2stringDescription
FLTPOPERintegerOperation type code
DSFLTPOPERstring Descriptiontype of operation (Transfer, Pickup, Delivery, Pickup/Delivery).
PHOTOMOTORISTbyte[]Driver photo 1
DSMSGAEstringMessage to print on AE
TIPOMSGstringMessage type
DSFONE0800string0800 number
NRFROTACAVALOstringHorse fleet number
FLNAOIMPRIMEAEintegerIndicates whether the data for this AE can be printed in the system (AE print report).
vlTotalTimeContinuousDirectionstringVehicle Moving Time
vlTotalTimeStoppedstringTime the vehicle was stopped
vlTotalTimeFeedingstringTime in Feeding
vlTotalTimeOvernightstringOvernight Time
vlTotalTimeTravelstringTimeTraveling
CurrentTripSituationstringThe current trip situation can be: In Collection/Delivery, Stopped for Food, Stopped, Moving, Trip Ended, Loading/Unloading, End of Loading/Unloading, Stopped for Overnight.
CurrentTripSituationTimeMinutesdatetimeTime the trip is in this situation (in minutes).
FLIGNITIONintegerIgnition situation
DSIGNICAOstringIgnition status (Off, On, Undefined, Trip not in progress)

sgrProducts:

FieldTypeDescription
CDPRODintegerProduct code
DSPPRODstringProduct Description
VLPRODfloatProduct value

sgrDocuments:

FieldTypeDescription
CDCLIintegerShipper code
NRDOCstringShipper document number
FLTPDOCintegerDocument type
VLVALUEfloatDocument value
FLSITUATIONintegerDocument status
NRCGCCPFstringrecipient's CNPJ/CPF
CDPAISORIGINintegerRecipient's country of origin code
DSSITUATIONstringDocument status description
FLTPOPERintegerTransaction type code
DSTPOPERstringType of operation (Transfer, Collection, Delivery, Collection/Delivery).
CDDOCIntegerDocument code
DTPREVISTAdatetimeEstimated date/time for collection/delivery
DTREALIZEDdatetimeDate/Time of collection/delivery
DTPREVISTASAIDAdatetimeExpected date/time to leave pickup/delivery location
DSRUAstringCollection/delivery address
NRRUAstringPickup/delivery address number
DSBAIRROstringPickup/delivery neighborhood
NRCEPstringZIP code of collection/delivery address
DSNAMEstringName of collection/delivery location
CDCIDintegerRecipient/delivery/collection city code
DSNOMECIDstringRecipient/delivery/pickup city name
DSCOMPLRUAstringRecipient/delivery/collection address complement
NRFONE1stringRecipient/delivery/collection phone number
NRFONE2stringRecipient/delivery/pickup phone number
VLLATfloatLatitude
VLLONGfloatLongitude
VLSEQDESTstringSecondary address string of recipient/pickup/delivery
VLQTDEPECASintegerNumber of pieces transported
VLQTDEVOLintegerNumber of volumes transported
NRCONTROLLER1stringCustomer control 1
NRCONTROLECLIENT2stringClient control 2
NRCONTROLECLIENTE3stringClient control 3
NRLACRESIFstringClient control 4
NRLACREARMADORstringClient control 5
DSNAVIOstringClient control 6
NRCGCCPFEMITENTEstringCNPJ of issuer
CDPAISORIGINEMITENTstringIssuer's country of origin code
FLTROCANOTABooleanIndicates whether this document can be replaced.
NRDOCTROCAstringNumber of the document chosen for replacement.

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

ErrorDescription
Trip risk management rule does not allow printing/return of boarding authorization data.This trip is linked to a GR rule that does not allow printing. If you need to do this, ask your account manager for assistance.
The requested trip was not found!