Skip to content

Get Payroll V2

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

Fetch generated salary types and (optionally) their calculated costs. Successor of wsdlGetPayroll with correct strongly-typed inputs/outputs. **Notes:** all non-preliminary salaries are returned regardless of pSalType; optional boolean inputs must be omitted (not left blank) to fall back to application defaults; the suggested maximum date range is three months.

Due to limitations in the wsdlGetPayroll method a new one has been created to maintain backwards compatibility while adding new features.

Notes

  • All Salaries not definitively transferred to payroll (non. prel) will be included in the output even if we have filtering using pSalType
  • It is important to specify the correct data type for all input parameters. (<attest xsi:type="xsd:boolean">true</attest> and not <attest>true</attest>)
  • Optional input parameters shall not be left blank. A blank boolean parameter will default to false. To use the application specific defaults for boolean parameters, leave out the element completely.
  • The suggested maximum date range when using the call is 3 months.
  • The correct return and input types are now used in the V2 request.
  • If approvedSalaryStatus is not sent in the input parameters, the default behaviour is to include/exclude approved salaries based on the attest input parameter.

Request

Message: wsdlGetPayrollV2Request

apiKeystring

API key of the unit.

getPayrollV2RequestgetPayrollV2Request

Filter set — see the getPayrollV2Request type.

fromDatedaterequired

Inclusive start of the range.

FormatYYYY-MM-DD
Example2015-05-01
toDatedaterequired

Inclusive end of the range.

FormatYYYY-MM-DD
Example2015-05-07
attestbooleanrequired

Whether the result is limited to approved (attested) punches and absences. Also excludes unapproved salaries whose salary type requires approval, unless approvedSalaryStatus is set — that filter then takes precedence for salaries.

Exampletrue
pSalTypestringrequired

Comma-separated transaction type filter

Values
0Time punches
1Salary-based leave
2Shifts without time
3Shifts without time, but with leave application (only exists when attest is missing for that time)
4Non salary-based leave
5Time punches transferred to payroll system
6Leaves transferred to payroll system
7Non salary-based leave
Example0,1,2,3
empInUnitOnlybooleanrequired

Whether the result is limited to employees whose home unit is the API key's unit. Has no effect when employeeId or badgeNo is set.

Values
trueOnly employees whose home unit is the API key's unit
falseEveryone who has worked on the unit during the period, including employees from other units
Exampletrue
employeeIdintrequired

Filter on a single Quinyx employee id.

Example123
badgeNostringrequired

Filter on a single employee badge number.

Example1000
isTransferingToPayrollboolean

Whether the result only includes salaries whose salary type is configured to be transferred to payroll (the salary type's transferToPayroll setting).

Defaulttrue
Exampletrue
approvedSalaryStatusint

Limit results by salary approval status:

Values
0All salaries
1Approved only
2Unapproved only
Example0
includeCostsboolean

Include netCost, absenceCost, socialCost, and totalCost in the response

Defaultfalse
Examplefalse
costCalculationTypeint

Cost calculation method. Has no effect unless includeCosts is true.

Values
1Actual
2Scheduled
3Fixed Schedule based
Example2
includeTagsboolean

Whether tags are included on each PayrollV2 row.

Defaultfalse
Examplefalse
includeStCodeboolean

Set to true to include stCode (salary type code) on each PayrollV2 row.

Examplefalse
curl -X POST 'https://api.quinyx.com/FlexForceWebServices.php' \
  -H 'Content-Type: text/xml; charset=utf-8' \
  -H 'SOAPAction: "uri:FlexForce/getPayrollV2"' \
  --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:wsdlGetPayrollV2>
    <apiKey xsi:type="xsd:string">string</apiKey>
    <getPayrollV2Request xsi:type="tns:getPayrollV2Request">
      <fromDate xsi:type="xsd:date">2015-05-01</fromDate>
      <toDate xsi:type="xsd:date">2015-05-07</toDate>
      <attest xsi:type="xsd:boolean">true</attest>
      <pSalType xsi:type="xsd:string">0,1,2,3</pSalType>
      <empInUnitOnly xsi:type="xsd:boolean">true</empInUnitOnly>
      <employeeId xsi:type="xsd:int">123</employeeId>
      <badgeNo xsi:type="xsd:string">1000</badgeNo>
      <isTransferingToPayroll xsi:type="xsd:boolean">true</isTransferingToPayroll>
      <approvedSalaryStatus xsi:type="xsd:int">0</approvedSalaryStatus>
      <includeCosts xsi:type="xsd:boolean">false</includeCosts>
      <costCalculationType xsi:type="xsd:int">2</costCalculationType>
      <includeTags xsi:type="xsd:boolean">false</includeTags>
      <includeStCode xsi:type="xsd:boolean">false</includeStCode>
    </getPayrollV2Request>
    </tns:wsdlGetPayrollV2>
  </soap:Body>
</soap:Envelope>
EOF

Response

Message: wsdlGetPayrollV2Response

returnArray<PayrollV2>

A PayrollsV2 array of payroll rows matching the filters.

itemPayrollV2

A single payroll row returned by wsdlGetPayrollV2.

idintrequired

Employee id.

empNamestringrequired

Employee display name.

restIdintrequired

Unit id the salary row belongs to.

badgeNostringrequired

Employee badge number.

socsecNostringrequired

Employee social-security number

Example700101-0123
cardNostringrequired

Employee card number.

pTypeintrequired

Payroll row type code.

datedaterequired

Calendar date the row applies to.

FormatYYYY-MM-DD
salTypestringrequired

External salary type code.

instringrequired

Start of the segment.

Formathh:mm
outstringrequired

End of the segment.

Formathh:mm
hoursdecimalrequired

Number of hours for this row.

salaryMgrAttestboolean

Only included when approvedSalaryStatus is set on the request. true when the salary has been approved (always true when the salary does not require approval).

transactionEmpAttestboolean

Only included when approvedSalaryStatus is set on the request. true when the employee has approved this time.

transactionMgrAttestboolean

Only included when approvedSalaryStatus is set on the request. true when the manager has approved this time.

transactionCustAttestboolean

true when the customer has approved this time. Only available with the CRM module.

costCentrestringrequired

Cost centre attached to the underlying punch/shift.

projectNostringrequired

Project number attached to the underlying punch/shift.

accountNostringrequired

Account number attached to the underlying punch/shift.

agrmntAdditionalField1stringrequired

Agreement additional field 1.

agrmntAdditionalField2stringrequired

Agreement additional field 2.

agrmntAdditionalField3stringrequired

Agreement additional field 3.

agrmntAdditionalField4stringrequired

Agreement additional field 4.

agrmntAdditionalField5stringrequired

Agreement additional field 5.

externalInfo1stringrequired

External information field 1 from the underlying punch/shift.

externalInfo2stringrequired

External information field 2 from the underlying punch/shift.

externalInfo3stringrequired

External information field 3 from the underlying punch/shift.

decisionNostringrequired

Decision number attached to the underlying punch/shift.

customerNostringrequired

Customer number attached to the underlying punch/shift.

teamIdintrequired

Team id the row is associated with.

teamExtCodestringrequired

External code of the team the row is associated with.

scheduleIdintrequired

Unique id of the shift the row was generated from.

punchIdintrequired

Unique id of the time punch. **Note:** this id can be empty when the salary type was generated by a bank-holiday rule rather than a punch.

punchDatedaterequired

Date of the underlying time punch.

FormatYYYY-MM-DD
orgScheduleIdintrequired

Original shift id — used when the shift was split by absence, to keep track of the origin.

leaveAppIdintrequired

Unique id of the underlying leave application.

segmentStartDatedaterequired

Calendar start date of the generated salary type. Not related to date.

FormatYYYY-MM-DD
productiveTimebooleanrequired

Whether the underlying shift counts as productive time.

Values
trueThe shift is set as productive time
falseThe shift is not productive time
netCostdecimal

Net cost for the row. Only present when includeCosts is true.

absenceCostdecimal

Absence cost for the row. Only present when includeCosts is true.

socialCostdecimal

Social cost for the row. Only present when includeCosts is true.

totalCostdecimal

Total cost for the row. Only present when includeCosts is true.

tagsArray<PayrollTag>

Array of PayrollTag records. Only present when includeTags is true.

stCodeint

Salary type code. Only present when includeStCode is true.

<?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:wsdlGetPayrollV2Response>
    <return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:PayrollV2[1]">
      <item xsi:type="tns:PayrollV2">
        <id xsi:type="xsd:int">0</id>
        <empName xsi:type="xsd:string">string</empName>
        <restId xsi:type="xsd:int">0</restId>
        <badgeNo xsi:type="xsd:string">string</badgeNo>
        <socsecNo xsi:type="xsd:string">700101-0123</socsecNo>
        <cardNo xsi:type="xsd:string">string</cardNo>
        <pType xsi:type="xsd:int">0</pType>
        <date xsi:type="xsd:date">2024-01-01</date>
        <salType xsi:type="xsd:string">string</salType>
        <in xsi:type="xsd:string">string</in>
        <out xsi:type="xsd:string">string</out>
        <hours xsi:type="xsd:decimal">0</hours>
        <salaryMgrAttest xsi:type="xsd:boolean">true</salaryMgrAttest>
        <transactionEmpAttest xsi:type="xsd:boolean">true</transactionEmpAttest>
        <transactionMgrAttest xsi:type="xsd:boolean">true</transactionMgrAttest>
        <transactionCustAttest xsi:type="xsd:boolean">true</transactionCustAttest>
        <costCentre xsi:type="xsd:string">string</costCentre>
        <projectNo xsi:type="xsd:string">string</projectNo>
        <accountNo xsi:type="xsd:string">string</accountNo>
        <agrmntAdditionalField1 xsi:type="xsd:string">string</agrmntAdditionalField1>
        <agrmntAdditionalField2 xsi:type="xsd:string">string</agrmntAdditionalField2>
        <agrmntAdditionalField3 xsi:type="xsd:string">string</agrmntAdditionalField3>
        <agrmntAdditionalField4 xsi:type="xsd:string">string</agrmntAdditionalField4>
        <agrmntAdditionalField5 xsi:type="xsd:string">string</agrmntAdditionalField5>
        <externalInfo1 xsi:type="xsd:string">string</externalInfo1>
        <externalInfo2 xsi:type="xsd:string">string</externalInfo2>
        <externalInfo3 xsi:type="xsd:string">string</externalInfo3>
        <decisionNo xsi:type="xsd:string">string</decisionNo>
        <customerNo xsi:type="xsd:string">string</customerNo>
        <teamId xsi:type="xsd:int">0</teamId>
        <teamExtCode xsi:type="xsd:string">string</teamExtCode>
        <scheduleId xsi:type="xsd:int">0</scheduleId>
        <punchId xsi:type="xsd:int">0</punchId>
        <punchDate xsi:type="xsd:date">2024-01-01</punchDate>
        <orgScheduleId xsi:type="xsd:int">0</orgScheduleId>
        <leaveAppId xsi:type="xsd:int">0</leaveAppId>
        <segmentStartDate xsi:type="xsd:date">2024-01-01</segmentStartDate>
        <productiveTime xsi:type="xsd:boolean">true</productiveTime>
        <netCost xsi:type="xsd:decimal">0</netCost>
        <absenceCost xsi:type="xsd:decimal">0</absenceCost>
        <socialCost xsi:type="xsd:decimal">0</socialCost>
        <totalCost xsi:type="xsd:decimal">0</totalCost>
        <tags xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:PayrollTag[1]">
          <item xsi:type="tns:PayrollTag">
            <tagCategoryName xsi:type="xsd:string">string</tagCategoryName>
            <tagCategoryExternalId xsi:type="xsd:string">string</tagCategoryExternalId>
            <tagName xsi:type="xsd:string">string</tagName>
            <tagCode xsi:type="xsd:string">string</tagCode>
            <tagExternalId xsi:type="xsd:string">string</tagExternalId>
            <customFields xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="tns:TagCustomField[1]">
              <item xsi:type="tns:TagCustomField">
                <label xsi:type="xsd:string">string</label>
                <value xsi:type="xsd:string">string</value>
              </item>
            </customFields>
          </item>
        </tags>
        <stCode xsi:type="xsd:int">0</stCode>
      </item>
    </return>
    </tns:wsdlGetPayrollV2Response>
  </soap:Body>
</soap:Envelope>