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

# Update Home Kit Order

> Modify a DIY mail-home test kit

Update a home kit order's delivery address. Only include the field you want to change.

<Note>Requires `home_kit_orders_manage` scope.</Note>

## Request

### Path parameters

<ParamField path="id" type="string" required>
  Unique identifier (UUID) of the home kit order to update.
</ParamField>

### Body parameters

All body parameters are optional — only include the fields you want to change.

<ParamField body="delivery_address" type="object">
  The address to mail the kit to — one of two shapes: either `{ location_id }` referencing a known test location, or the inline address fields (`name`, `street`, `house_number`, `postal_code`, `city`, `country`; `phone` / `email` optional). Provide exactly one — a location reference or an inline address, not both.

  <Expandable title="delivery address">
    <Tabs>
      <Tab title="Reference a location">
        <ParamField body="location_id" type="string" required>
          UUID of a known test location to ship the kit to. Correlate with [List
          Locations](/api/locations/list-locations).
        </ParamField>
      </Tab>

      <Tab title="Inline address">
        <ParamField body="name" type="string" required />

        <ParamField body="street" type="string" required />

        <ParamField body="house_number" type="string" required />

        <ParamField body="postal_code" type="string" required />

        <ParamField body="city" type="string" required />

        <ParamField body="country" type="string" required>
          ISO 3166-1 alpha-2 code (two letters, e.g. `DE`).
        </ParamField>

        <ParamField body="phone" type="string" />

        <ParamField body="email" type="string" />
      </Tab>
    </Tabs>
  </Expandable>
</ParamField>

## Response

On success, the API returns `200 OK` with the updated home kit order and its embedded profile.

<ResponseField name="id" type="string" required>
  Unique home kit order identifier (UUID).
</ResponseField>

<ResponseField name="profile_id" type="string" required>
  UUID of the profile this home kit order belongs to.
</ResponseField>

<ResponseField name="status" type="string" required>
  Current home kit order status. One of `pending`, `dispatched`, `activated`, or `cancelled`.
</ResponseField>

<ResponseField name="delivery_address" type="object" required>
  The address to mail the kit to — one of two shapes: either `{ location_id }` referencing a known test location, or the inline address fields (`name`, `street`, `house_number`, `postal_code`, `city`, `country`; `phone` / `email` optional). Provide exactly one — a location reference or an inline address, not both.

  <Expandable title="delivery address">
    <Tabs>
      <Tab title="Location reference">
        <ResponseField name="location_id" type="string" required>
          UUID of the test location the kit ships to.
        </ResponseField>
      </Tab>

      <Tab title="Inline address">
        <ResponseField name="name" type="string" required />

        <ResponseField name="street" type="string" required />

        <ResponseField name="house_number" type="string" required />

        <ResponseField name="postal_code" type="string" required />

        <ResponseField name="city" type="string" required />

        <ResponseField name="country" type="string" required>
          ISO 3166-1 alpha-2 code (two letters, e.g. `DE`).
        </ResponseField>

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

        <ResponseField name="email" type="string" />
      </Tab>
    </Tabs>
  </Expandable>
</ResponseField>

<ResponseField name="created_at" type="string" required>
  ISO 8601 timestamp of when the home kit order was created.
</ResponseField>

<ResponseField name="updated_at" type="string">
  ISO 8601 timestamp of the last update. May be `null`.
</ResponseField>

<ResponseField name="profile" type="object" required>
  The patient profile associated with this home kit order.

  <Expandable title="profile">
    <ResponseField name="id" type="string">
      Unique profile identifier (UUID).
    </ResponseField>

    <ResponseField name="handle" type="string">
      Profile handle or username. May be `null`.
    </ResponseField>

    <ResponseField name="first_name" type="string">
      First name. May be `null`.
    </ResponseField>

    <ResponseField name="last_name" type="string">
      Last name. May be `null`.
    </ResponseField>

    <ResponseField name="email" type="string">
      Email address. May be `null`.
    </ResponseField>

    <ResponseField name="phone" type="string">
      Phone number in E.164 format. May be `null`.
    </ResponseField>

    <ResponseField name="sex" type="integer">
      Biological sex per ISO/IEC 5218. May be `null`.
    </ResponseField>

    <ResponseField name="date_of_birth" type="string">
      Date of birth in `YYYY-MM-DD` format. May be `null`.
    </ResponseField>

    <ResponseField name="height" type="number">
      Height in centimeters. May be `null`.
    </ResponseField>

    <ResponseField name="weight" type="number">
      Weight in kilograms. May be `null`.
    </ResponseField>

    <ResponseField name="language" type="string">
      Preferred language (`en`, `de`, or `fi`).
    </ResponseField>

    <ResponseField name="transactional_emails_enabled" type="boolean">
      Whether this profile receives transactional (programmatic) emails. May be `null`.
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of when the profile was created.
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      ISO 8601 timestamp of the last profile update. May be `null`.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="panels" type="HomeKitOrderPanel[]" required>
  Catalog panels currently attached to this home kit order. Look up panel details (name, biomarkers) via
  [List Panels](/api/panels/list-panels).

  <Expandable title="Panel attachment fields">
    <ResponseField name="panel_id" type="string">
      Panel UUID — cross-reference against [List Panels](/api/panels/list-panels).
    </ResponseField>

    <ResponseField name="added_at" type="string">
      ISO 8601 timestamp the panel was first attached to this home kit order.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="individual_biomarkers" type="HomeKitOrderIndividualBiomarker[]" required>
  À-la-carte biomarkers attached to this home kit order outside any panel. Cross-reference each
  `biomarker_id` against [List Biomarkers](/api/biomarkers/list-biomarkers) for display data.

  <Expandable title="Individual biomarker fields">
    <ResponseField name="biomarker_id" type="integer">
      Biomarker identifier — cross-reference against
      [List Biomarkers](/api/biomarkers/list-biomarkers).
    </ResponseField>

    <ResponseField name="added_at" type="string">
      ISO 8601 timestamp the biomarker was first attached to this home kit order.
    </ResponseField>
  </Expandable>
</ResponseField>

## Error responses

| Status | Description                                                                         |
| ------ | ----------------------------------------------------------------------------------- |
| `400`  | Validation error — e.g., invalid UUID format or a missing `delivery_address` field. |
| `403`  | Forbidden — your API key does not have access to this operation.                    |
| `404`  | Home kit order not found.                                                           |
| `500`  | Internal server error.                                                              |

<RequestExample>
  ```bash cURL theme={null}
  curl --request PATCH \
    --url https://anivahealth.com/api/v1/home-kit-orders/d1e2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f5a \
    --header 'x-api-key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "delivery_address": {
        "name": "Maria Schmidt",
        "street": "Unter den Linden",
        "house_number": "77",
        "postal_code": "10117",
        "city": "Berlin",
        "country": "DE",
        "phone": "+4930123456789",
        "email": "maria.schmidt@example.com"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "d1e2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f5a",
    "profile_id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
    "status": "pending",
    "delivery_address": {
      "name": "Maria Schmidt",
      "street": "Unter den Linden",
      "house_number": "77",
      "postal_code": "10117",
      "city": "Berlin",
      "country": "DE",
      "phone": "+4930123456789",
      "email": "maria.schmidt@example.com"
    },
    "created_at": "2026-04-01T09:45:00Z",
    "updated_at": "2026-04-01T13:10:00Z",
    "profile": {
      "id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
      "handle": null,
      "first_name": "Maria",
      "last_name": "Schmidt",
      "email": "maria.schmidt@example.com",
      "phone": "+4930123456789",
      "sex": 2,
      "date_of_birth": "1985-03-22",
      "height": 168,
      "weight": 65,
      "language": "de",
      "transactional_emails_enabled": true,
      "created_at": "2026-04-01T09:14:32Z",
      "updated_at": null
    },
    "panels": [
      {
        "panel_id": "f1c2d4a3-7b8e-4f2a-9c1d-2e3f4a5b6c7d",
        "added_at": "2026-04-01T09:50:00Z"
      }
    ],
    "individual_biomarkers": []
  }
  ```

  ```json 400 theme={null}
  {
    "error": "delivery_address.postal_code is required"
  }
  ```

  ```json 404 theme={null}
  {
    "error": "Home kit order not found"
  }
  ```
</ResponseExample>
