Updating a Multiple Accounts by Adding One Attachment to Each Account
This example describes how to update multiple accounts by inserting an attachment in each account. This request body is an array of accounts, and each array element contains details of the account where the attachment will be added. Each account has an attachment as a child element, with attachment details, such as name and the attachment content, provided as a Base64 encoded string. The response has an array of account objects and details of the added attachments.
-
URI: https://ServerName:port/siebel/v1.0/data/Account/Account/
-
HTTP Method: PUT
-
Accept: application/json
-
Content-Type: multipart/form-data
-
Transfer encoding: Chunked
-
Authorization: Basic
-
Request body:
[ { "Name": "MultiAccountSingleAttachmentEach", "Location": "HQ-Distribution", "Primary Organization Id": "1-1DG", "Primary Organization": "Millennium Institutional Finance Services IF ENU", "Description": "Updated AccountData 1 new ", "Account Attachment": [ { "AccntFileName": "MultiAccountSingleAttachmentEach_file", "AccntFileExt": "txt", "Accnt Attachment Id": "RmlsZSBmb3IgYWNjb3VudCBhdHRhY2htZW50IGZvciBmYWNjb3VudCBudW1iZXIgMw==" } ] }, { "Name": "MultiAccountExample43", "Location": "HQ-Distribution", "Primary Organization Id": "1-1DG", "Primary Organization": "Millennium Institutional Finance Services IF ENU", "Description": "Updated AccountData 2 new", "Account Attachment": [ { "AccntFileName": "MultiAccountSingleAttachmentEach_file", "AccntFileExt": "txt", "Accnt Attachment Id": "RmlsZSBmb3IgYWNjb3VudCBhdHRhY2htZW50IGZvciBmYWNjb3VudCBudW1iZXIgMw==" } ] } ]
-
Response body:
{ "items": [ { "Name": "MultiAccountSingleAttachmentEach", "Id": "88-1X5MBT", "Location": "HQ-Distribution", "Primary Organization Id": "1-1DG", "Primary Organization": "Millennium Institutional Finance Services IF ENU", "Description": "Updated AccountData 1 new ", "Account Attachment": [ { "Id": "88-1X5MBW", "Accnt Attachment Id": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBT/Account Attachment/88-1X5MBW?fields=Accnt Attachment Id", "Link": { "rel": "self", "href": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBT/Account Attachment/88-1X5MBW", "name": "Account Attachment" } } ], "Link": { "rel": "self", "href": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBT", "name": "Account" } }, { "Name": "SingleAccountMultiChildAtt2", "Id": "88-1X5MBZ", "Location": "HQ-Distribution", "Primary Organization Id": "1-1DG", "Primary Organization": "Millennium Institutional Finance Services IF ENU", "Description": "Updated AccountData 1 new ", "Account Attachment": [ { "Id": "88-1X5MC2", "Accnt Attachment Id": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBZ/Account Attachment/88-1X5MC2?fields=Accnt Attachment Id", "Link": { "rel": "self", "href": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBZ/Account Attachment/88-1X5MC2", "name": "Account Attachment" } } ], "Link": { "rel": "self", "href": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBZ", "name": "Account" } } ] }