Adding a Customer with a parent Customer in QuickBooks Online

Example Request

<CustomerAddRq>
	<CustomerAdd>
		<Name>Child Customer Name</Name>
		<ParentRef>
			<FullName>Parent Customer Name</FullName>
		</ParentRef>
		<FirstName>Keith</FirstName>
		<LastName>Palmer</LastName>
		<Phone>860-634-1602</Phone>
		<Email>keith@uglyslug.com</Email>
	</CustomerAdd>
</CustomerAddRq>

Example Response

...

Generating this qbXML with PHP QuickBooks_Object_Customer Objects

$Customer = new QuickBooks_Object_Customer();

$Customer->setName('Child Customer Name');

$Customer->setPhone('860-634-1602');
$Customer->setEmail('keith@uglyslug.com');

$Customer->setFirstName('Keith');
$Customer->setLastName('Palmer');

// Set the parent of the customer
$Customer->setParentFullName('Parent Customer Name');

// You could also set the parent customer by ListID too
//$Customer->setParentListID('ABCD-1234');

print($Customer->asQBXML(QUICKBOOKS_ADD_CUSTOMER, 6.0, QUICKBOOKS_LOCALE_ONLINE_EDITION));
quickbooks_qbxml_customeradd_with_parent.txt · Last modified: 2013/01/21 12:44 (external edit)