- Auth
- ForgotPassword
- Profile
- Family Members
- Address
- Languages
- Products
- Permissions
- Config
- Appointment Schedule
- Test Tags
- Test Parameters
- Category
- Device
- File
- Appointment
- Reports
- Staff
- Patient
- Notifications
Create Schedule
Developing
POST
/api/service/v1/appointment/schedule
Request
Header Params
Accept
string
optional
Example:
application/json
Content-Type
string
optional
Example:
application/json
practice-code
string
optional
Example:
DEFAULT
Authorization
string
optional
Example:
{{token}}
Body Params application/json
user
string
required
name
string
required
start
string
required
end
null
required
services
array[string]
required
timezone
string
required
schedules
array [object {5}]
required
day
integer
required
isOn
boolean
required
startTime
string
required
endTime
string
required
breaks
array [object {2}]
required
override_dates
array [object {3}]
required
date
string
optional
start_time
string
optional
end_time
string
optional
Example
{
"user" : "677bb5bd4291b96cd0623eea",
"name" : "update THis is my Schedule name",
"start" : "2024-12-19",
"end" : null,
"is_active" : true,
"services": ["6790d7c19975d85c7b447c53"],
"timezone" : "Asia/Kolkata",
"schedules" : [
{
"day" : 1,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "10:00",
"end" : "11:00"
}
]
},
{
"day" : 2,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "10:00",
"end" : "11:00"
}
]
},
{
"day" : 3,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "14:00",
"end" : "15:00"
}
]
},
{
"day" : 4,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "10:00",
"end" : "11:00"
}
]
},
{
"day" : 5,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "10:00",
"end" : "11:00"
}
]
},
{
"day" : 6,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "10:00",
"end" : "11:00"
}
]
},
{
"day" : 7,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "10:00",
"end" : "11:00"
}
]
}
],
"override_dates" : [
{
"date" : "2024-12-30",
"start_time": "13:00",
"end_time": "14:00"
}
]
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://afyahealth.doctodoor.com:5600/api/service/v1/appointment/schedule' \
--header 'Accept: application/json' \
--header 'practice-code: DEFAULT' \
--header 'Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjJkZmZlNWJmMjdlMzk1NTUzMjE0MyIsImVtYWlsIjoiZGVlcC5tYXJzb25pYUBwbGVuYXJ0ZWNoLmNvbSIsInN1YiI6IjY3YjJkZmZlNWJmMjdlMzk1NTUzMjE0MyIsImlhdCI6MTc0MTc4MjA4NCwiZXhwIjoxNzQ5NTU4MDg0fQ.KAMsweSbJPDxpLijKdjgp3YEFauw8KYLLumCBpqQfAA' \
--header 'Content-Type: application/json' \
--data-raw '{
"user" : "677bb5bd4291b96cd0623eea",
"name" : "update THis is my Schedule name",
"start" : "2024-12-19",
"end" : null,
"is_active" : true,
"services": ["6790d7c19975d85c7b447c53"],
"timezone" : "Asia/Kolkata",
"schedules" : [
{
"day" : 1,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "10:00",
"end" : "11:00"
}
]
},
{
"day" : 2,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "10:00",
"end" : "11:00"
}
]
},
{
"day" : 3,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "14:00",
"end" : "15:00"
}
]
},
{
"day" : 4,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "10:00",
"end" : "11:00"
}
]
},
{
"day" : 5,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "10:00",
"end" : "11:00"
}
]
},
{
"day" : 6,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "10:00",
"end" : "11:00"
}
]
},
{
"day" : 7,
"isOn" : true,
"startTime" : "09:00",
"endTime" : "15:00",
"breaks" : [
{
"start" : "10:00",
"end" : "11:00"
}
]
}
],
"override_dates" : [
{
"date" : "2024-12-30",
"start_time": "13:00",
"end_time": "14:00"
}
]
}'
Responses
🟢200Success
application/json
Body
error
boolean
required
status_code
integer
required
data
object
required
services
array[string]
required
buffer_minutes
integer
required
is_deleted
integer
required
override_dates
array [object {6}]
optional
schedules
array [object {8}]
required
user
object
required
name
string
required
start
string
required
end
string
required
timezone
string
required
created_at
string
required
updated_at
string
required
id
string
required
Examples
{
"error": false,
"status_code": 200,
"message": "Schedule created successfully.",
"data": {
"services": [
{
"parent": null,
"fee_amount": 10,
"fee_type": "percentage",
"fee_currency": "SAR",
"is_deleted": 0,
"title": {
"en": "Blood Services",
"ar": "AR TITLE"
},
"type": "service",
"color": "#FF7689",
"image": "67b44aaae1c5fa73ee81bb13",
"slug": "blood_reports",
"created_at": "2025-02-18T08:50:26.845Z",
"updated_at": "2025-02-18T09:10:14.813Z",
"id": "67b449d2e1c5fa73ee81b9fb"
}
],
"is_active": true,
"buffer_minutes": 0,
"is_deleted": 0,
"override_dates": [
{
"date": "2024-12-30T00:00:00.000Z",
"start_time": "13:00",
"end_time": "14:00",
"created_at": "2025-03-03T09:45:00.459Z",
"updated_at": "2025-03-03T09:45:00.459Z",
"id": "67c57a1c3a2066574759b224"
}
],
"schedules": [
{
"day": 1,
"isOn": true,
"startTime": "09:00",
"endTime": "15:00",
"breaks": [
{
"start": "12:00",
"end": "13:00",
"created_at": "2025-03-03T09:45:00.459Z",
"updated_at": "2025-03-03T09:45:00.459Z",
"id": "67c57a1c3a2066574759b217"
}
],
"created_at": "2025-03-03T09:45:00.459Z",
"updated_at": "2025-03-03T09:45:00.459Z",
"id": "67c57a1c3a2066574759b216"
},
{
"day": 2,
"isOn": true,
"startTime": "09:00",
"endTime": "15:00",
"breaks": [
{
"start": "12:00",
"end": "13:00",
"created_at": "2025-03-03T09:45:00.459Z",
"updated_at": "2025-03-03T09:45:00.459Z",
"id": "67c57a1c3a2066574759b219"
}
],
"created_at": "2025-03-03T09:45:00.459Z",
"updated_at": "2025-03-03T09:45:00.459Z",
"id": "67c57a1c3a2066574759b218"
},
{
"day": 3,
"isOn": true,
"startTime": "09:00",
"endTime": "15:00",
"breaks": [
{
"start": "12:00",
"end": "13:00",
"created_at": "2025-03-03T09:45:00.459Z",
"updated_at": "2025-03-03T09:45:00.459Z",
"id": "67c57a1c3a2066574759b21b"
}
],
"created_at": "2025-03-03T09:45:00.460Z",
"updated_at": "2025-03-03T09:45:00.460Z",
"id": "67c57a1c3a2066574759b21a"
},
{
"day": 4,
"isOn": true,
"startTime": "09:00",
"endTime": "15:00",
"breaks": [
{
"start": "12:00",
"end": "13:00",
"created_at": "2025-03-03T09:45:00.460Z",
"updated_at": "2025-03-03T09:45:00.460Z",
"id": "67c57a1c3a2066574759b21d"
}
],
"created_at": "2025-03-03T09:45:00.460Z",
"updated_at": "2025-03-03T09:45:00.460Z",
"id": "67c57a1c3a2066574759b21c"
},
{
"day": 5,
"isOn": true,
"startTime": "09:00",
"endTime": "15:00",
"breaks": [
{
"start": "12:00",
"end": "13:00",
"created_at": "2025-03-03T09:45:00.460Z",
"updated_at": "2025-03-03T09:45:00.460Z",
"id": "67c57a1c3a2066574759b21f"
}
],
"created_at": "2025-03-03T09:45:00.460Z",
"updated_at": "2025-03-03T09:45:00.460Z",
"id": "67c57a1c3a2066574759b21e"
},
{
"day": 6,
"isOn": false,
"startTime": "09:00",
"endTime": "15:00",
"breaks": [
{
"start": "12:00",
"end": "13:00",
"created_at": "2025-03-03T09:45:00.460Z",
"updated_at": "2025-03-03T09:45:00.460Z",
"id": "67c57a1c3a2066574759b221"
}
],
"created_at": "2025-03-03T09:45:00.460Z",
"updated_at": "2025-03-03T09:45:00.460Z",
"id": "67c57a1c3a2066574759b220"
},
{
"day": 7,
"isOn": false,
"startTime": "09:00",
"endTime": "15:00",
"breaks": [
{
"start": "12:00",
"end": "13:00",
"created_at": "2025-03-03T09:45:00.460Z",
"updated_at": "2025-03-03T09:45:00.460Z",
"id": "67c57a1c3a2066574759b223"
}
],
"created_at": "2025-03-03T09:45:00.460Z",
"updated_at": "2025-03-03T09:45:00.460Z",
"id": "67c57a1c3a2066574759b222"
}
],
"user": {
"roles": [
"677bb5bd4291b96cd0623e9a"
],
"is_master_admin": 1,
"is_temporary_password": 0,
"is_deleted": 1,
"is_active": 1,
"deleted_at": null,
"language_code": "en",
"first_name": "Deep provider2",
"middle_name": "",
"last_name": "PRO",
"full_name": "Deep provider2 PRO",
"email": "deep.marsonia+lt1@plenartech.com",
"created_at": "2025-01-06T10:51:41.468Z",
"updated_at": "2025-02-27T06:44:23.470Z",
"family_members": [
{
"name": "test2",
"gender": "male",
"birth_date": "2000-01-01T00:00:00.000Z",
"updated_at": "2025-02-11T07:16:27.156Z",
"created_at": "2025-02-11T07:16:27.156Z",
"id": "67aaf94bdda840588315f62f"
}
],
"birth_date": "1994-05-05T13:06:00.000Z",
"country_code": "+91",
"gender": "male",
"image": "67b485f920396ed6b0344079",
"phone_primary": "345345",
"id": "677bb5bd4291b96cd0623ef2"
},
"name": "Hemoglogon schedule u2",
"start": "2025-01-01T00:00:00.000Z",
"end": null,
"timezone": "Asia/Kolkata",
"created_at": "2025-03-03T09:45:00.460Z",
"updated_at": "2025-03-03T09:45:00.460Z",
"id": "67c57a1c3a2066574759b215"
}
}