Skip to main content

Overview

The country requirements endpoints help developers understand what fields are required for entity creation in different countries. Each country has specific validation rules, tax ID formats, and required fields. This eliminates trial-and-error when creating entities and provides clear guidance on what data is needed.

Supported Countries

gu1 currently supports 16 countries with comprehensive validation:

🇦🇷 Argentina

CUIT validation

🇧🇷 Brazil

CNPJ validation

🇲🇽 Mexico

RFC validation

🇨🇱 Chile

RUT validation

🇨🇴 Colombia

NIT validation

🇵🇪 Peru

RUC validation

🇺🇾 Uruguay

RUT validation

🇪🇨 Ecuador

RUC validation

🇵🇾 Paraguay

RUC validation

🇧🇴 Bolivia

NIT validation

🇻🇪 Venezuela

RIF validation

🇺🇸 United States

EIN validation

🇨🇦 Canada

BN validation

🇪🇸 Spain

CIF validation

🇵🇹 Portugal

NIPC validation

🇪🇪 Estonia

Registrikood validation

Get All Countries

GET http://api.gu1.ai/entities/country-requirements
Retrieve a list of all supported countries.

Response Example

{
  "success": true,
  "countries": [
    { "code": "AR", "name": "Argentina" },
    { "code": "BR", "name": "Brazil" },
    { "code": "MX", "name": "Mexico" },
    { "code": "US", "name": "United States" },
    ...
  ],
  "total": 16
}

Get Country-Specific Requirements

GET http://api.gu1.ai/entities/country-requirements/:countryCode
Get detailed validation requirements for a specific country.

Path Parameters

countryCode
string
required
ISO 3166-1 alpha-2 country code (e.g., “AR”, “BR”, “US”)

Response Fields

success
boolean
Indicates if the request was successful
country
object
Country validation details
documentation
object
Example request payload

Examples

Get Argentina Requirements

curl http://api.gu1.ai/entities/country-requirements/AR \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "success": true,
  "country": {
    "code": "AR",
    "name": "Argentina",
    "taxIdName": "CUIT",
    "taxIdFormat": "^\\d{2}-\\d{8}-\\d{1}$",
    "requiredFields": [
      "cuit",
      "razonSocial",
      "domicilioFiscal"
    ],
    "optionalFields": [
      "iibb",
      "actividadPrincipal",
      "fechaInicioActividades"
    ],
    "registries": [
      "AFIP",
      "IGJ",
      "RPC"
    ]
  },
  "documentation": {
    "example": {
      "type": "company",
      "externalId": "company_123",
      "name": "Example Company",
      "countryCode": "AR",
      "taxId": "Example CUIT",
      "attributes": {
        "cuit": "Example cuit",
        "razonSocial": "Example razonSocial",
        "domicilioFiscal": "Example domicilioFiscal"
      }
    }
  }
}

Country-Specific Examples

🇦🇷 Argentina (CUIT)

{
  "type": "company",
  "externalId": "company_ar_001",
  "name": "Tech Solutions Argentina",
  "countryCode": "AR",
  "taxId": "30-71234567-8",
  "attributes": {
    "cuit": "30-71234567-8",
    "razonSocial": "Tech Solutions S.A.",
    "domicilioFiscal": "Av. Corrientes 1234, CABA",
    "iibb": "901-123456-7",
    "actividadPrincipal": "Desarrollo de Software"
  }
}

🇧🇷 Brazil (CNPJ)

{
  "type": "company",
  "externalId": "company_br_001",
  "name": "Tech Solutions Brasil",
  "countryCode": "BR",
  "taxId": "12.345.678/0001-90",
  "attributes": {
    "cnpj": "12.345.678/0001-90",
    "razaoSocial": "Tech Solutions Ltda",
    "enderecoFiscal": "Av. Paulista, 1000 - São Paulo, SP",
    "inscricaoEstadual": "123.456.789.012",
    "cnae": "6201-5/00"
  }
}

🇲🇽 Mexico (RFC)

{
  "type": "company",
  "externalId": "company_mx_001",
  "name": "Tech Solutions México",
  "countryCode": "MX",
  "taxId": "TSM980101ABC",
  "attributes": {
    "rfc": "TSM980101ABC",
    "razonSocial": "Tech Solutions S.A. de C.V.",
    "domicilioFiscal": "Av. Reforma 123, Ciudad de México",
    "regimenFiscal": "601"
  }
}

🇺🇸 United States (EIN)

{
  "type": "company",
  "externalId": "company_us_001",
  "name": "Tech Solutions Inc",
  "countryCode": "US",
  "taxId": "12-3456789",
  "attributes": {
    "ein": "12-3456789",
    "legalName": "Tech Solutions Inc.",
    "address": "123 Main St, San Francisco, CA 94102",
    "stateOfIncorporation": "Delaware",
    "naicsCode": "541511"
  }
}

🇪🇸 Spain (CIF)

{
  "type": "company",
  "externalId": "company_es_001",
  "name": "Tech Solutions España",
  "countryCode": "ES",
  "taxId": "A12345678",
  "attributes": {
    "cif": "A12345678",
    "razonSocial": "Tech Solutions S.L.",
    "direccionFiscal": "Calle Gran Vía 1, Madrid",
    "cnae": "6201"
  }
}

Error Responses

404 - Country Not Supported

{
  "success": false,
  "error": {
    "code": "COUNTRY_NOT_SUPPORTED",
    "message": "Country code 'XX' is not supported",
    "details": {
      "countryCode": "XX",
      "supportedCountries": ["AR", "BR", "MX", ...]
    }
  }
}

Best Practices

Always query country requirements before creating entities to ensure you collect all necessary data from your users upfront.
Country requirements rarely change. Consider caching them in your application to reduce API calls.
Use the taxIdFormat regex pattern to validate tax IDs on the client side before submitting to the API.
Display field names in the user’s language. The API returns local field names (e.g., “razonSocial” for Argentina instead of “legalName”).

Next Steps