Server-side validation endpoints to verify country and subdivision codes with relationship checking
Validate country and subdivision codes on your server to ensure data integrity. Our validation API provides fast, reliable validation with detailed error messages and relationship checking for complex scenarios like parent-child subdivisions and country redirections.
Complete reference for all validation endpoints with authentication, parameters, and response formats.
Validate country codes and check for upward relationships. This endpoint ensures the country exists and validates follow-upward rules.
This example uses the following configuration:
All validation endpoints require authentication using your private API key. Include the API key in the Authorization header as a Bearer token: Authorization: Bearer YOUR_API_KEY. The base URL for all validation endpoints is https://api.countriesdb.com.
Include the Content-Type header for POST requests: Content-Type: application/json
Validate subdivision codes and check for parent-child relationships and redirections. This endpoint handles complex validation scenarios including follow-related and allow-parent-selection rules.
This example uses the following configuration:
All validation endpoints require authentication using your private API key. Include the API key in the Authorization header as a Bearer token: Authorization: Bearer YOUR_API_KEY. The base URL for all validation endpoints is https://api.countriesdb.com.
Include the Content-Type header for POST requests: Content-Type: application/json