The `ExternalIdentifier` entity lets feed creators associate arbitrary sets of
source-value pairs with certain objects. `ExternalIdentifier` is a often
jurisdiction's code in an external system that's used to associate a
jurisdiciton with objects such as candidates, offices, or geopolitical units.

> [!NOTE]
> **Note:** This entity is the same for all feed types.

The `Type` field of an `ExternalIdentifier` entity is used to describe the
*source* of the identifier, not the object being identified. For example, two of
the built-in types are `fips`, an abbreviation of "Federal Information
Processing Standard" code, and `state`. Even though FIPS two-digit codes can be
used to describe states, the intended `Type` value for this situation is `fips`
and not `state`. That's because `fips` describes the source of the identifier.

External identifiers are used throughout the feed for the following purposes:

- Provide a [stable identifier](https://developers.google.com/civics-data/guides/stable-identifiers).
- Provide a canonical identifier from an external resource, such as Open Civic Data Identifiers or FIPS code.
- Provide additional attributes that aren't native to the NIST CDF schema.

When used to provide additional data or context for an object, external
identifiers need to use a `Type` of `other`. They also include an `OtherType`
and a `Value` that both depend on the type of data that's provided. For an
example of how data can be provided in this manner, see
[`Office`](https://developers.google.com/civics-data/reference/office?feed=pre-election#additional-types-external-identifiers).

> [!NOTE]
> **Note:** The plural `ExternalIdentifiers` is a [collection](https://developers.google.com/civics-data/reference/collections) that wraps one or more `ExternalIdentifier` entities. Multiple occurrences of the `ExternalIdentifier` sub-entity can be used to associate a jurisdiction with multiple codes.

## Attributes

The following table describes the attributes for `ExternalIdentifier`:

| Attribute | Required? | Type | Description |
|---|---|---|---|
| `label` | Optional | [`string`](https://developers.google.com/civics-data/reference/simple-data-types#xs-string) | An informative label. For use as needed. |

## Elements

The following table shows the elements for `ExternalIdentifier`:

| Element | Multiplicity | Type | Description |
|---|---|---|---|
| `Type` | 1 | [`IdentifierType`](https://developers.google.com/civics-data/reference/identifier-type) | Provides an identifier type. |
| `OtherType` | 0 or 1 | [`string`](https://developers.google.com/civics-data/reference/simple-data-types#xs-string) | Used when the value of `IdentifierType` is `other`. |
| `Value` | 1 | [`string`](https://developers.google.com/civics-data/reference/simple-data-types#xs-string) | The identifier used by the jurisdiction. |

## Examples

### XML

```xml
    <ExternalIdentifiers>
     <ExternalIdentifier>
        <Type>other</Type>
        <OtherType>stable</OtherType>
        <Value>ru-0081</Value>
      </ExternalIdentifier>
      <ExternalIdentifier>
        <Type>ocd-id</Type>
        <Value>ocd-division/country:ke/county:narok</Value>
      </ExternalIdentifier>
      <ExternalIdentifier>
        <Type>national-level</Type>
        <Value>33</Value>
      </ExternalIdentifier>
    </ExternalIdentifiers>
```