- 16 Feb 2024
- 11 Minutes to read
- Print
- DarkLight
Capturing Timesheets
- Updated on 16 Feb 2024
- 11 Minutes to read
- Print
- DarkLight
Time captured in external system and created in CMiC for cost purposes. These can be posted, un-posted, pre-approved.
Step 1: Retrieve the job cost distribution
Find job using company code e.g. compCode=001
- ?finder=findByKeys;compCode=001
Request
curl --location --request GET 'https://mobtest.cmiccloudr12.com/cmictestrti/jc-rest-api/rest/1/jcjob?finder=findByKeys;compCode=001' \
--header 'Authorization: Basic Your-User:Pass'
Response
{
"items": [{
"JobAccmethCode": null,
"JobAcctContactCode": null,
"JobAcctPartnCode": null,
"JobAcctPartnTypeCode": null,
"JobActComplDate": null,
"JobActStartDate": "2023-01-24",
"JobActionCode": null,
"JobAddTypeCode": null,
"JobAdjBudgEqualsRevFlg": "N",
"JobAllocApdiscJobFlag": "N",
"JobAllowEtmshtEntriesFlag": "Y",
"JobAllowOverheadFlag": "Y",
"JobApTax1Code": null,
"JobApTax2Code": null,
"JobApTax3Code": null,
"JobApplyDbRules": "N",
"JobArTax1Code": null,
"JobArTax2Code": null,
"JobArTax3Code": null,
"JobArchiveFlag": "N",
"JobAreaDistrict": null,
"JobAsstContactCode": null,
"JobAsstPartnCode": null,
"JobAsstPartnTypeCode": null,
"JobAttachOraseq": 51431458,
"JobAuthRqSeqNum": null,
"JobBidCode": null,
"JobBidFlag": "N",
"JobBidStatusCode": null,
"JobBidSubmitDate": null,
"JobBillAccCode": "40001",
"JobBillAmt": 0,
"JobBillDeptCode": "050",
"JobBillFlag": null,
"JobBillMethCode": "AR",
"JobBillTblRevFcastFlg": "N",
"JobBillingRateTableCode": "DFLT",
"JobBillingTypeCode": "COST",
"JobBudgOvrdProjFlag": "N",
"JobBudgUnit": null,
"JobBudgcstSameLevelFlag": "Y",
"JobBudgrSeqNum": null,
"JobCalSalChargeRate": null,
"JobCcAccCode": "16010",
"JobCcDeptCode": "050",
"JobCertifyCode": null,
"JobCertrepContractNumber": null,
"JobCertrepEndDate": null,
"JobCertrepFringeBenPaid": null,
"JobCertrepSignatoryName": null,
"JobCertrepSignatoryTitle": null,
"JobCertrepStartDate": null,
"JobChgSeqNum": null,
"JobCilocCode": null,
"JobCode": "00100",
"JobCompCode": "001",
"JobComplUnit": null,
"JobCompletedForWipFlag": "N",
"JobConstructionValue": null,
"JobConstructionValuePct": null,
"JobContTypeCode": null,
"JobContactCode": null,
"JobContractAmt": null,
"JobContractCode": "00100",
"JobCostFlag": "Y",
"JobCostMethCode": "B",
"JobCostToComplOvrdFlg": "N",
"JobCreateDate": "2016-09-21T16:02:01-04:00",
"JobCtrlCode": "ALL",
"JobCustCode": "11-0588",
"JobCustContactName": null,
"JobDaysOutstInvPaidTtl": null,
"JobDefaultDeptCode": "050",
"JobDefaultPyovhdGrp": null,
"JobDisbAmt": null,
"JobEqpChgNoRestartFlag": "N",
"JobEstComplDate": null,
"JobEstStartDate": null,
"JobExclBillingWip": "N",
"JobExclContAmtWipFlag": null,
"JobExclRevBudgWip": "N",
"JobExcludeFromWipFlag": "N",
"JobFcastInclSubjobsFlg": "N",
"JobFinalizeProjectionsFlag": null,
"JobFullyPaidInvs": null,
"JobHbAmt": null,
"JobHbRecAmt": null,
"JobHier": "001 00100 ",
"JobIbAllowFlag": "N",
"JobIbExpenseCatCode": null,
"JobIbFullTariffFlag": "N",
"JobIgnoreCostsPriorToDate": null,
"JobInvFormatCode": null,
"JobInvoiceFormatCode": "6",
"JobInvoiceGroupCode": null,
"JobIuCreateDate": "2016-09-21T16:02:03-04:00",
"JobIuUpdateDate": "2023-01-24T23:35:30-05:00",
"JobJbMapCode": "DFLT",
"JobJbRetainageCode": null,
"JobJtrExpFlag": null,
"JobLbcAccCode": null,
"JobLbcDeptCode": null,
"JobLocCode": null,
"JobLongCode": null,
"JobLstAddonDate": null,
"JobLstRecDate": "2016-12-31",
"JobLstRecPc": null,
"JobLtcAccCode": "21010",
"JobLtcDeptCode": "050",
"JobMakeupFlag": null,
"JobMaxBillingAmt": null,
"JobMaxBillingBudgetAmt": null,
"JobMaxChargePc": null,
"JobMaxHourlyRate": null,
"JobMaxHours": null,
"JobMsCode": null,
"JobMutliOvhdPcFlag": "N",
"JobName": "Electrical Reno",
"JobOrigBudgetEffectiveDate": null,
"JobOriginalContractAmt": 0,
"JobOriginalFeeAmt": null,
"JobPartnCode": null,
"JobPartnTypeCode": null,
"JobPayFromJobCompFlag": "N",
"JobPayrateScheduleCode": null,
"JobPhsBudgUnitsFlag": "N",
"JobPhsTypeRequiredFlg": "N",
"JobPlPolicyNo": null,
"JobPmFlag": "N",
"JobPolicyNo": null,
"JobPrevailingWage": null,
"JobProfrecAmt": null,
"JobProjThresholdPct": 0,
"JobPropertyId": null,
"JobProvinceCode": null,
"JobPublicSectorFlag": "N",
"JobPwOvRate": null,
"JobPwRateCode": null,
"JobPyOvtruleCode": null,
"JobRateByJobFlag": null,
"JobRecAmt": null,
"JobReserveRevAccCode": "41011",
"JobReserveRevDeptCode": "050",
"JobRevenueGenState": "J",
"JobRevrecAmt": null,
"JobRevrecCurrDate": null,
"JobRevrecLstAmt": 0,
"JobRevrecLstPc": 0,
"JobRevrecPc": null,
"JobRuleCode": null,
"JobSecGroup": null,
"JobSectorCode": null,
"JobShowCprAsCostAmtFlag": "N",
"JobSiSeqNum": null,
"JobSickPolicyCode": null,
"JobSizeCode": "L",
"JobStatusCode": "I",
"JobSubFlag": null,
"JobSuptContactCode": null,
"JobSuptPartnCode": null,
"JobSuptPartnTypeCode": null,
"JobTax1Code": null,
"JobTax2Code": null,
"JobTax3Code": null,
"JobTermCode": "NET30",
"JobTrackRepBurden": null,
"JobUeValidFlag": "Y",
"JobUnbilledRevAccCode": "41009",
"JobUnbilledRevDeptCode": "050",
"JobUnitPricedContractFlag": "N",
"JobUseEqpBillRateFlag": "N",
"JobUsePayBillRateFlag": "N",
"JobWbsvCode1": null,
"JobWbsvCode10": null,
"JobWbsvCode11": null,
"JobWbsvCode12": null,
"JobWbsvCode2": null,
"JobWbsvCode3": null,
"JobWbsvCode4": null,
"JobWbsvCode5": null,
"JobWbsvCode6": null,
"JobWbsvCode7": null,
"JobWbsvCode8": null,
"JobWbsvCode9": null,
"JobWbsvEditableFlag1": "Y",
"JobWbsvEditableFlag10": null,
"JobWbsvEditableFlag11": null,
"JobWbsvEditableFlag12": null,
"JobWbsvEditableFlag2": "Y",
"JobWbsvEditableFlag3": "Y",
"JobWbsvEditableFlag4": "N",
"JobWbsvEditableFlag5": null,
"JobWbsvEditableFlag6": null,
"JobWbsvEditableFlag7": null,
"JobWbsvEditableFlag8": null,
"JobWbsvEditableFlag9": null,
"JobWbsvRequiredFlag1": "N",
"JobWbsvRequiredFlag10": null,
"JobWbsvRequiredFlag11": null,
"JobWbsvRequiredFlag12": null,
"JobWbsvRequiredFlag2": "N",
"JobWbsvRequiredFlag3": "N",
"JobWbsvRequiredFlag4": "N",
"JobWbsvRequiredFlag5": null,
"JobWbsvRequiredFlag6": null,
"JobWbsvRequiredFlag7": null,
"JobWbsvRequiredFlag8": null,
"JobWbsvRequiredFlag9": null,
"JobWipAccCode": null,
"JobWipAdjAccCode": null,
"JobWipAdjDeptCode": null,
"JobWipDeptCode": "050",
"JobWipLmrgOvrFlag": "N",
"JobWipMrgLossbsAcc": null,
"JobWipMrgLossbsDep": null,
"JobWipMrgLossplAcc": null,
"JobWipMrgLossplDep": null,
"JobWipOhLossbsAcc": null,
"JobWipOhLossbsDep": null,
"JobWipOhLossplAcc": null,
"JobWipOhLossplDep": null,
"JobWipOverrideContAmt": null,
"JobWipRollInSubjobFlag": "Y",
"JobWipUnpostedCostAcc": null,
"JobWipUnpostedCostCat": null,
"JobWipUnpostedCostDep": null,
"JobWipUnpostedCostPhase": null,
"JobWipUnpostedRevAcc": null,
"JobWipUnpostedRevCat": null,
"JobWipUnpostedRevDep": null,
"JobWipUnpostedRevPhase": null,
"JobWmCode": null,
"JobWoFlag": null,
"JobWorkLoc": null,
"WorkLoc": null,
"JobVUuid": "B41F55C8B62CA908E053B08610AC2C73",
"links": [{
"rel": "self",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/jc-rest-api/rest/1/jcjob/B41F55C8B62CA908E053B08610AC2C73",
"name": "jcjob",
"kind": "item"
}, {
"rel": "canonical",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/jc-rest-api/rest/1/jcjob/B41F55C8B62CA908E053B08610AC2C73",
"name": "jcjob",
"kind": "item"
}
]
}
]
}
Step 2 Retrieve JC Job Phases
Retrieve cost codes related to the selected job using the finder query parameter e.g.
- ?finder=selectJobPhases;compCode=001,jobCode=00100
Request
curl --location --request GET 'https://mobtest.cmiccloudr12.com/cmictestrti/jc-rest-api/rest/1/jcjobcostcodes?finder=selectJobPhases;compCode=001,jobCode=00100' \
--header 'Authorization: Basic Your-User:Pass'
Response
{
"items": [{
"GjjpActComplDate": null,
"GjjpActStartDate": null,
"GjjpActiveFlag": "Y",
"GjjpAttachOraseq": 829398435,
"GjjpBillCode": null,
"GjjpBillName": null,
"GjjpBillingRateTableCode": null,
"GjjpBillingTypeCode": null,
"GjjpBillingUnitFlag": "Y",
"GjjpBudgUnit": null,
"GjjpChgOrdUnit": null,
"GjjpClvValueCode1": null,
"GjjpClvValueCode2": null,
"GjjpClvValueCode3": null,
"GjjpClvValueCode4": null,
"GjjpClvValueCode5": null,
"GjjpClvValueCode6": null,
"GjjpCode": "00015",
"GjjpCompCode": "001",
"GjjpComplUnit": null,
"GjjpCreateDate": "2022-10-20T14:26:03-04:00",
"GjjpCtrlCode": "00",
"GjjpEbudgCostAmt": null,
"GjjpEbudgRevenueAmt": null,
"GjjpEqpOraseq": null,
"GjjpEstComplDate": null,
"GjjpEstStartDate": null,
"GjjpFactor": null,
"GjjpFactorableFlg": "N",
"GjjpFinalProductFlag": null,
"GjjpHbRecAmt": null,
"GjjpHier": "001 00100 00 00015 ",
"GjjpInvoiceFormatCode": null,
"GjjpItemCode": null,
"GjjpItemCompCode": null,
"GjjpItemTypeCode": null,
"GjjpIuCreateDate": "2022-10-20T14:26:03-04:00",
"GjjpIuUpdateDate": "2023-01-24T23:35:30-05:00",
"GjjpJobCode": "00100",
"GjjpJobCtrlCode": "ALL",
"GjjpMaxBillingAmt": null,
"GjjpMaxBillingBudgetAmt": null,
"GjjpName": "Drawings",
"GjjpObudgCostAmt": null,
"GjjpObudgRevenueAmt": null,
"GjjpObudgUnit": 0,
"GjjpPhsTypeCode": null,
"GjjpPriorComplUnit": null,
"GjjpProjQty": null,
"GjjpProjThresholdPct": null,
"GjjpQraOverrideIndicator": null,
"GjjpRecAmt": null,
"GjjpSingleCatBudgFlag": null,
"GjjpStatusCode": "P",
"GjjpStoreFcastApprovedFlg": "N",
"GjjpUeValidFlag": "Y",
"GjjpUnitFcastAttachOraseq": 829398436,
"GjjpUserEnteredProjQty": null,
"GjjpWmCode": "LS",
"GjjpVUuid": "EB75B7A51AA77F0AE05316821FAC1C51",
"links": [{
"rel": "self",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/jc-rest-api/rest/1/jcjobcostcodes/EB75B7A51AA77F0AE05316821FAC1C51",
"name": "jcjobcostcodes",
"kind": "item"
}, {
"rel": "canonical",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/jc-rest-api/rest/1/jcjobcostcodes/EB75B7A51AA77F0AE05316821FAC1C51",
"name": "jcjobcostcodes",
"kind": "item"
}
]
}
]
}
Step 3 : Retrieve JC Job Categories
Find job category code for a specific job and cost code using finder e.g.
- finder=selectJobCategory;compCode=001,jobCode=00100,costCode=15100
Request
curl --location --request GET 'https://mobtest.cmiccloudr12.com/cmictestrti/jc-rest-api/rest/1/jcjobcategory?finder=selectJobCategory;compCode=001,jobCode=00100,costCode=15100' \
--header 'Authorization: Basic Your-User:Pass'
Response
{
"items": [{
"JcatActLbAmt": null,
"JcatAddedFromApp": null,
"JcatAddonAmt": null,
"JcatAnticipatedCostAmt": null,
"JcatBidItemRemainingAmt": null,
"JcatBillAmt": 0,
"JcatBillCode": null,
"JcatBillName": null,
"JcatBillingTypeCode": null,
"JcatBudgAdjustmentAmt": null,
"JcatBudgAmt": null,
"JcatBudgRevAmt": null,
"JcatBudgRevQty": null,
"JcatBudgRevRevAmt": null,
"JcatBudgRevenueAmt": null,
"JcatBudgUnit": null,
"JcatBudgUnitRate": null,
"JcatBudmethCode": "A",
"JcatCalculateColumnName": null,
"JcatCatActiveFlag": "Y",
"JcatCatHier": "001 00100 A ",
"JcatChgOrdAmt": null,
"JcatChgOrdQty": null,
"JcatChgOrdRevAmt": null,
"JcatCode": "A",
"JcatName": "Allowance",
"JcatCommUnit": null,
"JcatCompCode": "001",
"JcatComplPc": null,
"JcatComplPcDate": null,
"JcatComplUnit": null,
"JcatCostAmt": null,
"JcatCostRateOverrideAmt": null,
"JcatCostToComplOvrdFlg": "N",
"JcatCstEntry": "B",
"JcatCtrlCode": "ALL",
"JcatCatCtrlName": null,
"JcatDisbAmt": null,
"JcatDlbAmt": null,
"JcatExclCostBudgWip": "N",
"JcatExclCostWip": "N",
"JcatFreezeProjAmtFlag": null,
"JcatFwdLossOvrhPct": null,
"JcatHbPayAmt": null,
"JcatIdealRevenueAmt": 0,
"JcatInvCommAmt": null,
"JcatInvCommUnit": null,
"JcatInvUnit": null,
"JcatInvoiceFormatCode": null,
"JcatJobCode": "00100",
"JcatJobName": "Electrical Reno",
"JcatJobCtrlCode": "ALL",
"JcatJobCtrlName": null,
"JcatLabourForecastFlag": "N",
"JcatMaxBillingAmt": null,
"JcatMaxBillingBudgetAmt": null,
"JcatNcommCostAmt": null,
"JcatNinvCommAmt": null,
"JcatObudgAmt": 0,
"JcatObudgChgOrdAmt": null,
"JcatObudgChgOrdRevAmt": null,
"JcatObudgChgOrdUnit": null,
"JcatObudgRevenueAmt": 0,
"JcatObudgUnit": 0,
"JcatPbBillCode": "15100.A",
"JcatPhaseActiveFlag": "Y",
"JcatPhsCode": "15100",
"JcatPhaseName": "Building Services Piping",
"JcatPhsCtrlCode": "15",
"JcatPhaseCtrlName": "MECHANICAL",
"JcatPhsHier": "001 00100 15 15100 ",
"JcatPriorCostAmt": null,
"JcatPriorCostQty": null,
"JcatProductivityOverride": null,
"JcatProjAmt": null,
"JcatProjUnit": null,
"JcatRevAdjustmentAmt": null,
"JcatRuleCode": null,
"JcatTimePhasedFlag": null,
"JcatUserEnteredProjAmt": null,
"JcatUserEnteredProjUnit": null,
"JcatVarCode": "L",
"JcatWbsBudgetFlag": "N",
"JcatWbsvCode1": null,
"JcatWbsvCode10": null,
"JcatWbsvCode11": null,
"JcatWbsvCode12": null,
"JcatWbsvCode2": null,
"JcatWbsvCode3": null,
"JcatWbsvCode4": null,
"JcatWbsvCode5": null,
"JcatWbsvCode6": null,
"JcatWbsvCode7": null,
"JcatWbsvCode8": null,
"JcatWbsvCode9": null,
"JcatWbsvEditableFlag1": "Y",
"JcatWbsvEditableFlag10": null,
"JcatWbsvEditableFlag11": null,
"JcatWbsvEditableFlag12": null,
"JcatWbsvEditableFlag2": "Y",
"JcatWbsvEditableFlag3": "Y",
"JcatWbsvEditableFlag4": "N",
"JcatWbsvEditableFlag5": null,
"JcatWbsvEditableFlag6": null,
"JcatWbsvEditableFlag7": null,
"JcatWbsvEditableFlag8": null,
"JcatWbsvEditableFlag9": null,
"JcatWbsvRequiredFlag1": "N",
"JcatWbsvRequiredFlag10": null,
"JcatWbsvRequiredFlag11": null,
"JcatWbsvRequiredFlag12": null,
"JcatWbsvRequiredFlag2": "N",
"JcatWbsvRequiredFlag3": "N",
"JcatWbsvRequiredFlag4": "N",
"JcatWbsvRequiredFlag5": null,
"JcatWbsvRequiredFlag6": null,
"JcatWbsvRequiredFlag7": null,
"JcatWbsvRequiredFlag8": null,
"JcatWbsvRequiredFlag9": null,
"JcatWcbCode": null,
"JcatWmCode": "$",
"JcatVUuid": "BD8E1507E3FF2691E05316821FAC4947",
"JcatIuCreateDate": "2016-09-21T16:10:46-04:00",
"JcatIuUpdateDate": "2023-01-24T23:35:30-05:00",
"links": [{
"rel": "self",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/jc-rest-api/rest/1/jcjobcategory/BD8E1507E3FF2691E05316821FAC4947",
"name": "jcjobcategory",
"kind": "item"
}, {
"rel": "canonical",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/jc-rest-api/rest/1/jcjobcategory/BD8E1507E3FF2691E05316821FAC4947",
"name": "jcjobcategory",
"kind": "item"
}
]
}
]
}
Step 4 : Retrieve employee information
Retrieve employee information to be used when creating a time sheet.
As an example we will use employee number 02085 and retrieve the following fields:
Element | Description |
---|---|
EmpNo | Employee number |
EmpJobCompCode | Default Company the employee belongs to. |
EmpWcbCode | WCB according to timesheet job |
EmpUnionized | Union Employee - ‘Y’ or ‘N’ |
EmpUniCode | Union Code the employee belongs to. |
EmpUniName | Union name |
EmpTrdCode | Trade code |
EmpTrdName | Trade name |
As an example query parameters would look like:
- finder=PyEmployeeFinder;EmpNoVar=02085&fields=EmpNo,EmpJobCompCode,EmpWcbCode,EmpUnionized,EmpUniCode,EmpUniName,EmpTrdCode,EmpTrdName&onlyData=true
Request
curl --location --request GET 'https://mobtest.cmiccloudr12.com/cmictestrti/hcm-rest-api/rest/1/pyemployee?finder=PyEmployeeFinder;EmpNoVar=02085&fields=EmpNo,EmpJobCompCode,EmpWcbCode,EmpUnionized,EmpUniCode,EmpUniName,EmpTrdCode,EmpTrdName&onlyData=true' \
--header 'Authorization: Basic Your-User:Pass'
Response
{
"items": [
{
"EmpNo": "02085",
"EmpUnionized": "Y",
"EmpUniCode": "1644",
"EmpUniName": "Carpenters Union 1644",
"EmpTrdCode": "U001",
"EmpTrdName": "Carpenter",
"EmpWcbCode": "5506",
"EmpJobCompCode": "001"
}
],
"count": 1,
"hasMore": false,
"limit": 25,
"offset": 0,
"links": [
{
"rel": "self",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pyemployee",
"name": "pyemployee",
"kind": "collection"
}
]
}
Step 5 : Retrieve PY Unions
Retrieving employee's union information using q parameter. E.g.
- ?q=UniCode=1644
Request
curl --location --request GET '/hcm-rest-api/rest/1/pyunions?q=UniCode=1644' \
--header 'Authorization: Your-User:Pass'
Response
{
"items": [
{
"UniCode": "1644",
"UniName": "Carpenters Union 1644",
"UniShortName": "LU1644",
"UniType": "L",
"UniUnionsUniCode": null,
"UniUnionsUniName": null,
"UniUseCtlUnionRate": "N",
"UniCollectBargainRegCode": null,
"UniCollectBargainRegName": null,
"UniContactName": "Jason Gerard",
"UniLicenseNo": "8766766556",
"UniLicenseDate": "1989-01-01T00:00:00-05:00",
"UniAddress1": "4023 E. Lake Street",
"UniAddress2": null,
"UniAddress3": "Minneapolis",
"UniZipCode": "55406",
"UniBankCode": null,
"UniBranchCode": null,
"UniBankAccNumber": null,
"UniCountryCode": "US",
"UniCountryName": "United States of America",
"UniStateCode": "MN",
"UniStateName": "Minnesota",
"UniCountyCode": null,
"UniCountyName": null,
"UniCityCode": null,
"UniCityName": null,
"UniInclAsRegUniAca": "Y",
"UniShowInclAsRegUniFlag": "N",
"UniUser": "ADWAIT",
"UniLastUpdDate": "2015-04-30T11:43:19-04:00",
"UniIuCreateDate": "2015-04-30T11:43:19-04:00",
"UniIuCreateUser": "ADWAIT",
"UniIuUpdateDate": null,
"UniIuUpdateUser": null,
"UniVUuid": "D9C9AFC5586F4842E05316821FAC53F2",
"links": [
{
"rel": "self",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pyunions/D9C9AFC5586F4842E05316821FAC53F2",
"name": "pyunions",
"kind": "item"
},
{
"rel": "canonical",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pyunions/D9C9AFC5586F4842E05316821FAC53F2",
"name": "pyunions",
"kind": "item"
}
]
}
],
"totalResults": 1,
"count": 1,
"hasMore": false,
"limit": 50,
"offset": 0,
"links": [
{
"rel": "self",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pyunions",
"name": "pyunions",
"kind": "collection"
}
]
}
Step 6 : Retrieve PY Trades
Retrieving employee's trade information using q parameter. E.g.
- ?q=TrdCode=U001
Request
curl --location --request GET '/hcm-rest-api/rest/1/pytrades?q=TrdCode=U001' \
--header 'Authorization: Your-User:Pass'
Response
{
"items": [
{
"TrdCode": "U001",
"TrdDescription": "Carpenter",
"TrdShortDesc": "Carpenter",
"TrdTradeCode": null,
"TrdTradeName": null,
"TrdEeoClass": "07",
"TrdUser": "ADWAIT",
"TrdLastUpdDate": "2015-04-30T11:17:11-04:00",
"TrdEstCostRate": null,
"TrdEstBillRate": null,
"TrdRpAvailblFlag": "N",
"TrdIuCreateDate": "2015-04-30T11:17:11-04:00",
"TrdIuUpdateDate": "2019-01-12T16:51:55-05:00",
"TrdCertFlag": "N",
"TrdType": null,
"TrdTypeDesc": null,
"TrdClassCode": "CARP",
"TrdSocCode": null,
"TrdSocDescription": null,
"TrdCraftCode": null,
"TrdCraftDesc": null,
"TrdLaborClass": null,
"TrdLaborClassDesc": null,
"TrdEeoClassDesc": "Trade/Craft Workers",
"TrdApprentice": "J",
"TrdApprenticeDesc": "Journeyman",
"TrdVUuid": "DABA3F3A7BA9677EE05316821FAC32ED",
"links": [
{
"rel": "self",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pytrades/DABA3F3A7BA9677EE05316821FAC32ED",
"name": "pytrades",
"kind": "item"
},
{
"rel": "canonical",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pytrades/DABA3F3A7BA9677EE05316821FAC32ED",
"name": "pytrades",
"kind": "item"
}
]
}
],
"count": 1,
"hasMore": false,
"limit": 5,
"offset": 0,
"links": [
{
"rel": "self",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pytrades",
"name": "pytrades",
"kind": "collection"
}
]
}
Step 7 : Create a PY Employee Timesheet
Request
curl --location --request POST 'https://mobtest.cmiccloudr12.com/cmictestrti/hcm-rest-api/rest/1/pyemptimesheet' \
--header 'Content-Type: application/vnd.oracle.adf.resourceitem+json' \
--header 'Authorization: Basic Your-User:Pass' \
--data-raw '{
"TshCompCode": "001",
"TshPrnCode": "WK",
"TshPprYear": 2022,
"TshPprPeriod": 28,
"TshDocumentNo": "D01",
"TshBatchPostFlag": "N",
"TshDate": "2022-07-11",
"TshEmpNo": "02085",
"TshTypeCode": "J",
"TshJobdeptwoId": "00100",
"TshPhsacctwiId": "15100",
"TshCatexpId": "M",
"TshNormalHours": 8,
"TshDotHours": 0,
"TshOtHours": 0,
"TshOhType": null,
"TshOtherHours": 0,
"TshWcbCode": "5506",
"TshWorkCompCode": "001",
"TshExpAmount": null,
"TshExpCode": null,
"TshExpQuantity": null,
"TshExpRate": null,
"TshVUuid": ""
}'
Response
{
"TshCatexpId": "M",
"TshCompCode": "001",
"TshDate": "2022-07-11",
"TshDocumentNo": "D01",
"TshDotHours": 0,
"TshEmpNo": "02085",
"TshJobdeptwoId": "00100",
"TshNormalHours": 8,
"TshOhType": null,
"TshOtHours": 0,
"TshOtherHours": 0,
"TshPhsacctwiId": "15100",
"TshPprPeriod": 28,
"TshPprYear": 2022,
"TshPrnCode": "WK",
"TshSeqNo": null,
"TshTypeCode": "J",
"TshVUuid": "F3A73B5AD8CB1034E05316821FAC8377",
"TshWcbCode": "5506",
"TshWorkCompCode": "001",
"TshUserField3": null,
"TshUserField2": null,
"TshUserField1": null,
"TshUnionCode": null,
"TshTradeCode": null,
"TshShiftCode": null,
"TshSectorCode": null,
"TshScheduleCode": null,
"TshExpAmount": null,
"TshExpCode": null,
"TshExpQuantity": null,
"TshExpRate": null,
"TshBatchPostFlag": "N",
"TshWbsvCode1": null,
"TshWbsvCode2": null,
"TshWbsvCode3": null,
"TshWbsvCode4": null,
"TshIuCreateDate": null,
"TshIuUpdateDate": null,
"TshIuLastUpdateDate": null,
"links": [
{
"rel": "self",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pyemptimesheet/F3A73B5AD8CB1034E05316821FAC8377",
"name": "pyemptimesheet",
"kind": "item"
},
{
"rel": "canonical",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/hcm-rest-api/rest/1/pyemptimesheet/F3A73B5AD8CB1034E05316821FAC8377",
"name": "pyemptimesheet",
"kind": "item"
}
]
}
Optional : Create a PY Employee Timesheet with union and trade
Request
curl --location --request POST 'https://mobtest.cmiccloudr12.com/cmictestrti/hcm-rest-api/rest/1/pyemptimesheet' \
--header 'Content-Type: application/vnd.oracle.adf.resourceitem+json' \
--header 'Authorization: Basic Your-User:Pass' \
--data '{
"TshDate": "2022-07-13",
"TshEmpNo": "02085",
"TshCompCode": "001",
"TshWorkCompCode": "001",
"TshTypeCode": "J",
"TshJobdeptwoId": "00100",
"TshPhsacctwiId": "15100",
"TshCatexpId": "M",
"TshNormalHours": 8,
"TshDotHours": 0,
"TshOtHours": 0,
"TshOhType": null,
"TshOtherHours": 0,
"TshPrnCode": "WK",
"TshPprYear": 2022,
"TshPprPeriod": 28,
"TshDocumentNo": "D01",
"TshBatchPostFlag": "N",
"TshWcbCode": "5506",
"TshExpAmount": null,
"TshExpCode": null,
"TshExpQuantity": null,
"TshExpRate": null,
"TshUnionCode": "1644",
"TshTradeCode": "U001",
"TshVUuid": ""
}'
Response
{
"items": [{
"JobAccmethCode": null,
"JobAcctContactCode": null,
"JobAcctPartnCode": null,
"JobAcctPartnTypeCode": null,
"JobActComplDate": null,
"JobActStartDate": "2023-01-24",
"JobActionCode": null,
"JobAddTypeCode": null,
"JobAdjBudgEqualsRevFlg": "N",
"JobAllocApdiscJobFlag": "N",
"JobAllowEtmshtEntriesFlag": "Y",
"JobAllowOverheadFlag": "Y",
"JobApTax1Code": null,
"JobApTax2Code": null,
"JobApTax3Code": null,
"JobApplyDbRules": "N",
"JobArTax1Code": null,
"JobArTax2Code": null,
"JobArTax3Code": null,
"JobArchiveFlag": "N",
"JobAreaDistrict": null,
"JobAsstContactCode": null,
"JobAsstPartnCode": null,
"JobAsstPartnTypeCode": null,
"JobAttachOraseq": 51431458,
"JobAuthRqSeqNum": null,
"JobBidCode": null,
"JobBidFlag": "N",
"JobBidStatusCode": null,
"JobBidSubmitDate": null,
"JobBillAccCode": "40001",
"JobBillAmt": 0,
"JobBillDeptCode": "050",
"JobBillFlag": null,
"JobBillMethCode": "AR",
"JobBillTblRevFcastFlg": "N",
"JobBillingRateTableCode": "DFLT",
"JobBillingTypeCode": "COST",
"JobBudgOvrdProjFlag": "N",
"JobBudgUnit": null,
"JobBudgcstSameLevelFlag": "Y",
"JobBudgrSeqNum": null,
"JobCalSalChargeRate": null,
"JobCcAccCode": "16010",
"JobCcDeptCode": "050",
"JobCertifyCode": null,
"JobCertrepContractNumber": null,
"JobCertrepEndDate": null,
"JobCertrepFringeBenPaid": null,
"JobCertrepSignatoryName": null,
"JobCertrepSignatoryTitle": null,
"JobCertrepStartDate": null,
"JobChgSeqNum": null,
"JobCilocCode": null,
"JobCode": "00100",
"JobCompCode": "001",
"JobComplUnit": null,
"JobCompletedForWipFlag": "N",
"JobConstructionValue": null,
"JobConstructionValuePct": null,
"JobContTypeCode": null,
"JobContactCode": null,
"JobContractAmt": null,
"JobContractCode": "00100",
"JobCostFlag": "Y",
"JobCostMethCode": "B",
"JobCostToComplOvrdFlg": "N",
"JobCreateDate": "2016-09-21T16:02:01-04:00",
"JobCtrlCode": "ALL",
"JobCustCode": "11-0588",
"JobCustContactName": null,
"JobDaysOutstInvPaidTtl": null,
"JobDefaultDeptCode": "050",
"JobDefaultPyovhdGrp": null,
"JobDisbAmt": null,
"JobEqpChgNoRestartFlag": "N",
"JobEstComplDate": null,
"JobEstStartDate": null,
"JobExclBillingWip": "N",
"JobExclContAmtWipFlag": null,
"JobExclRevBudgWip": "N",
"JobExcludeFromWipFlag": "N",
"JobFcastInclSubjobsFlg": "N",
"JobFinalizeProjectionsFlag": null,
"JobFullyPaidInvs": null,
"JobHbAmt": null,
"JobHbRecAmt": null,
"JobHier": "001 00100 ",
"JobIbAllowFlag": "N",
"JobIbExpenseCatCode": null,
"JobIbFullTariffFlag": "N",
"JobIgnoreCostsPriorToDate": null,
"JobInvFormatCode": null,
"JobInvoiceFormatCode": "6",
"JobInvoiceGroupCode": null,
"JobIuCreateDate": "2016-09-21T16:02:03-04:00",
"JobIuUpdateDate": "2023-01-24T23:35:30-05:00",
"JobJbMapCode": "DFLT",
"JobJbRetainageCode": null,
"JobJtrExpFlag": null,
"JobLbcAccCode": null,
"JobLbcDeptCode": null,
"JobLocCode": null,
"JobLongCode": null,
"JobLstAddonDate": null,
"JobLstRecDate": "2016-12-31",
"JobLstRecPc": null,
"JobLtcAccCode": "21010",
"JobLtcDeptCode": "050",
"JobMakeupFlag": null,
"JobMaxBillingAmt": null,
"JobMaxBillingBudgetAmt": null,
"JobMaxChargePc": null,
"JobMaxHourlyRate": null,
"JobMaxHours": null,
"JobMsCode": null,
"JobMutliOvhdPcFlag": "N",
"JobName": "Electrical Reno",
"JobOrigBudgetEffectiveDate": null,
"JobOriginalContractAmt": 0,
"JobOriginalFeeAmt": null,
"JobPartnCode": null,
"JobPartnTypeCode": null,
"JobPayFromJobCompFlag": "N",
"JobPayrateScheduleCode": null,
"JobPhsBudgUnitsFlag": "N",
"JobPhsTypeRequiredFlg": "N",
"JobPlPolicyNo": null,
"JobPmFlag": "N",
"JobPolicyNo": null,
"JobPrevailingWage": null,
"JobProfrecAmt": null,
"JobProjThresholdPct": 0,
"JobPropertyId": null,
"JobProvinceCode": null,
"JobPublicSectorFlag": "N",
"JobPwOvRate": null,
"JobPwRateCode": null,
"JobPyOvtruleCode": null,
"JobRateByJobFlag": null,
"JobRecAmt": null,
"JobReserveRevAccCode": "41011",
"JobReserveRevDeptCode": "050",
"JobRevenueGenState": "J",
"JobRevrecAmt": null,
"JobRevrecCurrDate": null,
"JobRevrecLstAmt": 0,
"JobRevrecLstPc": 0,
"JobRevrecPc": null,
"JobRuleCode": null,
"JobSecGroup": null,
"JobSectorCode": null,
"JobShowCprAsCostAmtFlag": "N",
"JobSiSeqNum": null,
"JobSickPolicyCode": null,
"JobSizeCode": "L",
"JobStatusCode": "I",
"JobSubFlag": null,
"JobSuptContactCode": null,
"JobSuptPartnCode": null,
"JobSuptPartnTypeCode": null,
"JobTax1Code": null,
"JobTax2Code": null,
"JobTax3Code": null,
"JobTermCode": "NET30",
"JobTrackRepBurden": null,
"JobUeValidFlag": "Y",
"JobUnbilledRevAccCode": "41009",
"JobUnbilledRevDeptCode": "050",
"JobUnitPricedContractFlag": "N",
"JobUseEqpBillRateFlag": "N",
"JobUsePayBillRateFlag": "N",
"JobWbsvCode1": null,
"JobWbsvCode10": null,
"JobWbsvCode11": null,
"JobWbsvCode12": null,
"JobWbsvCode2": null,
"JobWbsvCode3": null,
"JobWbsvCode4": null,
"JobWbsvCode5": null,
"JobWbsvCode6": null,
"JobWbsvCode7": null,
"JobWbsvCode8": null,
"JobWbsvCode9": null,
"JobWbsvEditableFlag1": "Y",
"JobWbsvEditableFlag10": null,
"JobWbsvEditableFlag11": null,
"JobWbsvEditableFlag12": null,
"JobWbsvEditableFlag2": "Y",
"JobWbsvEditableFlag3": "Y",
"JobWbsvEditableFlag4": "N",
"JobWbsvEditableFlag5": null,
"JobWbsvEditableFlag6": null,
"JobWbsvEditableFlag7": null,
"JobWbsvEditableFlag8": null,
"JobWbsvEditableFlag9": null,
"JobWbsvRequiredFlag1": "N",
"JobWbsvRequiredFlag10": null,
"JobWbsvRequiredFlag11": null,
"JobWbsvRequiredFlag12": null,
"JobWbsvRequiredFlag2": "N",
"JobWbsvRequiredFlag3": "N",
"JobWbsvRequiredFlag4": "N",
"JobWbsvRequiredFlag5": null,
"JobWbsvRequiredFlag6": null,
"JobWbsvRequiredFlag7": null,
"JobWbsvRequiredFlag8": null,
"JobWbsvRequiredFlag9": null,
"JobWipAccCode": null,
"JobWipAdjAccCode": null,
"JobWipAdjDeptCode": null,
"JobWipDeptCode": "050",
"JobWipLmrgOvrFlag": "N",
"JobWipMrgLossbsAcc": null,
"JobWipMrgLossbsDep": null,
"JobWipMrgLossplAcc": null,
"JobWipMrgLossplDep": null,
"JobWipOhLossbsAcc": null,
"JobWipOhLossbsDep": null,
"JobWipOhLossplAcc": null,
"JobWipOhLossplDep": null,
"JobWipOverrideContAmt": null,
"JobWipRollInSubjobFlag": "Y",
"JobWipUnpostedCostAcc": null,
"JobWipUnpostedCostCat": null,
"JobWipUnpostedCostDep": null,
"JobWipUnpostedCostPhase": null,
"JobWipUnpostedRevAcc": null,
"JobWipUnpostedRevCat": null,
"JobWipUnpostedRevDep": null,
"JobWipUnpostedRevPhase": null,
"JobWmCode": null,
"JobWoFlag": null,
"JobWorkLoc": null,
"WorkLoc": null,
"JobVUuid": "B41F55C8B62CA908E053B08610AC2C73",
"links": [{
"rel": "self",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/jc-rest-api/rest/1/jcjob/B41F55C8B62CA908E053B08610AC2C73",
"name": "jcjob",
"kind": "item"
}, {
"rel": "canonical",
"href": "http://mobtest.cmiccloudr12.com:80/cmictestrti/jc-rest-api/rest/1/jcjob/B41F55C8B62CA908E053B08610AC2C73",
"name": "jcjob",
"kind": "item"
}
]
}
]
}