1"use strict";(self.webpackChunkapi_docs_template=self.webpackChunkapi_docs_template||[]).push([[928],{76089:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>k,contentTitle:()=>y,default:()=>x,frontMatter:()=>f,metadata:()=>a,toc:()=>D});const a=JSON.parse('{"id":"update-upsert-a-work-schedule","title":"Update (Upsert) a work schedule","description":"Updates a specific work schedule for an employee/date, or creates it if not exists.","source":"@site/docs/update-upsert-a-work-schedule.api.mdx","sourceDirName":".","slug":"/update-upsert-a-work-schedule","permalink":"/docs/update-upsert-a-work-schedule","draft":false,"unlisted":false,"editUrl":null,"tags":[],"version":"current","frontMatter":{"id":"update-upsert-a-work-schedule","title":"Update (Upsert) a work schedule","description":"Updates a specific work schedule for an employee/date, or creates it if not exists.","sidebar_label":"Update (Upsert) a work schedule","hide_title":true,"hide_table_of_contents":true,"api":"eJzNVtuO2zYQ/RViXjYB5OsmQSEgD06boOlDYSRrLALDCGhpbDOmSIUcetcV9C39i/5A0f8qhpLvi023QIA8iuQMzzlzRsMKSC49pFO4tW4tPmYrzINGD7MEcvSZUyUpayCFSZlLQi+k8CVmaqEyccchvg0RC+uENAKLUtstYo+PJ8I6kTmMkYqEWghjSeC98uS7kIDDrwE9vbH5FtIqfiqHOaTkAiaQWUNoiLdkWWqVSUbT++IZUgV8dyFPA6ewQ/BZ5ZAAw+CLLMVYXpwlUDpboiOFnqOPI9IKaFsipKAM4RIdJID3sig1QjoYXtdtyrQ6E+gXSVGEQlIqPnWKDt/epvLklFlCAs0+pDtY+8ww7A9fdvqDTv8nqE/hPo7oVZ2AJ0nBX0IavB5lpDaYiP7rsfRebVA8y3Ehg6ZUDJ4fAB4ym6C1nHNqLkFd74/Y+RfMCOqa1xz60hrfyDfs9y/v/hiyDL1fBC1Y6sgGnlDR0wodGJ4relDQNzdCU6EHkhTovVzi41luT0wdoutz4fds9LYLD6nysE4v+teX0kyMDLSyTv2BuZAxsSC775zvqxI6Zx1r9J/U+GSDkA5j10qt7R3mDNUjClopv8fc5Ywx9efM5t9Iesx/dKgZklT6GP03tX1xqe2HtnEi4oUNJv+R5LxE9yThduG/W3oXqf0f2V4+2K3oNuhEw+YHEmxkGkzCZllwDp+mV8Pq7X2GDc+ny8U/V8yCU7SFdFrBHKVDNwq0gnQ6q2dMg1Y2hxTKQJBAKXkLeptBj8djx+8nKmdiOD4mCk5DCiui0qe9nixVt5Tb3HrfzWwB58N3NH4vOIIv3OHhWV00uh+j2vPi3BeJ3sSTguwajVAaxRZprTSaXLkCu+JXlDm6KymuRm2Lxsqnog2sYmR9Jf75E9damRzF8u+/TI5O6QK1ypXjsd4Aercbdr/d3jD9CBjSdjcqzo76cHgDvN2V7mwmD4bXu7F7PCjP5uTg1WEU9usElFnYKIiiaIdxo7AYjd9fCHO0J3KbhQINMRMuWDtMu/3ugC1UWk+FjI1gZCTUvI3Es0np0dFzIU+fRueXVYf++k7PqtYChPfUK7VU0frRclXr0ClsBpDAmUdnCaysJ96uqrn0OHG6rnn5a0DHLTBLYCOdal4I01mdwCpaJpp6jVtI4eeGXOeGQfBxHRjMxY+kTnYRPARKevTscaeNJ2yneftmLOJvAJy8Yz/IO0gBErBR69gdca0CLc0yxB8ONCnZf/K0Z1pn7gwcSbVb0myPAFZVc+ImtkMNScsktgfUs7qu/wUh9+2A","sidebar_class_name":"put api-method","info_path":"paydoss-api","custom_edit_url":null},"sidebar":"docs-1.0.1","previous":{"title":"List work schedules","permalink":"/docs/list-work-schedules"},"next":{"title":"Bulk assign work schedules","permalink":"/docs/bulk-assign-work-schedules"}}');var r=s(74848),o=s(28453),i=s(57742),p=s.n(i),d=s(78178),n=s.n(d),c=s(19624),l=s.n(c),u=s(96226),m=s.n(u),h=(s(77675),s(19365),s(51107));const f={id:"update-upsert-a-work-schedule",title:"Update (Upsert) a work schedule",description:"Updates a specific work schedule for an employee/date, or creates it if not exists.",sidebar_label:"Update (Upsert) a work schedule",hide_title:!0,hide_table_of_contents:!0,api:"eJzNVtuO2zYQ/RViXjYB5OsmQSEgD06bo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Xr0ClsBpDAmUdnCaysJ96uqrn0OHG6rnn5a0DHLTBLYCOdal4I01mdwCpaJpp6jVtI4eeGXOeGQfBxHRjMxY+kTnYRPARKevTscaeNJ2yneftmLOJvAJy8Yz/IO0gBErBR69gdca0CLc0yxB8ONCnZf/K0Z1pn7gwcSbVb0myPAFZVc+ImtkMNScsktgfUs7qu/wUh9+2A",sidebar_class_name:"put api-method",info_path:"paydoss-api",custom_edit_url:null},y=void 0,k={},D=[];function g(e){const t={p:"p",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.default,{as:"h1",className:"openapi__heading",children:"Update (Upsert) a work schedule"}),"\n",(0,r.jsx)(p(),{method:"put",path:"/v1/work-schedules",context:"endpoint"}),"\n",(0,r.jsx)(t.p,{children:"Updates a specific work schedule for an employee/date, or creates it if not exists."}),"\n",(0,r.jsx)(h.default,{id:"request",as:"h2",className:"openapi-tabs__heading",children:"Request"}),"\n",(0,r.jsx)(n(),{parameters:void 0}),"\n",(0,r.jsx)(l(),{title:"Body",body:{required:!0,content:{"application/json":{schema:{required:["employee_id","date","rotation_id"],properties:{employee_id:{type:"integer",example:123},date:{description:"Date format: Y-m-d",type:"string",format:"date",example:"2025-01-08"},rotation_id:{type:"integer",example:16},status:{description:"1=Active, 0=Passive (default: 1)",type:"integer",nullable:!0}},type:"object"}}}}}),"\n",(0,r.jsx)(m(),{id:void 0,label:void 0,responses:{200:{description:"Successful operation",content:{"application/json":{schema:{properties:{status:{type:"string",example:"success"},data:{properties:{message:{type:"string",example:"Work schedule updated successfully."}},type:"object"}},type:"object"}}}}
1,403:{description:"Unauthorized access to employee",content:{"application/json":{schema:{properties:{status:{type:"string",example:"error"},message:{type:"string",example:"You are not allowed to see this employee."},error_code:{type:"string",example:"UnauthorizedAccess"},details:{type:"object"}},type:"object"}}}},404:{description:"Rotation not found",content:{"application/json":{schema:{properties:{status:{type:"string",example:"error"},message:{type:"string",example:"Rotation not found."},error_code:{type:"string",example:"RotationNotFound"},details:{type:"object"}},type:"object"}}}},500:{description:"Server error",content:{"application/json":{schema:{properties:{status:{type:"string",example:"error"},message:{type:"string",example:"An error occurred."},error_code:{type:"string",example:"ServerException"},details:{type:"object"}},type:"object"}}}}}})]})}function x(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(g,{...e})}):g(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.