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

# Add Panels

> Add blood test panels to an appointment

Add one or more blood test panels to an existing appointment. You can call this endpoint multiple times to build up the panel selection before confirming the blood draw.

<Warning>
  Panels cannot be added after you call [Confirm Blood Draw](/api/appointments/confirm-blood-draw).
  Attempting to add panels to a confirmed appointment returns `409 Conflict`.
</Warning>

## Request

### Path parameters

<ParamField path="id" type="string" required>
  Unique identifier (UUID) of the appointment to add panels to.
</ParamField>

### Body parameters

<ParamField body="panel_ids" type="string[]" required>
  Array of panel UUIDs to add to the appointment. Must contain at least one item.
</ParamField>

## Response

On success, the API returns `200 OK` confirming the panels have been added.

<ResponseField name="success" type="boolean">
  `true` when the panels have been successfully added to the appointment.
</ResponseField>

## Error responses

| Status | Description                                                                |
| ------ | -------------------------------------------------------------------------- |
| `400`  | Validation error — e.g., `panel_ids` is empty or contains an invalid UUID. |
| `403`  | Forbidden — your API key does not have access to this operation.           |
| `404`  | Appointment or one or more panels not found.                               |
| `409`  | Conflict — panels cannot be added after the blood draw has been confirmed. |
| `500`  | Internal server error.                                                     |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://anivahealth.com/api/v1/appointments/c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a/panels \
    --header 'x-api-key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "panel_ids": [
        "d4e5f6a7-b8c9-4d1e-a2f3-b4c5d6e7f8a9",
        "e5f6a7b8-c9d0-4e2f-b3a4-c5d6e7f8a9b0"
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true
  }
  ```

  ```json 409 theme={null}
  {
    "error": "Panels cannot be added after the blood draw has been confirmed"
  }
  ```

  ```json 404 theme={null}
  {
    "error": "Panel not found"
  }
  ```
</ResponseExample>
