POST

Ticket.TeamScheduleUpdate

Alias of Ticket.TeamScheduleEdit. 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.TeamScheduleUpdate 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

NameTypeSampleExplanation
id
post
int5Schedule row id. Aliases: data_id, appo_id, team_schedule_id, row_id.
team_member_id
post
int47Team member id. Alias: member_id.

Optional Parameters

NameTypeSampleWhat it gives
day_name
post
array|stringSundayWorking day name(s), dashboard day_name[]. Alias: day_name[]. Parallel arrays with from[] / to[].
from
post
array|string09:00Start time(s), dashboard from[]. Alias: from[].
to
post
array|string17:00End time(s), dashboard to[]. Alias: to[].
working_day
post
json[{"day_name":"Sunday","from":"09:00","to":"17:00"}]Alternative to day_name[]/from[]/to[]: JSON array of {day_name, from, to}.
work_time
post
jsonOptional legacy work_time JSON if your schema has the column.
color
post
string#1c7ed6Calendar color (default #1c7ed6).

Authentication

Send the bearer token returned by Login in the request header.

Authorization: Bearer YOUR TOKEN

Sample Request

{
    "url": "\/app\/Ticket.TeamScheduleUpdate",
    "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.TeamScheduleUpdate",
    "url_domain": "https:\/\/{domain}\/app\/Ticket.TeamScheduleUpdate"
}

Endpoint

POST /app/Ticket.TeamScheduleUpdate
POST https://{user}.bull36.com/app/Ticket.TeamScheduleUpdate
POST https://{domain}/app/Ticket.TeamScheduleUpdate

Sample 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.TeamScheduleUpdate', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
console.log(await res.json());

Error Example

{
    "success": 0,
    "message": "Team schedule not found"
}