我正在尝试从我的应用程序导出发票到QuickBooks Desktop。发票已创建,我收到了成功消息,但QuickBooks Desktop应用程序未反映通过API发送的金额,价格或数量。
以下是一个此类操作的请求/响应示例:
请求:
<?xml version="1.0"?>
<Mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.intuit.com/sb/cdm/v2" RequestId="6ffd7874b723b84ad2eba8146c12fda1">
<ExternalRealmId>MY_REALM_ID</ExternalRealmId>
<Object xsi:type="Invoice">
<Id idDomain="NG">2064384</Id>
<SyncToken>4</SyncToken>
<Header>
<DocNumber>100009</DocNumber>
<TxnDate>2013-10-16</TxnDate>
<Status>Pending</Status>
<CustomerId idDomain="QB">2</CustomerId>
<CustomerName>Jenny Cliff</CustomerName>
<RemitToId idDomain="QB">2</RemitToId>
<RemitToName>Jenny Cliff</RemitToName>
<ShipDate>2013-10-16</ShipDate>
<SubTotalAmt>950.0</SubTotalAmt>
<TaxRate>0.0</TaxRate>
<TaxAmt>0.0</TaxAmt>
<TotalAmt>950.0</TotalAmt>
<ToBePrinted>true</ToBePrinted>
<ToBeEmailed>false</ToBeEmailed>
<ARAccountId idDomain="QB">40</ARAccountId>
<ARAccountName>Accounts Receivable</ARAccountName>
<DueDate>2013-10-17</DueDate>
<BillAddr>
<Line1>217 E Washington Ave,</Line1>
<City>Sunnyvale</City>
<Country>USA</Country>
<CountrySubDivisionCode>CA</CountrySubDivisionCode>
<PostalCode>94086</PostalCode>
<Tag>Billing</Tag>
</BillAddr>
<ShipAddr>
<Line1>217 E Washington Ave,</Line1>
<City>Sunnyvale</City>
<CountrySubDivisionCode>CA</CountrySubDivisionCode>
<PostalCode>94086</PostalCode>
<Default>false</Default>
<Tag>Shipping</Tag>
</ShipAddr>
<Balance>950.0</Balance>
</Header>
<Line>
<Desc>Test Item 1</Desc>
<Amount>500.0</Amount>
<UnitPrice>500.0</UnitPrice>
<Qty>1</Qty>
</Line>
<Line>
<Desc>Test Item 2</Desc>
<Amount>450.0</Amount>
<UnitPrice>450.0</UnitPrice>
<Qty>1</Qty>
</Line>
</Object>
</Mod>
响应:
<RestResponse xmlns="http://www.intuit.com/sb/cdm/v2">
<Success RequestId="6ffd7874b723b84ad2eba8146c12fda1">
<ObjectRef>
<Id idDomain="NG">2064384</Id>
<SyncToken>5</SyncToken>
<LastUpdatedTime>2013-10-16T17:45:06Z</LastUpdatedTime>
</ObjectRef>
<RequestName>InvoiceMod</RequestName>
<ProcessedTime>2013-10-16T17:45:06Z</ProcessedTime>
</Success>
</RestResponse>
可以找到文档参考here。
答案 0 :(得分:5)
根据文件:
对于您指定的每个节点,您还必须指定一个Item节点。来自文档:
更改您的XML请求,以便您引用某个项目。
这反映了QuickBooks GUI的行为。