Skip to main content

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:

PRODUCTIONhttps://developers.gosocket.net/api/v1/Document/ChangeDocumentAuthorityStatus
SANDBOXhttps://developers-sbx.gosocket.net/api/v1/Document/ChangeDocumentAuthorityStatus

How does the method work?

To make the request, the method has the following parameters:

ChangeDocumentAuthorityStatus (request)
ParameterTypeDescriptionAllowed values
globalDocumentIdStringDocument identification in Gosocket.36-character alphanumeric UUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
statusStringCode of the new status before the tax authority."Status":"4" Since all documents submitted to this method will be voided.
UserNameStringUser making the requestExample: "nombre@gosocket.com"
reasonStringReason code for the change1: Invoice issued incorrectly 2: Incorrect issuance data 3: Invoice or credit/debit note returned
CountryIdStringCountry identificationbo

Request example

image-20240502-223536.png

Note: Remember that before using the method, you must authenticate on the Authorization tab.

For this method, we use Postman's Params tab.

  1. Select the method type. In this case, you must select POST.
  2. Enter the method URL.
  3. Enter the parameters shown in the previous table with their corresponding values.
  4. Press Send.

Response example

image-20240502-223844.png


Error responses

image-20240502-223956.png

image-20240502-224025.png

To correctly interpret the API's response, take into account the following criteria:

image-20240502-224110.png


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"