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:
https://developers.gosocket.net/api/v1/File/DownloadDocumentJsonhttps://developers-sbx.gosocket.net/api/v1/File/DownloadDocumentJsonHow does the DownloadDocumentJson method work?
To make the request, the method has the following parameters:
| DownloadDocumentJson (request) | |||
|---|---|---|---|
| Parameter | Type | Description | Allowed values |
| globalDocumentId* | String | Document identification in Gosocket. | 36-character alphanumeric UUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| Type* | String | Type of JSON to download. The defined type will be shown in the response. | default: downloads the document's JSON. |
*Required
Request example

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.
- Select the method type. In this case, you must select GET.
- Enter the method's URL.
- Enter the parameters shown in the table above with their corresponding values.
- Press Send.
Response example

To correctly interpret the API's response, take into account the following criteria:
| DownloadDocumentJson (response) | |||
|---|---|---|---|
| Parameter | Type | Description | Allowed values |
| Name | String | Name of the downloaded JSON file | globalDocumentId.json |
| Description | String | Description of the event performed. | JsonContent for paramétro_type GlobalDocumentId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| Base64Content | String | Base64-encoded JSON file | |
| TimeStamp | String | Date and time the document was created | yyyy-mm-ddThh:mm:ss |
| Type | String | File type | "json" |
Once the response has been decoded, the document's content will be displayed in the language of the decoding.
