Method for getting attachment information (GetDocumentAttachments)
This method allows you to get information about a document's attachments using the GET service.
Using this method, you obtain the respective information for the attachments of the queried document. The method retrieves information for all attachments.
To connect to this functionality, you must enter the URL according to the environment you want to use:
https://developers.gosocket.net/api/v1/File/GetDocumentAttachmentshttps://developers-sbx.gosocket.net/api/v1/File/GetDocumentAttachmentsHow does the GetDocumentAttachments method work?
To make the request, the method has the following parameters:
| GetDocumentAttachments (request) | |||
|---|---|---|---|
| Parameter | Type | Description | Allowed values |
| globalDocumentId* | String | Document identification in Gosocket | 36-character alphanumeric UUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
*Required
Request example

Note: Remember that before using the method, you must authenticate in 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 URL.
- Enter the parameters shown in the previous table with their corresponding values.
- Press Send.
Response example

To correctly interpret the API response, take into account the following parameters:
| GetDocumentAttachments (response) | |||
|---|---|---|---|
| Parameter | Type | Description | Allowed values |
| AttachmentId | String | Unique identification for the attachment | 36-character alphanumeric UUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| Country | String | Country code of the document's issuance | ar, bo, br, cl, co, cr, ec, gt, mx, pa, pe, py, do, sv, uy |
| Name | String | Name of the downloaded file | name.extension (the extension is sometimes not shown and depends on how the file was uploaded to the platform) |
| Description | String | Description of the file. | |
| AttachmentTypeId | Integer | Attachment type Id according to the means by which it was uploaded or created: 990: Gosocket API 999: ACK Process 1000: Gosocket Web | 990 999 1000 |
| Date | String | Date and time the file was uploaded | yyyy-mm-ddThh:mm:ss |
| FileExt | String | Type or extension of the file | "file_extension" |
| ShowSender | Boolean | Indicates whether the issuer can view the file | True: The file is shown to the issuer False: The file is NOT shown to the issuer |
| ShowReceiver | Boolean | Indicates whether the receiver can view the file | True: The file is shown to the receiver False: The file is NOT shown to the receiver |
| RefSenderCode | String | Issuer's fiscal ID | See table Fiscal ID Structure |
| RefReceiverCode | String | Receiver's fiscal ID | See table Fiscal ID Structure |
| RefDocumentTypeId | Integer | Code of the related document type in Gosocket (invoice, note, etc.) | 1, 2, 3, 4, … |
| RefDocumentId | String | Identification of the related document in Gosocket. | 36-character alphanumeric UUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| RefCountryDocumentId | String | Fiscal identifier of the related document at the country level, also known as CUFE, CLAVE, UUID, ID | See table Country Document ID Structure |
| RefDate | String | Date and time of the related document | yyyy-mm-ddThh:mm:ss |
| RefNumber | String | Related document or folio number | |
| RefSeries | String | Series of the related document | |
| CreatedBy | String | User who created the file according to the means by which it was uploaded or created: System: when some process creates it ID (36 characters): when it is uploaded manually from Inbox User UUID (ApiKey): uploaded via the API | System 36-character alphanumeric UUID. xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| CreationSource | String | Source of the file's creation | Gosocket API ACK Process Gosocket Web |
| Timestamp | String | Date and time of the file | yyyy-mm-ddThh:mm:ss |
| LastUpated | String | Date and time of the file | yyyy-mm-ddThh:mm:ss |
| AuthorityValidation | Integer | Tax authority validation code | |
| AuthorityValidationTimestamp | String | Date and time of the tax authority's validation | |
| GlobalTrackId | String | Tracking ID | 00000000-0000-0000-0000-000000000000 |
Characteristics of the GetDocumentAttachments method
-
When the document Id (globalDocumentId) does not exist, the system responds with an error message:

-
Files can be queried as many times as needed.
-
Information for all attachments the document has will be shown.