WebService Trafegus Documentation

[v.2.44.4766]

General Trafegus Webservice Guidelines:

  • Trafegus system has a webservice integration that works based on the REST architecture, and your methods for sending and receiving data are available via GET, POST e PUT (Respectively to Search, Send or Update data).
  • All submissions and returns of this webservice will be done in JSON format.
  • To perform communication tests with this webservice applications like POSTMAN can be used.
  • All methods have Basic Authentication, HTTP protocol for accessing information. It is included in the HTTP request header as follows: Authorization: Basic {base64 credentials in user: password}
  • In the methods presented in this manual where arrays "[]" are used, several objects can be sent in the same request, as shown below:
POST for insertion:
http://customer.ip.address:port/ws_rest/public/api/viagem
http://customer.ip.address:port/ws_rest/public/api/transportador
http://customer.ip.address:port/ws_rest/public/api/embarcador
http://customer.ip.address:port/ws_rest/public/api/motorista
http://customer.ip.address:port/ws_rest/public/api/veiculo
http://customer.ip.address:port/ws_rest/public/api/pgr
http://customer.ip.address:port/ws_rest/public/api/ajudante

PUT for update:
http://customer.ip.address:port/ws_rest/public/api/viagem/IdViagem
http://customer.ip.address:port/ws_rest/public/api/transportador/IdTransportador
http://customer.ip.address:port/ws_rest/public/api/embarcador/IdEmbarcador
http://customer.ip.address:port/ws_rest/public/api/motorista/IdMotorista
http://customer.ip.address:port/ws_rest/public/api/veiculo/IdVeiculo
http://customer.ip.address:port/ws_rest/public/api/ajudante/IdAjudante
http://customer.ip.address:port/ws_rest/public/api/pgr/IdPGR

Note I: Before making any communication, please contact the Insurer or Trafegus Systems that can provide for you the environment IP, username and password.

Note II: The Trafegus Webservice service runs in a CentOS 6 (or higher) environment with the Apache HTTP server, so to be able to connect to it, the HTTP service must be Online and the CentOS server must have an Internet connection, it is also necessary to have the PHP tool version 5 (or higher) installed on the CentOS server.

Note III: The layout of the insertion (POST) and update (PUT) methods will be the same.

Note IV: All query methods (GET), if not entered id , will need to enter a id for the query to be based on and fetch the next 100 records.

Note V: When sending several objects for registration, if it is not possible to register any of them, the whole process will not be reversed, keeping in base those that were successfully registered and returning error to the one that failed and stopping the process.
Example: If 6 carriers are sent and the 3rd failed, the first 2 will not be reversed, return error message to the 3rd and will stop the process, not trying to register the 4th, 5th and 6th.

Search Carrier

Return carrier(s) information

To consult a specific carrier, add the ID(CPF)/CNPJ at the url:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/transportador/123456

To query a carrier package add the last recived id in UltCodigo (each request fetches 100 records with the next data from the given id):

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/transportador?UltCodigo=123456

Note: When requested only one carrier the "transportador" key return will be just an object, not an array.

JSON Return

Search Shipper

Return Shipper(s) Information

To consult a specific Shipper, add the CNPJ at the url:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/embarcador/123456

To query a Shipper package add the last recived id in UltCodigo (each request fetches 100 records with the next data from the given id):

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/embarcador?UltCodigo=123456

Note: When requested only one Shipper the "embarcador" key return will be just an object, not an array.

JSON Return

Search Driver

Return Driver(s) Information

To consult a specific driver, add the ID(CPF) at the url:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/motorista/123456

To query a driver package add the last recived id in UltCodigo (each request fetches 100 records with the next data from the given id):

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/motorista?UltCodigo=123456

Note: When requested only one driver the "motorista" key return will be just an object, not an array.

JSON Return

Search Assistant

Return Assistant(s) Information

To consult a specific assistant, add the ID(CPF) at the url:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/ajudante/123456

To query a assistant package add the last recived id in UltCodigo (each request fetches 100 records with the next data from the given id):

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/ajudante?UltCodigo=123456

Note: When requested only one assistant the "ajudante" key return will be just an object, not an array.

JSON Return

Search Vehicle

Return Vehicle(s) Information

To consult a specific vehicle, add the ID(PLACA) at the url:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/veiculo/ABC0001

To query a vehicle package add the last recived id in UltCodigo (each request fetches 100 records with the next data from the given id):

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/veiculo?UltCodigo=123456

Note: When requested only one vehicle the "veiculo" key return will be just an object, not an array.

JSON Return

Search PGR

Returns PGR(s) Information

ParameterRequiredDescription
UltCodigoYESId (id) of the last PGR.
DocumentoYESVehicle Carrier CNPJ.
To consult a specific PGR, add the id at the url:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/pgr/123456

To query a PGR package add the last recived id in UltCodigo (each request fetches 100 records with the next data from the given id):

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/pgr?UltCodigo=123456&Documento=010329231

Note: When requested only one PGR the "pgr" key return will be just an object, not an array.

JSON Return

Search Shipment

Returns Shipment(s) Information

To consult a specific shipment, add the shipment id at the URL:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/viagem/123456

To query a shipment package add the last recived id in UltCodigo (each request fetches 100 records with the next data from the given id):

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/viagem?UltCodigo=123456

To consult the shipments completed on a date add the desired day value in the "DataFinalizacao" parameter:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/viagem?DataFinalizacao=10/09/2018

To query shipments started between a date period, you must enter the values in the parameters DataInicioI (search start date) and DataInicioF (search end date)

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/viagem?DataInicioI=09/10/2018&DataInicioF=10/10/2018

To query shipments Started on a Date, you must enter the values in the Parameters DataEfetivacao

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/viagem?DataEfetivacao=09/10/2018

To query shipments Completed on a Date, you must enter the values in the parameters DataFinalizacaoI (search start date) and DataFinalizacaoF (search end date)

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/viagem?DataFinalizacaoI=09/10/2018&DataFinalizacaoF=10/10/2018

Note: When requested only one shipment the "viagem" key return will be just an object, not an array.

JSON Return

Search Invoices

Returns Invoices Information

ParameterRequiredDescription
ViagemYESShipment ID.
DocumentoYESCompany Document ID (CPF/CNPJ) associated to the shipment.
To consult a specific invoice, add the invoice id at the URL:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/viagemnotafiscal/123

Note: When requested only one invoice the "notasFiscais" key return will be just an object, not an array.

JSON Returns

Send Shipment

[POST] http://customer.ip.address:port/ws_rest/public/api/viagem

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
Parameter LevelType RequiredDescription
viag_codigo_externo0IntegerNOCustomer Shipment ID
viag_ttra_codigo0IntegerYESTransport Type (Check Constants In Documentation)
viag_pgpg_codigo1IntegerYESPGR for Shipment Control
viag_carregado0String(1)NOLoaded Vehicle (Y/N)
documento_transportador0String(30)YESCargo Carrier Document ID (CPF/CNPJ)
cnpj_emba0String(30)NOCargo Shipper's CNPJ
viag_numero_manifesto0String(100)NOPacking List Number
viag_valor_merc_especifica0FloatNOSpecific Commodity Value
viag_valor_merc_nao_especifica0FloatNONon-specific Commodity Value
viag_previsao_inicio0Datetime (01/06/2015 00:00:00)NOStart Forecast Date/Time
viag_previsao_fim0Datetime (01/06/2015 00:00:00)NOEnd Forecast Date/Time
viag_valor_carga0FloatNOTotal Value of Charge
viag_valor_ddr0FloatNODDR Value
viag_peso_total0FloatNOTotal Weight of Cargo
viag_distancia0FloatNOShipment Distance in KM
viag_codigo_pai0IntegerNO"Parent Shipment" Code
viag_descricao_carga0String(500)NOCargo Description
viag_observacao0String(500)NOShipment Observation
viag_justificativa_liberacao0String(500)NOShipment Release Justification
ignorar_regras_pgrs 0 list (array) NO List of PGR items that should be ignored in PGR validation. To check which items can be ignored, consult the Trafegus technical team.
veiculos0list (array)YESVehicle Information, Can Associate Several In This Array
placa1String(10)YESShipment Vehicles Plate
nro_liberacao1IntegerNOVehicle Release Number
escolta1String(1)NOEscorting Vehicle (Y / N)
quantidade_embarcada0IntegerNOAmount Shipped to Vehicle
motoristas1list (array)NODriver Information, Can Associate Several In This Array
cpf_moto1String(20)NOShipment Driver ID(CPF)
nro_liberacao1IntegerNODriver Release Number
contatos1List (array)NODriver contacts, can associate several in this array
email1String(100)NOContact Email
fone11String(30)NOContact Phone
radio1String(50)NOContact Radio
ajudantes0List (Array)NOAssistants, Can Associate Several In This Array
cpf_ajudante1String(20)NOAssistant ID(CPF)
nro_liberacao1IntegerNORelease Number
contatos1List (Array)NOAssistant Contacts, Can Associate Several In This Array
email1String(100)NOContact Email
fone11String(30)NOContact Phone
radio1String(50)NOContact Radio
terminais0List (Array)NOShipment Terminals, Can Associate Several In This Array
term_numero_terminal1String(30)NOTerminal Number
tecn_tecnologia1String(50)NOTelematic
tope_descricao1String(50)NOOperation Type
tipos_produtos0List (Array)NOShipment Product Types, Can Associate Several In This Array
produto1String(50)NOProduct Type
valor1FloatNOShipment Product Value
temperatura1objectNOTemperature Control
descricao1String(100)NOTemperature Description
de1IntegerNOInitial Temperature Range
ate1IntegerNOFinal Temperature Range
sensores1IntegerNOEnter 0 to Apply to All Sensors
sensor_011String(1)NOApplies Sensor Range 1 (Y / N)
sensor_021String(1)NOApplies Sensor Range 2 (Y / N)
sensor_031String(1)NOApplies Sensor Range 3 (Y / N)
sensor_041String(1)NOApplies Sensor Range 4 (Y / N)
sensor_051String(1)NOApplies Sensor Range 5 (Y / N)
sensor_061String(1)NOApplies Sensor Range 6 (Y / N)
sensor_071String(1)NOApplies Sensor Range 7 (Y / N)
sensor_081String(1)NOApplies Sensor Range 8 (Y / N)
sensor_091String(1)NOApplies Sensor Range 9 (Y / N)
sensor_101String(1)NOApplies Sensor Range 10 (Y / N)
rota_codigo0IntegerYESRoute Code
coordenadas0StringYESRoute Encrypted Polyline in Google Maps Format
rota_descricao0StringYESRoute Description
origem0objectYESShipment Origin Information
vloc_descricao1String(200)YESDescription of Origin Place
logradouro1String(200)NOOrigin Street
complemento1String(100)NOOrigin Street Complement
cep1String(8)NOStreet's ZIP(CEP) Code (Use as an aid not to duplicate)
numero1String(10)NOOrigin Street Number
bairro1String(100)NOOrigin Neighborhood
cida_descricao_ibge1String(100)NOCity of Origin or IBGE Code (of city)
sigla_estado1String(2)NOAcronym UF (State of the City)
pais1String(50)NOCountry
refe_latitude1FloatNOOrigin Latitude
refe_longitude1FloatNOOrigin Longitude
refe_raio1FloatNOOrigin Radius
refe_km1String(10)NOOrigin Place in KM of highway
refe_bandeira1String(50)NOOrigin Place Flag
associar_transportador1String(1)NOAssociate as Carrier Origin (Y / N)
contatos1List (Array)NOOrigin Place Contacts
email2String(100)NOContact Email
fone12String(30)NOContact Phone
radio2String(50)NOContact Radio
viag_data_consolidacao2Datetime (01/06/2015 00:00:00)NOShipment Consolidation Date
previsao_chegada2Datetime (01/06/2015 00:00:00)NOExpected Arrival at Origin
previsao_inicio_espera2Datetime (01/06/2015 00:00:00)NOOrigin Waiting Start Forecast
previsao_fim_espera2Datetime (01/06/2015 00:00:00)NOOrigin Waiting End Forecast
previsao_inicio_carregamento2Datetime (01/06/2015 00:00:00)NOOrigin Charge Start Forecast
previsao_fim_carregamento2Datetime (01/06/2015 00:00:00)NOOrigin Charge End Forecast
previsao_inicio_descarregamento2Datetime (01/06/2015 00:00:00)NOOrigin Discharging Start Forecast
previsao_fim_descarregamento2Datetime (01/06/2015 00:00:00)NOOrigin Discharging End Forecast
previsao_saida2Datetime (01/06/2015 00:00:00)NOExit Origin Forecast
conhecimentos1List (Array)NOShipment Bill of Lading Information
vlco_numero2String(50)YESBill of Lading Number
vlco_cpf_cnpj2String(30)NOBill of Lading Customer Document (CPF/CNPJ)
vlco_valor2FloatYESBill of Lading Value
notas_fiscais2List (Array)NOBill of Lading Invoice Information
vnfi_numero3String(20)YESInvoice Number
vnfi_pedido3String(20)NOInvoiceOrder Number
vnfi_valor3FloatYESInvoice Monetary Value
vnfi_data_fat3Datetime (01/06/2015 00:00:00)NOInvoice Billing Date
vnfi_observacao3String(5000)NOInvoice Notes
produtos3List (Array)NOInvoice Products/Items
vpro_descricao4String(50)YESInvoice Product Description
vpro_tipo4String(50)YESProduct Type
vpro_quantidade4IntegerYESProduct Amount
vpro_valor4FloatYESProduct Value
locais0List (Array)NOShipment Locations, Can Associate Several In This Array
vloc_descricao1String(200)YESOrigin Place Description
tipo_parada1integerNOInform the code of the "stop type" of the place "Ex: 1 - If the place is a Stop, 2 - If the place is a Collection...", consult the method "Stop type parameters" present in the documentation
tipo_local1integerNOInform the code of the "type of location" of the location "Ex: 1 - If the location is an Area of ​​risk, 2 - If the location is an allowed point...", consult the method "Type of location parameters" present in the documentation
logradouro1String(200)NOOrigin Street
complemento1String(100)NOOrigin Street Complement
cep1String(8)NOStreet's ZIP(CEP) Code (Use as an aid not to duplicate)
numero1String(10)NOOrigin Street Number
bairro1String(100)NOOrigin Neighborhood
cida_descricao_ibge1String(100)NOCity of Origin or IBGE Code (of city)
sigla_estado1String(2)NOAcronym UF
pais1String(50)NOCountry
refe_latitude1FloatNOOrigin Latitude
refe_longitude1FloatNOOrigin Longitude
refe_raio1FloatNOOrigin Radius
refe_km1String(10)NOOrigin Place in KM of highway
refe_bandeira1String(50)NOOrigin Place Flag
associar_transportador1String(1)NOAssociate as Carrier Origin (Y / N)
contatos1List (Array)NOOrigin Place Contacts
email2String(100)NOContact Email
fone12String(30)NOContact Phone
radio2String(50)NOContact Radio
previsao_chegada2Datetime (01/06/2015 00:00:00)NOExpected Arrival at Origin
previsao_inicio_espera2Datetime (01/06/2015 00:00:00)NOOrigin Waiting Start Forecast
previsao_fim_espera2Datetime (01/06/2015 00:00:00)NOOrigin Waiting End Forecast
previsao_inicio_carregamento2Datetime (01/06/2015 00:00:00)NOOrigin Charge Start Forecast
previsao_fim_carregamento2Datetime (01/06/2015 00:00:00)NOOrigin Charge End Forecast
previsao_inicio_descarregamento2Datetime (01/06/2015 00:00:00)NOOrigin Discharging Start Forecast
previsao_fim_descarregamento2Datetime (01/06/2015 00:00:00)NOOrigin Discharging End Forecast
previsao_saida2Datetime (01/06/2015 00:00:00)NOExit Origin Forecast
conhecimentos1List (Array)NOShipment Bill of Lading Information
vlco_numero2String(50)YESBill of Lading Number
vlco_cpf_cnpj2String(30)NOBill of Lading Customer Document
vlco_valor2FloatYESBill of Lading Value
notas_fiscais2List (Array)NOBill of Lading Invoice Information
vnfi_numero3String(20)YESInvoice Number
vnfi_pedido3String(20)NOClient Order Number
vnfi_valor3FloatYESInvoice Value
vnfi_data_fat3Datetime (01/06/2015 00:00:00)NOInvoice Billing Date
vnfi_observacao3String(5000)NOInvoice Notes
produtos3List (Array)NOInvoice Products
vpro_descricao4String(50)YESInvoice Product Description
vpro_tipo4String(50)YESProduct Type
vpro_quantidade4IntegerYESProduct Quantity
vpro_valor4FloatYESProduct Value
destino0objectYESShipment Destination Information
vloc_descricao1String(200)YESOrigin Place Description
logradouro1String(200)NOOrigin Street
complemento1String(100)NOOrigin Street Complement
cep1String(8)NOStreet's ZIP(CEP) Code (Use as an aid not to duplicate)
numero1String(10)NOOrigin Street Number
bairro1String(100)NOOrigin Neighborhood
cida_descricao_ibge1String(100)NOCity of Origin or IBGE Code (of city)
sigla_estado1String(2)NOAcronym UF
pais1String(50)NOCountry
refe_latitude1FloatNOOrigin Latitude
refe_longitude1FloatNOOrigin Longitude
refe_raio1FloatNOOrigin Radius
refe_km1String(10)NOOrigin Place in KM of highway
refe_bandeira1String(50)NOOrigin Place Flag
associar_transportador1String(1)NOAssociate as Carrier Origin (Y / N)
contatos1List (Array)NOOrigin Place Contacts
email2String(100)NOContact Email
fone12String(30)NOContact Phone
radio2String(50)NOContact Radio
previsao_chegada2Datetime (01/06/2015 00:00:00)NOExpected Arrival at Origin
previsao_inicio_espera2Datetime (01/06/2015 00:00:00)NOOrigin Waiting Start Forecast
previsao_fim_espera2Datetime (01/06/2015 00:00:00)NOOrigin Waiting End Forecast
previsao_inicio_carregamento2Datetime (01/06/2015 00:00:00)NOOrigin Charge Start Forecast
previsao_fim_carregamento2Datetime (01/06/2015 00:00:00)NOOrigin Charge End Forecast
previsao_inicio_descarregamento2Datetime (01/06/2015 00:00:00)NOOrigin Discharging Start Forecast
previsao_fim_descarregamento2Datetime (01/06/2015 00:00:00)NOOrigin Discharging End Forecast
previsao_saida2Datetime (01/06/2015 00:00:00)NOExit Origin Forecast
conhecimentos1List (Array)NOShipment Bill of Lading Information
vlco_numero2String(50)YESBill of Lading Number
vlco_cpf_cnpj2String(30)NOBill of Lading Customer Document
vlco_valor2FloatYESBill of Lading Value
notas_fiscais2List (Array)NOBill of Lading Invoices Information
vnfi_numero3String(20)YESInvoice Number
vnfi_pedido3String(20)NOOrder Number
vnfi_valor3FloatYESInvoice Monetary Value
vnfi_data_fat3Datetime (01/06/2015 00:00:00)NOInvoice Billing Date
vnfi_observacao3String(5000)NOInvoice Notes
produtos3List (Array)NOInvoice Products
vpro_descricao4String(50)YESInvoice Product Description
vpro_tipo4String(50)YESProduct Type
vpro_quantidade4IntegerYESProduct Quantity
vpro_valor4FloatYESProduct Monetary Value
simular_sm0BooleanNODefines whether to generate an SM or just do a simulation to record the data

Notes:
The "Level" column represents the alignment of XML / JSON tags and their sublevels.

For shipments sent without automatic routing and without route, only with locations, if the geolocator does not find any location, it will be registered in the shipment with latitude/longitude zero and will return "warning" for information.

JSON submission example for Trafegus system shipments (This method allows multiple shipments to be sent).


Fill Validation Detail:
  • Only insured monitoring requests (SMs) should be submitted. Being the carrier and / or the shipper of the shipment.
  • Fill in transport type is not required.
  • At least one vehicle and one driver are required for SM..
  • Filling in a terminal is not required. If not informed will be used the vehicle registration. If it does not have one then an error will be returned.
  • Entering the transaction type information can be fixed as per the rule: TRANSFERENCIA (for interstate shipment) and DISTRIBUICAO (for shipment within the same state).
  • The shipment start forecast date cannot be retroactive (before the current date/time).
  • End forecast date cannot be less than start forecast date.
  • The rules (PGR) for controlling the indicators will be fulfilled at the time of inclusion of the SM according to Carrier CNPJ + Transport Type + Cargo Value.
  • Regarding the origin, destination and places of the shipment, the Latitudes / Longitudes or a valid address must be informed (Street, zip(CEP) id, number, neighborhood, city, uf).
  • Origin, destination and shipment locations will be linked to the carrier / shipper for shipment controls.
  • If the tag "temperatura[n].descricao" is sent with a non-existent description, it will validate whether it has Minimum Value and Maximum Value and Controlled Sensor data. If this data exists, it will automatically register a new range and link it to the SM. If this data does not exist, it will block the SM registration, even if there is a linked range at the trip terminal.

Send Carrier

[POST] http://customer.ip.address:port/ws_rest/public/api/transportador

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
Parameter Type RequiredDescription
documento_transportadortext (30)YESCarrier ID(CPF)/CNPJ
nomeText (50)YESCarrier Name
razao_socialText (100)NOCarrier Corporate Name
ie_rgText (20)NORG (natural person) or IE (legal entity)
logradouroText (200)NODescription of the Street
cepText (8)NOStreet ZIP(CEP) Code
numeroText (50)NOStreet Number
complementoText (100)NOStreet Neighborhood Description
bairroText (100)NOStreet Neighborhood Description
cidadeText (100)NOCity of Origin or IBGE Code (according to IBGE standard table)
sigla_estadoText (2)NOStreet State Acronym
paisText (50)NOCountry
documento_matrizText (30)NOCarrier Matrix ID(CPF)/CNPJ
senhaTexto (20)NOCarrier Password
roteiriza_automatico_smIntegerNOUses Automatic Routing in SM (0 no, 1 yes)
associa_motorista_smIntegerNOAutomatically Associate Drivers With the SM Carrier (0 no, 1 yes). Enter "1" by default.
associa_veiculo_smIntegerNOAutomatically Associate Vehicles With SM Carrier (0 no, 1 yes). Enter "1" by default.
contatosList (Array)NODriver Contacts
emailString(100)NOContact Email
fone1String(30)NOContact Phone
TextoString(100)NOContact Name
embarcadoresList (Array)NOShipper to link

Request to send Carrier's data:


Return on Success:


Return on Error:

Send Shipper

[POST] http://customer.ip.address:port/ws_rest/public/api/embarcador

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
ParameterTypeRequiredDescription
cnpj_embarcadorText (30)YESShippers CNPJ
nomeText (50)YESShippers Name
razao_socialText (100)NOShippers Corporate Name
ieText (20)NOShippers State Registration
logradouroText (200)NOStreet Description
cepText (8)NOStreet ZIP(CEP) Code
numeroText (50)NOStreet Street Number
complementoText (100)NOStreet Neighborhood Description
bairroText (100)NOStreet Neighborhood Description
cidadeText (100)NOCity of Origin or IBGE Code (according to IBGE standard table)
sigla_estadoText (2)NOStreet State Acronym
paisText (50)NOCountry
cnpj_matrizText (30)NOShippers Matrix ID(CPF)/CNPJ
roteiriza_automatico_smIntegerNOUses Automatic Routing in SM (0 no, 1 yes)
associa_motorista_smIntegerNOAutomatically Associate Drivers With the SM Carrier (0 no, 1 yes). Enter "1" by default.
associa_veiculo_smIntegerNOAutomatically Associate Vehicles With SM Carrier (0 no, 1 yes). Enter "1" by default.

Request to send Shipper's data:


Return on Success:


Return on Error:

Send Driver

[POST] http://customer.ip.address:port/ws_rest/public/api/motorista

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
ParameterGroupType RequiredDescription
cpf_motorista0Text (20)YESDrivers ID(CPF)
nome0Text (50)YESDrivers Name
rg0Text (20)NODrives RG
logradouro0Text (200)NOStreet Description
cep0Text (8)NOStreet ZIP(CEP) Code
numero0Text (50)NOStreet Street Number
complemento0Text (100)NOStreet Neighborhood Description
bairro0Text (100)NOStreet Neighborhood Description
cidade0Text (100)NOHometown or IBGE id (according to IBGE standard table)
sigla_estado0Text (2)NOStreet State Acronym
pais0Text (50)NOCountry
nro_cnh0Text (25)NODriver's CNH Number
categoria_cnh0Text (10)NODriver's CNH Category
validade_cnh0Datetime (01/06/2015 00:00:00)NODriver's CNH Validity
senha0Text (15)NODriver Password
vigilante0Text (1)NOVigilant (Y/N)
nro_cnv0IntegerNODriver's CNV Number
validade_cnv0Datetime (01/06/2015 00:00:00)NOCNV Validity
nome_pai0String(100)NOFather's name
nome_mae0String(100)NOMother's name
estado_civilString(1)NOC: MARRIED
S: SINGLE
D: DIVORCED
V: WIDOWER
moto_registro_cnhString(12)NOCNH Registration Number
moto_orgao_emissor_cnhString(10)NOCNH Issuing Agency
moto_data_primeira_habilitacao0Datetime (01/06/2015 00:00:00)NODate of First License
moto_data_emissao0Datetime (01/06/2015 00:00:00)NOCNH Issue Date
data_nasc0Datetime (01/06/2015 00:00:00)NOBirth Date
rg_emissor0String(10)NORG Issuing Agency
rg_uf0String(2)NORG Issuing Acronym Sender
naturalidade_descricao_ibge0String(100)NOHometown or IBGE Code (according to IBGE standard table)
naturalidade_uf_sigla0String(2)NOAcronym State Naturalness
cnh_seg0String(11)NOCNH Security Number
cnh_uf0String(2)NOCNH Issuing Acronym Sender
transportador0List (Array)NOArray of Carriers, Being Able to Associate Several in This Array
documento_transportador1Text (30)NOCarriers ID(CPF)/CNPJ
vinculo_contratual1IntegerNOType of Carrier Link. 1=fixed; 2=Aggregate; 3=Third
contatos1List (Array)NODriver Contacts, Can Associate Several In This Array
email1String(100)NOContact Email
fone11String(30)NOContact Phone
Texto1String(100)NOContact Name

Request to send Driver's data:


Return on Success:

Send Assistant

[POST] http://customer.ip.address:port/ws_rest/public/api/ajudante

The submit JSON is identical to the JSON in the Method SearchAssistant. (Multiple objects can be sent)

Parameters to be sent:

Parameter Group Type RequiredDescription
cpf_ajudante1String(20)YESAssistant ID(CPF)
nome1String(50)YESPersons Name
rg1String(20)NOAssistant RG
logradouro1String(200)NOStreet Description
cep1String(8)NOStreet ZIP(CEP) Code
numero1String(50)NOStreet Street Number
complemento1String(100)NOStreet Neighborhood Description
bairro1String(100)NOStreet Neighborhood Description
cidade1String(100)NOCity Description or City IBGE Code
sigla_estado1String(2)NOStreet State Acronym
pais1String(50)NOCountry
nome_pai1String(100)NOFather's Name
nome_mae1String(100)NOMother's Name
data_nasc1Datetime (01/06/2015 00:00:00)NODate of Birth
rg_emissor1String(10)NORG Issuing Agency
estado_civil1String(1)NOC: MARRIED
S: SINGLE
D: DIVORCED
V: WIDOWER
rg_uf1String(2)NORG Sender State Acronym
naturalidade_descricao_ibge1String(100)NOHometown or IBGE Code (according to IBGE standard table)
naturalidade_uf_sigla1String(2)NOAcronym State Naturalness
contatos1List (Array)NOAssistant Contacts, Can Associate Several In This Array
email2String(100)NOContact Email
fone12String(30)NOContact Phone
Texto2String(100)NOContact name
transportador1List (Array)NOArray of Carriers, Being Able to Associate Several in This Array
documento_transportador2Text (30)NOCarriers ID(CPF)/CNPJ

Return on Success

Return on Error:

Send Vehicle

[POST] http://customer.ip.address:port/ws_rest/public/api/veiculo

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
ParameterGroupType RequiredDescription
placa0Text (10)YESVehicle License Plate
tipo_veiculo0inteiroYESVehicle Type. 1 = Cart; 2 = Tractor unit; 3 = Truck; 4 = Motorcycle; 5 = Loader; 6 = Ride Utility;
frota0Text (10)NOVehicle Fleet
renavam0Text (10)NOVehicle RENAVAM
chassi0Text (50)NOVehicle Chassis
estacao_gr0IntegerNOTracking Station
veic_pgpg_codigo0IntegerNOPGR Code
documento_proprietario0Text (30)NOVehicle Owner's ID(CPF) / CNPJ
documento_transportador0Text (30)NOVehicle Carrier ID (CPF) / CNPJ
documento_gestor0Text (30)NOVehicle Fleet Manager ID(CPF)
senha_proprietario0Text (20)NOVehicle Owner Password
senha_coacao0Text (20)NOVehicle Duress Password
modelo0Text (50)NOVehicle Model
marca0Text (50)NOVehicle Brand
cpf_motorista0Text (20)NOVehicle Driver ID(CPF)
ano_fabricacao0Text (4)NOVehicle Manufacture Year
ano_modelo0Text (4)NOVehicle Model Year
cor0Text (20)NOVehicle Color
tamanho0numericNOVehicle Size
cidade_emplacamento0Text (100)NOCity Plating or IBGE Code (according to IBGE standard table)
sigla_estado0Text (2)NOAcronym UF (State of the City)
pais0Text (50)NOCountry
telefone0Text (20)NOVehicle Phone
antt0Text (50)NOVehicle ANTT
rntc0Text (10)NOVehicle RNTC
crlv0IntegerNOVehicle CRLV
capacidade_maxima0IntegerNOLoad Capacity
unidade_medida0ConstantNO FAR = BUNDLE
LIT = LITER
QUI = KG
PAL = PALLET
MEC = CUBIC_METER
QUI = KILOS
UVO = VOLUME_UNITS
tipo_unidade_medida0ConstantNO CAX = BOXES
PAL = PALLETS
tipo_carroceria0ConstantNO 1 = AMBULANCE
2 = FANLIGHT
3 = SHIELDED
4 = BUGGY
5 = CLOSED CABIN
6 = OPEN CABIN
8 = CONVERTIBLE
9 = VAN
10 = JEEP
11 = TRAILER
12 = MOTORCYCLES
13 = SIDER
combustivel0ConstantNO 0 = GASOLINE
1 = ETHANOL
2 = DIESEL
3 = FLEX
data_emissao0Datetime (01/06/2015 00:00:00)NODocument Issue Date
observacao_veiculo0Text (5000)NOVehicle Observation
terminais0List (Array)NOVehicle Terminals
numero1Text (30)NOVehicle Terminal Number
tecnologia1String(50)NOTelematic
cod_versao_tecnologia 1 Integer NO Technology version code. Priority will be given to this field when informed, otherwise the "technology" field will be used to search for the terminal.
transportadores0List (Array)NOCarrier
documento_transportador1Text (30)NOCarrier ID(CPF)/CNPJ
vinculo_contratual1IntegerNOType of Link to the Carrier. 1=fixed; 2=Aggregate; 3=Third
lista_observacao 0 list (array) NO Observations

Request to send Vehicle's data:


Return on Success:

Send Events

[POST] http://customer.ip.address:port/ws_rest/public/api/eventos

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
ParameterGroupType RequiredDescription
events0ArrayYESJSON main tag.
tipo_evento1IntegerYESFixed Code, According to The Table of Types of Events That Can Be Generated.
descricao1Text (100)YESDescription of The Generated Event
placa1Text (10)YESVehicle License Plate
numero_terminal1Text (30)YESVehicle Device Number
tecnologia1Text (50)YESDevice Telematic Description
data_bordo1Datetime (2018-10-02 11:34:29)YESEvent Date on Board
posicao1Text (200)YESDescription of Event Location Position
latitude1Text (15)YESEvent Local Latitude
longitude1Text (15)YESEvent Local Longitude
codigo_viagem1IntegerNOShipment ID

Request to send Event's data:


Return on Success:

Send Events Green Mile

[POST] http://ip.do.cliente:porta/ws_rest/public/api/eventos/greenmile

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
ParameterGroupType RequiredDescription
0ArrayYesMain json array
identificador1text(100)YesFrom-to identifier of vehicles registered in the Green Mile license plate association wizard
tipo_evento1text(10)YesEvent code that will be generated
data_evento1text(50)YesEvent date, string must start in the format DD/MM/YYYY HH:MM
latitude1text(19)YesLocation Latitude
longitude1text(19)YesLongitude of location

Request to Send Event's Green Mile data:


Return in case of Success:


Return on Success, with exceptions:


Return in case of Error:

Send Route

[POST] http://customer.ip.address:port/ws_rest/public/api/rota

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
ParameterGroupType RequiredDescription
rotas0ArrayYESJSON Main Tag.
descricao1Text (500)YESRoute Description
distancia1RealNORoute Distance (Required When Entered Coordinates)
coordenadas1TextNORoute Encrypted Polyline in Google Maps Format
pontos_rota2ArrayYESRoute Points
descricao_local2Text (200)YESPlace Description
tipo_local2IntegerYESStop Type (Available in Stop Type Parameters)
latitude2Text (15)NOPlace Latitude
longitude2Text (15)NOPlace Longitude
logradouro2Text (200)NOPlace Street
complemento2Text (100)NOPlace Street Complement
cep2Text (8)NOPlace Street ZIP(CEP) Code
numero2Text (50)NOPlace Number
bairro2Text (100)NOPlace Neighborhood
cidade_descricao_ibge2Text (100)NOCity Description or IBGE Code
sigla_estado2Text (2)NOPlace Street State Acronym
pais2Text (50)NOCountry
raio2realNOPlace Radius
valores_frete1ArrayNOFreight values ​​for the route.
tipo_veiculo2IntegerYESVehicle type.
tipo_carroceria2IntegerYESBody type.
valor_frete_fechado2floatNOClosed freight value.
valor_frete2floatNOFreight value.
valor_pedagio2floatNOToll value.
valor_ajudante2floatNOHelper value.
valor_motorista_adicional2floatNOAdditional driver fee.
valor_fiscais_adicionais2floatNOTax value.
valor_km_adicionais2floatNOAdditional KM value.
You must enter Latitude and Longitude, otherwise enter all other data for the detail of the street.

Request to send Route's data:


Return on Success:

Send PGR

[POST] http://customer.ip.address:port/ws_rest/public/api/pgr

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
ParameterGroupType RequiredDescription
pgr0ArrayYESJSON Main Tag.
descricao1Text (100)YESPGR Description
pgr_padrao1IntegerNODefault PGR to Use as Template for Cloning Detail and Action Settings
valor_minimo1RealNOPGR Minimum Value
valor_maximo_especifico1RealNOPGR Specific Maximum Value
valor_total1RealNOPGR Total Maximum Value
grau_risco1IntegerNO1 = Very High; 2 = High; 3 = Medium; 4 = Low; 5 = Not Relevant
versoes2ArrayNOTelematics Versions
codigo_versao_tecnologia2IntegerNOTelematic Version According to SearchTelematicVersions [GET] Method
sublimites2ArrayNOProduct Sublimite
tipo_produto2Text (50)NOProduct Type Description
valor_maximo2RealNOMaximum Value of This Product Type

Request to send PGR's data:


Return on Success:

Send Research

[POST] http://customer.ip.address:port/ws_rest/public/api/historico-pesquisa

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
ParameterGroupType RequiredDescription
TipoObjeto1Text (2)YESSearch Object Type (Available in The Documentation on The Search Object Type)
Documento1Text (50)YESSearch Owner Carrier Document
Objeto1Text (50)YESResearch Object (License Plate / CPF / CNPJ)
Status1Text (2)YESResearch Status (Available in The Search Status Documentation)
TipoValidade1Text (2)YESResearch Expiration Type by Date or Shipment, Listed in "DT" or "VI"
FornecedorPesquisa1IntegerYESResearch Provider (Available in The Documentation From The Search Provider)
NumeroLiberacao1Text (50)NOResearch Number Description
DataValidade1Datetime (2018-10-02 11:34:29)NOResearch Expiration Date

Request to send Research's data:


Note: If the carrier and the object are not linked, a link will be created automatically upon successful request. This applies to the types "MO", "VC", "VM", and "AJ".

Send Areas

[POST] http://customer.ip.address:port/ws_rest/public/api/area

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
ParameterGroupType RequiredDescription
areas0ArrayYESJSON main tag.
area_descricao1Text (200)YESArea description.
classe_referencia1Text (50)YESReference class description.
area_pontos1ArrayYESList of geographic points. Minimum 3 points
latitude2Text (15)YESPoint Latitude.
longitude2Text (15)YESPoint Longitude.

Request to send Points data:


Return on Success:

Send Driver Non-Conformity

[POST] http://customer.ip.address:port/ws_rest/public/api/naoconformidademotorista

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
Parameter Group Type Required Description
doc_cliente_suspensao 0 string YES CNPJ/CPF company generating the suspension.
cpf_motorista 0 string YES Driver's CPF for the suspension.
bloqueado_ate 0 Date/Time NO Deadline for the suspension to be effective. Retroactive dates to the suspension creation date are not allowed. Format: DD/MM/YYYY HH:MM
necessita_liberacao 0 string NO Parameter for driver release, accepting only 3 values: "NAO" (no), "ELEARNING" (e-learning), and "PRESENCIAL" (in-person)
doc_transportador 0 string NO CNPJ/CPF carrier sending the request.
motivo_suspensao 0 Array NO Array of suspension reasons descriptions listed on the web environment
descricao 1 string NO Suspension reason description
observacao 0 string (200) NO Non-Conformity observation.
motivo_interno 0 string (200) NO Non-Conformity internal reason.
codigo_modulo_elearning 0 integer YES E-Learning Module Code (obtained from the GET /moduloelearning method). This field is mandatory if the "necessita_liberacao" tag is filled as "E-LEARNING".

Request to send Driver Non-Conformity data:


Return on Success:

Send E-Learning Modules

[POST] http://customer.ip.address:port/ws_rest/public/api/moduloselearning

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
Parameter Group Type Required Description
nome_modulo 0 string YES E-Learning Module name.
status 0 string YES E-Learning Module status, accepting values "ATIVO" (active) or "INATIVO" (inactive).

Request to send E-Learning Modules:


Return on Success:

Send Checklist

Method responsible for registering new Checklists.

[POST] http://ip.do.cliente:porta/ws_rest/public/api/checklist

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
ParameterGroupTypeRequiredDescription
ativo0String(1)NoIf the checklist will be active (Y, N)
aprovado0String(1)NoIf the Checklist will be approved (Y, N)
env_email0String(1)NoSend data by email (Y, N)
placa0String(10)YesMotor vehicle license plate
terminal0ObjectYesTerminal data
numero_terminal1String(10)YesTerminal number
versao_tecnologia1IntegerYesTechnology version
placa_carreta0String(10)NoTrailer plate, send only one trailer
documento_proprietario0String(14)YesVehicle owner
documento_solicitante0String(14)NoChecklist requester
cpf_motorista0String(11)NoDriver's document
cod_viagem0IntegerNoTrip code
responsavel0String(100) NoResponsible for the Checklist
tipo_checklist0String(2)YesRO: Routine, PM: Post-maintenance, PC: Preload, TF: Cold Test
data_validade0Datetime(dd/mm/YYY H:i:s)YesChecklist expiration date
documento_transportador0String(14)YesCarrier document
documento_embarcador0String(14)YesShipper's document
motivo_recusa0String(200)NoReason for refusing the checklist
acessorios0ArrayNoAccessory data list
codigo1IntegerYesAccessory code
instalado1String(1)NoInstalled(Y, N)
funcionando1String(1)NoWorking(Y, N)
problema1String(50)NoProblem description
perifericos0ArrayNoPeripheral data list
codigo1IntegerYesPeripheral code
instalado1String(1)NoInstalled(Y, N)
funcionando1String(1)NoWorking(Y, N)
problema1String(50)NoProblem description

Request to send data


Return in case of success:


Return in case of error:

Send User

Method responsible for registering new Users and update Users.

[POST] http://ip.do.cliente:porta/ws_rest/public/api/usuario

Parameters to be sent to register new user:

  • Sending Authentication in HTTP / HTTPS header.
Parameter Group Type Mandatory Description
login 0 string(20) Yes User Login
senha 0 string(30) Yes User Password
documento_empresa 0 string(30) Yes User Company CPF/CNPJ
codigo_perfil 0 integer No User Profile Code
email 0 string(10) No User Email
pessoa 0 object - Person Data
nome 1 string(10) Yes User Name
documento 1 string(10) Yes User CPF/CNPJ
telefone 1 string(10) No User Phone

Request to send data


Success Response:


Error Examples:

Validation Error:

Parameters to be sent to edit a user:

  • Send Authentication in HTTP / HTTPS header.
Parameter Group Type Mandatory Description
login 0 string(20) Yes User Login
senha 0 string(30) Yes User Password
documento_empresa 0 string(30) Yes User Company CPF/CNPJ
codigo_perfil 0 integer No User Profile Code
email 0 string(10) No User Email
tempoSessaoWeb 0 integer No
ativoPrestor 0 string(1) No Active Prestador
ativoEC 0 string(1) No Active EC
pessoa 0 object - Person Data
nome 1 string(50) Name
documento 1 string(14) Yes User CPF/CNPJ
id 1 integer No
status 1 integer No Status
planoGr 1 integer No Plano GR
cpf 1 string(14) No CPF
cnpj 1 string(18) No CNPJ
rg 1 string(20) No RG
orgaoEmissor 1 string(10) No Issuing Agency
estadoEmissorRg 1 integer No RG Issuing State
sexo 1 integer No Gender
dataNascimento 1 date (01/01/2000) No Birth Date
dataAdmissao 1 date (01/01/2000) No Admission Date
telefone 1 string(30) No Phone
email 1 string(255) No Email
nomeMae 1 string(100) No Mother's Name
nomePai 1 string(100) No Father's Name
empresa 1 integer No Company
perfil 1 integer No Profile
grupoVisualizacao 1 integer No Visualization Group
ativoPrestor 1 string(1) No Active Prestor
ativoEC 1 string(1) No Active EC
identificadorEC 1 string(9) No EC Identifier
tabelaEventosTipoOperacao_length 1 integer No Length of Event Type Operation Table
tabelaEventosOperador_length 1 integer No Length of Operator Event Table
tabelaEventosSupervisor_length 1 integer No Length of Supervisor Event Table

Request to send data


Success Response:


Error Examples:

Validation Error:

Duplicate PGR

[POST] http://ip.of.client:port/ws_rest/public/api/planogr/duplicar

Parameters to be sent:

  • Authentication sent in the HTTP / HTTPS header.
Parameter Type Mandatory Description
pgr Int Yes Main JSON tag
descricao text (100) No Description of PGR

Request for sending PGR data:


Success Response:

Update Shipment

[PUT] http://customer.ip.address:port/ws_rest/public/api/viagem/IdViagem

It has the same parameters as the Send Shipment method. However, the id "IdViagem" must be sent.

It is not allowed to change more than one record at a time, so this information should not be sent within an array..

It is not allowed to change completed shipments, if the shipment is started will only change the Route or Places and the PGR of the shipment, if the shipment is scheduled you can change all fields of the shipment.

Update Shipment Status

[PUT] http://customer.ip.address:port/ws_rest/public/api/viagem/IdViagem

Request to Update SM's/Shipment's Status:

The statuses allowed to change the shipment are: 1 = Effective; 2 = Canceled; 5 = Finished (any other ids will be rejected by the webservice).

It is not allowed to change more than one record at a time, so this information should not be sent within an array.

Update Invoices

[PUT] http://customer.ip.address:port/ws_rest/public/api/viagemnotafiscal/IdNotaFiscal

Invoice Status Request::

The date format must be the same as the example above (any other formats will be rejected by the webservice).

It is not allowed to change more than one record at a time, so this information should not be sent within an array.

Update Route

[PUT] http://customer.ip.address:port/ws_rest/public/api/rota/{route_id}

Parameters to be sent:

  • Authentication Sending in the HTTPS / HTTPS header
  • Fields designated as mandatory will be validated only if they are provided
Parameter Group Type Required Description
rotas 0 Object YES Main JSON Tag
descricao 1 Text (200) NO Route Description
identificador 1 Text (20) NO Route Identifier
documento_dono 1 Text (20) NO Route Owner Document Number
distancia 1 Real NO Route Distance (Mandatory when Coordinates are informed)
coordenadas 1 Text NO Route Polyline in GoogleMaps format
pontos_rota 2 Array NO Route Points
descricao_local 2 Text (200) NO Location Description
tipo_local 2 Integer NO Stop Type (available in Stop Type Parameters)
latitude 2 Text (15) NO Location Latitude
longitude 2 Text (15) NO Location Longitude
logradouro 2 Text (200) NO Location Street
complemento 2 Text (100) NO Street Complement
cep 2 Text (8) NO Location Street ZIP Code
numero 2 Text (50) NO Location Number
bairro 2 Text (100) NO Location Neighborhood
cidade_descricao_ibge 2 Text (100) NO City Description or IBGE Code
sigla_estado 2 Text (2) NO Street State Abbreviation
pais 2 Text (50) NO Country
raio 2 Real NO Radius
velocidade_media 1 Real NO Average Speed
tempo_total_parado 1 Real NO Total Stop Time(min)
tempo_tolerancia_atraso 1 Real NO Delay Tolerance Time(min)
valores_frete 1 Array NO Freight Values
tipo_veiculo 2 Integer YES Vehicle Type
tipo_carroceria 2 Integer YES Bodywork Type
valor_frete_fechado 2 Real NO Closed Freight Value
valor_frete 2 Real NO Freight Value
valor_pedagio 2 Real NO Toll Value
valor_ajudante 2 Real NO Assistant Value
valor_motorista_adicional 2 Real NO Additional Driver Value
valor_fiscais_adicionais 2 Real NO Additional Fiscal Value
valor_km_adicionais 2 Real NO Additional KM Value
It is necessary to inform Latitude and Longitude, otherwise inform all other data for the street detail.

Request to send Route data:


Return in case of Success

Update Carrier

[PUT] http://customer.ip.address:port/ws_rest/public/api/transportador/IdTransportador

It has the same parameters as the Send Carrier method. However, the id "IdTransportador" must be sent.

It is not allowed to change more than one record at a time, so this information should not be sent within an array.

Update Shipper

[PUT] http://customer.ip.address:port/ws_rest/public/api/embarcador/IdEmbarcador

It has the same parameters as the SendShipper method. However, the id "IdEmbarcador" must be sent.

It is not allowed to change more than one record at a time, so this information should not be sent within an array.

Update Driver

[PUT] http://customer.ip.address:port/ws_rest/public/api/motorista/IdMotorista

It has the same parameters as the SendDriver method. However, the id "IdMotorista" must be sent.

It is not allowed to change more than one record at a time, so this information should not be sent within an array.

Update Assistant

[PUT] http://customer.ip.address:port/ws_rest/public/api/ajudante/IdAjudante

It has the same parameters as the SendAssistant method. However, the id "IdAjudante" must be sent.

It is not allowed to change more than one record at a time, so this information should not be sent within an array.

Update Vehicle

[PUT] http://customer.ip.address:port/ws_rest/public/api/veiculo/Placa

It has the same parameters as the SendVehicle method. However, the id "Placa" must be sent.

It is not allowed to change more than one record at a time, so this information should not be sent within an array.

Update Driver Non-Conformity

[PUT] http://customer.ip.address:port/ws_rest/public/api/naoconformidademotorista/Non-ConformityCode

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
Parameter Group Type Required Description
doc_cliente_suspensao 0 string YES CNPJ/CPF company generating the suspension.
cpf_motorista 0 string YES Driver's CPF for the suspension.
situacao 0 string NO non-Conformity status, wich can be: "BLOQUEADO", "LIBERADO", "LIBERADO PARA UMA SM"
bloqueado_ate 0 Date/Time NO Deadline for the suspension to be effective. Retroactive dates to the suspension creation date are not allowed. Format: DD/MM/YYYY HH:MM
necessita_liberacao 0 string NO Parameter for driver release, accepting only 3 values: "NAO" (no), "ELEARNING" (e-learning), and "PRESENCIAL" (in-person)
doc_transportador 0 string NO CNPJ/CPF carrier sending the request.
motivo_suspensao 0 Array NO Array of suspension reasons descriptions listed on the web environment
descricao 1 string NO Suspension reason description
observacao 0 string (200) NO Non-Conformity observation.
motivo_interno 0 string (200) NO Non-Conformity internal reason.
codigo_modulo_elearning 0 integer YES E-Learning Module Code (obtained from the GET /moduloelearning method). This field is mandatory if the "necessita_liberacao" tag is filled as "E-LEARNING".

Request to update Driver Non-Conformity data:


Return on Success:

Update E-Learning Modules

[PUT] http://customer.ip.address:port/ws_rest/public/api/moduloselearning/ELearningModuleCode

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
Parameter Group Type Required Description
nome_modulo 0 string YES E-Learning Module name.
status 0 string YES E-Learning Module status, accepting values "ATIVO" (active) or "INATIVO" (inactive).

Request to update E-Learning Modules:


Return on Success:

Update Terminals

[POST] http://client.ip:port/ws_rest/public/api/terminais

Parameters to be sent:

  • Sending Authentication in the HTTP / HTTPS header.
Parameter Group Type Mandatory Description
Array of objects 0 Array Yes Array of terminal objects
terminal 1 Object Yes Terminal object
codigo 2 int4 Yes* Terminal code in the Trafegus database;
Mandatory if the "number" and "version_code" fields are not entered
numero 2 varchar(30) Yes* Terminal number on the Trafegus base;
Mandatory if the "code" field is not provided
codigo_versao 2 int4 Yes* Technology version code in the Trafegus database;
Mandatory if the "code" field is not provided
ativo 2 varchar(1) Yes Active/inactive information to be updated on the terminal. Accepts "Y" or "N" regardless of upper or lower case

Request for terminal activation/inactivation:


Return in case of success:


Return in case of Error:


Return in case of Success/Error:

Search Vehicle Position

Returns Positions information.

To query the positions of a specific vehicle, the following parameters must be entered in the URL:
Parameter Type Required Description
IdPosicao: integer Yes Id (id) of the last position received (to fetch the ones after this id).
Documento text No Vehicle Carrier Document
Documento list(array) No Vehicle Carrier Document. Limit of 10 documents
DocumentosProp list(array) No Vehicle Owner Document. Limit of 10 documents
Placa: text No Vehicle License Plate
Placas: list(array) No Vehicle License Plates. Limit of 30 Plates.
Qtde: integer No Amount of record to be received (maximum 1000 if not entered maximum by default is 1000).
CodViag: integer No Shipment ID
DataCadastroI: date No Start Date (DD / MM / YYYY format) for registration period filter.
DataCadastroF: date No End Date (DD / MM / YYYY format) for registration period filter.
SomenteUltimaPosicao: integer No Search only the last position of the vehicle(s). (0 no, 1 yes)
Example to query data:

[GET] http://customer.ip.address:port/ws_rest/public/api/posicaoVeiculo?IdPosicao=999&Placa=ABC1234&DataCadastroI=01/05/2019&DataCadastroF=31/05/2019

Example to query the positions of a specific vehicle:

[GET] http://customer.ip.address:port/ws_rest/public/api/posicaoVeiculo?IdPosicao=999&Placa=ABC1234

Example to query the positions of all vehicles:

[GET] http://customer.ip.address:port/ws_rest/public/api/posicaoVeiculo?IdPosicao=999

NOTE

It's highly recommended to insert the period filter.

JSON Return:

Search Terminal Position

Returns Positions information

Parameters to be informed in the query:
ParameterRequiredDescription
IdPosicao:YESId of the last location received (to fetch the ones after this id).
DocumentoYESVehicle Carrier CNPJ
NumeroTerminalNODevice Number
TecnologiaNODevice Telematic
Qtde:NOAmount of Record to Be Received (maximum 1000 if not entered maximum by default is 1000).
CodViag:NOShipment ID.
Example for querying the positions of a specific terminal:

[GET] http://customer.ip.address:port/ws_rest/public/api/posicaoVeiculo?IdPosicao=01&NumeroTerminal=ONX0001&Tecnologia=ONIXSAT

Example to query the positions of all terminals:

[GET] http://customer.ip.address:port/ws_rest/public/api/posicaoVeiculo?IdPosicao=999

JSON Return

Search Last Vehicle Position

Returns Positions information

To query the positions of a specific vehicle, the following parameters must be entered in the URL:
ParameterRequiredDescription
IdPosicao:YESId (id) of The Last Position Received (to fetch the ones after this id).
DocumentoYESVehicle Carrier CNPJ
Placa:NOVehicle License Plate
Qtde:NOAmount of Record to Be Received (maximum 1000 if not entered maximum by default is 1000).
CodViag:NOShipment ID.
Example to query the positions of a specific vehicle:

[GET] http://customer.ip.address:port/ws_rest/public/api/ultimaPosicaoVeiculo?IdPosicao=999&Placa=ABC1234

Example to query the positions of all vehicles:

[GET] http://customer.ip.address:port/ws_rest/public/api/ultimaPosicaoVeiculo?IdPosicao=999

JSON Return

Search Last Terminal Position

Returns Positions information

Parameters to be informed in the query:
ParameterRequiredDescription
IdPosicao:YESId of The Last Position Received (to fetch the ones after this id).
DocumentoYESVehicle Carrier CNPJ
NumeroTerminalNOTerminal Number That is Positioning
TecnologiaNODevice Telematic
Qtde:NOAmount of Record To Be Received (maximum 1000 if not entered maximum by default is 1000).
CodViag:NOShipment ID.
Example for querying the positions of a specific terminal:

[GET] http://customer.ip.address:port/ws_rest/public/api/ultimaPosicaoVeiculo?IdPosicao=01&NumeroTerminal=ONX0001&Tecnologia=ONIXSAT

Example to query the positions of all terminals:

[GET] http://customer.ip.address:port/ws_rest/public/api/ultimaPosicaoVeiculo?IdPosicao=999

JSON Return

Search last peripheral receive [GET]

Return the last peripherals values

Parameters to be informed in the query:
Parameter Required Description
Documento NO CPF/CNPJ Carrier of the vehicle (if traveling) or owner (not traveling)
Placa NO Vehicle plate
Qtde NO Number of records to be returned
GrupoVisualizacao NO Optional filter to apply or not a filter per vehicle display group. Values 1= Apply Group. 0 = Do not apply. If this parameter is not entered, the visualization group filter will not be applied.
PerifericosPadroes NO Optional filter in list format (array) to define which peripherals you want to return
UltCodigo NO Code of the last record inserted (to search for records after this code).
Example to query the positions of all available registers:

[GET] http://ip.do.cliente:porta/ws_rest/public/api/ultimoperiferico

Example for querying the positions of a specific filter:

[GET] http://ip.do.cliente:porta/ws_rest/public/api/ultimoperiferico?Documento=111&PerifericosPadroes=[11,23,65]&Qtde=100&GrupoVisualizacao=1

JSON Return

Search Alerts

Method to returns information about the vehicles tracking sensors.

For querying tracking sensors data of an specific vehicle must be informed the following parameter in the URL:
ParameterRequiredDescription
Placa:YESTractor Unit Plate.
UltCodigo:YESId of the last record received (to fetch the records after this id in the next request).
PlacaCarreta:NOCart Plate
NroTerminal:NOTracker ID
Perifericos:NOArray of default alerts IDs (obtained in the method BuscaListaPerifericoPadrao);
DataCadastroI:NOInitial Date (format DD/MM/YYYY)for filtering the period of the alerts registration.
DataCadastroF:NOFinal date (format DD/MM/YYYY) for filtering the period of the alerts registration.
Example for querying data of an specific vehicle:

[GET] http://ip.do.client:porta/ws_rest/public/api/periferico?UltCodigo=100&Placa=ABC1234

Example for querying data of an specific vehicle, with filters by alerts, cart plate, tracker ID placa de carreta, and period:

[GET] http://ip.do.client:porta/ws_rest/public/api/periferico?UltCodigo=100&Placa=ABC1234&PlacaCarreta=CAR2323&NroTerminal=188212&Perifericos=[20,25,31]&DataCadastroI=01/02/2021&DataCadastroF=02/02/2021

Notes
  • It's highly recommended to insert the period filter.
  • The method will return up to 500 records in each request.
  • The vehicle plate filled in the query param, must belong to user the View Group (user authenticated in the WS). Otherwiser, no information will be returned.
  • The query will return from a maximum of 7 days prior to the current date of the request.

JSON Response

SearchDefaultAlertsList

Method to return the default alert list pre-registered in the Trafegus system.

For querying the full list of Trafegus default alerts, the following parameters can be informed optionally in the URL:
ParameterRequiredDescription
Codigo:NOTrafegus default alert ID.
Descricao:NODefault alert description.
Example for querying the full list of Trafegus default alerts:

[GET] http://ip.do.cliente:porta/ws_rest/public/api/eventoperifericopadrao

Example for querying an specfic default alert, by ID:

[GET] http://ip.do.cliente:porta/ws_rest/public/api/eventoperifericopadrao?codigo=32

JSON Response

Search Telematics Versions

Returns Information about Telematics Versions

Parameters to Be Informed in The Query:
ParameterRequiredDescription
TecnologiaNOTelematic Description
Example to query the versions of a specific telematic:

[GET] http://customer.ip.address:port/ws_rest/public/api/versaoTecnologia?Tecnologia=ONIXSAT

Example for querying data from all telematic versions:

[GET] http://customer.ip.address:port/ws_rest/public/api/versaoTecnologia

JSON Return

Search Route

Returns information about Consumer User Company Routes

Parameters to Be Informed in The Query:
ParameterRequiredDescription
UltCodigoNOLast Route ID Received (to fetch the ones after this id).
RotaCodigoNORoute ID
valores_freteNOAdd route freight values
At least one of the mentioned parameters must be passed, if the search is batch (UltCodigo) the batch is limited to 100 records.
Example to query the data of a specific Route:

[GET] http://customer.ip.address:port/ws_rest/public/api/rota?RotaCodigo=123

Example to query a route batch (100 Register):

[GET] http://customer.ip.address:port/ws_rest/public/api/rota?UltCodigo=1

Example to return freight values ​​data for route

[GET] http://ip.do.cliente:porta/ws_rest/public/api/rota?valores_frete=S

JSON Return

Search Events

Returns information about events generated on the Trafegus system.

Parameters to be informed in the query:
ParameterRequiredDescription
UltCodigoYESLast event id Received (to fetch the ones after this id).
PlacaNOVehicle License Plate
CodViagNOShipment ID
tipoEventoNOThe code of some event type
Example to query the data of a specific Plate or Shipment:

[GET] http://customer.ip.address:port/ws_rest/public/api/eventos?UltCodigo=1&Placa=PLA0001&CodViag=141

Example to query a event batch (100 Register):

[GET] http://customer.ip.address:port/ws_rest/public/api/eventos?UltCodigo=1

Example to query data by event type, being able to enter up to 20 integers:

[GET] http://costumer.ip.adress/ws_rest/public/api/eventos?UltCodigo=1&tipoEvento=[32, 18]

JSON Return

Search Non-Conformity

Returns information about the Non-Conformity generated in the Trafegus system

Parameters to be informed in the query:
ParameterRequiredDescription
UltCodigoYESLast Non-Conformity ID Received (to fetch later registers than this id).
PlacaNOVehicle License Plate
CodViagNOShipment ID
Example to query the data of a specific Plate or Shipment:

[GET] http://customer.ip.address:port/ws_rest/public/api/naoconformidades?UltCodigo=1&Placa=PLA0001&CodViag=141

Example to query a Non-Conformity batch (100 Register):

[GET] http://customer.ip.address:port/ws_rest/public/api/naoconformidades?UltCodigo=1

JSON Return

Search Tracking Stations

Return Tracking Station(s) Information

Example to query tracking stations:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/estacaoRastreamento

JSON Return

Search Research

Returns Research(s) Information

Parameters to be informed in the query:
ParameterRequiredDescription
UltCodigoYESLast Research id Received (to fetch the ones after this id).
DocumentoNOResearch Owner Document
ObjetoNOResearch Object (License Plate/ID(CPF)/CNPJ)
To search for a specific Object you must also enter the Research Owner Document
Example for querying Research data

[GET] http://customer.ip.address:port/ws_rest/public/api/historico-pesquisa?UltCodigo=1

JSON Return

Search Logistics Data

Returns fleet data information

Required:
To view shipments by a specific carrier, add the carrier document at the URL:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/frota?Documento=08879885554

You need to enter the search filter type (UPOS = Last Position / INI = Shipment Start Date / END = Shipment End Date):

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/frota?Tipo=UPOS

Need to enter the Research start and end date (dd / mm / yyyy hh: nn: ss):

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/frota?DataInicio=01/01/2019 00:00:00&DataFim=02/01/2019 00:00:00

Example of searching with required data:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/frota?Documento=08879885554&Tipo=UPOS&DataInicio=01/01/2019 00:00:00&DataFim=02/01/2019 00:00:00

Optional:
To see a specific shipment, add the shipment id at the URL:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/frota?CodViag=123456

To query a specific License Plate, add the License Plate at the URL:

Ex: [GET] http://customer.ip.address:port/ws_rest/public/api/frota?Placa=PLA0001

JSON Return

Send Research TrafegusCAD

[POST] http://customer.ip.address:port/ws_rest/public/api/v1/pesquisa

Parameters to be sent:

  • Sending Authentication in HTTP / HTTPS header.
ParameterGroupType RequiredDescription
TipoObjeto1Text (2)YESSearch Object Type (available in the documentation on the Search Object Type)
Documento1Text (50)YESResearch Owner Carrier Document
Objeto1Text (50)YESResearch Object (License Plate / ID(CPF) / CNPJ)
Renovacao1Text (1)YESResearch Renewal (Y / N)

Request to Submit Research Data:


Search Research TrafegusCad

Returns Research(s) Information

Parameters to be informed in the query: <
ParameterRequiredDescription
TipoYESSearch Object Type (available in the documentation on the Search Object Type)
DocumentoYESResearch Owner Document
ObjetoYESResearch Object (License Plate/ID(CPF)/CNPJ)
Example for querying Research data

[GET] http://customer.ip.address:port/ws_rest/public/api/consulta?UltCodigo=1

JSON Return

Search Place Status

Returns Information about the Place Status.

Parameters to be informed in the query:
ParameterRequiredDescription
localNOPlace Code
viagemNOShipment ID
Example to query data

[GET] http://customer.ip.address:port/ws_rest/public/api/baixalocal?UltCodigo=1

JSON Return

Search Driver Non-Conformity

Returns information about the Driver Non-Conformity generated in the Trafegus system

Parameters to be informed in the query:
ParameterRequiredDescription
ultimoCodigoNOLast Driver Non-Conformity ID Received (to fetch later registers than this id).
cpfMotoristaNODriver's CPF Document
documentoClienteSupensaoNOSuspension Client CPF/CNPJ Document
documentoTransportadorNOCarrier CNPJ Document
Example to query Driver Non-Conformity data in batches of 1000 records:

[GET] http://customer.ip.address:port/ws_rest/public/api/naoconformidademotorista?UltCodigo=1

JSON Return

Search E-Learning Modules

Returns information about the E-Learning Modules generated in the Trafegus system

Example to query E-Learning Modules:

[GET] http://customer.ip.address:port/ws_rest/public/api/moduloselearning

JSON Return

Search CheckList

Return CheckList(s) information

Parameters to be informed in the query:
ParameterRequiredDescription
UltCodigoYESLast Code to Be Send
DataCadastroINOInitial Registration Date
DataCadastroFNOFinal Registration Date
veiculoNOVehicle Code
BuscarAlteracoesNOInstead of Filtering by CheckList Code, Filters by Change Code
IncluirDetalhesNOReturns CheckList and Terminal Items
Example to query data

[GET] http://customer.ip.address:port/ws_rest/public/api/checkList

JSON Return

Search System Records

Returns System Logs Information

Query Filters:
Parameter Required Description
sessao NO Session Code
chave NO Key Code
limit NO Maximum number of records to List
offset NO Records offset from the first
Example to query data

[GET] http://customer.ip.address:port/ws_rest/public/api/sistemaregistro

JSON Return

Search MacrosMensagens

Fetches the Macros and Mensagens Livres sent by the terminal.

Query Filters:
Parameter Required Description
numero_terminal Yes¹ Terminal number
versao_tecnologia Yes² Version code of the terminal's telematic
tecnologia Yes² Name of the terminal's telematic
terminais Yes¹ Array for filtering by multiple terminals and telematics, in the format:
[["terminal_number_1", "telematic_1"], ["terminal_number_2", "telematic_2"], ["terminal_number_n", "telematic_n"]]
documento_proprietario Yes³ If provided, only macros sent by vehicles whose owner matches the specified document (the document can be either a CPF or CNPJ)
texto No If this parameter is provided, it will return macros that contain the specified text (matches the 'texto' field, not the 'descrição' field)
data_ultima_posicao No If this parameter is provided, only macros sent after this date will be returned (format yyyy-mm-dd hh:mm:ss)
codigo_ultima_posicao No If provided, only macros sent after the macro with this code will be returned
tipo_informacao No If provided, only messages of the specified type (MACRO or MENSAGEM) will be returned. If this filter is not provided, both MACRO and MENSAGEM information will be returned.
placa No If provided, only messages sent by the vehicle corresponding to the specified plate will be returned.
limit No Maximum number of records to be returned
offset No Starting record to be returned
¹ - It is mandatory to provide either the terminal and technology list or the terminal number
² - It is mandatory to provide either the technology name or the technology version code, if the terminal array is not provided
³ - It is mandatory to provide the owner's document if the terminal array, technology name, or technology version code is not provided
                    
Request Example

Ex: [GET] http://ip.do.cliente:porta/ws_rest/public/api/macro?numero_terminal=12345&versao_tecnologia=36&limit=100

Response

A list of objects in the following format

  • número: Macro number
  • texto: Macro text
  • data_computador_bordo: Date the macro was sent (format yyyy-mm-dd hh:mm:ss)
  • latitude: Macro latitude (in decimal format)
  • longitude: Macro longitude (in decimal format)
  • descricao: Macro description
  • mascara: Macro mask
  • numero_terminal: Terminal number
  • versao_tecnologia: Telematic version of the terminal
  • tecnologia: Telematic name of the terminal
  • localizacao: Description of the location or proximity at the time the message or macro was sent
  • placa: Vehicle plate description associated with the message/macro tracker
  • frota: Fleet description of the vehicle associated with the message/macro tracker
  • hodometro: Odometer according to the last received position of the tracker
  • motorista: Driver name associated with the message
  • cpf_motorista: Driver's CPF associated with the message

JSON Response

SearchTerminals

Returns a list of terminals according to the filters used in the request.

To perform a terminal query, simply consult the url:

Ex1: [GET] http://client.ip:port/ws_rest/public/api/terminais

Or use the parameters of your choice in the url:

Ex2: [GET] http://client.ip:port/ws_rest/public/api/terminais?ultCodigo=1360&descricao_tecnologia=descExemplo&ativo=s&codigo=100524&numero=ABC123&codigo_versao=6724&codigo_tecnologia=1

Parameter Mandatory Description
ultCodigo No Last code returned, to consult from this code forward. Request is limited to 1000 return records.
codigo No Terminal code in the Trafegus database.
numero No Terminal number in the Trafegus base.
codigo_versao No Technology version code in the Trafegus database.
codigo_tecnologia No Technology code in the Trafegus database.
descricao_tecnologia No Description of the technology in the Trafegus base, the The search will be carried out in such a way that the description of the technology contains the description informed in the parameter, without considering capital letters or lowercase.
ativo No Terminal status in the Trafegus base. Accepts "Y" or "N" without considering upper or lower case.

JSON Success Return

Search Data Overnight

Returns driver overnight information.

Parameter Required Description
data_inicio YES Start date of driver point.
data_fim YES End date of driver point.
cpf_motorista NO Driver's CPF.
doc_transportador NO Transporter CPF/CNPJ.
placa NO Vehicle plate.
To consult a specific driver, add the driver's CPF in the URL:

Ex: [GET] http://ip.do.cliente:porta/ws_rest/public/api/BuscarDadosPernoite?cpf_motorista=00000000000

To consult a specific vehicle, add the vehicle's plate to the URL:

Ex: [GET] http://ip.do.cliente:porta/ws_rest/public/api/BuscarDadosPernoite?placa=MTG1234

To consult a specific transporter, add the transporter's document to the URL:

Ex: [GET] http://ip.do.cliente:porta/ws_rest/public/api/BuscarDadosPernoite?doc_transportador=00000000000100

JSON Response

Search Concreserv Invoice Data

Returns data from an invoice, the data returned comes from an external API.

The search only refers to an invoice, informing the invoice key:

Ex: [GET] http://ip.do.cliente:porta/ws_rest/public/api/consultadadosnf/123456

Successful JSON return



Returns in case of error or invoice not found

Place Type

Location type to associate with the Carrier, used in the tipo_local parameter

Parameters to be sent

CodeDescription
1RISK AREA
2ALLOWED POINT
3PROHIBITED POINT
4ORIGIN
5DESTINATION
6DELIVERY
7COLLECT
8SAFE PLACE
9CRITICAL AREA
14CUSTOMS

Break Type

Stop type used at shipment locations, referenced in tipo_parada parameter

Parameters to be sent

CodeDescription
1STOP
2COLLECT
3DELIVERY
4ORIGIN
5DESTINATION
6MEAL
7OVERNIGHT STAY
8PASSAGE
9CUSTOMS
10MATRIX
11MAINTENANCE
12SUPPLY
13SUPERVISION
14POLICE
15FERRY
16PORT
17Custom Waypoint
18Invoice Exchange

Vehicle Type

Vehicle Type Used in Vehicle Registration

Parameters to be sent

CodeDescription
1Cart
2Tractor Unit
3TRUCK
4Motorcycle
5LOAD UTILITY
6UTILITY TOUR

Search Provider

Constants Used for Research Providers

CodeDescription
1OTNET
2CENTURY
3TRAFEGUS PESQUISA
4TELECONSULT (BUONNY)
5PROTEGEGR
6GSAT
7GLOBAL5
9TRUST
10GUEP
11PAMCARY
12SAFETY
13ULTRACAD
14REPENSE
8OTHERS / NOT INTEGRATED

Search Status

Constants used for Search Status

CodeDescription
INACCORDING TO INSURANCE RULES
NIDISAGREEING WITH INSURANCE RULES
PEIN RESEARCH
DIINCONSISTENT DATA
BLOBJECT BELONGS TO MANAGER BLACKList

Search Object Type

Constants Used for Search Object Types

CodeDescription
MODRIVER
VCREEL VEHICLE
VMMOTOR VEHICLE
TRCARRIER
AJASSISTANT

Shipment Transportation Type

Constants Used for Shipment Types of Transportation

CodeDescription
1TRANSFER
2DISTRIBUTION
3RAW MATERIAL
4MIXED
5REGRESS
6NATIONAL
7EXPORT
8IMPORT
9CIRCUIT