Client Composite
POST {{url}}/services/data/v{{version}}/composite/
Request Body
{"allOrNone"=>true, "compositeRequest"=>[{"url"=>"/services/data/v{{version}}/query?q=SELECT+id+FROM+tc9_pr__Schedule__c+WHERE+recordtype.name=%27pay+schedule%27+AND+name=%27weekly+pay%27", "method"=>"GET", "referenceId"=>"payScheduleId"}, {"url"=>"/services/data/v{{version}}/query?q=SELECT+id+FROM+tc9_pr__Schedule__c+WHERE+recordtype.name=%27invoice+schedule%27+AND+name=%27weekly%27", "method"=>"GET", "referenceId"=>"invoiceScheduleId"}, {"url"=>"/services/data/v{{version}}/query?q=SELECT+id+FROM+tc9_et__Invoice_Tax_ID__c+WHERE+tc9_et__Tax_Rate__c=10", "method"=>"GET", "referenceId"=>"taxId"}, {"url"=>"/services/data/v{{version}}/query?q=SELECT+id+FROM+recordtype+WHERE+sobjecttype=%27account%27+AND+name=%27client%27", "method"=>"GET", "referenceId"=>"recordTypeId"}, {"url"=>"/services/data/v{{version}}/sobjects/account", "method"=>"POST", "referenceId"=>"clientId", "body"=>{"Name"=>"Test client", "Phone"=>"123456", "BillingStreet"=>"billing street", "BillingCity"=>"billing city", "BillingPostalCode"=>"billing postal code", "BillingState"=>"billing state", "BillingCountry"=>"billing country", "ShippingStreet"=>"shipping street", "ShippingCity"=>"shipping city", "ShippingPostalCode"=>"shipping postal code", "ShippingState"=>"shipping state", "ShippingCountry"=>"shipping country", "Description"=>"", "tc9_pr__Schedule__c"=>"@{payScheduleId.records[0].Id}", "tc9_et__Default_Invoice_Schedule__c"=>"@{invoiceScheduleId.records[0].Id}", "tc9_et__Default_Invoice_Tax_ID__c"=>"@{taxId.records[0].Id}", "tc9_et__Default_Invoice_Taxable__c"=>"Yes", "tc9_et__Invoice_Group_By__c"=>"Assignment", "tc9_et__Invoice_Contact__c"=>"", "tc9_et__Invoice_Email_CC__c"=>"", "tc9_et__Invoice_Message__c"=>"", "tc9_et__Invoice_Split__c"=>"", "tc9_pr__External_ID__c"=>"123", "RecordTypeId"=>"@{recordTypeId.records[0].Id}"}}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Authorization | string |