Skip to main content
This guide walks you through the core workflow: finding a test location, creating a patient profile, scheduling an appointment, and confirming a blood draw.

Prerequisites

You need a partner API key with the following scopes: LOCATIONS_VIEW, CREATE_USER, TEST_SESSIONS_SCHEDULE.
If you don’t have an API key yet, contact Aniva to get one issued for your partner account.

Steps

1

List available locations

Retrieve the list of test locations to find a location_id for the appointment you will schedule.
curl https://anivahealth.com/api/v1/locations \
  -H "x-api-key: YOUR_API_KEY"
Example response
[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Aniva Berlin Mitte",
    "company_name": "Aniva GmbH",
    "address_line_1": "Unter den Linden 42",
    "address_line_2": null,
    "city": "Berlin",
    "state": "Berlin",
    "postal_code": "10117",
    "country_name": "Germany",
    "country_code": "DE",
    "timezone": "Europe/Berlin",
    "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" }],
      "friday": [{ "open": "08:00", "close": "16:00" }],
      "saturday": [],
      "sunday": []
    }
  }
]
Note the id of the location you want to use. You will need it in step 3.
2

Create a profile

Create a patient profile by sending their demographic data. The profile_group_slug ties the profile to your partner account.
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_slug": "your-profile-group"
  }'
Request body fields
FieldTypeRequiredDescription
first_namestringYesPatient’s first name
last_namestringNoPatient’s last name
sexintegerYes1 = male, 2 = female (ISO/IEC 5218)
date_of_birthstringYesDate of birth in YYYY-MM-DD format
profile_group_slugstringYesSlug of your partner profile group
emailstringNoPatient email. Auto-generated if omitted.
languagestringNoen, de, or fi. Defaults to en.
Example response (201 Created)
{
  "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",
  "created_at": "2026-04-01T10:00:00Z",
  "updated_at": "2026-04-01T10:00:00Z"
}
Note the id from the response. You will use it as profile_id in the next step.
3

Schedule an appointment

Create an appointment using the profile_id from step 2 and the location_id from step 1.
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"
  }'
Example response (201 Created)
{
  "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "profile_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "location_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "scheduled_at": "2026-04-10T09:00:00Z",
  "status": "scheduled",
  "test_method": "practitioner",
  "created_at": "2026-04-01T10:05:00Z",
  "updated_at": "2026-04-01T10:05:00Z",
  "profile": {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "first_name": "Jordan",
    "last_name": "Rivera"
  }
}
Note the appointment id. You will use it to confirm the blood draw.
4

Confirm the blood draw

After the blood draw is complete, submit the kit barcode to confirm the draw and trigger the lab order pipeline.
curl -X POST https://anivahealth.com/api/v1/appointments/c3d4e5f6-a7b8-9012-cdef-123456789012/confirm \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "barcode": "4012345678901"
  }'
Example response (200 OK)
{
  "success": true
}
Once confirmed, the lab order pipeline is triggered. You can retrieve the appointment to verify its status has changed to "confirmed".

Next steps