Punch
Punch in or out without sending a complete punch — used for real-time updates from external systems.
Ability to punch in and out without sending the complete punch with in and out parameters already set.
This is mostly used for real time updates when the punch is initiated from an external system. If usecase is to update or add punches historically then wsdlUpdateTimePunches should be used.
Supports punching by badge or card number for identification.
Actions allowed
1 - Punch In
2 - Punch Out
3 - Punch in and close any existing punch found
Punches will be matched to their most accurate shift and rounded accordingly, except for the case of action 3, punching in and closing the existing punch, the switch between current punch and new one will not be rounded.
Notes
- If no existing punch exists when choosing action 3, it will still try to create a punch in, without throwing an error. The status message will reflect the action taken.
- If punches happen outside of Stockholm timezone a timestamp will need to be sent or the punch time will be wrong.
Request
API key of the unit.
Badge number of the employee. Empty string falls back to cardNumber.
Card number of the employee. Empty string falls back to badgeNumber.
The punch action to perform.
External cost-centre id as defined in Quinyx WFM.
Datetime as a string without timezone. The server uses its own time and timezone, corrected by the unit's timezone (defaults to Europe/Stockholm, CET/CEST). Send a timestamp explicitly when the unit is in a different timezone.
curl -X POST 'https://api.quinyx.com/FlexForceWebServices.php' \
-H 'Content-Type: text/xml; charset=utf-8' \
-H 'SOAPAction: "uri:FlexForce/wsdlPunch"' \
--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:wsdlPunch>
<apiKey xsi:type="xsd:string">string</apiKey>
<badgeNumber xsi:type="xsd:string">string</badgeNumber>
<cardNumber xsi:type="xsd:string">string</cardNumber>
<action xsi:type="xsd:int">0</action>
<externalCostCentre xsi:type="xsd:string">string</externalCostCentre>
<timestamp xsi:type="xsd:string">string</timestamp>
</tns:wsdlPunch>
</soap:Body>
</soap:Envelope>
EOFResponse
A PunchValidation record carrying the resulting punch metadata and any validation errors.
The badgeNumber used
The cardNumber used
The final punch in time set will be returned. If action 3, this will be the in time for the new punch created
Will only be set when using action 2
The ID of the created punch
If punch gets matched to a shift, the shiftId will be returned
Returns the status of the punch:
- No action (Will include validationErrors)
- Punched in
- Punched out
- Punched out existing and punched in new
An array of validation error messages.
<?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:wsdlPunchResponse>
<return xsi:type="tns:PunchValidation">
<badgeNumber xsi:type="xsd:string">string</badgeNumber>
<cardNumber xsi:type="xsd:string">string</cardNumber>
<punchIn xsi:type="xsd:dateTime">2024-01-01T00:00:00Z</punchIn>
<punchOut xsi:type="xsd:dateTime">2024-01-01T00:00:00Z</punchOut>
<punchId xsi:type="xsd:int">0</punchId>
<shiftId xsi:type="xsd:int">0</shiftId>
<status xsi:type="xsd:string">string</status>
<validationErrors xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
<item xsi:type="xsd:string">string</item>
</validationErrors>
</return>
</tns:wsdlPunchResponse>
</soap:Body>
</soap:Envelope>