Timesheet Composite
POST {{url}}/services/data/v{{version}}/composite/
Request Body
{"allOrNone"=>true, "compositeRequest"=>[{"url"=>"/services/data/v{{version}}/query?q=SELECT+id+FROM+tc9_et__Interpretation_Rule__c+WHERE+name=%27daily+rate%27", "method"=>"GET", "referenceId"=>"interpretationRuleId"}, {"url"=>"/services/data/v{{version}}/sobjects/tc9_et__Timesheet__c", "method"=>"POST", "referenceId"=>"timesheetId", "body"=>{"tc9_et__Approval_Status__c"=>"Approved", "tc9_et__Approved_Rejected_Date__c"=>"2022-12-20", "tc9_et__Approved_Rejected_By__c"=>"0038c000036fMZXAA2", "tc9_et__Assignment__r"=>{"tc9_pr__External_ID__c"=>"123"}, "tc9_et__Employee__r"=>{"tc9_pr__External_ID__c"=>"123"}, "tc9_et__Start_Date__c"=>"2022-12-19", "tc9_et__End_Date__c"=>"2022-12-25", "tc9_et__Interpretation_Rule__c"=>"@{interpretationRuleId.records[0].Id}", "tc9_et__Payee__r"=>{"tc9_pr__External_ID__c"=>"123"}, "tc9_et__Start_Day__c"=>"Monday", "tc9_et__Submitted_Date__c"=>"2022-12-20", "tc9_et__Transaction_Creation_Stage__c"=>"2", "tc9_et__Notify_Employee_on_Approval__c"=>false, "tc9_et__External_ID__c"=>"12345"}}, {"url"=>"/services/data/v{{version}}/composite/tree/tc9_et__Timesheet_Entry__c", "method"=>"POST", "referenceId"=>"timesheetEntryId", "body"=>{"records"=>[{"attributes"=>{"type"=>"tc9_et__Timesheet_Entry__c", "referenceId"=>"te1"}, "tc9_et__Timesheet__c"=>"@{timesheetId.id}", "tc9_et__Approval_Flag__c"=>true, "tc9_et__Approved_Rejected_Date__c"=>"2022-12-20", "tc9_et__Assignment__r"=>{"tc9_pr__External_ID__c"=>"123"}, "tc9_et__Employee__r"=>{"tc9_pr__External_ID__c"=>"123"}, "tc9_et__End_Date__c"=>"2022-12-21", "tc9_et__End_Time__c"=>"17:00:00.000Z", "tc9_et__Start_Date__c"=>"2022-12-21", "tc9_et__Start_Time__c"=>"09:00:00.000Z", "tc9_et__Payee__r"=>{"tc9_pr__External_ID__c"=>"123"}, "tc9_et__Submitted_Date__c"=>"2022-12-20", "tc9_et__Submitted_Flag__c"=>2, "tc9_et__Total_Hours__c"=>8}, {"attributes"=>{"type"=>"tc9_et__Timesheet_Entry__c", "referenceId"=>"te2"}, "tc9_et__Timesheet__c"=>"@{timesheetId.id}", "tc9_et__Approval_Flag__c"=>true, "tc9_et__Approved_Rejected_Date__c"=>"2022-12-22", "tc9_et__Assignment__r"=>{"tc9_pr__External_ID__c"=>"123"}, "tc9_et__Employee__r"=>{"tc9_pr__External_ID__c"=>"123"}, "tc9_et__End_Date__c"=>"2022-12-22", "tc9_et__End_Time__c"=>"17:00:00.000Z", "tc9_et__Start_Date__c"=>"2022-12-22", "tc9_et__Start_Time__c"=>"09:00:00.000Z", "tc9_et__Payee__r"=>{"tc9_pr__External_ID__c"=>"123"}, "tc9_et__Submitted_Date__c"=>"2022-12-20", "tc9_et__Submitted_Flag__c"=>2, "tc9_et__Total_Hours__c"=>8}]}}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Authorization | string |