> ## Documentation Index
> Fetch the complete documentation index at: https://developer.eka.care/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook Samples

## Webhook Payload Examples

These are the samples of the webhook payloads that you will receive from Eka Care:

### Appointments

**1. Appointment Webhook**

When an appointment is created, modified, or completed, Eka Care will send a webhook event to your registered URL.

**Example Payload:**

```json theme={null}
{
    "service": "dr",
    "event_type": "appointment.created",
    "event_time": 1730189586,
    "timestamp": 1730189588,
    "client_id": "{{client_id}}",
    "business_id": "{{business_id}}",
    "data": {
        "appointment_id": "12345-abcde-67890-fghij",
        "doctor_id": "0910731080189",
        "patient_id": "54321098809",
        "clinic_id": "09876345768790",
        "status": "BK",
        "action": "create",
        "created_at": "2023-07-30T18:07:24.000Z",
        "modified_at": "2023-07-30T18:07:24.000Z",
        "client_meta": {
            "visit_id": "Client_visit_id_123"
        }
    }
}
```

**2. Fetch Appointment Details**

After receiving the appointment webhook, use the appointment ID to fetch full details using the Get Appointment Details API.

**Endpoint:** `GET {{HOST}}/dr/v1/appointment/{{appointment_id}}`

This step allows you to retrieve comprehensive information about the appointment, including any additional details not included in the webhook payload.

### Prescriptions

**1. Prescription Webhook**

When a prescription is created, Eka Care will send a webhook event to your registered URL.

**Example Payload:**

```json theme={null}
{
    "service": "dr",
    "event_type": "prescription.created",
    "event_time": 1730189586,
    "timestamp": 1730189588,
    "client_id": "{{client_id}}",
    "business_id": "{{business_id}}",
    "data": {
        "status" : "created",
        "action" : "created",
        "rx_id": "{{rx_id}}",
        "appointment_id": "{{appointment_id}}",
        "doctor_id": "{{doctor_id}}",
        "patient_id": "{{patient_id}}",
        "clinic_id": "{{clinic_id}}",
        "created_at": "2023-07-30T18:07:24.000Z"
    }
}
```

**2. Fetch Prescription Details**

After receiving the prescription webhook, use the prescription ID to fetch full details using the Get Prescription Details API.

**Endpoint:** `GET {{HOST}}/dr/v1/prescription/{{prescription_id}}`

This step allows you to retrieve comprehensive information about the prescription, including medication details and other relevant information not included in the webhook payload.

### Receipts

**1. Receipt Webhook**

When a receipt is created, Eka Care will send a webhook event to your registered URL.

**Example Payload:**

```json theme={null}
{
    "service": "appointment",
    "event_type": "receipt.created",
    "event_time": 1730189586,
    "timestamp": 1730189588,
    "client_id": "{{client_id}}",
    "business_id": "{{business_id}}",
    "transaction_id": "{{transaction_id}}",
    "data": {
        "additional_discount_amount": 10,
        "additional_discount_type": "AMOUNT",
        "additional_discount_value": 10,
        "aid": "{{aid}}",
        "amount_due": 0,
        "amount_paid": null,
        "archive": 0,
        "business_receipt_number": null,
        "clinic_id": "{{clinic_id}}",
        "created_at": 1755851612670,
        "doctor_oid": "{{doctor_oid}}",
        "flavour": null,
        "mobile": "+919999999999",
        "name": "test patient",
        "net_amount": 750,
        "patient_oid": "{{patient_oid}}",
        "payment_id": null,
        "payment_link": null,
        "receipt_amount": 760,
        "receipt_id": "{{receipt_id}}",
        "receipt_number": null,
        "receipt_status": "SUCCESS",
        "receipt_url": "{{receipt_url}}",
        "ref_trx_id": "",
        "remarks": "",
        "sku_discount_amount": 0,
        "updated_at": 1755851612670
    }
}
```

### EkaScribe

**1. EkaScribe Webhook**

When a medical audio file is uploaded, Eka Care will send a webhook event to your registered URL.

```json theme={null}
{
    "business_id": {{busness_id}},
    "client_id": {{client_id}},
    "service_id": "v2rx",
    "event_id": "v2rx.completed",
    "payload": {
        "service": "v2rx",
        "event": "v2rx.completed",
        "event_time": "2023-07-30T18:07:24.000Z",
        "transaction_id": {{transaction_id}},
        "data": {}
    }
}
```

**2. Fetch Medical Audio Upload Results**

After receiving the webhook, use the transaction ID to fetch the full upload result via the Retrieve Result API.

**Endpoint:** `GET {{HOST}}/voice-record/api/status/{{transaction_id}}`

This API provides the upload status (e.g., queued, inprogress, completed, deleted, error, partial\_completed) along with the FHIR output for the processed voice data.


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