sgrGerarAEv13
Creates the Boarding Authorization together with the Destination Location and escort
PARAMETERS:
Field | Type | Required? | Description |
---|---|---|---|
keyaccess | string | Yes | Key returned by the sgrLogin method. |
cdpas | integer | Yes | PAS code, returned by the sgrListPASUser method |
cdclient | integer | Yes | Client code, returned by the sgrListCompaniesPASUser method. |
cdpaisorigemcavalo | integer | Yes | Code of the horse's country of origin. This code is returned by the sgrListaPais method. |
nrplacacavalo | string | Yes | Horse's license plate. |
cdpaisorigemcarreta1 | Integer | Yes | Code of the country of origin of cart 1. This code is returned by the sgrListaPais method. |
nrplacacarreta1 | string | Yes | License plate of the first trailer. Send '' (blank) when there isn't one. |
cdpaisorigemcarreta2 | Integer | No | Code of the country of origin of trailer 2. This code is returned by the sgrListaPais method. Send -1 when there is none. |
nrplacacarreta2 | string | No | License plate of the second trailer. Send '' (blank) when there is none. |
cdpaisorigemmot1 | integer | Yes | Code of the country of origin of the first Driver. This code is returned by the sgrListaPais method. |
nrdocmotorist1 | string | Yes | Document number of the first driver. |
cdpaisorigemmot2 | Integer | No | Second driver's country of origin code. This code is returned by the sgrListaPais method. Send -1 when there is none. |
nrdocmotorist2 | string | No | Document number of the second driver. Send '' (blank) when there is no information. |
nomemot1 | string | Yes | First driver's name. (50 characters) |
nomemot2 | string | No* | Name of second Driver. *Must be filled in if nrdocmotorist2 is entered. Send “” (blank) when it doesn't exist. |
cdvincmot1 | string | Yes | First driver's link code. This code is returned by the sgrListaTiposVinculoPF method. Send “” (blank) when not informing. |
cdvincmot2 | string | No* | Second driver's link code, returned by the sgrListaTiposVinculoPF method *Filling in is mandatory if nrdocmotorista2 is entered. Send “” (blank) when not informed. |
dtprevini | string | Yes | Estimated date and time of start of trip. Send the date in “YYYY-MM-DD HH:MM” format. |
dtprevfim | string | Yes | Estimated date and time of end of trip. Send the date in the format “YYYY-MM-DD HH:MM”. |
horse tracker | string | No | Horse tracker number (50 characters). Send “” (blank) when it doesn't exist. |
cdemprastrcavalo | Integer | No | Code of the horse's Tracking Technology company, returned by the sgrListaEmpresasRastreamento method. Send -1 when not entered. |
trailer tracker1 | string | No | Trailer tracker number (50 characters). Send “” (blank) when it doesn't exist. |
cdemprastrcarreta1 | Integer | No | Code of the trailer's Tracking Technology company, returned by the sgrListaEmpresasRastreamento method. Send -1 when not informed. |
cdcidorigem | integer | Yes | Origin city code, returned by the sgrListaCidades method. |
cdciddestination | integer | Yes | Destination city code, returned by the sgrListCities method. |
cdroute | integer | Yes | Code of the route to be used on the trip. This code is returned by the sgrListRoutes method, and will be mandatory depending on the risk management rule configured. Send -1 when it doesn't exist. |
vlcargo | Decimal | Yes | Total cargo value. |
cdtransp | integer | No | Carrier company code, returned by the sgrListaTransportadoras method. If not, send the customer's own code [cdcliente]. |
nrfonecel | string | Yes | Cell phone number of the driver of the trip. |
cdtypeoperation | integer | Yes | Operation type code, returned by the sgrListTypesOperation method. |
cdshipper | integer | Yes | Shipper code, returned by the sgrListShippers method. When this information does not exist, send the customer code. |
nrcontrolcargo | string | No | Field for free use by the customer (20 characters). Send '' (blank) when it doesn't exist. |
nrfrota | string | No | Vehicle fleet number. Send '' (blank) when it doesn't exist. |
distanciatotal | decimal | No | Total distance of the trip. Send 0 (zero) when it doesn't exist. |
loadweight | decimal | No | Load weight. Send 0 (zero) when the information does not exist. |
dscontroleviag(1 to 10) | string | No | Trip controls. Send “” (blank) when it doesn't exist. |
products | list | Yes | List of AE products. 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. |
documents | list | Yes | List of AE documents. To use this parameter, you must create an array of type sgrDocumentProductsSeqV2. |
stops | list | No* | List of Support Points. To use this parameter you must create an array of type sgrTravelSupportPoint. *Filling in this field may be mandatory depending on the client's configuration. When no stops are entered, send an empty array. |
sensortemperature | list | No | List 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. |
nrDDDCelMot | string | Yes | DDD of driver's phone |
dsnomerespviag | string | No | Name of the person responsible for the trip. Send '' (blank) when it doesn't exist. |
dsfone1respviag | string | No* | 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. |
dsfone2respviag | string | No | Additional phone number of the person responsible for the trip. |
baits | list | No* | 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. * This is only mandatory if the bait requirement is checked in the customer's GR rule configuration. |
Routes | list | No* | List of routes. To use this parameter, an array of type Route must be created. When the route parameters are not entered, an empty array must be sent. * Only required if the route requirement is checked in the client configuration. |
placeoforigin | list | No* | List of the trip's place of origin. To use this parameter, you must create an array of type sgrlocaldeorigem.When you do not enter the origin parameters, you must send an empty array. * This is mandatory if you want the router to show the trip's Place of Origin |
escort | list | No* | List escort of the trip. To use this parameter, you must create an array of type sgrescolta. If you do not enter the escort parameters, you must send an empty array. * This is mandatory if you want to record the vehicle's escort. |
NrDocAgente1 | string | No | Agent's document number |
NameAgent1 | string | No | Agent's name |
NrFornecel1 | string | No | Agent's phone number |
NrDocAgent2 | string | No | Document number of the second Agent |
NameAgent2 | string | No | Name of second Agent |
NrFornecel2 | string | No | Second agent's phone number |
NrVehiclePlate1 | string | No | Agent's vehicle plate |
VehicleTracker1 | string | No | Vehicle Tracker |
CdEmprastrViatura1 | integer | No | Vehicle tracking company code |
VehiclePlate2 | string | No | Second agent's vehicle plate |
VehicleTracker2 | string | No | Second Agent's vehicle tracker |
CdEmprastrViatura2 | integer | No | Tracking company code of second Agent's vehicle |
RETURN METHOD:
ReturnDataset: If the parameters are correct, the record will be sent to search and the dataset will display it:
Field | Type | Description |
---|---|---|
CDVIAG | integer | Number of the shipment authorization generated |
ReturnDescription: If there is an error in the execution of the method, the property will be displayed:
Error | Description |
---|---|
Invalid Start/End Forecast Date | The 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. |
Mandatory to inform Responsible Contact and Phone Number(s) | Indicates that one of the following parameters has not been filled in: dsnomerespviag, dsfone1respviag or dsfone2respviag |
XML example
This is an example of XML GenerateAEv13, you can copy it to the right
<sgrGerarAEv13 xmlns="https://tempuri.org/">
<chaveacesso>SUA CHAVE DE ACESSO</chaveacesso>
<cdpas>1</cdpas>
<cdcliente>6999</cdcliente>
<cdpaisorigemcavalo>1</cdpaisorigemcavalo>
<nrplacacavalo>PLACA CAVALO</nrplacacavalo>
<cdpaisorigemcarreta1>1</cdpaisorigemcarreta1>
<nrplacacarreta1> </nrplacacarreta1>
<cdpaisorigemcarreta2>-1</cdpaisorigemcarreta2>
<nrplacacarreta2 />
<cdpaisorigemmot1>1</cdpaisorigemmot1>
<nrdocmotorista1>DOCUMENTO MOTORISTA</nrdocmotorista1>
<cdpaisorigemmot2>0</cdpaisorigemmot2>
<nrdocmotorista2 />
<nomemot1>NOME MOTORISTA</nomemot1>
<nomemot2 />
<cdvincmot1>F</cdvincmot1>
<cdvincmot2 />
<dtprevini>2023/05/06 15:00:00</dtprevini>
<dtprevfim>2023/05/06 15:00:00</dtprevfim>
<rastreadorcavalo>475432</rastreadorcavalo>
<cdemprastrcavalo>164048</cdemprastrcavalo>
<cdemprastrcarreta1>0</cdemprastrcarreta1>
<cdcidorigem>5169</cdcidorigem>
<cdciddestino>4175</cdciddestino>
<cdrota>0</cdrota>
<vlcarga>0.01</vlcarga>
<cdtransp>6999</cdtransp>
<nrfonecel>9 9717-4701 </nrfonecel>
<cdtipooperacao>0</cdtipooperacao>
<cdembarcador>6999</cdembarcador>
<nrcontrolecarga />
<nrfrota />
<distanciatotal>0</distanciatotal>
<pesocarga>0</pesocarga>
<dscontroleviag1 />
<dscontroleviag2 />
<dscontroleviag3 />
<dscontroleviag4 />
<dscontroleviag5 />
<dscontroleviag6 />
<dscontroleviag7 />
<dscontroleviag8 />
<dscontroleviag9 />
<dscontroleviag10 />
<produtos>
<sgrProduto>
<cdprod>24720</cdprod>
<valor>0.0100</valor>
</sgrProduto>
</produtos>
<documentos>
<sgrDocumentoProdutosSeqV2>
<nrDoc>4378750 - 1</nrDoc>
<tpDoc>4</tpDoc>
<valorDoc>0.0000</valorDoc>
<tpOperacao>2</tpOperacao>
<dtPrevista>2023-02-08T15:00:00</dtPrevista>
<dtPrevistaSaida>08/02/2023 19:00:00</dtPrevistaSaida>
<cdCid>5075</cdCid>
<dsRua>DECIO DA SILVA</dsRua>
<nrRua>29 </nrRua>
<complementoRua />
<dsBairro>JARDIM N. SRA APARECIDA</dsBairro>
<nrCep>07177150</nrCep>
<nrFone1>9232134613 </nrFone1>
<nrFone2></nrFone2>
<cdEmbarcador>6999</cdEmbarcador>
<cdPaisOrigemEmitente>0</cdPaisOrigemEmitente>
<nrCnpjCpfEmitente />
<cdPaisOrigemDestinatario>1</cdPaisOrigemDestinatario>
<nrCnpjCPFDestinatario>06149282000255</nrCnpjCPFDestinatario>
<nrCnpjCpfDestinatarioSequencia />
<Latitude>-23.41706</Latitude>
<Longitude>-46.3918</Longitude>
<dsNome>ADITEX INDUSTRIA E COMERCIO DE ADITIVOS QUIMICOS</dsNome>
<qtVolumes>0</qtVolumes>
<qtPecas>0</qtPecas>
<nrLacreSIF />
<nrLacreArmador />
<dsNavio />
<dsSiglaOrig />
<dsSiglaDest />
<flRegiao>0</flRegiao>
<nrControleCliente1 />
<nrControleCliente2 />
<nrControleCliente3 />
<produtos>
<sgrProduto>
<cdprod>24720</cdprod>
<valor>0.0000</valor>
</sgrProduto>
</produtos>
<vlCubagem>0</vlCubagem>
<vlPeso>0</vlPeso>
<cdTransp>0</cdTransp>
<nrDDDFone1 />
<nrControleCliente7 />
<nrControleCliente8 />
<nrControleCliente9 />
<nrControleCliente10 />
<flTrocaNota>0</flTrocaNota>
<cdTrocaNota>0</cdTrocaNota>
<cdProgramacaoDestinatario xsi:nil="true" />
<vlInicioDiariaNoPrazo xsi:nil="true" />
<vlInicioDiariaAtrasado xsi:nil="true" />
<flReentrega xsi:nil="true" />
</sgrDocumentoProdutosSeqV2>
</documentos>
<paradas />
<sensorestemperatura />
<nrDDDCelMot>47</nrDDDCelMot>
<dsnomerespviag />
<dsfone1respviag />
<dsfone2respviag />
<iscas />
<rotas> </rotas>
<dsListaProgramacao />
<dsManifestoCarga />
<segsAdiconais />
<localDeOrigem>
<cdCid>4275</cdCid>
<!--Optional:-->
<dsRua>rua dos buzios</dsRua>
<!--Optional:-->
<nrRua>30</nrRua>
<!--Optional:-->
<complementoRua>ap 302</complementoRua>
<!--Optional:-->
<dsBairro>Bom Retiro</dsBairro>
<!--Optional:-->
<nrCep></nrCep>
<!--Optional:-->
<nrFone1></nrFone1>
<!--Optional:-->
<nrFone2></nrFone2>
<!--Optional:-->
<email></email>
<!--Optional:-->
<observacao></observacao>
<cdPaisOrigemEmitente>1</cdPaisOrigemEmitente>
<!--Optional:-->
<nrCnpjCpfEmitente>59187522000197</nrCnpjCpfEmitente>
<Latitude>-23.41706</Latitude>
<Longitude>-46.3918</Longitude>
<!--Optional:-->
<dsNome>EMPRESA guarana</dsNome>
<!--Optional:-->
<razaoSocial></razaoSocial>
<!--Optional:-->
<inscricaoEstadual></inscricaoEstadual>
<!--Optional:-->
<nomeFantasia></nomeFantasia>
<!--Optional:-->
<nrDDDFone1></nrDDDFone1>
<!--Optional:-->
<nrDDDFone2></nrDDDFone2>
</localDeOrigem>
</sgrGerarAEv13>