Invoice Composite With VersionDataId
POST
{{url}}/services/data/v{{version}}/composite/
VersionDataId is required to pass to the request 'Get Version Data Binary" which returns the content of the pdf in binary form
Body
PARAM
Key |
Datatype |
Required |
Description |
HEADERS
Key |
Datatype |
Required |
Description |
Content-Type
|
string |
|
|
Authorization
|
string |
|
|
RESPONSES
status
curl -X POST 'undefined/services/data/vundefined/composite/' -H 'Content-Type: application/json' -H 'Authorization: Bearer undefined' -d '{"allOrNone":true,"compositeRequest":[{"url":"/services/data/vundefined/query?q=SELECT+id+FROM+tc9_et__Invoice__c+WHERE+name=%27INV-0000000023%27","method":"GET","referenceId":"invoiceId"},{"url":"/services/data/vundefined/query?q=SELECT+tc9_et__Invoice_No__c+FROM+tc9_et__Invoice__c+WHERE+name=%27INV-0000000023%27","method":"GET","referenceId":"invoiceNo"},{"url":"/services/data/vundefined/query?q=SELECT+contentDocumentId+FROM+contentDocumentLink+WHERE+linkedEntityId=%27@{invoiceId.records[0].Id}%27+and+contentDocument.title+like+%27@{invoiceNo.records[0].tc9_et__Invoice_No__c}%25%27","method":"GET","referenceId":"contentDocumentId"},{"url":"/services/data/vundefined/query?q=select+id+from+ContentVersion+where+ContentDocumentId=%27@{contentDocumentId.records[0].ContentDocumentId}%27","method":"GET","referenceId":"versionDataId"},{"url":"/services/data/v57.0/sobjects/ContentVersion/@{versionDataId.records[0].Id}/VersionData","method":"GET","referenceId":"versionData"}]}'