Happy Business Starts Here

Create multiple accounts using REST API

Highlighted

Create multiple accounts using REST API

Hi,

I have a requirement to clone a particular parent account and create multiple child accounts with same attributes. I would like to know if I can use Zuora REST API to create multiple accounts/objects in a single call. 

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Zuora Support Moderator

Re: Create multiple accounts using REST API

REST API call to create multiple Child accounts is given below, ParentId will be the Id of the Parent Account, Please ensure that the Customer Hierarchy Feature is turned on for the below set of child accounts to get created.

 

{
  "type": "Account",
   "objects": [{
    			"AutoPay": false,
				"Batch": "Batch1",
				"BillCycleDay": 1,
				"ParentId":"2c92c0fb6994768a0169953839db4e8b",
				"Currency": "USD",
				"Name": "Creating Child Account6",
				"Notes": "this is notes",
   				"PaymentTerm": "Due Upon Receipt",
				"Status": "Draft",
    			"paymentGateway": "Credit Card",
    			"GeographicRegion__c": "EMEA",	
    			"invoiceCollect": false
   	  },
   {
    			"AutoPay": false,
				"Batch": "Batch1",
				"BillCycleDay": 1,
				"ParentId":"2c92c0fb6994768a0169953839db4e8b",
				"Currency": "USD",
				"Name": "Creating Child Account7",
				"Notes": "this is notes",
    			"PaymentTerm": "Due Upon Receipt",
				"Status": "Draft",
    			"paymentGateway": "Credit Card",
    			"GeographicRegion__c": "EMEA",	
    			"invoiceCollect": false
   }] 
} 

Note: Please include the mandatory custom fields in the call above, Ex. GeographicRegion__C is a mandatory custom field in my personal sandbox environment.

 






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post

2 REPLIES 2
Highlighted
Zuora Support Moderator

Re: Create multiple accounts using REST API

REST API call to create multiple Child accounts is given below, ParentId will be the Id of the Parent Account, Please ensure that the Customer Hierarchy Feature is turned on for the below set of child accounts to get created.

 

{
  "type": "Account",
   "objects": [{
    			"AutoPay": false,
				"Batch": "Batch1",
				"BillCycleDay": 1,
				"ParentId":"2c92c0fb6994768a0169953839db4e8b",
				"Currency": "USD",
				"Name": "Creating Child Account6",
				"Notes": "this is notes",
   				"PaymentTerm": "Due Upon Receipt",
				"Status": "Draft",
    			"paymentGateway": "Credit Card",
    			"GeographicRegion__c": "EMEA",	
    			"invoiceCollect": false
   	  },
   {
    			"AutoPay": false,
				"Batch": "Batch1",
				"BillCycleDay": 1,
				"ParentId":"2c92c0fb6994768a0169953839db4e8b",
				"Currency": "USD",
				"Name": "Creating Child Account7",
				"Notes": "this is notes",
    			"PaymentTerm": "Due Upon Receipt",
				"Status": "Draft",
    			"paymentGateway": "Credit Card",
    			"GeographicRegion__c": "EMEA",	
    			"invoiceCollect": false
   }] 
} 

Note: Please include the mandatory custom fields in the call above, Ex. GeographicRegion__C is a mandatory custom field in my personal sandbox environment.

 






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

View solution in original post

Highlighted

Re: Create multiple accounts using REST API

Thanks Anand!