AlfaDocs Beta API (1.1.0-beta)

Download OpenAPI specification:Download

Introduction

This API of AlfaDocs is documented using the OpenAPI format. In addition to the OpenAPI syntax, we use a few vendor extensions.

Location

The API is located at https://app.alfadocs.com/api/. SSL is used for transport security.

Authentication

You need to specify the X-Api-Key field in the request header using the API Key.

An API key is related to a certain archive. You create an API Key for your archive inside of AlfaDocs, in Impostazioni -> Studio -> Chiavi API.

Usage

The API currently does not have a usage limit. However, AlfaDocs reserves the right to limit the API usage and also to ask for a fee related to the API usage.

Feedback

If you discover bugs or you need other API functionalities, just tell us. While doing so, please specify the use case. Generally, feedback is always welcome. Feel free to contact our support.

Appointment Booking Reasons

Get the list of appointment booking reasons

Get appointment booking reasons

Get the information related to all configured appointment booking reasons.

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice ID

archiveId
required
integer

Archive ID

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "count": 0,
  • "data": [
    ]
}

Appointments

API endpoints for appointment management

Get appointments

Get a list of appointments. The default Date filter is from current date to Sunday +14 days. The maximum datetime range is 30 days.

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice ID

archiveId
required
integer

Archive ID

query Parameters
dateStart
date-time <Y-m-d>

Start date

dateEnd
date-time <Y-m-d>

End date

state
string
Enum: "absent" "waiting" "in_care" "done" "cancelled" "confirmed"

Appointment State

patientId
integer

Patient ID

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "count": 0,
  • "data": [
    ]
}

Create an appointment

Create an appointment

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice id

archiveId
required
integer

Archive id

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Request Body schema: application/json
date
required
string <date-time>

Appointment's date

patientId
integer

Patient's ID

emailReminder
boolean

Email reminder

smsReminder
boolean

SMS reminder

description
string

Appointment description

allDay
boolean

Is it a full day appointment?

type
string
Enum: "telehealth" "inPractice"

Type of appointment

duration
integer

Duration of the appointment in minutes

state
string

Appointment State

colorId
required
integer

ID of the color for the appointment in the agenda.

chairId
integer

Chair ID of the practice

operatorId
integer

Operator ID

Responses

Request samples

Content type
application/json
{
  • "date": "2020-01-01 00:00:00",
  • "patientId": 69215,
  • "emailReminder": false,
  • "smsReminder": true,
  • "description": "Appointment",
  • "allDay": false,
  • "type": "telehealth",
  • "duration": 30,
  • "state": "string",
  • "colorId": 85665,
  • "chairId": 2285362,
  • "operatorId": 965563
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "data": {
    }
}

Get an appointment

Get the information related to an appointment.

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice ID

archiveId
required
integer

Archive ID

appointmentId
required
integer

Appointment ID

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "data": {
    }
}

Update an appointment

Update an existing appointment's one or multiple attributes.

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice id

archiveId
required
integer

Archive id

appointmentId
required
integer

Appointment id

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Request Body schema: application/json
date
required
string <date-time>

Appointment's date

patientId
integer

Patient's ID

emailReminder
boolean

Email reminder

smsReminder
boolean

SMS reminder

description
string

Appointment description

allDay
boolean

Is it a full day appointment?

type
string
Enum: "telehealth" "inPractice"

Type of appointment

duration
integer

Duration of the appointment in minutes

state
string

Appointment State

colorId
required
integer

ID of the color for the appointment in the agenda.

chairId
integer

Chair ID of the practice

operatorId
integer

Operator ID

Responses

Request samples

Content type
application/json
{
  • "date": "2020-01-01 00:00:00",
  • "patientId": 69215,
  • "emailReminder": false,
  • "smsReminder": true,
  • "description": "Appointment",
  • "allDay": false,
  • "type": "telehealth",
  • "duration": 30,
  • "state": "string",
  • "colorId": 85665,
  • "chairId": 2285362,
  • "operatorId": 965563
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "data": {
    }
}

Chairs

Get the list of the chairs

Get chairs

Get the information related to all configured chairs.

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice ID

archiveId
required
integer

Archive ID

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "count": 0,
  • "data": [
    ]
}

Colors

Get the list of colors

Get colors

Get the information related to all configured colors.

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice ID

archiveId
required
integer

Archive ID

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "count": 0,
  • "data": [
    ]
}

Document

API endpoints for document management

Create a document

Add a new document to the selected patient. You can check the file inside the Patient profile -> Document tab.

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice id

archiveId
required
integer

Archive id

patientId
required
integer

Patient id

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Request Body schema: application/json
base64Data
required
string

base64 encoded file data

type
required
string
Enum: "text" "xray" "image" "identification" "electronic_signature_patient_details" "electronic_signature_patient_details_and_terms_and_conditions" "other"

File type

name
required
string

File name

folderName
required
string

Folder name where the document it's going to be

Responses

Request samples

Content type
application/json
{
  • "base64Data": "string",
  • "type": "text",
  • "name": "string",
  • "folderName": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "folderId": "string",
  • "success": true
}

Free Slots

Get available free slots to set an appointment.

Get free slots

Get a list of free slots available for a duration of time starting from the startDate.

path Parameters
practiceId
required
integer

Practice ID

archiveId
required
integer

Archive ID

startDate
required
date-time <Y-m-d>

Start date

query Parameters
endDate
date-time <Y-m-d>

End date

duration
required
integer

Slot duration (in minutes)

operatorIds
Array of integers
Example: operatorIds=1,2,3,4

Operator's ID

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "count": 0,
  • "data": [
    ]
}

Operators

Get the list of operators

Get operators

Get the information related to all configured operators.

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice ID

archiveId
required
integer

Archive ID

query Parameters
ignoreDeleted
bool
Example: ignoreDeleted=true

To ignore deleted operators otherwise deleted operators will be included

italianFiscalCode
string

filter Operator by italianFiscalCode

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "count": 0,
  • "data": [
    ]
}

Patients

API endpoints for patient's phone numbers management

Get patients

By passing in the appropriate options, you can search for available patients in the system. Custom fields have an underscore as prefix

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice id

archiveId
required
integer

Archive id

query Parameters
phoneNumberPrefix
string <0039>

Phone number prefix

phoneNumber
string <1112233444>

Phone number

italianFiscalCode
string
Example: italianFiscalCode=RSSMRA85T10A562S

To filter patients by italianFiscalCode

offset
integer

Offset to move the result window forward

limit
integer

Number of results in response

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Responses

Response samples

Content type
application/json
{
  • "links": { },
  • "total": 1,
  • "offset": 0,
  • "limit": 100,
  • "results": [
    ]
}

Create a patient

Adds a new patient to the system. You can also add the custom patient fields that you defined on Gestione -> Pazienti -> Impostazioni Paziente by just putting the technical name and the value on the body.

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice id

archiveId
required
integer

Archive id

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Request Body schema: application/json
firstName
required
string

Patient first name

lastName
required
string

Patient last name

email
string

Patient last name

emailEnabled
boolean

If the patient has email sending enabled

gender
string
Enum: "m" "f"

Gender of the patient

street
string

Street address of the patient

city
string

City of the patient

postcode
string

Zip code of the patient

province
string

Province of the patient

dateOfBirth
string

Date of birth of the patient

placeOfBirth
string

City of birth

italianFiscalCode
string

Italian fiscal code

job
string

Software Engineer

yearlyNumberingYear
string

Yearly numbering year

yearlyNumberingNumber
integer

Yearly numbering number

defaultDiscount
integer

Default percentage of discount

sourceId
integer

ID of the patient's source. You can customize the sources available in the Impostazioni -> Studio -> Fonte Pazienti

priceListId
integer

Price list ID. You can find the price lists in the Impostazioni -> Studio -> Prestazioni -> Listini menu

emailReminderPossible
boolean

Is possible to send emails reminders to the patient?

smsReminderPossible
boolean

Is possible to send SMS reminders to the patient?

createdAt
string <date-time>

Creation date

documentSignatureEmailPossible
boolean

Is possible to send documents requesting signature?

lastModifiedAt
string <date-time>

Last modified date

_sampleCustomField
string <string>

The custom field value

Responses

Request samples

Content type
application/json
{
  • "firstName": "string",
  • "lastName": "string",
  • "email": "string",
  • "emailEnabled": true,
  • "gender": "m",
  • "street": "Via Albertazzi 1",
  • "city": "Milano",
  • "postcode": "20100",
  • "province": "MI",
  • "dateOfBirth": "1989-10-11",
  • "placeOfBirth": "Milano",
  • "italianFiscalCode": "RSSMRA85T10A562S",
  • "job": "string",
  • "yearlyNumberingYear": "2018",
  • "yearlyNumberingNumber": "2018",
  • "defaultDiscount": 20,
  • "sourceId": 283,
  • "priceListId": 283,
  • "emailReminderPossible": "true",
  • "smsReminderPossible": "true",
  • "createdAt": "2018-04-01 00:00:00",
  • "documentSignatureEmailPossible": "true",
  • "lastModifiedAt": "2022-06-17 00:00:00",
  • "_sampleCustomField": "string"
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "data": [
    ]
}

Get a patient

Get patient info. It also works for deleted patients, but returns only some data. The endpoint will also return the custom patient field values. These custom fields have an underscore as prefix

Authorizations:
apiKey
path Parameters
patientId
required
integer

Patient id

practiceId
required
integer

Practice id

archiveId
required
integer

Archive id

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "data": {
    }
}

Delete a patient

Delete a patient from the given archive.

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice id

patientId
required
integer

Patient id

archiveId
required
integer

Archive id

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Responses

Update a patient

Update an existing patient from the archive. You can also update custom fields that you defined in Gestione -> Pazienti -> Impostazioni Paziente by using the technical name with an underscore as prefix.

path Parameters
practiceId
required
integer

Practice id

patientId
required
integer

Patient id

archiveId
required
integer

Archive id

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Request Body schema: application/json
firstName
required
string

Patient first name

lastName
required
string

Patient last name

email
string

Patient last name

emailEnabled
boolean

If the patient has email sending enabled

gender
string
Enum: "m" "f"

Gender of the patient

street
string

Street address of the patient

city
string

City of the patient

postcode
string

Zip code of the patient

province
string

Province of the patient

dateOfBirth
string

Date of birth of the patient

placeOfBirth
string

City of birth

italianFiscalCode
string

Italian fiscal code

job
string

Software Engineer

yearlyNumberingYear
string

Yearly numbering year

yearlyNumberingNumber
integer

Yearly numbering number

defaultDiscount
integer

Default percentage of discount

sourceId
integer

ID of the patient's source. You can customize the sources available in the Impostazioni -> Studio -> Fonte Pazienti

priceListId
integer

Price list ID. You can find the price lists in the Impostazioni -> Studio -> Prestazioni -> Listini menu

emailReminderPossible
boolean

Is possible to send emails reminders to the patient?

smsReminderPossible
boolean

Is possible to send SMS reminders to the patient?

createdAt
string <date-time>

Creation date

documentSignatureEmailPossible
boolean

Is possible to send documents requesting signature?

lastModifiedAt
string <date-time>

Last modified date

_sampleCustomField
string <string>

The custom field value

Responses

Request samples

Content type
application/json
{
  • "firstName": "string",
  • "lastName": "string",
  • "email": "string",
  • "emailEnabled": true,
  • "gender": "m",
  • "street": "Via Albertazzi 1",
  • "city": "Milano",
  • "postcode": "20100",
  • "province": "MI",
  • "dateOfBirth": "1989-10-11",
  • "placeOfBirth": "Milano",
  • "italianFiscalCode": "RSSMRA85T10A562S",
  • "job": "string",
  • "yearlyNumberingYear": "2018",
  • "yearlyNumberingNumber": "2018",
  • "defaultDiscount": 20,
  • "sourceId": 283,
  • "priceListId": 283,
  • "emailReminderPossible": "true",
  • "smsReminderPossible": "true",
  • "createdAt": "2018-04-01 00:00:00",
  • "documentSignatureEmailPossible": "true",
  • "lastModifiedAt": "2022-06-17 00:00:00",
  • "_sampleCustomField": "string"
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "data": [
    ]
}

Specialties

Get the list of specialties

Get specialties

Get the information related to all configured specialties.

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice ID

archiveId
required
integer

Archive ID

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "count": 0,
  • "data": [
    ]
}

Phone numbers

Get patient's phone numbers

Get all the related phone numbers of an specific patient.

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice id

archiveId
required
integer

Archive id

patientId
required
integer

Patient id

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Responses

Response samples

Content type
application/json
{
  • "links": { },
  • "total": 1,
  • "offset": 0,
  • "limit": 100,
  • "results": [
    ]
}

Create a patient's phone number

Add a new phone number to an existing patient

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice id

archiveId
required
integer

Archive id

patientId
required
integer

Patient id

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Request Body schema: application/json
prefix
string

Prefix of the phone number

number
string

Number of the phone number

label
string

Type of the phone number

smsEnabled
boolean

Is this phone available for SMS?

Responses

Request samples

Content type
application/json
{
  • "prefix": "string",
  • "number": "string",
  • "label": "string",
  • "smsEnabled": true
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "data": [
    ]
}

Get specific patient's phone number

Get an specific phone number of a patient.

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice id

archiveId
required
integer

Archive id

patientId
required
integer

Patient id

phoneNumberId
required
integer

Phone number id

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "data": {
    }
}

Update an specific patient's phone number

Modify an specific phone number from a patient

Authorizations:
apiKey
path Parameters
practiceId
required
integer

Practice id

archiveId
required
integer

Archive id

patientId
required
integer

Patient id

phoneNumberId
required
integer

Phone number id

header Parameters
X-Api-Key
required
apiKey
Example: JcqPcPQ0Cg07vfYatzZPvuJO3ueuaec3

API Key Authentication

Request Body schema: application/json
prefix
string

Prefix of the phone number

number
string

Number of the phone number

label
string

Type of the phone number

smsEnabled
boolean

Is this phone available for SMS?

Responses

Request samples

Content type
application/json
{
  • "prefix": "string",
  • "number": "string",
  • "label": "string",
  • "smsEnabled": true
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "data": [
    ]
}