Know of an official OpenAPI document? Contribute it →
For Agents
Download the fiscal document XMLs tied to an NSU sequence number from SIEG as a ZIP archive.
Use for: Download the XMLs for NSU 1042, Get the next batch of fiscal documents after the last NSU we processed, Retrieve a ZIP of XMLs from SIEG by sequence number, I need to back up fiscal XMLs in NSU order
Not supported: Does not search documents by access key, filter by CNPJ, or issue invoices. Use for downloading fiscal XMLs by NSU sequence number only.
The SIEG Baixar XML por NSU API downloads the fiscal document XMLs associated with an NSU, the sequential number SIEG assigns to stored documents. A request sends a single Nsu value and the response is a ZIP archive containing one or more XMLs. Because NSUs are sequential, a client can walk forward from the last number it processed to collect documents in order.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Baixar XML por NSU, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fsieg.com%2Fbaixar-xml-por-nsu" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fsieg.com%2Fbaixar-xml-por-nsu" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Baixar XML por NSU API.
Download the XMLs associated with an NSU as a single ZIP archive
Step through documents in sequence by incrementing the Nsu value
Detect invalid requests or missing authorisation from the 400 and 401 responses
Patterns agents use Baixar XML por NSU API for, with concrete tasks.
★ Agent that pulls new fiscal documents in sequence
A bookkeeping agent keeps a company's ledger current by importing each new fiscal document once. Through Jentic the agent searches for 'download XML by NSU', loads the baixarXmlPorNsu operation, and sends the next Nsu after the last one it stored, with the SIEG JWT and access key injected at call time. It unpacks the ZIP, records the documents, and moves on to the following NSU.
Call POST /api/v1/baixar-xml/nsu with Nsu 1043, unzip the returned archive, and store each XML before moving to Nsu 1044
Fiscal XML backup
Brazilian companies must keep fiscal XMLs for years, and an NSU-ordered download is a simple way to mirror them to your own storage. Each call returns a ZIP for one NSU, so a backup job can record the highest NSU it has saved and resume from there after an interruption.
Starting from the highest saved NSU, call POST /api/v1/baixar-xml/nsu for each following Nsu and write every ZIP to object storage
Recover a document from its sequence number
When a system logs only the NSU of a document it received, the original XML can still be retrieved. Sending that Nsu returns the ZIP with the associated XMLs, which an accountant or support agent can open without searching by access key.
Call POST /api/v1/baixar-xml/nsu with Nsu 88231 and return the XML files inside the ZIP
1 endpoints — the sieg baixar xml por nsu api downloads the fiscal document xmls associated with an nsu, the sequential number sieg assigns to stored documents.
METHOD
PATH
DESCRIPTION
/api/v1/baixar-xml/nsu
Download XMLs for an NSU as a ZIP
/api/v1/baixar-xml/nsu
Download XMLs for an NSU as a ZIP
This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.
Base layer of spec validity and structural soundness.
Aggregated quality score from linter diagnostics, weighted by severity.
Percentage of `$ref` references that resolve successfully.
Checks whether the API description parses successfully and conforms to its declared specification (e.g., OpenAPI).
Structural correctness score based on schema issues using logarithmic dampening.
Clarity, completeness, and ingestion readiness for developers and tooling.
How richly the API is illustrated with examples.
Percentage of examples that conform to their schemas.
Percentage of operations with complete response definitions (success, client error, server error).
Health of API ingestion, bundling, and resolution within Jentic pipelines.
Semantic breadth, depth, and agent comprehension for AI systems.
Coverage of descriptions across API elements.
Coverage of RFC 9457 Problem Details for error responses.
Coverage, uniqueness, and casing consistency of operationIds for AI inference.
Coverage of summaries across operations/tags/info.
Functional utility, complexity comfort, and AI orchestration readiness.
Agent comfort level based on API operational and structural complexity.
Trust, risk posture, and security compliance.
Average quality of security schemes based on authentication method strength (weakest link for OAuth2).
Findability, semantic richness, and reasoning readiness.
Clarity and depth of descriptions across API elements.
Score it yourself
Every API in the directory is allowlisted, so you can re-score it with no key required.
npx @jentic/api-scorecard-cli score <openapi-url>What agents get from Jentic-routed access to this vendor.
Setup
Wiring Baixar XML por NSU by hand means obtaining a SIEG JWT from a separate authentication endpoint, pairing it with an X-API-Key or X-OAuth-Token header, and handling a ZIP response instead of JSON. Through Jentic you install once, import it from the API Directory, store the credentials once, and your agent calls it.
Permission scoping
Baixar XML por NSU sends the Nsu inside the request body, so rules bound which operations your agent may call, not which sequence numbers. Limit the agent to the operations it needs, such as the NSU download, and keep other SIEG operations out unless you add them.
Credential isolation
Your SIEG JWT and access key are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'download fiscal XMLs by NSU' or 'get the next documents after an NSU', and Jentic returns the matching SIEG operation with its input schema so the agent sends the Nsu correctly.
Alternatives and complements available in the Jentic catalogue.
Specific to using Baixar XML por NSU API through Jentic.
What authentication does the SIEG Baixar XML por NSU API use?
Per its OpenAPI spec, each call needs a JWT sent as an HTTP bearer token plus either an X-API-Key header or an X-OAuth-Token header with a SIEG OAuth 2.0 token. The JWT comes from SIEG's authentication endpoint, which is outside this spec, and a missing or wrong credential returns 401. Through Jentic both credentials are stored by your own instance and attached at call time, so the agent never sees them.
What does the Baixar XML por NSU API return?
A ZIP archive (application/zip) containing the one or more XMLs associated with the Nsu you send. The request body has a single required field, Nsu, a 64-bit integer. Your client or agent needs to unzip the response to read the documents.
What are the rate limits for the SIEG Baixar XML por NSU API?
The OpenAPI spec does not specify rate limits. Check your SIEG plan and the documentation at https://sieg.com for current limits before running a long NSU backfill.
Is there a SIEG Baixar XML por NSU MCP server?
You don't need an MCP server to give your agent Baixar XML por NSU. Jentic connects it directly from the API Directory: import it, store your SIEG JWT and access key once, and your agent calls the NSU download when it needs it, discovered on demand rather than kept in its context.
How do I download XMLs by NSU through Jentic?
Search Jentic for 'download fiscal XMLs by NSU', load the POST /api/v1/baixar-xml/nsu operation, and send the Nsu value. Save the returned ZIP and increment Nsu to fetch the next set. To run it on your own infrastructure, install Jentic One from its GitHub repo.
Can I limit what my agent is allowed to do with the SIEG Baixar XML por NSU API?
Yes, at the operation level. A backup agent can be given a rule that includes only this NSU download, so it can mirror XMLs but cannot reach other SIEG operations, and every call it makes is logged. The Nsu value is sent in the request body, so the rule cannot cap which sequence numbers it requests.
GET STARTED