The Spanish version is the authoritative reference. View in Spanish
Method to change the status before the Tax Authority (ChangeDocumentAuthorityStatus)
This method allows changing the status of a document before the tax authority to Voided using the POST ChangeDocumentAuthorityStatus service.
Through this method, you can change the status before the tax authority of a document that is in approved status.
To connect to this functionality, you will need to enter the URL according to the environment to be used:
https://developers.gosocket.net/api/v1/Document/ChangeDocumentAuthorityStatushttps://developers-sbx.gosocket.net/api/v1/Document/ChangeDocumentAuthorityStatusHow does the method work?
To make the request, the method has the following parameters:
| ChangeDocumentAuthorityStatus (request) | |||
|---|---|---|---|
| Parameter | Type | Description | Allowed values |
| globalDocumentId | String | Document identification in Gosocket. | 36-character alphanumeric UUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| status | String | Code of the new status before the tax authority. | "Status":"4" Since all documents submitted to this method will be voided. |
| UserName | String | User making the request | Example: "nombre@gosocket.com" |
| reason | String | Reason code for the change | 1: Invoice issued incorrectly 2: Incorrect issuance data 3: Invoice or credit/debit note returned |
| CountryId | String | Country identification | bo |
Request example
The identifiers and the user email in these examples are fictitious; replace them with your company's real data.
POST https://developers-sbx.gosocket.net/api/v1/Document/ChangeDocumentAuthorityStatus?globalDocumentId=00000000-0000-0000-0000-000000000001&status=04&UserName=contacto@empresa-ejemplo.com&reason=1&CountryId=bo
The query parameters sent in the request are:
| Key | Value |
|---|---|
| globalDocumentId | 00000000-0000-0000-0000-000000000001 |
| status | 04 |
| UserName | contacto@empresa-ejemplo.com |
| reason | 1 |
| CountryId | bo |
Note: Remember that before using the method, you must authenticate on the Authorization tab.
For this method, we use Postman's Params tab.
- Select the method type. In this case, you must select POST.
- Enter the method URL.
- Enter the parameters shown in the previous table with their corresponding values.
- Press Send.
Response example
{
"ErrorMessage": [],
"IsValid": true,
"StatusCode": "200",
"StatusDescription": "",
"StatusMessage": "El estado del documento fue actualizado correctamente",
"XmlBase64Bytes": null,
"XmlBytes": null,
"XmlDocumentKey": null,
"XmlFileName": null,
"ResponseType": null,
"OtherData": null,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000001",
"Timestamp": null,
"Response": ":\n \"facturaBoletoAereoAnulacionLote\":true\r\n",
"TaxDocument": null
}Error responses
{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": null,
"Messages": [
"Regla: Evento no puede ser registrado ya que el documento no se encuentra en estado aprobado."
],
"ResponseValue": null,
"Code": "400",
"Description": "Evento no puede ser registrado ya que el documento no se encuentra en estado aprobado.",
"ErrorException": null
}To correctly interpret the API's response, take into account the following criteria:
| ChangeDocumentAuthorityStatus (response) | |||
|---|---|---|---|
| Parameter | Type | Description | Allowed values |
| ErrorMessage | String | Description of the error message | |
| IsValid | Boolean | Indicates whether the request ran correctly. | true: The request ran correctly. false: The request ran with some inconsistency. |
| StatusCode | String | Process response code | Examples: 500: Some inconsistency occurred 200: It worked correctly |
| StatusDescription | String | Technical description of the error found in the process | |
| StatusMessage | String | Description of the response of the executed process | |
| XmlBase64Bytes, XmlBytes, XmlDocumentKey, XmlFileName, ResponseType, OtherData, GlobalDocumentId, Timestamp, Response, TaxDocument | String | Additional data in the process response | Null or empty |
Characteristics of the ChangeDocumentAuthorityStatus method
-
The method allows changing the status to voided when it is in an approved status.
-
Some examples of process response (StatusMessage) are:
- "No es posible cambiar el estado de un documento aprobado al estado XX"
- "El estado del documento fue actualizado correctamente"