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

# Metadata

Metadata lets your application store additional, structured information on an Elation object. For example, you can store your system's patient ID on an Elation patient object. Objects that support metadata include a `metadata` field in their API reference. Any field inside `metadata` can be updated and set to null.

Each application reads and writes only its own metadata. Other API applications cannot see it. Elation displays some patient metadata to practice users in the EMR. See [The Patient Object](/articles/rest/patient-profile-api/patients/the-patient-object#working-with-patients-via-the-api).

You cannot search objects by `metadata.object_id` or any sub-fields within the `metadata` object.

## Metadata JSON

```json theme={null}
{
  // other fields
  "metadata": {
    "object_id": "opaque id of your choice", // max 100 chars
    "data": {                                // max 1000 chars
    	// any structured (valid json) data
    },
    "object_web_link": "https://app.example.com/patients/12345" // max 200 chars
  }
}
```

<Warning>
  Include `object_id` or `data` in every request that sets metadata. If a request sends `object_web_link` without `object_id` or `data`, Elation ignores the whole `metadata` object and does not save the link.
</Warning>

## Sample usage (storing your own patient ID in the patient object)

```json theme={null}
{
  "first_name": "Sample",
  "last_name": "Patient",
  // other patient fields
  "metadata": {
    "object_id": "unique_patient_id_in_your_system",
    "data": {
      "alias": "alias in your system",
      "last_sync": "2017-01-03T00:00:00Z",
      "other_ids": [
        "sdf23423", "4394611", "khjh23cxlz"
      ]
    },
    "object_web_link": "https://app.example.com/patients/unique_patient_id_in_your_system"
  }
}
```
