1

I am using the QuickBooks PHP DevKit. I tried the xml below but it only replaces the existing ship to address

<?xml version="1.0" encoding="utf-8"?>
    <?qbxml version="2.0"?>
    <QBXML>
        <QBXMLMsgsRq onError="stopOnError">
            <CustomerModRq requestID="IDhere">
                <CustomerMod>
                    <ListID>123456</ListID>
                        <EditSequence>1424079129</EditSequence>
                        <ShipAddress>
                            <Addr1>Line 1 here</Addr1>
                            <Addr2>Line 2 here</Addr2>
                            <City>City</City>
                            <State>Province</State>
                            <PostalCode>1223</PostalCode>
                            <Country>Philippines</Country>
                        </ShipAddress>
                </CustomerMod>
            </CustomerModRq>
        </QBXMLMsgsRq>
    </QBXML>

I also tried adding the original ship address to (2 tags) but to no avail.

Thanks!

basic_space
  • 101
  • 10

1 Answers1

1

Did you refer to the QuickBooks OSR documentation?

If you refer to the docs, you'll see a tag to send multiple shipping addresses exists, called ShipToAddress:

<!-- must occur 0 - 50 times -->
<ShipToAddress> 
  <Name >STRTYPE</Name> <!-- required -->
  <Addr1 >STRTYPE</Addr1> <!-- optional -->
  <Addr2 >STRTYPE</Addr2> <!-- optional -->
  <Addr3 >STRTYPE</Addr3> <!-- optional -->
  <Addr4 >STRTYPE</Addr4> <!-- optional -->
  <Addr5 >STRTYPE</Addr5> <!-- optional -->
  <City >STRTYPE</City> <!-- optional -->
  <State >STRTYPE</State> <!-- optional -->
  <PostalCode >STRTYPE</PostalCode> <!-- optional -->
  <Country >STRTYPE</Country> <!-- optional -->
  <Note >STRTYPE</Note> <!-- optional -->
  <DefaultShipTo >BOOLTYPE</DefaultShipTo> <!-- optional -->
</ShipToAddress>

Note that only some versions of QuickBooks support this (at a minimum you must have QuickBooks 2013 or newer to use this -- and even then only some editions of QuickBooks will have been updated to support this functionality -- it was added as a placeholder in the docs prior to the software actually supporting it).

Keith Palmer Jr.
  • 27,666
  • 16
  • 68
  • 105
  • That did it. First it didn't work. I had to change the qbxml version to 13.0. Follow up question: Do I have to overwrite the existing addresses everytime I add a new one? currently, If the user already has 2 addresses and wants to add a new one, I have to append those 2 to the new request. – basic_space Feb 17 '15 at 03:22