Updating a Multiple Accounts by Adding Multiple Attachments to Each Account
This example describes how to update multiple accounts by inserting multiple attachments in each account. Multiple accounts are upserted to add multiple attachments to each account. The request body is an array of accounts objects. Each account object contains details of the account where the attachment will be added, and a child array of attachment objects. The response body has an array of account objects, each containing an array of attachment objects.
-
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": "MultiAccountMultiAttachmentsEach_1", "Location": "HQ-Distribution", "Primary Organization Id": "1-1DG", "Primary Organization": "Millennium Institutional Finance Services IF ENU", "Description": "Updated AccountData 1 new ", "Account Attachment": [ { "AccntFileName": "MultiAccountMultiAttachmentsEach_file_1", "AccntFileExt": "txt", "Accnt Attachment Id": "RmlsZSBmb3IgYWNjb3VudCBhdHRhY2htZW50IGZvciBmYWNjb3VudCBudW1iZXIgMw==" }, { "AccntFileName": "MultiAccountMultiAttachmentsEach_file_2", "AccntFileExt": "txt", "Accnt Attachment Id": "RmlsZSBmb3IgYWNjb3VudCBhdHRhY2htZW50IGZvciBmYWNjb3VudCBudW1iZXIgMw==" }, { "AccntFileName": "MultiAccountMultiAttachmentsEach_file_3", "AccntFileExt": "txt", "Accnt Attachment Id": "RmlsZSBmb3IgYWNjb3VudCBhdHRhY2htZW50IGZvciBmYWNjb3VudCBudW1iZXIgMw==" } ] }, { "Name": "MultiAccountMultiAttachmentsEach_2", "Location": "HQ-Distribution", "Primary Organization Id": "1-1DG", "Primary Organization": "Millennium Institutional Finance Services IF ENU", "Description": "Updated AccountData 2 new", "Account Attachment": [ { "AccntFileName": "MultiAccountMultiAttachmentsEach_file_1", "AccntFileExt": "txt", "Accnt Attachment Id": "RmlsZSBmb3IgYWNjb3VudCBhdHRhY2htZW50IGZvciBmYWNjb3VudCBudW1iZXIgMw==" }, { "AccntFileName": "MultiAccountMultiAttachmentsEach_file_2", "AccntFileExt": "txt", "Accnt Attachment Id": "RmlsZSBmb3IgYWNjb3VudCBhdHRhY2htZW50IGZvciBmYWNjb3VudCBudW1iZXIgMw==" }, { "AccntFileName": "MultiAccountMultiAttachmentsEach_file_3", "AccntFileExt": "txt", "Accnt Attachment Id": "RmlsZSBmb3IgYWNjb3VudCBhdHRhY2htZW50IGZvciBmYWNjb3VudCBudW1iZXIgMw==" } ] } ]
-
Response body:
{ "items": [ { "Name": "MultiAccountMultiAttachmentsEach_1", "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" } }, { "Id": "88-1X5MBX", "Accnt Attachment Id": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBT/Account Attachment/88-1X5MBX?fields=Accnt Attachment Id", "Link": { "rel": "self", "href": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBT/Account Attachment/88-1X5MBX", "name": "Account Attachment" } }, { "Id": "88-1X5MBY", "Accnt Attachment Id": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBT/Account Attachment/88-1X5MBY?fields=Accnt Attachment Id", "Link": { "rel": "self", "href": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBT/Account Attachment/88-1X5MBY", "name": "Account Attachment" } } ], "Link": { "rel": "self", "href": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBT", "name": "Account" } }, { "Name": "MultiAccountMultiAttachmentsEach_2", "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" } }, { "Id": "88-1X5MC3", "Accnt Attachment Id": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBZ/Account Attachment/88-1X5MC3?fields=Accnt Attachment Id", "Link": { "rel": "self", "href": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBZ/Account Attachment/88-1X5MC3", "name": "Account Attachment" } }, { "Id": "88-1X5MC4", "Accnt Attachment Id": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBZ/Account Attachment/88-1X5MC4?fields=Accnt Attachment Id", "Link": { "rel": "self", "href": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBZ/Account Attachment/88-1X5MC4", "name": "Account Attachment" } } ], "Link": { "rel": "self", "href": "https://ServerName:port/siebel/v1.0/data/Account/Account/88-1X5MBZ", "name": "Account" } } ] }