Skip to content

Punch

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

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

Message: wsdlPunchRequest

apiKeystringrequired

API key of the unit.

badgeNumberstring

Badge number of the employee. Empty string falls back to cardNumber.

cardNumberstring

Card number of the employee. Empty string falls back to badgeNumber.

actionintrequired

The punch action to perform.

Values
1Punch in
2Punch out
3Punch in and close any existing open punch (silently creates a punch-in if no open punch exists)
externalCostCentrestring

External cost-centre id as defined in Quinyx WFM.

timestampstring

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.

FormatYYYY-MM-DDTHH:MM:SS
Example2023-11-11T20:00:00
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>
EOF

Response

Message: wsdlPunchResponse

returnPunchValidation

A PunchValidation record carrying the resulting punch metadata and any validation errors.

badgeNumberstringrequired

The badgeNumber used

cardNumberstringrequired

The cardNumber used

punchIndateTimerequired

The final punch in time set will be returned. If action 3, this will be the in time for the new punch created

punchOutdateTimerequired

Will only be set when using action 2

punchIdintrequired

The ID of the created punch

shiftIdintrequired

If punch gets matched to a shift, the shiftId will be returned

Default0
statusstringrequired

Returns the status of the punch:

  • No action (Will include validationErrors)
  • Punched in
  • Punched out
  • Punched out existing and punched in new
validationErrorsArray<xsd:string>required

An array of validation error messages.

itemstring
<?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>