Endpoint Depreciado - Validar Nota Fiscal
curl --request POST \
--url https://production.api.noodle.cx/external/validate_nf \
--header 'Authorization: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form 'data=<string>' \
--form file='@example-file'import requests
url = "https://production.api.noodle.cx/external/validate_nf"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "data": "<string>" }
headers = {"Authorization": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('data', '<string>');
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
options.body = form;
fetch('https://production.api.noodle.cx/external/validate_nf', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://production.api.noodle.cx/external/validate_nf",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://production.api.noodle.cx/external/validate_nf"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://production.api.noodle.cx/external/validate_nf")
.header("Authorization", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.api.noodle.cx/external/validate_nf")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"valid": true,
"message": "<string>",
"fields": [
{
"valid": true,
"field_name": "total_amount",
"request_value": "1500.5",
"extracted_value": "1500.50",
"confidence_score": 0.99,
"message": "O valor corresponde ao extraído."
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Validacao
Endpoint Depreciado - Validar Nota Fiscal
deprecated
Depreciado: use o endpoint /validate/nf para validar um arquivo de Nota Fiscal (PDF) com os dados fornecidos no formulário.
POST
/
validate_nf
Endpoint Depreciado - Validar Nota Fiscal
curl --request POST \
--url https://production.api.noodle.cx/external/validate_nf \
--header 'Authorization: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form 'data=<string>' \
--form file='@example-file'import requests
url = "https://production.api.noodle.cx/external/validate_nf"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "data": "<string>" }
headers = {"Authorization": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('data', '<string>');
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
options.body = form;
fetch('https://production.api.noodle.cx/external/validate_nf', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://production.api.noodle.cx/external/validate_nf",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://production.api.noodle.cx/external/validate_nf"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://production.api.noodle.cx/external/validate_nf")
.header("Authorization", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.api.noodle.cx/external/validate_nf")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"valid": true,
"message": "<string>",
"fields": [
{
"valid": true,
"field_name": "total_amount",
"request_value": "1500.5",
"extracted_value": "1500.50",
"confidence_score": 0.99,
"message": "O valor corresponde ao extraído."
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
multipart/form-data
Uma string JSON contendo os seguintes campos (todos opcionais):
due_date(Optional): Data de vencimento da Nota Fiscal.- Exemplo:
2025-12-31
- Exemplo:
invoice_date(Optional): Data de emissão da Nota fiscal.- Exemplo:
2025-11-30
- Exemplo:
invoice_id(Optional): Número de identificação da nota fiscal.- Exemplo:
123456
- Exemplo:
receiver_email(Optional): E-mail do sacado (destinatário/comprador).- Exemplo:
comprador@email.com
- Exemplo:
receiver_name(Optional): Nome ou razão social do sacado (destinatário/comprador).- Exemplo:
Empresa Compradora LTDA
- Exemplo:
receiver_tax_id(Optional): CNPJ ou CPF do sacado (destinatário/comprador).- Exemplo:
11.222.333/0001-44
- Exemplo:
supplier_address(Optional): Endereço do cedente (emissor/vendedor).- Exemplo:
Rua Exemplo, 123, São Paulo, SP
- Exemplo:
supplier_name(Optional): Nome ou razão social do cedente (emissor/vendedor).- Exemplo:
Empresa Vendedora S.A.
- Exemplo:
supplier_tax_id(Optional): CNPJ ou CPF do cedente (emissor/vendedor).- Exemplo:
55.666.777/0001-88
- Exemplo:
total_amount(Optional): Valor total da nota fiscal.- Exemplo:
1500.5
- Exemplo:
Arquivo da Nota Fiscal (PDF) para extração e validação dos dados.
Response
Successful Response
Modelo de resposta para a validação da Nota Fiscal.