The Spanish version is the authoritative reference. View in Spanish
GetDocument
Queries the status and metadata of a document registered on the Gosocket platform for Brazil.
Endpoint
https://developers-sbx.gosocket.net/api/v1/Document/GetDocumenthttps://developers.gosocket.net/api/v1/Document/GetDocumentMethod: POST
- The maximum period between
DateFromandDateTois 1 month. - Year ranges that span different years are not allowed (e.g. December to January is not valid).
Input parameters
Response parameters
The response contains three root fields: Documents (array of found documents), ContinuationToken (opaque pagination token — pass as-is in the next request; null if there are no more results) and Description (e.g. "Cantidad de documentos encontrados 5").
Each object in Documents contains:
AuthorityStatus values
| Code | Status | Corresponding NDD Notes.Code |
|---|---|---|
0 | To be sent | — |
1 | Sent | — |
2 | Authorized | NF-e/CT-e/MDF-e: "100" (on time) or "150" (fora de prazo) — NFS-e: "45" |
3 | Rejected | "225", "228", "745", "999" or other SEFAZ cStat |
4 | Voided | — |
5 | Error | — |
6 | Unresolved | — |
7 | Voided (Inutilizado) | — |
8 | Denied | — |
Examples
{
"Country": "br",
"SenderCode": "00000000000100",
"DateFrom": "2026-06-01",
"DateTo": "2026-06-30",
"DocumentTypeId": "55",
"ResultMaxItemCount": 10,
"GlobalDocumentId": ""
}Notes
The fiscal status is not a top-level field — it lives inside the DocumentTags array as the object whose Code is "AuthorityStatus". The Value field contains the numeric code (single digit: "2", "3", etc.).
Status "2" (Authorized) can originate from Notes.Code: "100" (on time) or "150" (fora de prazo) — both produce the same AuthorityStatus.
Status "6" (Unresolved) means the system could not determine the status after exhausting query retries. It mainly occurs in documents uploaded via Upload. Notes will show Source: "Gosocket" with Code: "NoRetries" in these cases.
The UrlPdf and UrlXml fields appear in the response when the functionality is enabled for the TaxID (not the default behaviour — must be requested from the Integrations team). Only available when the document has AuthorityStatus: "2".
As an always-available alternative (no activation required), files can be downloaded with the endpoints:
To determine the result of an NDD transaction, iterate the Notes array and locate the last entry with Source: "NDD" that represents the result of the tax authority query. If it has Mandatory: true, it is a blocking error (rejection); if the Code is "100" or "150", the document was authorized. Intermediate entries with Code: "200" and Source: "NDD" are internal NDD processing steps, not the final result. Entries with other Source values record subsequent distribution events and may or may not appear depending on the TaxID configuration.