Skip to content

Update Shift Types

Operation
wsdlUpdateShiftTypes
SOAP Action
uri:FlexForce/wsdlUpdateShiftTypes
Service
FlexForce
Port
FlexForcePort
Style
rpc

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

Message: wsdlUpdateShiftTypesRequest

apiKeystringrequired

API key of the unit.

shifTypeArray<UpdateShiftType>required

Array of UpdateShiftType records to create or update.

itemUpdateShiftType

A shift type to create or update through wsdlUpdateShiftTypes.

namestringrequired

Display name of the shift type.

idint

Id of the shift type. Required when updating; leave empty / 0 to create.

shiftTypeExtIdstring

External id of the shift type. When present in the DB it overrides id; otherwise it's created/updated alongside the shift type.

costHourlydecimal

Hourly cost used to estimate the cost of unassigned shifts.

timeStartstringrequired

Default start time. Seconds must be 00. Empty for none.

FormatHH:MM:00
timeEndstringrequired

Default end time. Must be set when timeStart is set.

FormatHH:MM:00
sectionIdintrequired

Section id, or 0 for no section.

breakStartstringrequired

First break start. Empty for none.

FormatHH:MM:00
breakEndstringrequired

First break end. Required when breakStart is set.

FormatHH:MM:00
breakStart2string

Second break start.

FormatHH:MM:00
breakEnd2string

Second break end. Required when breakStart2 is set.

FormatHH:MM:00
breakStart3string

Third break start.

FormatHH:MM:00
breakEnd3string

Third break end.

FormatHH:MM:00
breakStart4string

Fourth break start.

FormatHH:MM:00
breakEnd4string

Fourth break end.

FormatHH:MM:00
commentstring

Free-form comment (e.g. location address).

shiftTypeCatIdintrequired

Shift-type category id.

skillsArray<Skill>

Array of Skill records to attach to the shift type.

productiveTimeint
Values
0Not productive time
1Yes, for scheduled time only
2Yes, always
costCentreIdint

Cost-centre id, or 0 / empty for none.

costCentreExtCodestring

External cost-centre code. Ignored when costCentreId is set.

projectIdint

Project id, or 0 / empty for none.

projectExtCodestring

External project code. Ignored when projectId is set.

accountIdint

Account id, or 0 / empty for none.

accountExtCodestring

External account code. Ignored when accountId is set.

bgColorint

Background colour as a decimal value.

textColorint

Text colour as a decimal value. Not used by Quinyx Web (Neo); applies to Classic only.

useColorsboolean

true to honour bgColor/textColor. Empty or unparseable values are treated as false.

costUT1decimal

Cost factor for unsocial-time level 1.

costUT2decimal

Cost factor for unsocial-time level 2.

costUT3decimal

Cost factor for unsocial-time level 3.

costUT4decimal

Cost factor for unsocial-time level 4.

costUT5decimal

Cost factor for unsocial-time level 5.

costUT6decimal

Cost factor for unsocial-time level 6.

costUT7decimal

Cost factor for unsocial-time level 7.

costUT8decimal

Cost factor for unsocial-time level 8.

isActiveboolean

Whether the shift type is active.

isFreeDayboolean

Whether the shift type represents a free day.

countPunchHoursboolean

Whether punched hours count for this shift type.

countScheduleHoursboolean

Whether scheduled hours count for this shift type.

tasksArray<Task>

Array of Task records — subshift tasks attached to this shift type.

sharedToAllUnitsboolean

When true, share the shift type with every unit on the customer.

replaceboolean

true deletes existing scheduleCategoryUnits entries and writes the supplied set; false only appends. Required when setting scheduleCategoryUnits.

scheduleCategoryUnitsArray<scheduleCategoryUnit>

Array of scheduleCategoryUnit — per-unit visibility configuration.

tagsArray<Tag>

Array of Tag records to attach to the shift type. Empty array clears all tags.

validationErrorsArray<xsd:string>

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>
EOF

Response

Message: wsdlUpdateShiftTypesResponse

returnArray<UpdateShiftType>

Array of UpdateShiftType records reflecting the saved state.

itemUpdateShiftType

A shift type to create or update through wsdlUpdateShiftTypes.

namestringrequired

Display name of the shift type.

idint

Id of the shift type. Required when updating; leave empty / 0 to create.

shiftTypeExtIdstring

External id of the shift type. When present in the DB it overrides id; otherwise it's created/updated alongside the shift type.

costHourlydecimal

Hourly cost used to estimate the cost of unassigned shifts.

timeStartstringrequired

Default start time. Seconds must be 00. Empty for none.

FormatHH:MM:00
timeEndstringrequired

Default end time. Must be set when timeStart is set.

FormatHH:MM:00
sectionIdintrequired

Section id, or 0 for no section.

breakStartstringrequired

First break start. Empty for none.

FormatHH:MM:00
breakEndstringrequired

First break end. Required when breakStart is set.

FormatHH:MM:00
breakStart2string

Second break start.

FormatHH:MM:00
breakEnd2string

Second break end. Required when breakStart2 is set.

FormatHH:MM:00
breakStart3string

Third break start.

FormatHH:MM:00
breakEnd3string

Third break end.

FormatHH:MM:00
breakStart4string

Fourth break start.

FormatHH:MM:00
breakEnd4string

Fourth break end.

FormatHH:MM:00
commentstring

Free-form comment (e.g. location address).

shiftTypeCatIdintrequired

Shift-type category id.

skillsArray<Skill>

Array of Skill records to attach to the shift type.

productiveTimeint
Values
0Not productive time
1Yes, for scheduled time only
2Yes, always
costCentreIdint

Cost-centre id, or 0 / empty for none.

costCentreExtCodestring

External cost-centre code. Ignored when costCentreId is set.

projectIdint

Project id, or 0 / empty for none.

projectExtCodestring

External project code. Ignored when projectId is set.

accountIdint

Account id, or 0 / empty for none.

accountExtCodestring

External account code. Ignored when accountId is set.

bgColorint

Background colour as a decimal value.

textColorint

Text colour as a decimal value. Not used by Quinyx Web (Neo); applies to Classic only.

useColorsboolean

true to honour bgColor/textColor. Empty or unparseable values are treated as false.

costUT1decimal

Cost factor for unsocial-time level 1.

costUT2decimal

Cost factor for unsocial-time level 2.

costUT3decimal

Cost factor for unsocial-time level 3.

costUT4decimal

Cost factor for unsocial-time level 4.

costUT5decimal

Cost factor for unsocial-time level 5.

costUT6decimal

Cost factor for unsocial-time level 6.

costUT7decimal

Cost factor for unsocial-time level 7.

costUT8decimal

Cost factor for unsocial-time level 8.

isActiveboolean

Whether the shift type is active.

isFreeDayboolean

Whether the shift type represents a free day.

countPunchHoursboolean

Whether punched hours count for this shift type.

countScheduleHoursboolean

Whether scheduled hours count for this shift type.

tasksArray<Task>

Array of Task records — subshift tasks attached to this shift type.

sharedToAllUnitsboolean

When true, share the shift type with every unit on the customer.

replaceboolean

true deletes existing scheduleCategoryUnits entries and writes the supplied set; false only appends. Required when setting scheduleCategoryUnits.

scheduleCategoryUnitsArray<scheduleCategoryUnit>

Array of scheduleCategoryUnit — per-unit visibility configuration.

tagsArray<Tag>

Array of Tag records to attach to the shift type. Empty array clears all tags.

validationErrorsArray<xsd:string>

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