Search code examples
intuit-partner-platformipp-qbd-sync

QBD V2 Customer Revert


Because V3 doesn't support reverting IDS objects in a SyncError state, I'm having to use the V2 revert call (found at https://developer.intuit.com/docs/95_deprecated/qbd_v2/qbd_v2_reference/0100_calling_data_services/reverting_an_object). Unfortunately, I'm having some troubles fixing customers.

POST: https://services.intuit.com/sb/customer/v2/<RealmID>

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<Revert xmlns="http://www.intuit.com/sb/cdm/v2" RequestId="7aa1d747cf5c58969a3bc638e0c820b1">
  <Object xsi:type="Customer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Id idDomain="QB">6</Id>
    <SyncToken>2</SyncToken>
  </Object>
</Revert>

Response:

<?xml version=\"1.0\" ?>
<RestResponse xmlns=\"http://www.intuit.com/sb/cdm/v2\">
<Error RequestId=\"8c28d64de5c644079d10f0165b717258\">
  <RequestName>ErrorRequest</RequestName>
  <ProcessedTime>2014-01-17T00:03:35.627Z</ProcessedTime>
  <ErrorCode>-2001</ErrorCode>
  <ErrorDesc>cvc-complex-type.2.4.b: The content of element 'Object' is not complete. One of '{\"http://www.intuit.com/sb/cdm/v2\":MetaData, \"http://www.intuit.com/sb/cdm/v2\":ExternalKey, \"http://www.intuit.com/sb/cdm/v2\":Synchronized, \"http://www.intuit.com/sb/cdm/v2\":AlternateId, \"http://www.intuit.com/sb/cdm/v2\":CustomField, \"http://www.intuit.com/sb/cdm/v2\":Draft, \"http://www.intuit.com/sb/cdm/v2\":ObjectState, \"http://www.intuit.com/sb/cdm/v2\":PartyReferenceId, \"http://www.intuit.com/sb/cdm/v2\":TypeOf}' is expected.
  </ErrorDesc>
</Error>
</RestResponse>

I'm not sure why it would need some of these elements for a Revert call. The data I have on my server is invalid which is why it's in an error state in the first place. Could this problem be caused because the error was created in V3 and is not being solved with V2?

Thanks, Forrest


Solution

  • QBD V2 Revert/Delete apis were released in beta earlier and may have issues. You can use them but we do not support them. The best of course of action to deal with error objects(v2 or v3) is to 'update' them using V2 update endpoint for now. Not the best solution but we are working on that. Going forward, you can post your questions here- https://intuitpartnerplatform.lc.intuit.com

    V3 update does not work on errored objects.