Update Shift Types
Update or create shift types, the service supports a list of entries and each entry is validated separately. If an error is found that entry will not be updated and a validationErrors is returned with the cause of the failure.
Read more about the shift types color palette here.
Notes
- Only one tag per tag category can be assigned to a shift type. If a list of tags is included, those tags will replace existing tags for the shift type and if the list is empty all tags will be removed,
Request
API key of the unit.
Array of UpdateShiftType records to create or update.
A shift type to create or update through wsdlUpdateShiftTypes.
Display name of the shift type.
Id of the shift type. Required when updating; leave empty / 0 to create.
External id of the shift type. When present in the DB it overrides id; otherwise it's created/updated alongside the shift type.
Hourly cost used to estimate the cost of unassigned shifts.
Default start time. Seconds must be 00. Empty for none.
Default end time. Must be set when timeStart is set.
Section id, or 0 for no section.
First break start. Empty for none.
First break end. Required when breakStart is set.
Second break start.
Second break end. Required when breakStart2 is set.
Third break start.
Third break end.
Fourth break start.
Fourth break end.
Free-form comment (e.g. location address).
Shift-type category id.
Array of Skill records to attach to the shift type.
Cost-centre id, or 0 / empty for none.
External cost-centre code. Ignored when costCentreId is set.
Project id, or 0 / empty for none.
External project code. Ignored when projectId is set.
Account id, or 0 / empty for none.
External account code. Ignored when accountId is set.
Background colour as a decimal value.
Text colour as a decimal value. Not used by Quinyx Web (Neo); applies to Classic only.
true to honour bgColor/textColor. Empty or unparseable values are treated as false.
Cost factor for unsocial-time level 1.
Cost factor for unsocial-time level 2.
Cost factor for unsocial-time level 3.
Cost factor for unsocial-time level 4.
Cost factor for unsocial-time level 5.
Cost factor for unsocial-time level 6.
Cost factor for unsocial-time level 7.
Cost factor for unsocial-time level 8.
Whether the shift type is active.
Whether the shift type represents a free day.
Whether punched hours count for this shift type.
Whether scheduled hours count for this shift type.
Array of Task records — subshift tasks attached to this shift type.
When true, share the shift type with every unit on the customer.
true deletes existing scheduleCategoryUnits entries and writes the supplied set; false only appends. Required when setting scheduleCategoryUnits.
Array of scheduleCategoryUnit — per-unit visibility configuration.
Array of Tag records to attach to the shift type. Empty array clears all tags.
Returned in the response only. Array of error strings on failure; empty on success.
curl -X POST 'https://api.quinyx.com/FlexForceWebServices.php' \
-H 'Content-Type: text/xml; charset=utf-8' \
-H 'SOAPAction: "uri:FlexForce/wsdlUpdateShiftTypes"' \
--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:wsdlUpdateShiftTypes>
<apiKey xsi:type="xsd:string">string</apiKey>
<shifType xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:UpdateShiftType[1]">
<item xsi:type="tns:UpdateShiftType">
<name xsi:type="xsd:string">string</name>
<id xsi:type="xsd:int">0</id>
<shiftTypeExtId xsi:type="xsd:string">string</shiftTypeExtId>
<costHourly xsi:type="xsd:decimal">0</costHourly>
<timeStart xsi:type="xsd:string">string</timeStart>
<timeEnd xsi:type="xsd:string">string</timeEnd>
<sectionId xsi:type="xsd:int">0</sectionId>
<breakStart xsi:type="xsd:string">string</breakStart>
<breakEnd xsi:type="xsd:string">string</breakEnd>
<breakStart2 xsi:type="xsd:string">string</breakStart2>
<breakEnd2 xsi:type="xsd:string">string</breakEnd2>
<breakStart3 xsi:type="xsd:string">string</breakStart3>
<breakEnd3 xsi:type="xsd:string">string</breakEnd3>
<breakStart4 xsi:type="xsd:string">string</breakStart4>
<breakEnd4 xsi:type="xsd:string">string</breakEnd4>
<comment xsi:type="xsd:string">string</comment>
<shiftTypeCatId xsi:type="xsd:int">0</shiftTypeCatId>
<skills xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:Skill[1]">
<item xsi:type="tns:Skill">
<skillId xsi:type="xsd:int">0</skillId>
<skillDescription xsi:type="xsd:string">string</skillDescription>
<ts xsi:type="xsd:dateTime">2024-01-01T00:00:00Z</ts>
</item>
</skills>
<productiveTime xsi:type="xsd:int">0</productiveTime>
<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>
<bgColor xsi:type="xsd:int">0</bgColor>
<textColor xsi:type="xsd:int">0</textColor>
<useColors xsi:type="xsd:boolean">true</useColors>
<costUT1 xsi:type="xsd:decimal">0</costUT1>
<costUT2 xsi:type="xsd:decimal">0</costUT2>
<costUT3 xsi:type="xsd:decimal">0</costUT3>
<costUT4 xsi:type="xsd:decimal">0</costUT4>
<costUT5 xsi:type="xsd:decimal">0</costUT5>
<costUT6 xsi:type="xsd:decimal">0</costUT6>
<costUT7 xsi:type="xsd:decimal">0</costUT7>
<costUT8 xsi:type="xsd:decimal">0</costUT8>
<isActive xsi:type="xsd:boolean">true</isActive>
<isFreeDay xsi:type="xsd:boolean">true</isFreeDay>
<countPunchHours xsi:type="xsd:boolean">true</countPunchHours>
<countScheduleHours xsi:type="xsd:boolean">true</countScheduleHours>
<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>
<sharedToAllUnits xsi:type="xsd:boolean">true</sharedToAllUnits>
<replace xsi:type="xsd:boolean">true</replace>
<scheduleCategoryUnits xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:scheduleCategoryUnit[1]">
<item xsi:type="tns:scheduleCategoryUnit">
<externalUnitId xsi:type="xsd:string">string</externalUnitId>
<unitId xsi:type="xsd:int">0</unitId>
<visibleInWebpunch xsi:type="xsd:boolean">true</visibleInWebpunch>
</item>
</scheduleCategoryUnits>
<tags xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:Tag[1]">
<item xsi:type="tns:Tag">
<categoryExternalId xsi:type="xsd:string">string</categoryExternalId>
<tagExternalId xsi:type="xsd:string">string</tagExternalId>
</item>
</tags>
<validationErrors xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
<item xsi:type="xsd:string">string</item>
</validationErrors>
</item>
</shifType>
</tns:wsdlUpdateShiftTypes>
</soap:Body>
</soap:Envelope>
EOFResponse
Array of UpdateShiftType records reflecting the saved state.
A shift type to create or update through wsdlUpdateShiftTypes.
Display name of the shift type.
Id of the shift type. Required when updating; leave empty / 0 to create.
External id of the shift type. When present in the DB it overrides id; otherwise it's created/updated alongside the shift type.
Hourly cost used to estimate the cost of unassigned shifts.
Default start time. Seconds must be 00. Empty for none.
Default end time. Must be set when timeStart is set.
Section id, or 0 for no section.
First break start. Empty for none.
First break end. Required when breakStart is set.
Second break start.
Second break end. Required when breakStart2 is set.
Third break start.
Third break end.
Fourth break start.
Fourth break end.
Free-form comment (e.g. location address).
Shift-type category id.
Array of Skill records to attach to the shift type.
Cost-centre id, or 0 / empty for none.
External cost-centre code. Ignored when costCentreId is set.
Project id, or 0 / empty for none.
External project code. Ignored when projectId is set.
Account id, or 0 / empty for none.
External account code. Ignored when accountId is set.
Background colour as a decimal value.
Text colour as a decimal value. Not used by Quinyx Web (Neo); applies to Classic only.
true to honour bgColor/textColor. Empty or unparseable values are treated as false.
Cost factor for unsocial-time level 1.
Cost factor for unsocial-time level 2.
Cost factor for unsocial-time level 3.
Cost factor for unsocial-time level 4.
Cost factor for unsocial-time level 5.
Cost factor for unsocial-time level 6.
Cost factor for unsocial-time level 7.
Cost factor for unsocial-time level 8.
Whether the shift type is active.
Whether the shift type represents a free day.
Whether punched hours count for this shift type.
Whether scheduled hours count for this shift type.
Array of Task records — subshift tasks attached to this shift type.
When true, share the shift type with every unit on the customer.
true deletes existing scheduleCategoryUnits entries and writes the supplied set; false only appends. Required when setting scheduleCategoryUnits.
Array of scheduleCategoryUnit — per-unit visibility configuration.
Array of Tag records to attach to the shift type. Empty array clears all tags.
Returned in the response only. Array of error strings on failure; empty on success.
<?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:wsdlUpdateShiftTypesResponse>
<return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:UpdateShiftType[1]">
<item xsi:type="tns:UpdateShiftType">
<name xsi:type="xsd:string">string</name>
<id xsi:type="xsd:int">0</id>
<shiftTypeExtId xsi:type="xsd:string">string</shiftTypeExtId>
<costHourly xsi:type="xsd:decimal">0</costHourly>
<timeStart xsi:type="xsd:string">string</timeStart>
<timeEnd xsi:type="xsd:string">string</timeEnd>
<sectionId xsi:type="xsd:int">0</sectionId>
<breakStart xsi:type="xsd:string">string</breakStart>
<breakEnd xsi:type="xsd:string">string</breakEnd>
<breakStart2 xsi:type="xsd:string">string</breakStart2>
<breakEnd2 xsi:type="xsd:string">string</breakEnd2>
<breakStart3 xsi:type="xsd:string">string</breakStart3>
<breakEnd3 xsi:type="xsd:string">string</breakEnd3>
<breakStart4 xsi:type="xsd:string">string</breakStart4>
<breakEnd4 xsi:type="xsd:string">string</breakEnd4>
<comment xsi:type="xsd:string">string</comment>
<shiftTypeCatId xsi:type="xsd:int">0</shiftTypeCatId>
<skills xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:Skill[1]">
<item xsi:type="tns:Skill">
<skillId xsi:type="xsd:int">0</skillId>
<skillDescription xsi:type="xsd:string">string</skillDescription>
<ts xsi:type="xsd:dateTime">2024-01-01T00:00:00Z</ts>
</item>
</skills>
<productiveTime xsi:type="xsd:int">0</productiveTime>
<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>
<bgColor xsi:type="xsd:int">0</bgColor>
<textColor xsi:type="xsd:int">0</textColor>
<useColors xsi:type="xsd:boolean">true</useColors>
<costUT1 xsi:type="xsd:decimal">0</costUT1>
<costUT2 xsi:type="xsd:decimal">0</costUT2>
<costUT3 xsi:type="xsd:decimal">0</costUT3>
<costUT4 xsi:type="xsd:decimal">0</costUT4>
<costUT5 xsi:type="xsd:decimal">0</costUT5>
<costUT6 xsi:type="xsd:decimal">0</costUT6>
<costUT7 xsi:type="xsd:decimal">0</costUT7>
<costUT8 xsi:type="xsd:decimal">0</costUT8>
<isActive xsi:type="xsd:boolean">true</isActive>
<isFreeDay xsi:type="xsd:boolean">true</isFreeDay>
<countPunchHours xsi:type="xsd:boolean">true</countPunchHours>
<countScheduleHours xsi:type="xsd:boolean">true</countScheduleHours>
<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>
<sharedToAllUnits xsi:type="xsd:boolean">true</sharedToAllUnits>
<replace xsi:type="xsd:boolean">true</replace>
<scheduleCategoryUnits xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:scheduleCategoryUnit[1]">
<item xsi:type="tns:scheduleCategoryUnit">
<externalUnitId xsi:type="xsd:string">string</externalUnitId>
<unitId xsi:type="xsd:int">0</unitId>
<visibleInWebpunch xsi:type="xsd:boolean">true</visibleInWebpunch>
</item>
</scheduleCategoryUnits>
<tags xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:Tag[1]">
<item xsi:type="tns:Tag">
<categoryExternalId xsi:type="xsd:string">string</categoryExternalId>
<tagExternalId xsi:type="xsd:string">string</tagExternalId>
</item>
</tags>
<validationErrors xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
<item xsi:type="xsd:string">string</item>
</validationErrors>
</item>
</return>
</tns:wsdlUpdateShiftTypesResponse>
</soap:Body>
</soap:Envelope>Change log
| Date | Description |
|---|---|
| 2019-04-03 | Documentation uplifted to new format |
| 2019-04-03 | New fields added: costCentre, costCentreExtCode, projectId, projectExtCode, accountId, accountExtCode, tags |
| 2019-04-11 | Tags added.. costCentre.. Projects and Accounts |
| 2020-03-06 | Tasks |
| 2020-03-20 | Add shiftTypeExtId |
| 2020-07-29 | Added isFreeDay, countPunchHours, countScheduleHours, break 2,3 and 4 |