Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Wrapper libraries >

AccountCode is set to NULL against an Items PurchaseDetails when sending an update request

Started by John Bishoff-Towgood -   in Wrapper libraries

When sending the following Item update request via xero .NET wrapper the PurchaseDetails "AccountCode" gets set to NULL never though i sent through "424000"

POST https://api.xero.com/api.xro/2.0/Items?unitdp=4&summarizeErrors=false HTTP/1.1
<?xml version="1.0" encoding="utf-8"?>
<Items xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Item>
<ValidationErrors />
<Code>SAMHDTV001</Code>
<Description>Samsung HDTV sale1</Description>
<InventoryAssetAccountCode i:nil="true" />
<IsPurchased>true</IsPurchased>
<IsSold>true</IsSold>
<ItemID>cbd99273-8ade-4518-b85c-ed600ca21168</ItemID>
<Name>Samsung HDTV</Name>
<PurchaseDescription>Samsung HDTV p666</PurchaseDescription>
<PurchaseDetails>
<AccountCode>424000</AccountCode>
<COGSAccountCode i:nil="true" />
<TaxType>INPUT2</TaxType>
<UnitPrice>2500.0000</UnitPrice>
</PurchaseDetails>
<SalesDetails>
<AccountCode>105100</AccountCode>
<COGSAccountCode i:nil="true" />
<TaxType>OUTPUT2</TaxType>
<UnitPrice>3500.0000</UnitPrice>
</SalesDetails>
</Item>
</Items>
Thanks for reporting this John.

This is a bug. We are working on a fix and will release it as soon as we can.

We will update this thread when we do.

Thanks again for reporting it.

Phil - API Team
 

Phil Alsford (Xero Staff)  

The fix for this was released today. Thanks for raising it John.

Cheers,
Adam
 

Adam Moore (Community Manager)