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

# Tús tapa

> Déan do chéad ghlao ar API Comhpháirtí Aniva laistigh de chúpla nóiméad: aimsigh suíomh tástála, cruthaigh próifíl agus cuir tógáil fola in áirithe.

Tugann an treoir seo thú tríd an bpríomhshreabhadh oibre: láthair tástála a aimsiú, próifíl othair a chruthú, coinne a sceidealú, agus tógáil fola a dheimhniú.

## Réamhriachtanais

Teastaíonn eochair API comhpháirtí uait a d'eisigh Aniva.

> [!NOTE]
>
> Mura bhfuil eochair API agat fós, déan teagmháil le Aniva chun go n-eiseofar ceann do do chuntas comhpháirtí.

## Céimeanna

**1. Liostaigh na láithreacha atá ar fáil**

Faigh an liosta de láithreacha tástála chun `location_id` a aimsiú don choinne a sceidealóidh tú.

```bash theme={null}
curl https://anivahealth.com/api/v1/locations \
  -H "x-api-key: YOUR_API_KEY"
```

**Freagra samplach**

```json theme={null}
[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Aniva Berlin Mitte",
    "company_name": "Aniva GmbH",
    "street": "Unter den Linden",
    "house_number": "42",
    "address_line_2": null,
    "city": "Berlin",
    "state": "Berlin",
    "state_code": "BE",
    "postal_code": "10117",
    "country_name": "Germany",
    "country_code": "DE",
    "timezone": "Europe/Berlin",
    "latitude": 52.517036,
    "longitude": 13.388859,
    "contact_phone": "+4930987654321",
    "email": "berlin-mitte@anivahealth.com",
    "website": "https://anivahealth.com",
    "google_maps_url": null,
    "image_url": null,
    "open_hours": {
      "monday": [{ "open": "08:00", "close": "18:00" }],
      "tuesday": [{ "open": "08:00", "close": "18:00" }],
      "wednesday": [{ "open": "08:00", "close": "18:00" }],
      "thursday": [{ "open": "08:00", "close": "18:00" }],
      "friday": [{ "open": "08:00", "close": "16:00" }],
      "saturday": [],
      "sunday": []
    },
    "default_draw_method": "venous",
    "draw_methods": ["venous"]
  }
]
```

Breac síos `id` na láithreach is mian leat a úsáid. Beidh sé uait i gcéim 3.

**2. Cruthaigh próifíl**

Cruthaigh próifíl othair trína gcuid sonraí déimeagrafacha a sheoladh. Ceanglaíonn `profile_group` an phróifíl le do chuntas comhpháirtí — glacann sé le UUID do-athraithe an ghrúpa nó lena slug inléite ag daoine.

```bash theme={null}
curl -X POST https://anivahealth.com/api/v1/profiles \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Jordan",
    "last_name": "Rivera",
    "sex": 1,
    "date_of_birth": "1990-04-15",
    "profile_group": "your-profile-group"
  }'
```

**Réimsí chorp an iarratais**

| Réimse | Cineál | Riachtanach | Cur síos |
| - | - | - | - |
| `first_name` | string | Tá | Céadainm an othair |
| `last_name` | string | Tá | Sloinne an othair |
| `sex` | integer | Tá\*\* | `1` = fireann, `2` = baineann (ISO/IEC 5218) |
| `date_of_birth` | string | Tá\*\* | Dáta breithe i bhformáid `YYYY-MM-DD`. Ní mór dó a bheith san am atá caite, gan a bheith roimh 1900, agus aois 16–100 a thabhairt le tuiscint. |
| `profile_group` | string | Tá\* | UUID nó slug do ghrúpa próifíle comhpháirtí. UUID is ea an tagairt chobhsaí; glactar le slug freisin. |
| `profile_group_slug` | string | Níl | **Dímholta.** Ailias slug do `profile_group`. Tá `profile_group` nó `profile_group_slug` riachtanach. |
| `email` | string | Níl | Ríomhphost an othair. Gintear go huathoibríoch é má fhágtar ar lár é. |
| `language` | string | Níl | Ceann de 32 chód teanga, mar shampla `en`, `de` nó `fi`. Is é `en` an réamhshocrú. Féach [Cruthaigh próifíl](https://docs.anivahealth.com/ga/api/profiles/create-profile.md). |
| `phone` | string | Níl | Uimhir ghutháin i bhformáid E.164, mar shampla `+4915123456789`. |
| `height` | number | Níl | Airde i gceintiméadair. |
| `weight` | number | Níl | Meáchan i gcileagraim. |
| `transactional_emails_enabled` | boolean | Níl | Sáraíonn sé réamhshocrú an ghrúpa próifíle do ríomhphoist oibríochtúla. |
| `marketing_emails_enabled` | boolean | Níl | Sáraíonn sé réamhshocrú an ghrúpa próifíle do ríomhphoist mhargaíochta. |

\*\* Roghnach nuair a ligeann do ghrúpa próifíle don othar an dá cheann a iontráil ar leathanach gníomhachtaithe an fhearais. Féach
[Próifílí](https://docs.anivahealth.com/ga/concepts/profiles.md#lig-don-othar-data-breithe-agus-gneas-a-chur-isteach).

**Freagra samplach (201 Created)**

```json theme={null}
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "handle": null,
  "first_name": "Jordan",
  "last_name": "Rivera",
  "email": "jordan.rivera@example.com",
  "phone": null,
  "sex": 1,
  "date_of_birth": "1990-04-15",
  "height": null,
  "weight": null,
  "language": "en",
  "transactional_emails_enabled": null,
  "created_at": "2026-04-01T10:00:00Z",
  "updated_at": "2026-04-01T10:00:00Z"
}
```

Breac síos an `id` ón bhfreagra. Úsáidfidh tú é mar `profile_id` sa chéad chéim eile.

**3. Sceidealaigh coinne**

Cruthaigh coinne ag úsáid an `profile_id` ó chéim 2 agus an `location_id` ó chéim 1. Socraigh `scheduled_at` ar thús sliotáin a thugann [Faigh infhaighteacht](https://docs.anivahealth.com/ga/api/locations/get-availability.md) ar ais don láthair sin. Diúltaíonn an API d'am nach bhfuil ar ghreille na sliotán.

```bash theme={null}
curl -X POST https://anivahealth.com/api/v1/appointments \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "profile_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "location_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "scheduled_at": "2026-04-10T09:00:00Z"
  }'
```

**Freagra samplach (201 Created)**

```json theme={null}
{
  "id": "c3d4e5f6-a7b8-4012-8def-123456789012",
  "profile_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "location_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "scheduled_at": "2026-04-10T09:00:00Z",
  "status": "confirmed",
  "cancellation_reason": null,
  "results_ready_emails": [],
  "draw_method": "venous",
  "created_at": "2026-04-01T10:05:00Z",
  "updated_at": "2026-04-01T10:05:00Z",
  "profile": {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "handle": null,
    "first_name": "Jordan",
    "last_name": "Rivera",
    "email": "jordan.rivera@example.com",
    "phone": null,
    "sex": 1,
    "date_of_birth": "1990-04-15",
    "height": null,
    "weight": null,
    "language": "en",
    "transactional_emails_enabled": null,
    "created_at": "2026-04-01T10:00:00Z",
    "updated_at": "2026-04-01T10:00:00Z"
  },
  "panels": [],
  "individual_biomarkers": [],
  "shipments": [],
  "lab_codes": []
}
```

Breac síos `id` na coinne. Úsáidfidh tú é chun an tógáil fola a dheimhniú.

**4. Deimhnigh an tógáil fola**

Tar éis don tógáil fola a bheith críochnaithe, cuir isteach an cód saotharlainne (barrchód an fheadáin) chun an tógáil fola a dheimhniú agus chun píblíne na n-orduithe saotharlainne a spreagadh. Seolann tógáil fola a bhfuil roinnt cód ar a feadáin `lab_codes` ina ionad sin — féach [Deimhnigh tógáil fola](https://docs.anivahealth.com/ga/api/appointments/confirm-blood-draw.md).

```bash theme={null}
curl -X POST https://anivahealth.com/api/v1/appointments/c3d4e5f6-a7b8-4012-8def-123456789012/confirm \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lab_code": "7642001234"
  }'
```

**Freagra samplach (200 OK)**

```json theme={null}
{
  "success": true
}
```

Nuair a dheimhnítear é, spreagtar píblíne an ordaithe saotharlainne. Is féidir leat an choinne a aisghabháil chun a fhíorú gur athraigh a stádas go `"blood_drawn"`.

## Na chéad chéimeanna eile

* [Cuir painéil le coinne](https://docs.anivahealth.com/ga/api/appointments/add-panels.md) chun a shonrú cé na tástálacha saotharlainne atá le déanamh.
* [Nuashonraigh coinne](https://docs.anivahealth.com/ga/api/appointments/update-appointment.md) chun í a athsceidealú nó an suíomh a athrú roimh thógáil fola.
* [Cealaigh coinne](https://docs.anivahealth.com/ga/api/appointments/cancel-appointment.md) mura bhfuil sí ag teastáil a thuilleadh.
* [Faigh torthaí saotharlainne](https://docs.anivahealth.com/ga/api/appointments/get-results.md) chun torthaí cliniciúla agus géiniteacha a aisghabháil tar éis próiseála.
* [Íoslódáil doiciméid](https://docs.anivahealth.com/ga/api/documents/download-document.md) chun PDFanna de thuairiscí saotharlainne a fháil.
* [Aisghabh próifíl](https://docs.anivahealth.com/ga/api/profiles/get-profile.md) chun sonraí othair a sheiceáil nó a thaispeáint.
* Féach ar an [tagairt API](https://docs.anivahealth.com/ga/api/profiles/create-profile.md) iomlán le haghaidh na gcríochphointí agus na bparaiméadar uile atá ar fáil.


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