sgrGerarAEv12
Creates the Boarding Authorization with IBGE code
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. * This is only mandatory if the route requirement is checked in the client's configuration. |
dsListProgramming | list | No* | List of programming code |
dsLoadManifest | string | No* | Load Manifest Description |
segsAdiconais | list | No* | List of additional segments |
cnpjCpflocalDeOrigem | integer | No* | CNPJ or CPF of the place of origin |
cdcidorigemIBGE | integer | No* | IBGE code of the city of origin |
cdciddestinoIBGE | integer | No* | Destination city IBGE code |
cdCidIBGE | Integer | No* | City IBGE code |
cdcnpjembarcador | Integer | No | Shipper's CNPJ |
METHOD RETURN:
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 Telephone(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 GenerateAEv12, you can copy it to the right
<tem:sgrGerarAEv12>
<!--Optional:-->
<tem:chaveacesso>SUA CHAVE DE ACESSO</tem:chaveacesso>
<tem:cdpas>1</tem:cdpas>
<tem:cdcliente>6999</tem:cdcliente>
<tem:cdpaisorigemcavalo>1</tem:cdpaisorigemcavalo>
<!--Optional:-->
<tem:nrplacacavalo>PLACA CAVALO</tem:nrplacacavalo>
<tem:cdpaisorigemcarreta1>1</tem:cdpaisorigemcarreta1>
<!--Optional:-->
<tem:nrplacacarreta1></tem:nrplacacarreta1>
<tem:cdpaisorigemcarreta2>1</tem:cdpaisorigemcarreta2>
<!--Optional:-->
<tem:nrplacacarreta2></tem:nrplacacarreta2>
<tem:cdpaisorigemmot1>1</tem:cdpaisorigemmot1>
<!--Optional:-->
<tem:nrdocmotorista1>DOCUMENTO MOTORISTA</tem:nrdocmotorista1>
<tem:cdpaisorigemmot2>1</tem:cdpaisorigemmot2>
<!--Optional:-->
<tem:nrdocmotorista2></tem:nrdocmotorista2>
<!--Optional:-->
<tem:nomemot1>NOME DO MOTORISTA</tem:nomemot1>
<!--Optional:-->
<tem:nomemot2></tem:nomemot2>
<!--Optional:-->
<tem:cdvincmot1>F</tem:cdvincmot1>
<!--Optional:-->
<tem:cdvincmot2>0</tem:cdvincmot2>
<!--Optional:-->
<tem:dtprevini>2022-12-20 08:39</tem:dtprevini>
<!--Optional:-->
<tem:dtprevfim>2022-12-20 08:39</tem:dtprevfim>
<!--Optional:-->
<tem:rastreadorcavalo></tem:rastreadorcavalo>
<tem:cdemprastrcavalo>0</tem:cdemprastrcavalo>
<!--Optional:-->
<tem:rastreadorcarreta1></tem:rastreadorcarreta1>
<tem:cdemprastrcarreta1>0</tem:cdemprastrcarreta1>
<tem:cdcidorigem>0</tem:cdcidorigem>
<tem:cdciddestino>3414</tem:cdciddestino>
<tem:cdcidorigemIBGE>3304557</tem:cdcidorigemIBGE>
<tem:cdciddestinoIBGE>3304557</tem:cdciddestinoIBGE>
<tem:cdrota>0</tem:cdrota>
<tem:vlcarga>2</tem:vlcarga>
<tem:cdtransp>6999</tem:cdtransp>
<!--Optional:-->
<tem:cdcnpjtransp>10887479000183</tem:cdcnpjtransp>
<!--Optional:-->
<tem:nrfonecel>82732235542</tem:nrfonecel>
<tem:cdtipooperacao>1</tem:cdtipooperacao>
<tem:cdembarcador>6999</tem:cdembarcador>
<!--Optional:-->
<tem:cdcnpjembarcador>10887479000183</tem:cdcnpjembarcador>
<!--Optional:-->
<tem:nrcontrolecarga></tem:nrcontrolecarga>
<!--Optional:-->
<tem:nrfrota></tem:nrfrota>
<tem:distanciatotal>31.34</tem:distanciatotal>
<tem:pesocarga>0</tem:pesocarga>
<!--Optional:-->
<tem:dscontroleviag1></tem:dscontroleviag1>
<!--Optional:-->
<tem:dscontroleviag2></tem:dscontroleviag2>
<!--Optional:-->
<tem:dscontroleviag3></tem:dscontroleviag3>
<!--Optional:-->
<tem:dscontroleviag4></tem:dscontroleviag4>
<!--Optional:-->
<tem:dscontroleviag5></tem:dscontroleviag5>
<!--Optional:-->
<tem:dscontroleviag6></tem:dscontroleviag6>
<!--Optional:-->
<tem:dscontroleviag7></tem:dscontroleviag7>
<!--Optional:-->
<tem:dscontroleviag8></tem:dscontroleviag8>
<!--Optional:-->
<tem:dscontroleviag9></tem:dscontroleviag9>
<!--Optional:-->
<tem:dscontroleviag10></tem:dscontroleviag10>
<!--Optional:-->
<tem:produtos>
<!--Zero or more repetitions:-->
<tem:sgrProduto>
<tem:cdprod>0</tem:cdprod>
<!--Optional:-->
<tem:cdprodutocliente>20221</tem:cdprodutocliente>
<tem:valor>2.00</tem:valor>
</tem:sgrProduto>
</tem:produtos>
<!--Optional:-->
<tem:documentos>
<!--Zero or more repetitions:-->
<tem:sgrDocumentoProdutosSeqV2>
<!--Optional:-->
<tem:nrDoc>TESTANDO VIC</tem:nrDoc>
<tem:tpDoc>1</tem:tpDoc>
<tem:valorDoc>2.00</tem:valorDoc>
<tem:tpOperacao>1</tem:tpOperacao>
<tem:dtPrevista>2022-12-20T08:39:00</tem:dtPrevista>
<!--Optional:-->
<tem:dtPrevistaSaida>2022-12-20 23:59</tem:dtPrevistaSaida>
<tem:cdCid>3414</tem:cdCid>
<!--Optional:-->
<tem:dsRua>CASA</tem:dsRua>
<!--Optional:-->
<tem:nrRua>21</tem:nrRua>
<!--Optional:-->
<tem:complementoRua></tem:complementoRua>
<!--Optional:-->
<tem:dsBairro>BOM RETIRO</tem:dsBairro>
<!--Optional:-->
<tem:nrCep></tem:nrCep>
<!--Optional:-->
<tem:nrFone1>773847466</tem:nrFone1>
<!--Optional:-->
<tem:nrFone2>73223554</tem:nrFone2>
<tem:cdEmbarcador>6999</tem:cdEmbarcador>
<tem:cdPaisOrigemEmitente>1</tem:cdPaisOrigemEmitente>
<!--Optional:-->
<tem:nrCnpjCpfEmitente></tem:nrCnpjCpfEmitente>
<tem:cdPaisOrigemDestinatario>1</tem:cdPaisOrigemDestinatario>
<!--Optional:-->
<tem:nrCnpjCPFDestinatario>21718667990</tem:nrCnpjCPFDestinatario>
<!--Optional:-->
<tem:nrCnpjCpfDestinatarioSequencia></tem:nrCnpjCpfDestinatarioSequencia>
<tem:Latitude>0</tem:Latitude>
<tem:Longitude>0</tem:Longitude>
<!--Optional:-->
<tem:dsNome>TESTE VITORIA</tem:dsNome>
<tem:qtVolumes>0</tem:qtVolumes>
<tem:qtPecas>0</tem:qtPecas>
<!--Optional:-->
<tem:nrLacreSIF></tem:nrLacreSIF>
<!--Optional:-->
<tem:nrLacreArmador></tem:nrLacreArmador>
<!--Optional:-->
<tem:dsNavio></tem:dsNavio>
<!--Optional:-->
<tem:dsSiglaOrig></tem:dsSiglaOrig>
<!--Optional:-->
<tem:dsSiglaDest></tem:dsSiglaDest>
<tem:flRegiao>0</tem:flRegiao>
<!--Optional:-->
<tem:nrControleCliente1></tem:nrControleCliente1>
<!--Optional:-->
<tem:nrControleCliente2></tem:nrControleCliente2>
<!--Optional:-->
<tem:nrControleCliente3></tem:nrControleCliente3>
<!--Optional:-->
<tem:vlCubagem>0</tem:vlCubagem>
<tem:vlPeso>0</tem:vlPeso>
<tem:cdTransp>0</tem:cdTransp>
<!--Optional:-->
<tem:nrDDDFone1>82</tem:nrDDDFone1>
<!--Optional:-->
<tem:nrDDDFone2>82</tem:nrDDDFone2>
<!--Optional:-->
<tem:nrControleCliente7></tem:nrControleCliente7>
<!--Optional:-->
<tem:nrControleCliente8></tem:nrControleCliente8>
<!--Optional:-->
<tem:nrControleCliente9></tem:nrControleCliente9>
<!--Optional:-->
<tem:nrControleCliente10></tem:nrControleCliente10>
<tem:flTrocaNota>0</tem:flTrocaNota>
<tem:cdTrocaNota>0</tem:cdTrocaNota>
</tem:sgrDocumentoProdutosSeqV2>
</tem:documentos>
<!--Optional:-->
<tem:paradas>
<!--Zero or more repetitions:-->
<tem:sgrPontoApoioViagem>
<tem:cdTrecho>0</tem:cdTrecho>
<tem:cdApoio>0</tem:cdApoio>
<tem:vlDistancia>0</tem:vlDistancia>
</tem:sgrPontoApoioViagem>
</tem:paradas>
<!--Optional:-->
<tem:sensorestemperatura>
<!--Zero or more repetitions:-->
<tem:sgrSensorTemperatura>
<tem:nrSensor>3</tem:nrSensor>
<tem:cdTpSensTemp>34</tem:cdTpSensTemp>
<tem:vlToleraSup>8</tem:vlToleraSup>
<tem:vlIdealSup>5</tem:vlIdealSup>
<tem:vlIdealInf>5</tem:vlIdealInf>
<tem:vlToleraInf>3</tem:vlToleraInf>
<tem:vlTempoPermitidoForaRange>21</tem:vlTempoPermitidoForaRange>
</tem:sgrSensorTemperatura>
</tem:sensorestemperatura>
<!--Optional:-->
<tem:nrDDDCelMot>21</tem:nrDDDCelMot>
<!--Optional:-->
<tem:dsnomerespviag></tem:dsnomerespviag>
<!--Optional:-->
<tem:dsfone1respviag></tem:dsfone1respviag>
<!--Optional:-->
<tem:dsfone2respviag></tem:dsfone2respviag>
<!--Optional:-->
<!--Optional:-->
<!--Optional:-->
<tem:dsListaProgramacao></tem:dsListaProgramacao>
<!--Optional:-->
<tem:dsManifestoCarga></tem:dsManifestoCarga>
<!--Optional:-->
<tem:segsAdiconais></tem:segsAdiconais>
<!--Optional:-->
<tem:cnpjLocalDeOrigem></tem:cnpjLocalDeOrigem>
<tem:cdcnpjembarcador></tem:cdcnpjembarcador>
</tem:sgrGerarAEv12>