Home Kit Orders
Cancel Home Kit Order
Cancel a DIY mail-home test kit
DELETE
/
api
/
v1
/
home-kit-orders
/
{id}
curl --request DELETE \
--url https://anivahealth.com/api/v1/home-kit-orders/d1e2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f5a \
--header 'x-api-key: YOUR_API_KEY'
{
"id": "d1e2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f5a",
"profile_id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
"status": "cancelled",
"delivery_address": {
"name": "Maria Schmidt",
"street": "Friedrichstraße",
"house_number": "123",
"postal_code": "10117",
"city": "Berlin",
"country_code": "DE",
"phone": "+4930123456789",
"email": "maria.schmidt@example.com"
},
"created_at": "2026-04-01T09:45:00Z",
"updated_at": "2026-04-03T10:00: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": [],
"metadata": {},
"replaces_home_kit_order_id": null,
"replacement_reason": null,
"results_ready_emails": [],
"lab_code": null,
"activated_at": null,
"shipments": []
}
{
"error": "Home kit order not found"
}
{
"error": "A home kit order can only be cancelled while it is pending. Once it is dispatched or activated the physical kit has been packed and labelled and can no longer be called back."
}
{
"error": "Fulfilment refused the cancellation (Order is already in fulfillment). The home kit order was NOT cancelled."
}
Cancel a home kit order by setting its status to
cancelled. The cancelled home kit order is returned in the response.
Only a pending order can be cancelled. Once it is dispatched the kit has been packed and labelled by fulfilment, and cancelling returns 409 — as does an activated order.
If the kit has already been ordered from fulfilment, we cancel it there before cancelling yours, and the call fails when they will not take it back: 409 when the kit is already packed and labelled, 502 when fulfilment refused the cancellation or could not be reached. In every failure case nothing is changed — the order stays live, and a 502 is safe to retry.
Cancelling an order that is already cancelled returns 200 with that order, whatever status it was cancelled from. The response carries Idempotent-Replayed: true so you can tell a repeat from the call that did the work. See Idempotency.
Requires the home_kit_orders_manage scope.
Request
Path parameters
string
required
Unique identifier (UUID) of the home kit order to cancel.
Response
On success, the API returns200 OK with the cancelled home kit order and its embedded profile. An order that was already cancelled returns the same 200.
string
required
Unique home kit order identifier (UUID).
string
required
UUID of the profile this home kit order belongs to.
string
required
Home kit order status. Will be
cancelled after a successful cancellation.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, city, postal_code, country_code; company_name / house_number / address_line_2 / state / phone / email optional — the same vocabulary as the locations API). Provide exactly one — a location reference or an inline address, not both.Show delivery address
Show delivery address
- Location reference
- Inline address
string
required
UUID of the test location the kit ships to.
string
required
Recipient, company, or location name.
string
Company holding the parcel for the recipient — a
c/o party or a department.string
required
Street name, without the house number (e.g.
Wilhelmstraße).string
House number (e.g.
118 or 12a).string
Building, entrance, or floor.
string
required
string
State or province. Optional.
string
required
string
required
ISO 3166-1 alpha-2 code (two letters, e.g.
DE).string
string
string
Laboratory sample code the results report under — printed on the physical kit, and what the
patient reads off the box as the activation code.
null until the kit is packed.
Read-only.string
required
Collection timestamp reported via Activate — when the
patient collected their sample.
null until the kit is activated.string
The home kit order this one replaces, when it is a replacement kit.
null on a normal order. See
Create Home Kit Order.string
Why the replacement was sent.
null on a normal order.string[]
required
Addresses that each get one email once every lab result is final, lowercased. Empty when off. See
Results-ready emails.
object
required
Partner-defined key/value pairs, echoed back verbatim. Always present —
{} when unset.string
required
ISO 8601 timestamp of when the home kit order was created.
string
ISO 8601 timestamp of the last update. May be
null.object
required
The patient profile associated with this home kit order.
Show profile
Show profile
string
Unique profile identifier (UUID).
string
Profile handle or username. May be
null.string
First name. May be
null.string
Last name. May be
null.string
Email address. May be
null.string
Phone number in E.164 format. May be
null.integer
Biological sex per ISO/IEC 5218. May be
null.string
Date of birth in
YYYY-MM-DD format. May be null.number
Height in centimeters. May be
null.number
Weight in kilograms. May be
null.string
Preferred language (
en, de, or fi).boolean
Whether this profile receives transactional (programmatic) emails. May be
null.string
ISO 8601 timestamp of when the profile was created.
string
ISO 8601 timestamp of the last profile update. May be
null.HomeKitOrderPanel[]
required
The panel that was attached to this home kit order before cancellation — always exactly one (a
home kit maps 1:1 onto a physical kit product). Look up panel details (name, biomarkers) via
List Panels.
Show Panel attachment fields
Show Panel attachment fields
string
Panel UUID — cross-reference against List Panels.
string
ISO 8601 timestamp the panel was first attached to this home kit order.
HomeKitOrderIndividualBiomarker[]
required
À-la-carte biomarkers that were attached to this home kit order before cancellation. Cross-reference
each
biomarker_id against List Biomarkers with home_kit=true for display data.Show Individual biomarker fields
Show Individual biomarker fields
integer
Biomarker identifier — cross-reference against
List Biomarkers with
home_kit=true.string
ISO 8601 timestamp the biomarker was first attached to this home kit order.
HomeKitOrderShipmentLink[]
required
Parcels that were linked to this home kit order before cancellation, oldest-link first. Read the
full parcels with List Shipments and
?home_kit_order_id=.Show Shipment link fields
Show Shipment link fields
string
Shipment reference — cross-reference against Get Shipment.
string
ISO 8601 timestamp the shipment was linked to this home kit order.
Error responses
| Status | Description |
|---|---|
400 | Invalid ID format — the provided value is not a valid UUID. |
403 | Forbidden — your API key does not have access to this operation, or the home kit order is outside your permission scope. |
404 | Home kit order not found. |
409 | Conflict — the order is no longer pending (dispatched or activated), or its kit has already been packed and labelled by fulfilment. |
500 | Internal server error. |
502 | Fulfilment refused the cancellation (includes their reason) or could not be reached. Nothing was changed; the order is still live. |
curl --request DELETE \
--url https://anivahealth.com/api/v1/home-kit-orders/d1e2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f5a \
--header 'x-api-key: YOUR_API_KEY'
{
"id": "d1e2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f5a",
"profile_id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
"status": "cancelled",
"delivery_address": {
"name": "Maria Schmidt",
"street": "Friedrichstraße",
"house_number": "123",
"postal_code": "10117",
"city": "Berlin",
"country_code": "DE",
"phone": "+4930123456789",
"email": "maria.schmidt@example.com"
},
"created_at": "2026-04-01T09:45:00Z",
"updated_at": "2026-04-03T10:00: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": [],
"metadata": {},
"replaces_home_kit_order_id": null,
"replacement_reason": null,
"results_ready_emails": [],
"lab_code": null,
"activated_at": null,
"shipments": []
}
{
"error": "Home kit order not found"
}
{
"error": "A home kit order can only be cancelled while it is pending. Once it is dispatched or activated the physical kit has been packed and labelled and can no longer be called back."
}
{
"error": "Fulfilment refused the cancellation (Order is already in fulfillment). The home kit order was NOT cancelled."
}
⌘I
curl --request DELETE \
--url https://anivahealth.com/api/v1/home-kit-orders/d1e2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f5a \
--header 'x-api-key: YOUR_API_KEY'
{
"id": "d1e2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f5a",
"profile_id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
"status": "cancelled",
"delivery_address": {
"name": "Maria Schmidt",
"street": "Friedrichstraße",
"house_number": "123",
"postal_code": "10117",
"city": "Berlin",
"country_code": "DE",
"phone": "+4930123456789",
"email": "maria.schmidt@example.com"
},
"created_at": "2026-04-01T09:45:00Z",
"updated_at": "2026-04-03T10:00: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": [],
"metadata": {},
"replaces_home_kit_order_id": null,
"replacement_reason": null,
"results_ready_emails": [],
"lab_code": null,
"activated_at": null,
"shipments": []
}
{
"error": "Home kit order not found"
}
{
"error": "A home kit order can only be cancelled while it is pending. Once it is dispatched or activated the physical kit has been packed and labelled and can no longer be called back."
}
{
"error": "Fulfilment refused the cancellation (Order is already in fulfillment). The home kit order was NOT cancelled."
}