Skip to main content

sgrCriarAEv4

Generates the Shipment Authorization (national).

SoapAction

PARAMETERS:

FieldTypeReq.Description
keyaccessstringYesKey returned by the sgrLogin method.
cdpasintegerYesPAS code, returned by the sgrListPASUser method
cdclienteopentechintegerYesCustomer code, returned by the sgrListaEmpresasUsuario method.
nrplacacavalostringYesHorse license plate.
nrplacacarreta1stringNoLicense plate of the first trailer. Send '' (blank) when there is none.
nrplacacarreta2stringNoLicense plate of the second trailer. Send '' (blank) when there isn't one.
nrdocmotorista1stringYesDocument number of the first driver.
nrdocmotorist2stringNoDocument number of the second driver. Send '' (blank) when the information does not exist.
dtprevinistringYesEstimated date and time for the start of the trip. Send the date in “YYYY-MM-DD HH:MM” format.
dtprevfimstringYesEstimated date and time of end of trip. Send the date in the format “YYYY-MM-DD HH:MM”.
cdcidibgeorigemintegerYesIBGE code of the city of origin. This code is returned by the sgrListaCidades method.
cdcidibgedestinointegerYesIBGE code of the destination city. This code is returned by the sgrListCities method.
cdrotaopentechintegerYesRoute code in Opentech, returned by the sgrListRoutes method.
cdrouteclientstringNoRoute code in the client. This code must be filled in when the cdrotaopentech field is not entered. Send '' (blank) when there is no information. The use of this field implies the registration of the customer's route codes in Opentech (The ratio must be 1 customer route code to 1 Opentech route code).
nrcnpjcpftransporterstringNoCNPJ/CPF of the transporter. This field must be filled in if the cdtransporterclient field is not used. Send '' (blank) when not used.
cdtransporterclientstringNoTransporter code on the client. This field must be filled in if the nrcnpjcpftransporter field is not used.
nrfonecelularstringYesCell phone number of the driver of the trip.
cdtipooperacaointegerYesOperation type code, returned by the sgrListaTiposOperacao method.
nrcnpjcpfembarcadorstringNoCNPJ/CPF of the shipper. This field must be filled in if the cdembarcadorcliente field is not used. Send '' (blank) when not used.
cdembarcadorclientestringNoCode of the shipper in the client. This field must be filled in if the nrcnpjcpfembarcador field is not used.
nrcontrolecargostringNoField for free use by the customer. Send '' (blank) when it doesn't exist.
nrfrotastringNoVehicle fleet number. Send '' (blank) when it doesn't exist.
distanciatotaldecimalNoTotal distance of the trip. Send 0 (zero) when it doesn't exist.
loadweightdecimalNoLoad weight. Send 0 (zero) when the information does not exist.
dscontroleviag(1 to 10)stringNoTrip controls. Send “” (blank) when it doesn't exist.
productsarrayYesList of products in the Shipment Authorization. To use this parameter, you must create an array of type sgrProduct. This array will be the summary of the transported cargo. It is not allowed to repeat a product code in this list.
documentsarrayYesList of Shipment Authorization documents. To use this parameter, you must create an array of type sgrDocumentAE.
stopsarrayNoList of Support Points, returned by the sgrListRoutePoints method. To use this parameter, you must create an array of type sgrTravelSupportPoint. For certain clients, this field may be required to be filled in. When no stops are entered, send an empty array.
sensortemperaturearrayNoList of Temperature Sensors. To use this parameter, an array of type sgrSensorTemperature must be created. When no temperature parameters are entered, send an empty array.
nrdddfonecellularstringYesDDD of driver's phone
dsnomerespviagstringNoName of the person responsible for the trip. Send '' (blank) when it doesn't exist.
dsfone1respviagstringNo*Phone number of the person responsible for the trip. * Only required if there are no phone numbers registered on the [Customer Contact] screen for the Operational contact type.
dsfone2respviagstringNoAdditional phone number of the person responsible for the trip.
baitslistNo*List of baits. To use this parameter, an array of type sgrIsca must be created. When no bait parameters are entered, an empty array must be sent. * Only required if the bait requirement is checked in the customer's GR rule configuration.

Observation: To make it easier to understand the secondary methods, which must be called to return the codes required in the parameters listed above, an analogy between the secondary methods and the registration screen in Clipas NET will be presented below. It should be noted that, as they are different systems, the Web Service and Clipas NET do not necessarily have to contain the same fields.

Figure 1: AE registration screen in Clipas NET, Shipping authorization tab. In blue, the names of the parameters have been written. In red are the secondary methods.

Figure 2: AE registration screen in Clipas NET, Documents tab.

Figure 1: AE cadastre fabric not Clipas NET, aba Temperature Sensors.

METHOD RETURN:

ReturnDataset: If the parameters are valid, the Shipment Authorization is created and the dataset is displayed:

FieldTypeDescription
CDVIAGintegerNumber of the AE created in the execution of the method

ReturnDescription: If there is an error in the execution of the method, the property will be displayed:

ErrorDescription
Invalid Start/End Forecast DateThe format of the date entered for the start and/or end forecast is invalid. It is necessary to fill in the format “YYYY-MM-DDhh:mm”.
It was not possible to generate the Shipment Authorization.The errors that made it impossible to register are listed in the dataset, and can be seen in Table 1.

| Boarding Authorization already created! There is already a boarding authorization with the data entered.

The following method is more complete and can be used when traveling through MERCOSUL. (sgrGerarAEv9)