POST
Ticket.TeamScheduleEdit
Alias: Ticket.TeamScheduleUpdate. Update a tickets_teammember_time row. Same fields as dashboard Setting::add_ticket_appo edit mode. Requires manager permission. Schedule id is required.
Permissions
- User must be logged in with a valid bearer token.
- Returned or changed records are limited by the user permissions, team access, folder access, and account settings.
Action
- Runs the Ticket.TeamScheduleEdit function and returns JSON.
Push Service
Pushes event ticket.teamschedule.updated to users who should see this change.
Automation
No automation is run for this function.
Special Instructions
- Requires manager permission.
- id (schedule row) is required. Aliases: data_id, appo_id, team_schedule_id, row_id.
- Send working hours as day_name[] / from[] / to[] or working_day JSON.
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
idpost | int | 5 | Schedule row id. Aliases: data_id, appo_id, team_schedule_id, row_id. |
team_member_idpost | int | 47 | Team member id. Alias: member_id. |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
day_namepost | array|string | Sunday | Working day name(s), dashboard day_name[]. Alias: day_name[]. Parallel arrays with from[] / to[]. |
frompost | array|string | 09:00 | Start time(s), dashboard from[]. Alias: from[]. |
topost | array|string | 17:00 | End time(s), dashboard to[]. Alias: to[]. |
working_daypost | json | [{"day_name":"Sunday","from":"09:00","to":"17:00"}] | Alternative to day_name[]/from[]/to[]: JSON array of {day_name, from, to}. |
work_timepost | json | | Optional legacy work_time JSON if your schema has the column. |
colorpost | string | #1c7ed6 | Calendar color (default #1c7ed6). |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Ticket.TeamScheduleEdit",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"id": "5",
"team_member_id": "47",
"color": "#1c7ed6",
"day_name": [
"Sunday"
],
"from": [
"09:00"
],
"to": [
"17:00"
]
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Ticket.TeamScheduleEdit",
"url_domain": "https:\/\/{domain}\/app\/Ticket.TeamScheduleEdit"
}Endpoint
POST /app/Ticket.TeamScheduleEdit
POST https://{user}.bull36.com/app/Ticket.TeamScheduleEdit
POST https://{domain}/app/Ticket.TeamScheduleEditSample Output
{
"success": 1,
"message": "Success",
"id": 5,
"socket_event": "ticket.teamschedule.updated"
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams({ id: '5', team_member_id: '47', color: '#1c7ed6' });
const res = await fetch('/app/Ticket.TeamScheduleEdit', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());Error Example
{
"success": 0,
"message": "Team schedule not found"
}