Skip to main content

The Spanish version is the authoritative reference. View in Spanish

Colombia: Method to query purchaser data (GetAccount)

This method allows you to query the "Name or Business Name" and "Email" data of a purchaser or buyer, in the service of the Dirección de Impuestos y Aduanas Nacionales (DIAN, National Directorate of Taxes and Customs), specifying the document type and number through the GET GetAccount method.

DIAN provides the information according to the purchasers' updated records from 2023 and 2024 onward.

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/Account/GetAccount
SANDBOXhttps://developers-sbx.gosocket.net/api/v1/Account/GetAccount

How does the GetAccount method work?

BEFORE YOU START

It is important to note that this method must be enabled by Gosocket in order to use it.

Request access from the Gosocket sales team.

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

GetAccount (request)

ParameterTypeDescriptionAllowed values
AccountCode*StringTax ID of the company making the query. Required to verify that the company can use the service.See the Tax ID Structure table
identificationType*StringType of identification document of the purchaser to querySee the Document types table
receiverCode*StringIdentification number of the purchaser to querySee the Tax ID Structure table
countryId*StringCountry code of the company making the queryco

* All parameters are required

Document types

CodeDescription
11Civil registry
12Identity card
13Citizenship ID card
21Foreigner's ID card
22Foreigner's citizenship card
31NIT
41Passport
42Foreign identification document
47PEP (Special Permanence Permit)
48PPT (Temporary Protection Permit)
50NIT from another country
91NUIP

Request example

image-20250506-144239.png

Note

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

For this method, we use the Postman Params tab.

  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 examples

{
  "ErrorMessage": null,
  "IsValid": false,
  "StatusCode": "500",
  "StatusDescription": "Empresa no activa para utilizar el evento GetAccount",
  "StatusMessage": "Empresa no activa para utilizar el evento GetAccount",
  "XmlBase64Bytes": null,
  "XmlBytes": null,
  "XmlDocumentKey": null,
  "XmlFileName": null,
  "ResponseType": null,
  "OtherData": null,
  "GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
  "Timestamp": null,
  "Response": null,
  "TaxDocument": null,
  "PrinterXml": null
}

To properly interpret this response, take into account the following parameters:

GetAccount (response)

ParameterTypeDescriptionAllowed values
errorMessageStringcode | description as applicable, returned error messages- null
- [ "404 Adquiriente no existe" ]
- [ "Error al consultar Compliance", "A task was canceled." ]
isValidBooleanRequest result:
- true when the purchaser exists
- false when the purchaser does not exist
- True
- False
statusCodeStringResponse code- 404
- 200
- 500
statusDescriptionStringDescription of the code- 404: Adquiriente no existe
- 200: Adquiriente encontrado
- 500: Error al consultar Compliance
xmlBase64BytesStringBase64-encoded XML of the response returned by DIAN when the purchaser exists.- null
- Base64-encoded XML
xmlBytesStringnull
XmlDocumentKeyStringnull
XmlFileNameStringnull
ResponseTypeStringResponse type against the DIAN service: synchronousSync
OtherDataStringOnly when the query has completed successfully and the purchaser has been found is it returned with the 2 parameters below:
- ReceiverName
- ReceiverMail
- null
- {
"ReceiverName": "Nombre Cédula de ciudadanía 1", "ReceiverEmail": " [ Mail@dominio.com ] "
}
ReceiverNameStringName or business name of the queried purchaser"CLIENT NAME"
ReceiverMailStringEmail address of the queried purchaserExample:
"mail@dominio.com"
GlobalDocumentIdString00000000-0000-0000-0000-00000000000000000000-0000-0000-0000-000000000000
TimestampStringQuery date-time2025-05-02T21:50:31.7268377Z
ResponseStringnull
TaxDocumentStringnull
PrinterXmlStringnull