> ## 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.

# Link

Link defines a link between this document and another resource.

## Schema ID

`https://gobl.org/draft-0/head/link`

## Properties

| Title | Property | Type | Description |
| - | - | - | - |
| UUID | `uuid` | string | Universally Unique Identifier. |
| Category | `category` | [cbc.Key](https://docs.gobl.org/draft-0/cbc/key.md) | Classifies the link according to a fixed list. Optional but highly recommended, as it helps receivers understand the purpose of the link and potentially how it should be presented. |
| | `key` | [cbc.Key](https://docs.gobl.org/draft-0/cbc/key.md) | Unique identifier for the link within the header and category, if provided. |
| Code | `code` | [cbc.Code](https://docs.gobl.org/draft-0/cbc/code.md) | Code used to identify the contents of the link. |
| Title | `title` | string | Title of the resource to use when presenting to users. |
| Description | `description` | string | Description of the resource to use when presenting to users. |
| MIME Type | `mime` | string | Expected MIME type of the link's content when the content is a file. Can only be one of the allowed types defined by EN 16931-1:2017 plus XML itself. |
| Digest | `digest` | [dsig.Digest](https://docs.gobl.org/draft-0/dsig/digest.md) | Used to verify the integrity of the destination document when downloaded from the URL. |
| URL | `url` | string | URL of the resource. |
| Metadata | `meta` | [cbc.Meta](https://docs.gobl.org/draft-0/cbc/meta.md) | Additional metadata about the link. |

## Category Values

| Value | Description |
| - | - |
| `format` | Alternative formats of the same document, such as PDF, HTML, or XML. |
| `portal` | Websites that provide access to alternative versions of this document or request modifications. May also allow access to other or previous business documents. |
| `request` | Documents related to requests submitted to other systems. |
| `response` | Response documents sent from third party systems often in reply to requests. |
| `agreement` | Contracts or agreements related to this document. |
| `verification` | Evidence or verification documents that can be used to validate the authenticity of this document. |
| `attachment` | General attachments for related information such as spread sheets, letters, presentations, specifications, etc. |

## Validation Rules

| Field | Test | Validation Code / Message |
| - | - | - |
| Link | <ul><li>No digest without MIME</li></ul> | `GOBL-HEAD-LINK-06` Link digest must be nil when MIME type is not provided |
| `key` | <ul><li>Present</li></ul> | `GOBL-HEAD-LINK-01` Link key is required |
| `category` | <ul><li>Valid or empty</li></ul> | `GOBL-HEAD-LINK-02` Link category is not valid |
| `url` | <ul><li>Present</li></ul> | `GOBL-HEAD-LINK-03` Link URL is required |
| `url` | <ul><li>Url</li></ul> | `GOBL-HEAD-LINK-04` Link URL must be a valid URL |
| `mime` | <ul><li>Valid or empty MIME</li></ul> | `GOBL-HEAD-LINK-05` Link MIME type is not valid |


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