The Spanish version is the authoritative reference. View in Spanish
ChangeDocumentStatus
Executes events on an already-sent document: cancellation, correction letter, operation confirmation, among others.
Endpoint
QA
https://developers-sbx.gosocket.net/api/v1/Document/ChangeDocumentStatusPRODUCTION
https://developers.gosocket.net/api/v1/Document/ChangeDocumentStatusMethod: POST
Parameters as querystring
Parameters are sent in the URL as a querystring, not in the body. The request body is empty.
Input parameters
AtributoTipoDescripción
GlobalDocumentIdstringUnique global identifier of the document on the Gosocket platform. Required.
statusstringCode of the operation or event to execute. See table of allowed values below. Required.
descriptionstringReason why the operation or event is issued. Required.
accountCodestringCNPJ of the creditor account. Conditional: required for events 110001, 112110 and 211128.
stampNumberstringSEFAZ protocol of the event related to the cancellation. Conditional: only applies to event 110001.
codestringCode of the related event type. Conditional: only applies to event 110001.
Allowed values for status
| Code | Description | Process | NF-e | CT-e | MDF-e | NFS-e |
|---|---|---|---|---|---|---|
110001 | Cancelamento de Evento | 📤 | ✅ | ❌ | ❌ | ❌ |
110110 | Carta de correção | 📤 | ✅ | ✅ | ❌ | ❌ |
110111 | Cancelamento | 📤 | ✅ | ✅ | ✅ | ✅ |
110112 | Encerramento | 📤 | ❌ | ❌ | ✅ | ❌ |
110114 | Inclusao Condutor | 📤 | ❌ | ❌ | ✅ | ❌ |
112110 | Informação de efetivo pagamento para liberar crédito presumido | 📤 | ✅ | ❌ | ❌ | ❌ |
210200 | Confirmação da operação | 📥 | ✅ | ❌ | ❌ | ❌ |
210210 | Ciência da operação | 📥 | ✅ | ❌ | ❌ | ❌ |
210220 | Desconhecimento da operação | 📥 | ✅ | ❌ | ❌ | ❌ |
210240 | Operação não realizada | 📥 | ✅ | ❌ | ❌ | ❌ |
211128 | Aceite de débito na apuração por emissão de nota de crédito | 📥 | ✅ | ❌ | ❌ | ❌ |
1009 | Inutilização | 📤 | ✅ | ❌ | ❌ | ❌ |
Response parameters
AtributoTipoDescripción
Successbooleantrue — the operation was successful.
GlobalDocumentIdstringUnique global identifier of the document on the Gosocket platform.
CountryDocumentIdstringChave de acesso of the document (44 digits).
OtherData.ProtocolNumberstringGUID of the internal protocol of the event processed by NDD. Example: "966244f4-fa50-4987-902c-f6432c9461f1".
OtherData.ProtocolSefazstringProtocol number assigned by SEFAZ.
OtherData.IssueDatestringDate and time of the event in ISO 8601 format with timezone. Example: "2026-06-02T18:47:36-03:00".
OtherData.SeriesNumberstringSeries number of the affected document.
OtherData.DatastringInternal NDD response encoded in Base64. Contains the event XML and traceability data.
OtherData.CountrystringCountry code. Always "br".
OtherData.CertifierstringCertifier. Always "NDD" for this integration.
OtherData.AuthorityTimeStampstringDate and time the event was registered. Format: "dd/MM/yyyy HH:mm:ss".
MessagesarrayList of additional messages. Empty if there are no errors.
ResponseValuestringProcessed event XML encoded in Base64.
CodestringSEFAZ cStat code propagated by NDD. This is the **event** response code, not the document authorization code. Examples: "135" (event registered and linked to the document), "136" (event registered but not linked — typical of EPEC when the document does not yet exist in SEFAZ).
DescriptionstringResult description emitted by NDD. Example: "Evento registrado com sucesso, Cancelamento".
ErrorExceptionobjectnull if there is no error.
Examples
ChangeDocumentStatus — Request
POST /api/v1/Document/ChangeDocumentStatus
?GlobalDocumentId=7b28000c-ae96-f63e-5639-fffdf28c7fd9
&status=110111
&description=Cancelamento+por+erro+no+valor+do+impostoChangeDocumentStatus — Response
{
"Success": true,
"GlobalDocumentId": "7b28000c-ae96-f63e-5639-fffdf28c7fd9",
"CountryDocumentId": "33260600000000000100550010000000010000000000",
"OtherData": {
"ProtocolNumber": "966244f4-fa50-4987-902c-f6432c9461f1",
"ProtocolSefaz": "333260000242212",
"IssueDate": "2026-06-02T18:47:36-03:00",
"SeriesNumber": "12010",
"Data": "eyJ0aXBvUmV0b3JubyI6MiwiZXZlbnRvIjp7...",
"Country": "br",
"Certifier": "NDD",
"AuthorityTimeStamp": "02/06/2026 18:47:28"
},
"Messages": [],
"ResponseValue": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48...",
"Code": "135",
"Description": "Evento registrado com sucesso, Cancelamento",
"ErrorException": null
}Notes
Authentication
All methods require Basic Auth authentication. Use the API Key as username and the API Secret as password. Both credentials are generated in the Gosocket portal.
AP reception operations
Events 210200, 210210, 210220 and 210240 correspond to receiver operation confirmation and only apply to NF-e. For other document types, use only the events listed as compatible in the table.
Conditional parameters
accountCodeis required for events110001,112110and211128. Contains the CNPJ of the creditor account involved in the operation.stampNumberandcodeare required only for event110001(Cancelamento de Evento). Sending them in other events may cause rejection by SEFAZ.