Creates a toll voucher purchase by submitting the required data for asynchronous processing.
The request includes identification, carrier, driver, route, amount, notes, vehicle, and tag information.
Once received, the system starts processing and returns a GUID for tracking.
Endpoint
POST /valePedagio/comprar/{enterpriseId}
Request Body
Refer to the schema documentation for full details.
Example:
{
"ide": {
"cnpj": "12345678901234",
"numero": "123456",
"serie": "1",
"ptEmissor": "Ponto Emissor XPTO",
"dataFinal": "2025-02-15",
"tipoPagamento": 1
},
"transp": {
"rntrc": "123456789",
"cpfCnpjTransportador": "12345678901234",
"cadastro": {
"nomeRazao": "Transportadora TAC Exemplo SA",
"tipo": 1,
"dataNascimento": "1980-05-10",
"identidade": "MG1234567"
}
},
"condutor": {
"cpf": "12345678901",
"nomeCompleto": "Condutor Exemplo"
},
"infRota": {
"categoriaPedagio": 2,
"rota": "Rota SP-RJ",
"informacoes": {
"tipo": 1,
"utilizarRoteirizador": true,
"pontosParada": [
{
"CEP": "12345678"
},
{
"codigoIBGE": 1234567
},
{
"latitude": "-25.09492",
"longitude": "-50.16311"
}
]
}
},
"observacao": "Observações gerais sobre a operação de vale-pedágio.",
"veiculo": {
"placa": "ABC1234",
"cadastro": {
"modelo": "VW 19.320",
"RNTRCTransportador": 987654321
}
},
"infTag": {
"codigoFornecedor": 2,
"codigoTagAtivacao": "TAG1234567"
}
}
Layout
valePedagio
Root object for the toll voucher purchase payload.
ide (Identification)
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
cnpj |
string(14) |
Yes |
Contractor CNPJ (14 digits) |
|
numero |
string |
Yes |
Toll voucher operation identifier |
|
serie |
string |
Yes |
Operation series |
|
ptEmissor |
string(30) |
Yes |
Issuing point responsible for the operation (1–30) |
|
dataFinal |
date/string |
No |
End date (YYYY-MM-DD). Defaults to +30 days if not provided |
|
tipoPagamento |
number |
No |
|
transp (Carrier)
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
rntrc |
number(9) |
Yes |
Carrier RNTRC |
|
cpfCnpjTransportador |
string(14) |
Yes |
Carrier CNPJ (14 digits) |
cadastro (Registration)
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
nomeRazao |
string(150) |
Yes |
Full name or company name (1–150) |
|
tipo |
number |
Yes |
|
dadosPF (Individual – TAC only)
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
dataNascimento |
date |
Yes (if TAC) |
Date of birth (YYYY-MM-DD) |
|
identidade |
string(20) |
Yes (if TAC) |
ID number (no formatting) |
condutor (Driver)
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
cpf |
number(11) |
Yes |
Driver CPF (11 digits) |
|
nomeCompleto |
string(150) |
Yes |
Full name (1–150) |
infRota (Route Information)
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
categoriaPedagio |
number |
Yes |
Toll category (0–16, ANTT table) |
|
rota |
string(30) |
Yes |
Route name in ERP/TMS (1–30) |
informacoes (Route Settings)
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
tipoRotaPadrao |
number |
No |
|
|
utilizarRoteirizador |
number |
No |
|
|
pontosParada |
array |
Yes |
List of stop points |
parada (Stop Points)
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
cep |
string(8) |
No |
ZIP code |
|
codigoIBGE |
number(7) |
No |
IBGE code |
|
latlong |
array |
Conditional |
Latitude/longitude pair |
latlong
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
latitude |
string |
No |
Latitude |
|
longitude |
string |
No |
Longitude |
observacao
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
observacao |
string(500) |
No |
Free text displayed in NDVP print |
veiculo (Vehicle)
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
placa |
string(7) |
Yes |
Vehicle plate |
cadastro (Vehicle Registration)
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
modelo |
string(100) |
Yes |
Vehicle model (1–100) |
|
RNTRCTransportador |
number(9) |
Yes |
Carrier RNTRC registered in ANTT |
informacoesTag (Tag Information)
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
codigoFornecedor |
number |
Yes |
|
|
codigoTagAtivacao |
string(30) |
No |
Tag activation code (required for new tags) |
Response
After submitting the request, the API returns a JSON with the processing status and a GUID for tracking.
Success Example
{
"sucesso": true,
"guid": "xxxxxxxxxxxxxxx",
"codigo": "000",
"mensagem": "Batch received for processing."
}
Note
-
sucesso: indicates whether the batch was accepted for processing (true) or rejected (false) -
guid: unique identifier to track the batch processing -
codigo: response code (e.g.,"000"for success) -
mensagem: description of the request result or informational message
Error Example
{
"sucesso": false,
"guid": "",
"codigo": "400",
"mensagem": "Validation error in request parameters."
}
Response Layouts
|
Field |
Type |
Description |
|---|---|---|
|
sucesso |
boolean |
Indicates whether the request was accepted for processing ( |
|
guid |
string |
Unique identifier to track the request |
|
codigo |
string |
Response code (e.g., |
|
mensagem |
string |
Description of the result or additional information |