为什么 QBO 批量更新账单项目 BillableStatus 不工作?

Why isn't QBO Batch update bill item BillableStatus working?

我正在使用批处理来更新 ItemBasedExpenseLineDetail.BillableStatus 可变数量的账单。我通过增加的 SyncToken 获得了成功的响应,但 BillableStatus 没有改变。

请求前的原值:<BillableStatus>Billable</BillableStatus>.

请求中的值:<BillableStatus>HasBeenBilled</BillableStatus>.

响应中的值:<BillableStatus>Billable</BillableStatus>

完整请求:

    RequestUrl: https://sandbox-quickbooks.api.intuit.com/v3/company/4620816365031247730/batch?minorversion=57&requestid=3a107b77ae534b, Request Payload:
    <?xml version="1.0"?>
    <IntuitBatchRequest
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns="http://schema.intuit.com/finance/v3">
        <BatchItemRequest bId="f4372dc6-2bf5-4aab-93df-c1ce178233ef" operation="update">
            <Bill domain="QBO" sparse="false">
                <Id>344</Id>
                <SyncToken>2</SyncToken>
                <MetaData>
                    <CreateTime>2021-06-22T17:17:24-04:00</CreateTime>
                    <LastUpdatedTime>2021-06-23T10:00:43-04:00</LastUpdatedTime>
                </MetaData>
                <TxnDate>2021-06-22</TxnDate>
                <CurrencyRef name="United States Dollar">USD</CurrencyRef>
                <LinkedTxn>
                    <TxnId>343</TxnId>
                    <TxnType>PurchaseOrder</TxnType>
                </LinkedTxn>
                <LinkedTxn>
                    <TxnId>345</TxnId>
                    <TxnType>ReimburseCharge</TxnType>
                </LinkedTxn>
                <Line>
                    <Id>1</Id>
                    <LineNum>1</LineNum>
                    <Description>Fountain Pump</Description>
                    <Amount>10.00</Amount>
                    <LinkedTxn>
                        <TxnId>343</TxnId>
                        <TxnType>PurchaseOrder</TxnType>
                        <TxnLineId>1</TxnLineId>
                    </LinkedTxn>
                    <DetailType>ItemBasedExpenseLineDetail</DetailType>
                    <ItemBasedExpenseLineDetail>
                        <ItemRef name="Pump">11</ItemRef>
                        <UnitPrice>10</UnitPrice>
                        <Qty>1</Qty>
                        <TaxCodeRef>NON</TaxCodeRef>
                        <CustomerRef name="Domino's Pizza:Domino's Pizza - 17">88</CustomerRef>
                        <BillableStatus>HasBeenBilled</BillableStatus>
                    </ItemBasedExpenseLineDetail>
                </Line>
                <VendorRef name="Books by Bessie">30</VendorRef>
                <APAccountRef name="Accounts Payable (A/P)">33</APAccountRef>
                <TotalAmt>10.00</TotalAmt>
                <DueDate>2021-06-22</DueDate>
                <VendorAddr>
                    <Id>31</Id>
                    <Line1>15 Main St.</Line1>
                    <City>Palo Alto</City>
                    <CountrySubDivisionCode>CA</CountrySubDivisionCode>
                    <PostalCode>94303</PostalCode>
                    <Lat>37.445013</Lat>
                    <Long>-122.1391443</Long>
                </VendorAddr>
                <Balance>10.00</Balance>
            </Bill>
        </BatchItemRequest>
    </IntuitBatchRequest>

完整回复:

    Response Intuit_Tid header: 1-60d33f1b-0aa90b3a0d364cfe179d9ae3, Response Payload: 
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <IntuitResponse
        xmlns="http://schema.intuit.com/finance/v3" time="2021-06-23T07:03:07.975-07:00">
        <BatchItemResponse bId="f4372dc6-2bf5-4aab-93df-c1ce178233ef">
            <Bill domain="QBO" sparse="false">
                <Id>344</Id>
                <SyncToken>3</SyncToken>
                <MetaData>
                    <CreateTime>2021-06-22T14:17:24-07:00</CreateTime>
                    <LastUpdatedTime>2021-06-23T07:03:08-07:00</LastUpdatedTime>
                </MetaData>
                <TxnDate>2021-06-22</TxnDate>
                <CurrencyRef name="United States Dollar">USD</CurrencyRef>
                <LinkedTxn>
                    <TxnId>343</TxnId>
                    <TxnType>PurchaseOrder</TxnType>
                </LinkedTxn>
                <LinkedTxn>
                    <TxnId>345</TxnId>
                    <TxnType>ReimburseCharge</TxnType>
                </LinkedTxn>
                <Line>
                    <Id>1</Id>
                    <LineNum>1</LineNum>
                    <Description>Fountain Pump</Description>
                    <Amount>10.00</Amount>
                    <LinkedTxn>
                        <TxnId>343</TxnId>
                        <TxnType>PurchaseOrder</TxnType>
                        <TxnLineId>1</TxnLineId>
                    </LinkedTxn>
                    <DetailType>ItemBasedExpenseLineDetail</DetailType>
                    <ItemBasedExpenseLineDetail>
                        <ItemRef name="Pump">11</ItemRef>
                        <UnitPrice>10</UnitPrice>
                        <Qty>1</Qty>
                        <TaxCodeRef>NON</TaxCodeRef>
                        <CustomerRef name="Domino's Pizza:Domino's Pizza - 17">88</CustomerRef>
                        <BillableStatus>Billable</BillableStatus>
                    </ItemBasedExpenseLineDetail>
                </Line>
                <VendorRef name="Books by Bessie">30</VendorRef>
                <APAccountRef name="Accounts Payable (A/P)">33</APAccountRef>
                <TotalAmt>10.00</TotalAmt>
                <DueDate>2021-06-22</DueDate>
                <VendorAddr>
                    <Id>31</Id>
                    <Line1>15 Main St.</Line1>
                    <City>Palo Alto</City>
                    <CountrySubDivisionCode>CA</CountrySubDivisionCode>
                    <PostalCode>94303</PostalCode>
                    <Lat>37.445013</Lat>
                    <Long>-122.1391443</Long>
                </VendorAddr>
                <Balance>10.00</Balance>
            </Bill>
        </BatchItemResponse>
    </IntuitResponse>

更新:批次不相关。仅使用该更改的帐单更新也不起作用。

     RequestUrl: https://sandbox-quickbooks.api.intuit.com/v3/company/4620816365031247730/bill?minorversion=57&requestid=a7f7feddb93a49478d41b1b175b313be, Request Payload:<?xml version="1.0"?>
    <Bill xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" domain="QBO" sparse="false" xmlns="http://schema.intuit.com/finance/v3">
      <Id>344</Id>
      <SyncToken>3</SyncToken>
      <MetaData>
        <CreateTime>2021-06-22T17:17:24-04:00</CreateTime>
        <LastUpdatedTime>2021-06-23T10:03:08-04:00</LastUpdatedTime>
      </MetaData>
      <TxnDate>2021-06-22</TxnDate>
      <CurrencyRef name="United States Dollar">USD</CurrencyRef>
      <Line>
        <Id>1</Id>
        <LineNum>1</LineNum>
        <Description>Fountain Pump</Description>
        <Amount>10.00</Amount>
        <DetailType>ItemBasedExpenseLineDetail</DetailType>
        <ItemBasedExpenseLineDetail>
          <ItemRef name="Pump">11</ItemRef>
          <UnitPrice>10</UnitPrice>
          <Qty>1</Qty>
          <TaxCodeRef>NON</TaxCodeRef>
          <CustomerRef name="Domino's Pizza:Domino's Pizza - 17">88</CustomerRef>
          <BillableStatus>HasBeenBilled</BillableStatus>
        </ItemBasedExpenseLineDetail>
      </Line>
      <VendorRef name="Books by Bessie">30</VendorRef>
      <APAccountRef name="Accounts Payable (A/P)">33</APAccountRef>
      <TotalAmt>10.00</TotalAmt>
      <DueDate>2021-06-22</DueDate>
      <Balance>10.00</Balance>
    </Bill>
     Response Intuit_Tid header: 1-60d3761a-4b232cbd0fa3d50317aac69a, Response Payload: 
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <IntuitResponse
        xmlns="http://schema.intuit.com/finance/v3" time="2021-06-23T10:57:46.762-07:00">
        <Bill domain="QBO" sparse="false">
            <Id>344</Id>
            <SyncToken>3</SyncToken>
            <MetaData>
                <CreateTime>2021-06-22T14:17:24-07:00</CreateTime>
                <LastUpdatedTime>2021-06-23T07:03:08-07:00</LastUpdatedTime>
            </MetaData>
            <TxnDate>2021-06-22</TxnDate>
            <CurrencyRef name="United States Dollar">USD</CurrencyRef>
            <LinkedTxn>
                <TxnId>343</TxnId>
                <TxnType>PurchaseOrder</TxnType>
            </LinkedTxn>
            <LinkedTxn>
                <TxnId>345</TxnId>
                <TxnType>ReimburseCharge</TxnType>
            </LinkedTxn>
            <Line>
                <Id>1</Id>
                <LineNum>1</LineNum>
                <Description>Fountain Pump</Description>
                <Amount>10.00</Amount>
                <LinkedTxn>
                    <TxnId>343</TxnId>
                    <TxnType>PurchaseOrder</TxnType>
                    <TxnLineId>1</TxnLineId>
                </LinkedTxn>
                <DetailType>ItemBasedExpenseLineDetail</DetailType>
                <ItemBasedExpenseLineDetail>
                    <ItemRef name="Pump">11</ItemRef>
                    <UnitPrice>10</UnitPrice>
                    <Qty>1</Qty>
                    <TaxCodeRef>NON</TaxCodeRef>
                    <CustomerRef name="Domino's Pizza:Domino's Pizza - 17">88</CustomerRef>
                    <BillableStatus>Billable</BillableStatus>
                </ItemBasedExpenseLineDetail>
            </Line>
            <VendorRef name="Books by Bessie">30</VendorRef>
            <APAccountRef name="Accounts Payable (A/P)">33</APAccountRef>
            <TotalAmt>10.00</TotalAmt>
            <DueDate>2021-06-22</DueDate>
            <VendorAddr>
                <Id>31</Id>
                <Line1>15 Main St.</Line1>
                <City>Palo Alto</City>
                <CountrySubDivisionCode>CA</CountrySubDivisionCode>
                <PostalCode>94303</PostalCode>
                <Lat>37.445013</Lat>
                <Long>-122.1391443</Long>
            </VendorAddr>
            <Balance>10.00</Balance>
        </Bill>
    </IntuitResponse>

附加信息:当我将 Amount 字段更改为 11.00 时,它会保留,但新的 BillableStatus 值不会。我认为这是 API.

中的错误

附加信息:将 BillableStatus 设置为 NotBillable 时,相同的基本请求成功。 HasBeenBilled 有一些他们 API 不喜欢的东西。

来自 Intuit 支持票的回答:

BillableStatus is not updatable through request, it will change if an invoice has been created. We will update our api documentation with this information soon.