Question

I'm attempting to use the QuickBooks API to sync up my company's product list with the workbook's item list. I have gotten through the OAuth system to be able to make read/write requests to the API, but always get an error while attempting to update an object.

The reference that I have been using is here, and within the same documentation is a reference to retrieving an object that I have been able to use just fine. This is the XML that I'm sending. I have been tweaking the XML for a few hours now to no avail.

The error message that I get is "QB item name already exists ERI=420962215". That ERI is my realm ID. It seems like QuickBooks thinks I am trying to add a new item, when I'm trying to modify an existing one. If I omit the name field or leave it null, it gives me an error as well.

The item that I am attempting to modify was created in QuickBooks, then synced through QuickBook's Sync Manager. I then authenticated my app to that workbook and have been able to read data easily. I only have an issue when I attempt to write. I have yet to try creating or deleting an object since I've been stalling out on updating.

I am trying to just set up a simple form on my company's site that will hit the API and update data when saving, but I can't find a way around this error.

Any help would be greatly appreciated. I began to have trouble on Friday and feel like I'm just spinning in circles now. I found a QuickBooks / PHP library and tried looking through it to see if I could find useful information, but it was a bit too large for me to locate what I was looking for, since I think the error is just some incorrect XML.

I have followed all the directions within the update reference and just can't make progress. I've double and triple checked that my authentication works, that the URL is correct, that I'm sending POST and not GET and that my XML matches the XML shown in that example.

UPDATE 2012-03-15

It seems the problem is that the API is not able to update an item that was created through QuickBooks. Ever item has an id and an idDomain, which indicates if it was made through the API (NG) or Quickbooks (QB). An example id/idDomain would be 1/QB or 2556587/NG.

Whenever I was doing this, I was able to perfectly update an item that was made through the API, but not one made through Quickbooks. After looking into the Supported Object Reference, I noticed that item assembly update/create is listed as beta.

Was it helpful?

Solution

It seems that what I wrote in the update is correct. I am not able to update items that were made in quickbooks through the API. I can read items made in quickbooks, I can create items and I can edit items made through the API, but editing an item made in quickbooks through the API returns this error.

OTHER TIPS

A few things:

  • What URL are you POSTing to?
  • Can you show the full HTTP response you're getting? IDS has a bad habit of returning error messages/codes that are sometimes ambiguous if you don't look at the full XML response.
  • Some of these fields are not updateable: QtyOnPurchaseOrder, QtyOnSalesOrder
  • You do know you can only use IDS/Sync Manager for applications you're going to resell to other companies, right? i.e. you can't use it for internal/one-off apps.
  • You're going to get much better support if you post these questions to Intuit's developer forums: https://idnforums.intuit.com/

You may consider migrating to QBO V3 it is way better and easy to work with. there is a very good api made to for this purpose. which you can get here. https://github.com/consolibyte/quickbooks-php (Made By : Keith Palmer)

i am using this and am very satisfied with it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top