Update Shifts
Create, update, or delete one or more scheduled / absence shifts.
Request
API key of the unit.
Array of Shift records to create / update / delete.
A scheduled or worked shift.
Set to 0 or "" to create a new shift; supply an existing id to update that shift.
Shift begin date.
Shift end date.
Shift begin time.
Shift end time.
Quinyx id of the employee. Set to 0 if badgeNo is used.
Badge number of the employee. Leave empty if persId is used.
Required unless shiftTypeExtCode is specified, in which case it can be empty but must still be present.
Agreement id.
0 = none.
External id of the shift. Can only be set when creating a shift; it cannot be edited/updated on an existing shift.
Whether to delete the shift.
Id in the section table.
External section id.
Description of the given shift.
Default inherits from the setting on the shift type.
Default inherits from the setting on the shift type.
External code for the shift type, which can be defined through an integration key type.
Cost centre id.
External cost centre code.
Project id.
External project code.
Account id.
External account code.
An array of Task records. If present but empty, all tasks are removed; if non-empty, only the included tasks are set.
When set, the shift type rules are applied.
Array of validation error messages returned for the shift.
curl -X POST 'https://api.quinyx.com/FlexForceWebServices.php' \
-H 'Content-Type: text/xml; charset=utf-8' \
-H 'SOAPAction: "uri:FlexForce/UpdateShifts"' \
--data @- <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="https://api.quinyx.com/soap/FlexForce">
<soap:Body>
<tns:wsdlUpdateShifts>
<apiKey xsi:type="xsd:string">string</apiKey>
<Shifts xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:Shift[1]">
<item xsi:type="tns:Shift">
<scheduleId xsi:type="xsd:string">134</scheduleId>
<begDate xsi:type="xsd:date">2018-01-02</begDate>
<endDate xsi:type="xsd:date">2018-01-02</endDate>
<begTime xsi:type="xsd:string">12:26:00</begTime>
<endTime xsi:type="xsd:string">17:26:00</endTime>
<begBreak xsi:type="xsd:string">00:00:00</begBreak>
<endBreak xsi:type="xsd:string">00:00:00</endBreak>
<begBreak2 xsi:type="xsd:string">00:00:00</begBreak2>
<endBreak2 xsi:type="xsd:string">00:00:00</endBreak2>
<begBreak3 xsi:type="xsd:string">00:00:00</begBreak3>
<endBreak3 xsi:type="xsd:string">00:00:00</endBreak3>
<begBreak4 xsi:type="xsd:string">00:00:00</begBreak4>
<endBreak4 xsi:type="xsd:string">00:00:00</endBreak4>
<persId xsi:type="xsd:string">16</persId>
<badgeNo xsi:type="xsd:string">19888</badgeNo>
<shiftCategoryId xsi:type="xsd:string">10</shiftCategoryId>
<agreementId xsi:type="xsd:int">0</agreementId>
<extScheduleId xsi:type="xsd:string">string</extScheduleId>
<deleteShift xsi:type="xsd:int">0</deleteShift>
<sectionId xsi:type="xsd:int">0</sectionId>
<extSectionId xsi:type="xsd:string">string</extSectionId>
<comment xsi:type="xsd:string">Description content</comment>
<countsAsScheduledHours xsi:type="xsd:boolean">true</countsAsScheduledHours>
<isFreeDay xsi:type="xsd:boolean">true</isFreeDay>
<shiftTypeExtCode xsi:type="xsd:string">string</shiftTypeExtCode>
<costCentreId xsi:type="xsd:int">0</costCentreId>
<costCentreExtCode xsi:type="xsd:string">string</costCentreExtCode>
<projectId xsi:type="xsd:int">0</projectId>
<projectExtCode xsi:type="xsd:string">string</projectExtCode>
<accountId xsi:type="xsd:int">0</accountId>
<accountExtCode xsi:type="xsd:string">string</accountExtCode>
<replaceTasks xsi:type="xsd:boolean">true</replaceTasks>
<tasks xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:Task[1]">
<item xsi:type="tns:Task">
<shiftTypeExtCode xsi:type="xsd:string">string</shiftTypeExtCode>
<shiftTypeId xsi:type="xsd:int">12</shiftTypeId>
<begTime xsi:type="xsd:string">14:45:00</begTime>
<endTime xsi:type="xsd:string">15:15:00</endTime>
</item>
</tasks>
<applyShiftTypeRules xsi:type="xsd:boolean">true</applyShiftTypeRules>
<validationErrors xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
<item xsi:type="xsd:string">string</item>
</validationErrors>
</item>
</Shifts>
</tns:wsdlUpdateShifts>
</soap:Body>
</soap:Envelope>
EOFResponse
Array of Shift records reflecting the saved state.
A scheduled or worked shift.
Set to 0 or "" to create a new shift; supply an existing id to update that shift.
Shift begin date.
Shift end date.
Shift begin time.
Shift end time.
Quinyx id of the employee. Set to 0 if badgeNo is used.
Badge number of the employee. Leave empty if persId is used.
Required unless shiftTypeExtCode is specified, in which case it can be empty but must still be present.
Agreement id.
0 = none.
External id of the shift. Can only be set when creating a shift; it cannot be edited/updated on an existing shift.
Whether to delete the shift.
Id in the section table.
External section id.
Description of the given shift.
Default inherits from the setting on the shift type.
Default inherits from the setting on the shift type.
External code for the shift type, which can be defined through an integration key type.
Cost centre id.
External cost centre code.
Project id.
External project code.
Account id.
External account code.
An array of Task records. If present but empty, all tasks are removed; if non-empty, only the included tasks are set.
When set, the shift type rules are applied.
Array of validation error messages returned for the shift.
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="https://api.quinyx.com/soap/FlexForce">
<soap:Body>
<tns:wsdlUpdateShiftsResponse>
<return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:Shift[1]">
<item xsi:type="tns:Shift">
<scheduleId xsi:type="xsd:string">134</scheduleId>
<begDate xsi:type="xsd:date">2018-01-02</begDate>
<endDate xsi:type="xsd:date">2018-01-02</endDate>
<begTime xsi:type="xsd:string">12:26:00</begTime>
<endTime xsi:type="xsd:string">17:26:00</endTime>
<begBreak xsi:type="xsd:string">00:00:00</begBreak>
<endBreak xsi:type="xsd:string">00:00:00</endBreak>
<begBreak2 xsi:type="xsd:string">00:00:00</begBreak2>
<endBreak2 xsi:type="xsd:string">00:00:00</endBreak2>
<begBreak3 xsi:type="xsd:string">00:00:00</begBreak3>
<endBreak3 xsi:type="xsd:string">00:00:00</endBreak3>
<begBreak4 xsi:type="xsd:string">00:00:00</begBreak4>
<endBreak4 xsi:type="xsd:string">00:00:00</endBreak4>
<persId xsi:type="xsd:string">16</persId>
<badgeNo xsi:type="xsd:string">19888</badgeNo>
<shiftCategoryId xsi:type="xsd:string">10</shiftCategoryId>
<agreementId xsi:type="xsd:int">0</agreementId>
<extScheduleId xsi:type="xsd:string">string</extScheduleId>
<deleteShift xsi:type="xsd:int">0</deleteShift>
<sectionId xsi:type="xsd:int">0</sectionId>
<extSectionId xsi:type="xsd:string">string</extSectionId>
<comment xsi:type="xsd:string">Description content</comment>
<countsAsScheduledHours xsi:type="xsd:boolean">true</countsAsScheduledHours>
<isFreeDay xsi:type="xsd:boolean">true</isFreeDay>
<shiftTypeExtCode xsi:type="xsd:string">string</shiftTypeExtCode>
<costCentreId xsi:type="xsd:int">0</costCentreId>
<costCentreExtCode xsi:type="xsd:string">string</costCentreExtCode>
<projectId xsi:type="xsd:int">0</projectId>
<projectExtCode xsi:type="xsd:string">string</projectExtCode>
<accountId xsi:type="xsd:int">0</accountId>
<accountExtCode xsi:type="xsd:string">string</accountExtCode>
<replaceTasks xsi:type="xsd:boolean">true</replaceTasks>
<tasks xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:Task[1]">
<item xsi:type="tns:Task">
<shiftTypeExtCode xsi:type="xsd:string">string</shiftTypeExtCode>
<shiftTypeId xsi:type="xsd:int">12</shiftTypeId>
<begTime xsi:type="xsd:string">14:45:00</begTime>
<endTime xsi:type="xsd:string">15:15:00</endTime>
</item>
</tasks>
<applyShiftTypeRules xsi:type="xsd:boolean">true</applyShiftTypeRules>
<validationErrors xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
<item xsi:type="xsd:string">string</item>
</validationErrors>
</item>
</return>
</tns:wsdlUpdateShiftsResponse>
</soap:Body>
</soap:Envelope>Change log
| Date | Description |
|---|---|
| 2018-09-19 | Added comment (description) field to shift element |
| 2018-10-25 | Change a comment for countsAsScheduledHours from default as true to default as inherit from shift type |
| 2019-07-15 | Added isFreeDay |
| 2019-10-13 | Added account,project,costCentre |
| 2020-01-28 | applyShiftTypeRules |