Skip to main content

The Spanish version is the authoritative reference. View in Spanish

Panama: Method to query taxpayer data (GetAccount)

Allows querying the data of a given taxpayer, specifying the document type and number. The method reports whether the queried document exists or not in the DGI's records, and if it exists, reports the name, check digit, and whether the taxpayer is enrolled in the SFE.

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 explaining how it works, it is important to note that this method must be enabled by Gosocket in order to use it.

If you want to use the method, get in touch with the Gosocket sales team.

To make the request, the method has the following parameter in JSON format 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 taxpayer to query:
1: Natural person
2: Legal entity
1 or 2
receiverCode*StringIdentification number of the taxpayer to querySee the Tax ID Structure table
countryId*StringCountry code of the company making the querypa

* All parameters are required


Request example

getaccountpa01.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 example

{
"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 messagesnull
[ "0640
isValidBooleanRequest result:
true when the client exists
false when the client does not exist
True
False
statusCodeStringResponse codeExamples:
0680
0640
500
statusDescriptionStringDescription of the codeExamples:
0680: Taxpayer found
0640: Taxpayer not registered
500: Company not active to use the GetAccount event
500: The identification type must be 1 or 2.
StatusMessageStringDescription of the responseResponse code 0 - Client found.
Response code 1 - Error The identification type must be 1 or 2
xmlBase64BytesStringBase64-encoded XML of the response returned by the SAT catalog when the client exists.null
Base64-encoded XML
xmlBytesStringnull
XmlDocumentKeyStringnull
XmlFileNameStringnull
ResponseTypeStringResponse type of the queried service: synchronousSync
OtherDataStringOnly when the query has completed successfully and the taxpayer has been found is it returned with the parameters below:
Ruc
TipoRuc
Nombre
DV
AfilFE
TipoRec
null
"OtherData": {
"Ruc": "155707757-2-2021",
"TipoRuc": "2",
"Nombre": "GOSOCKET PANAMA S.A.",
"DV": "50",
"AfilFE": "RUC afiliado al SFE",
"TipoRec": "Contribuyente"
}
OtherData.RucStringRuc of the queried taxpayerRuc value
OtherData.TipoRucStringType of queried taxpayer1: Natural person
2: Legal entity
OtherData.NombreStringName of the queried taxpayerexample: "GOSOCKET PANAMA S.A."
OtherData.DVStringCheck digit of the queried taxpayerexample: "50"
OtherData.AfilFEStringIndicates whether the taxpayer is enrolled in the SFEExample:
"RUC afiliado al SFE" (RUC enrolled in the SFE)
"RUC no afiliado al SFE" (RUC not enrolled in the SFE)
OtherData.TipoRecStringIndicates whether it is a taxpayerexample: "Contribuyente" (Taxpayer)
GlobalDocumentIdString00000000-0000-0000-0000-00000000000000000000-0000-0000-0000-000000000000
TimestampStringQuery date-time2025-05-02T21:50:31.7268377Z
ResponseStringnull
TaxDocumentStringnull
PrinterXmlStringnull