Skip to main content

The Spanish version is the authoritative reference. View in Spanish

Method to download the JSON file (DownloadDocumentJson)

This method allows you to download a document's XML file using the GET DownloadDocumentJson service.

Through this method, you obtain the base64-encoded JSON file of the queried document.

To connect to this functionality, you will need to enter the URL according to the environment you want to use:

PRODUCTIONhttps://developers.gosocket.net/api/v1/File/DownloadDocumentJson
SANDBOXhttps://developers-sbx.gosocket.net/api/v1/File/DownloadDocumentJson

How does the DownloadDocumentJson method work?

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

DownloadDocumentJson (request)
ParameterTypeDescriptionAllowed values
globalDocumentId*StringDocument identification in Gosocket.36-character alphanumeric UUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Type*StringType of JSON to download. The defined type will be shown in the response.default: downloads the document's JSON.

*Required


Request example

image-20240503-023451.png

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

Since this is a GET method, we use the Params tab in Postman to build the query.

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

Response example

image-20240503-023615.png

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

DownloadDocumentJson (response)
ParameterTypeDescriptionAllowed values
NameStringName of the downloaded JSON fileglobalDocumentId.json
DescriptionStringDescription of the event performed.JsonContent for paramétro_type GlobalDocumentId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Base64ContentStringBase64-encoded JSON file
TimeStampStringDate and time the document was createdyyyy-mm-ddThh:mm:ss
TypeStringFile type"json"

Once the response has been decoded, the document's content will be displayed in the language of the decoding.

image-20240503-024817.png