Skip to main content

Social Security

Service to query a person's social security information in Colombia. Returns personal information and the history of social security contributions.

POST /validate/social-security HTTP/1.1
HOST: {{api_auco}}
Authorization: {{private_key}}
info

This service uses the company's private key

Colombia Only

This service is only available for social security queries in Colombia. The accepted document types are Colombian Citizenship Card (CC) and Foreign ID Card (CE).

NameDescription
email
String
Required.
Email of the process creator.
This email must be registered on the Auco platform and must belong to the company.
type
String
Required.
Identity document type.
Accepted values: CC, CE
identification
String
Required.
Identity document number to query.

🧪 Usage examples

curl -X POST '{{api_auco}}/validate/social-security' \
-H 'Authorization: {{private_key}}' \
-H 'Content-Type: application/json' \
-d '{
"email": "user@company.com",
"type": "CC",
"identification": "123456781"
}'

📥 Response structure

Main fields

FieldTypeDescription
codeStringUnique code of the generated validation
documentTypeStringQueried document type
documentNumberStringQueried document number
personalInfoObjectPersonal information of the holder
contributionPeriodsArrayList of social security contribution periods

personalInfo object

FieldTypeDescription
firstNameStringFirst name
middleNameStringMiddle name
lastNameStringLast name
secondLastNameStringSecond last name

contributionPeriods[] object

FieldTypeDescription
periodStringContribution period in YYYYMM format
baseIncomeNumberContribution base income in COP
employerObjectEmployer or contributor information
contributorTypeObjectContributor type
monthsWithEmployerNumberAccumulated months with the employer
hasChangeBooleanIndicates if there was an employer change in this period
lastChangeDateStringDate of last employer change (YYYYMM or null)

employer object

FieldTypeDescription
nameStringName or company name of the employer
documentTypeStringDocument type (NI = Tax ID, CC = ID Card)
documentNumberStringEmployer's document number

contributorType object

FieldTypeDescription
codeStringContributor type code
descriptionStringContributor type description

Common contributor types

CodeDescription
1Employee (Dependent)
3Independent
57Voluntary Independent to Occupational Risk System
59Independent with service contract greater than 1 month

📥 Response examples

{
"code": "VAL1234ABC",
"documentType": "CC",
"documentNumber": "1000000001",
"personalInfo": {
"firstName": "JUAN",
"middleName": "CARLOS",
"lastName": "GARCIA",
"secondLastName": "MARTINEZ"
},
"contributionPeriods": [
{
"period": "202501",
"baseIncome": 3000000,
"employer": {
"name": "EMPRESA EJEMPLO SAS",
"documentType": "NI",
"documentNumber": "900123456"
},
"contributorType": {
"code": "1",
"description": "Dependiente"
},
"monthsWithEmployer": 18,
"hasChange": false,
"lastChangeDate": null
}
]
}

⚠️ Error responses

CodeMessageDescription
400USER_NOTFOUNDEmail does not exist in the company.
400SOCIAL_SECURITY_NOT_FOUNDNo social security information found for the document.
400SOCIAL_SECURITY_SERVICE_ERRORThe social security service is temporarily unavailable.
401-Invalid or missing authentication.

🧪 Test data (Development environment)

For testing in the development environment, you can use the following documents:

DocumentTypeDescription
1000000001CCDependent employee with stable history
1000000002CCIndependent changing to dependent
1000000003CCMultiple employer changes

ℹ️ Additional notes

  • The service returns the contribution history for approximately the last 12 months.
  • The same period may have multiple records if the person has several employers or simultaneous contribution types.
  • The hasChange field indicates if there was an employer change in that specific period.
  • The monthsWithEmployer field represents the accumulated tenure with that specific employer.
  • The email must correspond to an active user of the company.