Loingsithe
Ceangail coinní le loingsiú
Nasc coinne amháin nó níos mó le loingsiú
POST
/
api
/
v1
/
shipments
/
{id}
/
appointments
curl --request POST \
--url https://anivahealth.com/api/v1/shipments/P261119KXTW/appointments \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"appointment_ids": [
"c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a"
]
}'
[
{
"id": "c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a",
"profile_id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
"location_id": "b7e2d1f5-3c4a-4e8b-a2f1-9d0c1e2f3a4b",
"scheduled_at": "2026-04-15T08:30:00Z",
"status": "blood_drawn",
"created_at": "2026-04-01T09:45:00Z",
"updated_at": "2026-04-15T08:30:00Z",
"profile": {
"id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
"first_name": "Maria",
"last_name": "Schmidt",
"email": "maria.schmidt@example.com",
"date_of_birth": "1985-03-22",
"sex": 2
},
"panels": [],
"individual_biomarkers": [],
"shipments": [
{
"id": "P261119KXTW",
"added_at": "2026-04-15T08:30:00Z"
}
]
}
]
{
"error": "Cannot attach appointments outside the allowed window — each appointment must be past blood-draw or the shipment must be less than 24 hours old. Blocked: c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a"
}
Ceangail coinne amháin nó níos mó leis an loingsiú seo. Idempotent — scipeáiltear go ciúin coinní atá nasctha cheana.
Seo an riail athraithe (in aghaidh na coinne): is féidir an nasc a chruthú i gCEACHTAR den dá chás seo
- tá an choinne tar éis na tógála fola (
blood_drawn), nó - cruthaíodh an loingsiú níos lú ná 24 uair an chloig ó shin.
409 Conflict ionas go bhfanfaidh taifid stairiúla cobhsaí.
Tá an riail chéanna i bhfeidhm ar Dícheangail coinní ó
lastas. Is iad an dá chríochphointe seo an t-aon bhealach
le naisc a athrú. Níl aon chríochphointe scáthánach ag API na gcoinní.
Iarratas
Paraiméadair chosáin
Paraiméadair choirp
Freagra
Má éiríonn leis, tugann an API200 OK ar ais leis na coinní nasctha i do chomhthéacs rochtana,
an nasc is sine ar dtús. Tá an cruth céanna ar gach iontráil is atá ar Faigh coinne.
Freagraí earráide
| Stádas | Cur síos |
|---|---|
400 | Earráid bhailíochtaithe — m.sh. appointment_ids folamh nó UUID neamhbhailí. |
403 | Toirmiscthe — scóip ar iarraidh, lastas nó coinne lasmuigh den chomhthéacs rochtana, nó ordú tacair bhaile nasctha lasmuigh de do chomhthéacs rochtana. |
404 | Níor aimsíodh an lastas, nó níor aimsíodh coinne amháin nó níos mó. |
409 | Theip ar an riail athraithe — tá coinne amháin ar a laghad nach bhfuil thar an tógáil fola fós agus tá an lastas níos sine ná 24 uair an chloig. Liostaíonn an freagra na hIDanna. |
500 | Earráid inmheánach freastalaí. |
curl --request POST \
--url https://anivahealth.com/api/v1/shipments/P261119KXTW/appointments \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"appointment_ids": [
"c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a"
]
}'
[
{
"id": "c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a",
"profile_id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
"location_id": "b7e2d1f5-3c4a-4e8b-a2f1-9d0c1e2f3a4b",
"scheduled_at": "2026-04-15T08:30:00Z",
"status": "blood_drawn",
"created_at": "2026-04-01T09:45:00Z",
"updated_at": "2026-04-15T08:30:00Z",
"profile": {
"id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
"first_name": "Maria",
"last_name": "Schmidt",
"email": "maria.schmidt@example.com",
"date_of_birth": "1985-03-22",
"sex": 2
},
"panels": [],
"individual_biomarkers": [],
"shipments": [
{
"id": "P261119KXTW",
"added_at": "2026-04-15T08:30:00Z"
}
]
}
]
{
"error": "Cannot attach appointments outside the allowed window — each appointment must be past blood-draw or the shipment must be less than 24 hours old. Blocked: c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a"
}
⌘I
curl --request POST \
--url https://anivahealth.com/api/v1/shipments/P261119KXTW/appointments \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"appointment_ids": [
"c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a"
]
}'
[
{
"id": "c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a",
"profile_id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
"location_id": "b7e2d1f5-3c4a-4e8b-a2f1-9d0c1e2f3a4b",
"scheduled_at": "2026-04-15T08:30:00Z",
"status": "blood_drawn",
"created_at": "2026-04-01T09:45:00Z",
"updated_at": "2026-04-15T08:30:00Z",
"profile": {
"id": "a3f1c2d4-8b7e-4f2a-9c1d-2e3f4a5b6c7d",
"first_name": "Maria",
"last_name": "Schmidt",
"email": "maria.schmidt@example.com",
"date_of_birth": "1985-03-22",
"sex": 2
},
"panels": [],
"individual_biomarkers": [],
"shipments": [
{
"id": "P261119KXTW",
"added_at": "2026-04-15T08:30:00Z"
}
]
}
]
{
"error": "Cannot attach appointments outside the allowed window — each appointment must be past blood-draw or the shipment must be less than 24 hours old. Blocked: c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a"
}