> ## Documentation Index
> Fetch the complete documentation index at: https://docs.frankieone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Working With Country Codes

> The FrankieOne service standardizes all country information using ISO-3166-alpha3 codes (e.g., 'AUS' for Australia, 'GBR' for United Kingdom).

## Input Flexibility

When sending country data to our API, you can use any of these formats:

<CardGroup cols={3}>
  <Card title="Alpha-3" icon="globe">
    Three-letter codes (e.g., 'AUS')
  </Card>

  <Card title="Alpha-2" icon="globe">
    Two-letter codes (e.g., 'AU')
  </Card>

  <Card title="Full Names" icon="font">
    Complete country names (e.g., 'Australia')
  </Card>
</CardGroup>

## How It Works

<Steps>
  <Step title="Input Processing">
    The service accepts your country input in any ISO-3166 compliant format
  </Step>

  <Step title="Normalization">
    Automatically converts the input to ISO-3166-alpha3 format
  </Step>

  <Step title="Validation">
    Verifies the converted code against ISO standards
  </Step>
</Steps>

<Callout icon="bell" color="#FFCA16" iconType="regular">
  If the service can't convert your country input to a valid ISO-3166-alpha3
  code, the request will be rejected with an error response.
</Callout>

## Example Usage

<CodeGroup>
  ```json title="Valid Request" theme={null}
  {
    "country": "Australia",  // Will be converted to "AUS"
    "nationality": "AU",     // Will be converted to "AUS"
    "residency": "AUS"      // Already in correct format
  }
  ```

  ```json title="Error Response" theme={null}
  {
    "error": "Invalid country code",
    "details": "Unable to convert 'Atlantis' to ISO-3166-alpha3 format"
  }
  ```
</CodeGroup>

## ISO-3166 Country Codes Reference

For a complete list of valid country codes and their formats, refer to the [ISO-3166 Country Codes Wikipedia page <Icon icon="arrow-up-right-from-square" size={12} />](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes).

Common examples:

* 🇦🇺 Australia: AUS (AU)
* 🇬🇧 United Kingdom: GBR (GB)
* 🇺🇸 United States: USA (US)
* 🇨🇦 Canada: CAN (CA)
