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

# Update Physical Sample

> Update fields on an existing physical sample

Updates a physical sample record. Only the fields you include in the body are changed.

<ParamField path="physical_sample_id" type="string" required>
  UUID of the physical sample to update
</ParamField>

<ParamField body="name" type="string">
  Name or label for the sample
</ParamField>

<ParamField body="sample_id" type="integer">
  Numeric sample identifier
</ParamField>

<ParamField body="detail_notes_id" type="string">
  UUID of the detail note to link to this sample
</ParamField>

<ParamField body="physical_sample_metadata" type="object">
  Arbitrary key-value metadata for the sample
</ParamField>

## Response

<ResponseField name="id" type="string">
  Physical sample UUID
</ResponseField>

<ResponseField name="name" type="string">
  Sample name
</ResponseField>

<ResponseField name="created_datetime" type="string">
  ISO 8601 timestamp of creation
</ResponseField>

<ResponseField name="last_updated" type="string">
  ISO 8601 timestamp of last update
</ResponseField>

<ResponseField name="version" type="string">
  Version string of the sample record
</ResponseField>

<ResponseField name="user_id" type="string">
  ID of the user who owns the sample
</ResponseField>

<ResponseField name="growth_instrument_id" type="integer">
  Growth instrument ID, or `null` if not set
</ResponseField>

<ResponseField name="sample_id" type="integer">
  Numeric sample identifier, or `null` if not set
</ResponseField>

<ResponseField name="detail_notes_id" type="string">
  UUID of the linked detail note, or `null` if not set
</ResponseField>

<ResponseField name="physical_sample_metadata" type="object">
  Key-value metadata for the sample
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.atomscale.ai/physical_samples/a1b2c3d4-5678-90ab-cdef-1234567890ab" \
    -H "X-API-KEY: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "GaAs-003-revised"
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.patch(
      "https://api.atomscale.ai/physical_samples/a1b2c3d4-5678-90ab-cdef-1234567890ab",
      headers={
          "X-API-KEY": "YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "name": "GaAs-003-revised"
      }
  )
  sample = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
    "name": "GaAs-003-revised",
    "created_datetime": "2024-01-15T11:00:00Z",
    "last_updated": "2024-01-16T09:30:00Z",
    "version": "0.269.1",
    "user_id": "user_abc123",
    "growth_instrument_id": null,
    "sample_id": null,
    "detail_notes_id": null,
    "physical_sample_metadata": {}
  }
  ```
</ResponseExample>
