QBO API V3 Sparse update request to reactivate entity in named list

114 views Asked by At

According to the Accounting API docs named lists items are soft deleted, so it is possible to reactivate them with a sparse update where Active is set to true. This is working fine for Term, Account, PaymentMethod, and Department.

However we ran into issues when trying to sparse update Class and TaxCode. Here are the request/response we got in each case:

<?xml version="1.0" encoding="UTF-8"?>
<Class xmlns="http://schema.intuit.com/finance/v3" sparse="true">
   <Id>5000000000000020362</Id>
   <Name>Consultancy (deleted)</Name>
   <SyncToken>1</SyncToken>
   <Active>true</Active>
</Class>

Response from request to sparse update to reactivate class:

<?xml version="1.0" encoding="UTF-8"?>
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2016-12-29T10:36:51.732-08:00">
   <Fault type="ValidationFault">
      <Error code="6000" element="">
         <Message>A business validation error has occurred while processing your request</Message>
         <Detail>Business Validation Error: You cannot modify a list element that has been deleted.</Detail>
      </Error>
   </Fault>
</IntuitResponse>

Request to activate a tax code

<?xml version="1.0" encoding="UTF-8"?>
<TaxCode xmlns="http://schema.intuit.com/finance/v3" sparse="true">
   <Id>4</Id>
   <Name>California - Inactive</Name>
   <SyncToken>1</SyncToken>
   <Active>true</Active>
</TaxCode>

Response from request to sparse update to reactivate tax code:

<?xml version="1.0" encoding="UTF-8"?>
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2016-12-30T14:20:24.614-08:00">
   <Fault type="ValidationFault">
      <Error code="500" element="Operation">
         <Message>Unsupported Operation</Message>
         <Detail>Operation Update is not supported.</Detail>
      </Error>
   </Fault>
</IntuitResponse>

Any help would be much appreciated.

Thanks, Fernando

0

There are 0 answers