/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch
curl --request POST \
--url https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"taxDocumentIds": [
"<string>"
],
"filters": {
"status": [],
"type": [
"NFSE"
],
"issuedAtStart": "2023-11-07T05:31:56Z",
"issuedAtEnd": "2023-11-07T05:31:56Z",
"competenceDateStart": "2023-11-07T05:31:56Z",
"competenceDateEnd": "2023-11-07T05:31:56Z",
"rpsNumberStart": 123,
"rpsNumberEnd": 123,
"customerDocument": "<string>",
"customerName": "<string>"
}
}
'import requests
url = "https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch"
payload = {
"taxDocumentIds": ["<string>"],
"filters": {
"status": [],
"type": ["NFSE"],
"issuedAtStart": "2023-11-07T05:31:56Z",
"issuedAtEnd": "2023-11-07T05:31:56Z",
"competenceDateStart": "2023-11-07T05:31:56Z",
"competenceDateEnd": "2023-11-07T05:31:56Z",
"rpsNumberStart": 123,
"rpsNumberEnd": 123,
"customerDocument": "<string>",
"customerName": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
taxDocumentIds: ['<string>'],
filters: {
status: [],
type: ['NFSE'],
issuedAtStart: '2023-11-07T05:31:56Z',
issuedAtEnd: '2023-11-07T05:31:56Z',
competenceDateStart: '2023-11-07T05:31:56Z',
competenceDateEnd: '2023-11-07T05:31:56Z',
rpsNumberStart: 123,
rpsNumberEnd: 123,
customerDocument: '<string>',
customerName: '<string>'
}
})
};
fetch('https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch', 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://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'taxDocumentIds' => [
'<string>'
],
'filters' => [
'status' => [
],
'type' => [
'NFSE'
],
'issuedAtStart' => '2023-11-07T05:31:56Z',
'issuedAtEnd' => '2023-11-07T05:31:56Z',
'competenceDateStart' => '2023-11-07T05:31:56Z',
'competenceDateEnd' => '2023-11-07T05:31:56Z',
'rpsNumberStart' => 123,
'rpsNumberEnd' => 123,
'customerDocument' => '<string>',
'customerName' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch"
payload := strings.NewReader("{\n \"taxDocumentIds\": [\n \"<string>\"\n ],\n \"filters\": {\n \"status\": [],\n \"type\": [\n \"NFSE\"\n ],\n \"issuedAtStart\": \"2023-11-07T05:31:56Z\",\n \"issuedAtEnd\": \"2023-11-07T05:31:56Z\",\n \"competenceDateStart\": \"2023-11-07T05:31:56Z\",\n \"competenceDateEnd\": \"2023-11-07T05:31:56Z\",\n \"rpsNumberStart\": 123,\n \"rpsNumberEnd\": 123,\n \"customerDocument\": \"<string>\",\n \"customerName\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"taxDocumentIds\": [\n \"<string>\"\n ],\n \"filters\": {\n \"status\": [],\n \"type\": [\n \"NFSE\"\n ],\n \"issuedAtStart\": \"2023-11-07T05:31:56Z\",\n \"issuedAtEnd\": \"2023-11-07T05:31:56Z\",\n \"competenceDateStart\": \"2023-11-07T05:31:56Z\",\n \"competenceDateEnd\": \"2023-11-07T05:31:56Z\",\n \"rpsNumberStart\": 123,\n \"rpsNumberEnd\": 123,\n \"customerDocument\": \"<string>\",\n \"customerName\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"taxDocumentIds\": [\n \"<string>\"\n ],\n \"filters\": {\n \"status\": [],\n \"type\": [\n \"NFSE\"\n ],\n \"issuedAtStart\": \"2023-11-07T05:31:56Z\",\n \"issuedAtEnd\": \"2023-11-07T05:31:56Z\",\n \"competenceDateStart\": \"2023-11-07T05:31:56Z\",\n \"competenceDateEnd\": \"2023-11-07T05:31:56Z\",\n \"rpsNumberStart\": 123,\n \"rpsNumberEnd\": 123,\n \"customerDocument\": \"<string>\",\n \"customerName\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"fileName": "<string>",
"url": "<string>",
"expiresInSeconds": 123,
"total": 123,
"included": 123,
"missing": [
{
"taxDocumentId": "<string>",
"reason": "NOT_FOUND",
"nfseNumber": "<string>",
"rpsNumber": "<string>",
"status": "<string>"
}
]
}Tax Documents (NFSe)
/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch
POST
/
realms
/
{realmId}
/
organizations
/
{organizationId}
/
tax-document
/
download-batch
/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch
curl --request POST \
--url https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"taxDocumentIds": [
"<string>"
],
"filters": {
"status": [],
"type": [
"NFSE"
],
"issuedAtStart": "2023-11-07T05:31:56Z",
"issuedAtEnd": "2023-11-07T05:31:56Z",
"competenceDateStart": "2023-11-07T05:31:56Z",
"competenceDateEnd": "2023-11-07T05:31:56Z",
"rpsNumberStart": 123,
"rpsNumberEnd": 123,
"customerDocument": "<string>",
"customerName": "<string>"
}
}
'import requests
url = "https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch"
payload = {
"taxDocumentIds": ["<string>"],
"filters": {
"status": [],
"type": ["NFSE"],
"issuedAtStart": "2023-11-07T05:31:56Z",
"issuedAtEnd": "2023-11-07T05:31:56Z",
"competenceDateStart": "2023-11-07T05:31:56Z",
"competenceDateEnd": "2023-11-07T05:31:56Z",
"rpsNumberStart": 123,
"rpsNumberEnd": 123,
"customerDocument": "<string>",
"customerName": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
taxDocumentIds: ['<string>'],
filters: {
status: [],
type: ['NFSE'],
issuedAtStart: '2023-11-07T05:31:56Z',
issuedAtEnd: '2023-11-07T05:31:56Z',
competenceDateStart: '2023-11-07T05:31:56Z',
competenceDateEnd: '2023-11-07T05:31:56Z',
rpsNumberStart: 123,
rpsNumberEnd: 123,
customerDocument: '<string>',
customerName: '<string>'
}
})
};
fetch('https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch', 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://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'taxDocumentIds' => [
'<string>'
],
'filters' => [
'status' => [
],
'type' => [
'NFSE'
],
'issuedAtStart' => '2023-11-07T05:31:56Z',
'issuedAtEnd' => '2023-11-07T05:31:56Z',
'competenceDateStart' => '2023-11-07T05:31:56Z',
'competenceDateEnd' => '2023-11-07T05:31:56Z',
'rpsNumberStart' => 123,
'rpsNumberEnd' => 123,
'customerDocument' => '<string>',
'customerName' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch"
payload := strings.NewReader("{\n \"taxDocumentIds\": [\n \"<string>\"\n ],\n \"filters\": {\n \"status\": [],\n \"type\": [\n \"NFSE\"\n ],\n \"issuedAtStart\": \"2023-11-07T05:31:56Z\",\n \"issuedAtEnd\": \"2023-11-07T05:31:56Z\",\n \"competenceDateStart\": \"2023-11-07T05:31:56Z\",\n \"competenceDateEnd\": \"2023-11-07T05:31:56Z\",\n \"rpsNumberStart\": 123,\n \"rpsNumberEnd\": 123,\n \"customerDocument\": \"<string>\",\n \"customerName\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"taxDocumentIds\": [\n \"<string>\"\n ],\n \"filters\": {\n \"status\": [],\n \"type\": [\n \"NFSE\"\n ],\n \"issuedAtStart\": \"2023-11-07T05:31:56Z\",\n \"issuedAtEnd\": \"2023-11-07T05:31:56Z\",\n \"competenceDateStart\": \"2023-11-07T05:31:56Z\",\n \"competenceDateEnd\": \"2023-11-07T05:31:56Z\",\n \"rpsNumberStart\": 123,\n \"rpsNumberEnd\": 123,\n \"customerDocument\": \"<string>\",\n \"customerName\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.accounting.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/tax-document/download-batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"taxDocumentIds\": [\n \"<string>\"\n ],\n \"filters\": {\n \"status\": [],\n \"type\": [\n \"NFSE\"\n ],\n \"issuedAtStart\": \"2023-11-07T05:31:56Z\",\n \"issuedAtEnd\": \"2023-11-07T05:31:56Z\",\n \"competenceDateStart\": \"2023-11-07T05:31:56Z\",\n \"competenceDateEnd\": \"2023-11-07T05:31:56Z\",\n \"rpsNumberStart\": 123,\n \"rpsNumberEnd\": 123,\n \"customerDocument\": \"<string>\",\n \"customerName\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"fileName": "<string>",
"url": "<string>",
"expiresInSeconds": 123,
"total": 123,
"included": 123,
"missing": [
{
"taxDocumentId": "<string>",
"reason": "NOT_FOUND",
"nfseNumber": "<string>",
"rpsNumber": "<string>",
"status": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
200 - application/json
Successful response
Suggested name of the zip (also signed into the URL's Content-Disposition).
Presigned S3 GET of the zip; expires — see expiresInSeconds.
Documents the request resolved to (matched by filter, or requested by id).
Files actually inside the zip.
Everything requested/matched that is NOT in the zip, and why. Also listed in the zip's manifest.csv.
Show child attributes
Show child attributes