Skip to main content

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:

PRODUCCIÓNhttps://developers.gosocket.net/api/v1/File/GetDocumentAttachments
SANDBOXhttps://developers-sbx.gosocket.net/api/v1/File/GetDocumentAttachments

How does the GetDocumentAttachments method work?

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

GetDocumentAttachments (request)
ParameterTypeDescriptionAllowed values
globalDocumentId*StringDocument identification in Gosocket36-character alphanumeric UUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

*Required


Request example

image-20240503-034906.png

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.

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

Response example

image-20240503-035040.png

To correctly interpret the API response, take into account the following parameters:

GetDocumentAttachments (response)
ParameterTypeDescriptionAllowed values
AttachmentIdStringUnique identification for the attachment36-character alphanumeric UUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
CountryStringCountry code of the document's issuancear, bo, br, cl, co, cr, ec, gt, mx, pa, pe, py, do, sv, uy
NameStringName of the downloaded filename.extension (the extension is sometimes not shown and depends on how the file was uploaded to the platform)
DescriptionStringDescription of the file.
AttachmentTypeIdIntegerAttachment type Id according to the means by which it was uploaded or created: 990: Gosocket API 999: ACK Process 1000: Gosocket Web990 999 1000
DateStringDate and time the file was uploadedyyyy-mm-ddThh:mm:ss
FileExtStringType or extension of the file"file_extension"
ShowSenderBooleanIndicates whether the issuer can view the fileTrue: The file is shown to the issuer False: The file is NOT shown to the issuer
ShowReceiverBooleanIndicates whether the receiver can view the fileTrue: The file is shown to the receiver False: The file is NOT shown to the receiver
RefSenderCodeStringIssuer's fiscal IDSee table Fiscal ID Structure
RefReceiverCodeStringReceiver's fiscal IDSee table Fiscal ID Structure
RefDocumentTypeIdIntegerCode of the related document type in Gosocket (invoice, note, etc.)1, 2, 3, 4, …
RefDocumentIdStringIdentification of the related document in Gosocket.36-character alphanumeric UUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
RefCountryDocumentIdStringFiscal identifier of the related document at the country level, also known as CUFE, CLAVE, UUID, IDSee table Country Document ID Structure
RefDateStringDate and time of the related documentyyyy-mm-ddThh:mm:ss
RefNumberStringRelated document or folio number
RefSeriesStringSeries of the related document
CreatedByStringUser 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 APISystem 36-character alphanumeric UUID. xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
CreationSourceStringSource of the file's creationGosocket API ACK Process Gosocket Web
TimestampStringDate and time of the fileyyyy-mm-ddThh:mm:ss
LastUpatedStringDate and time of the fileyyyy-mm-ddThh:mm:ss
AuthorityValidationIntegerTax authority validation code
AuthorityValidationTimestampStringDate and time of the tax authority's validation
GlobalTrackIdStringTracking ID00000000-0000-0000-0000-000000000000

Characteristics of the GetDocumentAttachments method

  • When the document Id (globalDocumentId) does not exist, the system responds with an error message:

    image-20240503-035622.png

  • Files can be queried as many times as needed.

  • Information for all attachments the document has will be shown.