Adding and Updating Account Addresses
The information in this topic is applicable when the Enable Shared Addresses check box in the company profile is deselected, that is, when addresses are not shared.
The account object has three types of address:
Billing address
Shipping address
Simple address
The billing and shipping address correspond to fields in the account object. The address child object can correspond to a simple address, but might also correspond to a billing address or a shipping address.
You can use either AccountInsert, AccountUpdate or AccountExecute calls to insert or update billing and shipping addresses for an account. With AccountInsert or AccountUpdate calls, the account parent node with billing and shipping address fields must be present and there must not be any child node. If an address child is present, only a simple address can be added, and not billing and shipping addresses. If the address child or any other child node is not present, only billing and shipping addresses can be added, and not simple addresses.
With the AccountExecute call, both the account parent node and address child node can be present along with billing and shipping address fields at the parent level.
To distinguish whether the address in an address child node is a billing or shipping address:
If the PrimaryBillToAddressId and AddressId fields have the same value, then the address is a billing address.
If the PrimaryShipToAddressId and AddressId have the same values, the address is a shipping address.