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

# Identity

Identity is used to define a code for a specific context.

## Schema ID

`https://gobl.org/draft-0/org/identity`

## Properties

| Title | Property | Type | Description |
| - | - | - | - |
| UUID | `uuid` | string | Universally Unique Identifier. |
| Label | `label` | string | Optional label useful for non-standard identities to give a bit more context. |
| Scope | `scope` | [cbc.Key](https://docs.gobl.org/draft-0/cbc/key.md) | Context in which the identity is meant to be used. |
| Country | `country` | [l10n.ISOCountryCode](https://docs.gobl.org/draft-0/l10n/iso_country_code.md) | Country from which the identity was issued. |
| Key | `key` | [cbc.Key](https://docs.gobl.org/draft-0/cbc/key.md) | Uniquely classifies the identity, used instead of a type. |
| Type | `type` | [cbc.Code](https://docs.gobl.org/draft-0/cbc/code.md) | Type of code being represented, usually specific to a particular context, country, or tax regime. Cannot be used alongside the key. |
| Code | `code` | [cbc.Code](https://docs.gobl.org/draft-0/cbc/code.md) | Value of the identity. |
| Description | `description` | string | Details about what the code means or implies. |
| Extensions | `ext` | [tax.Extensions](https://docs.gobl.org/draft-0/tax/extensions.md) | Additional structured information about the identity. |

## Scope Values

| Value | Description |
| - | - |
| `tax` | Tax |
| `legal` | Legal |

## Validation Rules

| Field | Test | Validation Code / Message |
| - | - | - |
| Identity | <ul><li>Key and type must not be used together</li></ul> | `GOBL-ORG-IDENTITY-03` Identity must have either a key or type defined, but not both |
| `code` | <ul><li>Present</li></ul> | `GOBL-ORG-IDENTITY-01` Identity code must be provided |
| `scope` | <ul><li>One of \[tax, legal]</li></ul> | `GOBL-ORG-IDENTITY-02` Identity scope when provided must be either 'tax' or 'legal' |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.