AdministrationClientOpenTransactionBatch Method |
Initialise the Batch for submitting file(s) containing Transaction. The service returns the Batch Details, containing a key for calling the subsequent workflow Transaction Batch methods.
This method is a step in the workflow for Transaction File Batch submission.
public ResultOfBatch OpenTransactionBatch( ManagementGroupRequestOfOpenBatch OpenTransactionBatch1 )
using (var svc = new AdministrationService.AdministrationClient()) { var request = new AdministrationService.ManagementGroupRequestOfOpenBatch(); request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin var openBatch = new AdministrationService.OpenBatch(); openBatch.BatchOwnerRSN = new Guid("adf6537e-60ab-4d1d-b19b-1473569f396a");; //Required - usually AccountOwnerRSN of the logged in admin openBatch.FileName = "ImportTransactions.csv"; //Required - uploaded file name openBatch.Merge = true; //Required - Merge to existing transactions based on matching rules request.Value = openBatch; AdministrationService.ResultOfBatch result = svc.OpenTransactionBatch(request); if (result.FaultCode == 0) { //Request succeeded } else { //Request failed throw new Exception(result.FaultDescription); } }