> ## 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.

# Evde test kiti siparişini iptal et

> Eve postalanan kendin yap test kitini iptal et

Bir evde test kiti siparişinin durumunu `cancelled` olarak ayarlayıp iptal et. İptal edilen evde test kiti siparişi yanıtta döndürülür.

Yalnızca `pending` durumundaki bir sipariş iptal edilebilir. Sipariş `dispatched` olduğunda kit lojistik merkezi tarafından paketlenip etiketlenmiş olur ve iptal işlemi `409` döndürür — `activated` durumundaki bir siparişte de aynı durum geçerlidir.

Kit lojistik merkezinden zaten sipariş edildiyse, seninkini iptal etmeden önce orada iptal ederiz ve geri almayı kabul etmediklerinde çağrı başarısız olur: kit zaten paketlenip etiketlendiyse `409`, lojistik merkezi iptali reddettiyse veya merkeze ulaşılamadıysa `502`. Her başarısızlık durumunda **hiçbir şey değişmez** — sipariş aktif kalır ve `502` güvenle yeniden denenebilir.

Zaten `cancelled` durumunda olan bir siparişi iptal etmek, hangi durumdan iptal edilmiş olursa olsun o siparişle birlikte `200` döndürür. Yanıt, tekrar çağrısını işlemi gerçekleştiren çağrıdan ayırt edebilmen için `Idempotent-Replayed: true` taşır. Bkz. [İdempotentlik](https://docs.anivahealth.com/tr/concepts/idempotency.md).

`home_kit_orders_manage` kapsamını gerektirir.

## İstek

### Yol parametreleri

**id** `string` *required*

İptal edilecek evde test kiti siparişinin benzersiz kimliği (UUID).

## Yanıt

Başarılı olduğunda API, iptal edilen evde test kiti siparişi ve gömülü profiliyle birlikte `200 OK` döndürür. Zaten iptal edilmiş bir sipariş de aynı `200` yanıtını döndürür.

**id** `string` *required*

Benzersiz evde test kiti siparişi kimliği (UUID).

**profile\_id** `string` *required*

Bu evde test kiti siparişinin ait olduğu profilin UUID'si.

**status** `string` *required*

Evde test kiti siparişi durumu. Başarılı bir iptalden sonra `cancelled` olur.

**delivery\_address** `object` *required*

Kitin postalanacağı adres — iki biçimden biri: bilinen bir test konumuna referans veren `{ location_id }` veya satır içi adres alanları (`name`, `street`, `city`, `postal_code`, `country_code`; `company_name` / `house_number` / `address_line_2` / `state` / `phone` / `email` isteğe bağlı — konumlar API'siyle aynı terminoloji). Tam olarak birini belirt — konum referansı veya satır içi adres, ikisi birden değil.

**teslimat adresi**

> [tab] Konum referansı
>
> **location\_id** `string` *required*
>
> Kitin gönderileceği test konumunun UUID'si.

> [tab] Satır içi adres
>
> **name** `string` *required*
>
> Alıcı, şirket veya konum adı.
>
> **company\_name** `string`
>
> Alıcı adına paketi teslim alan şirket — bir `c/o` tarafı veya departman.
>
> **street** `string` *required*
>
> Kapı numarası olmadan cadde/sokak adı (örn. `Wilhelmstraße`).
>
> **house\_number** `string`
>
> Kapı numarası (örn. `118` veya `12a`).
>
> **address\_line\_2** `string`
>
> Bina, giriş veya kat.
>
> **city** `string` *required*
>
> **state** `string`
>
> Eyalet veya il. İsteğe bağlı.
>
> **postal\_code** `string` *required*
>
> **country\_code** `string` *required*
>
> ISO 3166-1 alpha-2 kodu (iki harf, örn. `DE`).
>
> **phone** `string`
>
> **email** `string`

**lab\_code** `string`

Sonuçların altında raporlandığı laboratuvar örnek kodu — fiziksel kitin üzerinde basılıdır ve
hastanın kutudan etkinleştirme kodu olarak okuduğu koddur. Kit paketlenene kadar `null`.
Salt okunur.

**activated\_at** `string` *required*

[Etkinleştir](https://docs.anivahealth.com/tr/api/home-kit-orders/activate-home-kit.md) üzerinden bildirilen örnek alma zaman damgası —
hastanın örneğini ne zaman aldığı. Kit etkinleştirilene kadar `null`.

**replaces\_home\_kit\_order\_id** `string`

Bu bir değişim kiti olduğunda, yerini aldığı evde test kiti siparişi. Normal bir siparişte `null`. Bkz.
[Evde test kiti siparişi oluştur](https://docs.anivahealth.com/tr/api/home-kit-orders/create-home-kit.md).

**replacement\_reason** `string`

Değişim kitinin neden gönderildiği. Normal bir siparişte `null`.

**results\_ready\_emails** `string[]` *required*

Tüm laboratuvar sonuçları kesinleştiğinde her birine bir e-posta gönderilen, küçük harfe çevrilmiş adresler. Kapalıyken boştur. Bkz.
[Sonuçlar hazır e-postaları](https://docs.anivahealth.com/tr/concepts/results.md#sonuclar-hazir-e-postalari).

**metadata** `object` *required*

İş ortağı tarafından tanımlanan ve aynen geri döndürülen anahtar/değer çiftleri. Her zaman mevcuttur — ayarlanmadığında `{}`.

**created\_at** `string` *required*

Evde test kiti siparişinin oluşturulduğu zamanın ISO 8601 zaman damgası.

**updated\_at** `string`

Son güncellemenin ISO 8601 zaman damgası. `null` olabilir.

**profile** `object` *required*

Bu evde test kiti siparişiyle ilişkili hasta profili.

**profil**

**id** `string`

Benzersiz profil tanımlayıcısı (UUID).

**handle** `string`

Profil rumuzu veya kullanıcı adı. `null` olabilir.

**first\_name** `string`

Ad. `null` olabilir.

**last\_name** `string`

Soyad. `null` olabilir.

**email** `string`

E-posta adresi. `null` olabilir.

**phone** `string`

E.164 biçiminde telefon numarası. `null` olabilir.

**sex** `integer`

ISO/IEC 5218 standardına göre biyolojik cinsiyet. `null` olabilir.

**date\_of\_birth** `string`

`YYYY-MM-DD` biçiminde doğum tarihi. `null` olabilir.

**height** `number`

Santimetre cinsinden boy. `null` olabilir.

**weight** `number`

Kilogram cinsinden kilo. `null` olabilir.

**language** `string`

Tercih edilen dil: [Profil oluştur](https://docs.anivahealth.com/tr/api/profiles/create-profile.md) sayfasındaki 32 koddan biri.

**transactional\_emails\_enabled** `boolean`

Bu profilin işlemsel (programatik) e-postalar alıp almadığı. `null` olabilir.

**created\_at** `string`

Profilin oluşturulduğu zamanın ISO 8601 zaman damgası.

**updated\_at** `string`

Son profil güncellemesinin ISO 8601 zaman damgası. `null` olabilir.

**panels** `HomeKitOrderPanel[]` *required*

İptalden önce bu evde test kiti siparişine ekli olan panel — her zaman tam olarak bir tane (bir
evde test kiti, fiziksel bir kit ürünüyle 1:1 eşleşir). Panel ayrıntılarına (ad, biyobelirteçler)
[Panelleri listele](https://docs.anivahealth.com/tr/api/panels/list-panels.md) üzerinden bak.

**Panel ekleme alanları**

**panel\_id** `string`

Panel UUID'si — [Panelleri listele](https://docs.anivahealth.com/tr/api/panels/list-panels.md) ile karşılaştır.

**added\_at** `string`

Panelin bu evde test kiti siparişine ilk eklendiği zamanın ISO 8601 zaman damgası.

**individual\_biomarkers** `HomeKitOrderIndividualBiomarker[]` *required*

İptalden önce bu evde test kiti siparişine ekli olan tekil biyobelirteçler. Görüntüleme verileri için
her `biomarker_id` değerini `home_kit=true` ile [Biyobelirteçleri listele](https://docs.anivahealth.com/tr/api/biomarkers/list-biomarkers.md) üzerinden karşılaştır.

**Tekil biyobelirteç alanları**

**biomarker\_id** `integer`

Biyobelirteç kimliği — `home_kit=true` ile
[Biyobelirteçleri listele](https://docs.anivahealth.com/tr/api/biomarkers/list-biomarkers.md) üzerinden karşılaştır.

**added\_at** `string`

Biyobelirtecin bu evde test kiti siparişine ilk eklendiği zamanın ISO 8601 zaman damgası.

**shipments** `HomeKitOrderShipmentLink[]` *required*

İptalden önce bu evde test kiti siparişine bağlanan paketler, en eski bağlantı önce gelecek şekilde. Paketlerin
tümünü [Gönderileri listele](https://docs.anivahealth.com/tr/api/shipments/list-shipments.md) ve `?home_kit_order_id=` ile oku.

**Gönderi bağlantısı alanları**

**id** `string`

Gönderi referansı — [Gönderiyi al](https://docs.anivahealth.com/tr/api/shipments/get-shipment.md) ile karşılaştır.

**added\_at** `string`

Gönderinin bu evde test kiti siparişine bağlandığı zamanın ISO 8601 zaman damgası.

## Hata yanıtları

| Durum | Açıklama |
| - | - |
| `400` | Geçersiz kimlik biçimi — sağlanan değer geçerli bir UUID değil. |
| `403` | Yasak — API anahtarının bu işleme erişimi yok veya evde test kiti siparişi izin kapsamının dışında. |
| `404` | Evde test kiti siparişi bulunamadı. |
| `409` | Çakışma — sipariş artık `pending` durumunda değil (gönderilmiş veya etkinleştirilmiş) ya da kiti lojistik merkezi tarafından zaten paketlenip etiketlenmiş. |
| `500` | İç sunucu hatası. |
| `502` | Lojistik merkezi iptali reddetti (nedenini içerir) veya merkeze ulaşılamadı. Hiçbir şey değiştirilmedi; sipariş hâlâ aktif. |

```bash cURL theme={null}
curl --request DELETE \
  --url https://anivahealth.com/api/v1/home-kit-orders/d1e2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f5a \
  --header 'x-api-key: YOUR_API_KEY'
```

```json 200 theme={null}
{
  "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": []
}
```

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

```json 409 theme={null}
{
  "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."
}
```

```json 502 theme={null}
{
  "error": "Fulfilment refused the cancellation (Order is already in fulfillment). The home kit order was NOT cancelled."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.