---
title: "Update sample (partial)"
method: PATCH
path: "/samples/{key}"
tags: ["samples"]
---

# Update sample (partial)

`PATCH /samples/{key}`

Update the specified sample. If a field is not included in the query body, that field will not be updated.

## Path parameters

- `key` string, required

## Request body

- object — An observation of a particular aspect for a particular subject at a particular point in time.
  - `messageBody` string — Optional message about the sample value. Informational only--not used to determine the status of the sample. It's up to the lens whether/how to display this, will typically be displayed only on hover or click.
  - `messageCode` string — Optional 5-charater code about the sample value. Informational only--not used to determine the status of the sample. It's up to the lens whether/how to display this, will typically be displayed without having to hover or click.
  - `value` string — Stored as a string but will be treated as whatever the aspect’s valueType was specified as, i.e. [BOOLEAN|NUMERIC|PERCENT]. If timeout occurs, value is set to null.
  - `relatedLinks` RelatedLinkRequest[] — RelatedLinks associated with this model.
    - `name` string, required — Name of the related link.
    - `url` string, required — The relatedLink url. For example, a related link associated with a sample can have a link to the source from which that sample information is obtained.
  - `owner` string — The name of the user to assign as the owner. Defaults to the user that created it

## Response `200`

Success.

- SamplesResponse — An observation of a particular aspect for a particular subject at a particular point in time.
  - `messageBody` string — Optional message about the sample value. Informational only--not used to determine the status of the sample. It's up to the lens whether/how to display this, will typically be displayed only on hover or click.
  - `messageCode` string — Optional 5-charater code about the sample value. Informational only--not used to determine the status of the sample. It's up to the lens whether/how to display this, will typically be displayed without having to hover or click.
  - `status` 'Critical' | 'Invalid' | 'Timeout' | 'Warning' | 'Info' | 'OK' — Status.
  - `previousStatus` 'Critical' | 'Invalid' | 'Timeout' | 'Warning' | 'Info' | 'OK' — Previous Status.
  - `value` string — Stored as a string but will be treated as whatever the aspect’s valueType was specified as, i.e. [BOOLEAN|NUMERIC|PERCENT]. If timeout occurs, value is set to null.
  - `provider` string — User who provided this sample.
  - `createdAt` string — TODO
  - `updatedAt` string — TODO
  - `statusChangedAt` string — Time at which the status changed from one state to another.
  - `relatedLinks` RelatedLinkResponse[] — RelatedLinks associated with this model.
    - `name` string — Name of the related link.
    - `url` string — The relatedLink url. For example, a related link associated with a sample can have a link to the source from which that sample information is obtained.
  - `apiLinks` HATEOAS[] — Hypertext As The Engine Of Application State.
    - `href` string, required — URL of the related HATEOAS link you can use for subsequent calls.
    - `rel` string, required — Link relation that describes how this link relates to the previous call.
    - `method` string, required — The HTTP method required for the related call.

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Resource Not Found
- `default` — Error

---

[API](https://skmtc.net/salesforce/apis/refocus-api.md) · [All operations](https://skmtc.net/salesforce/apis/refocus-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/salesforce/refocus-api/versions/42c2153b047e/schema)
