处理您的请求quickbooks销售收据api时发生了业务验证错误

时间:2017-05-04 10:31:15

标签: quickbooks quickbooks-online

我尝试使用quickbook api创建销售收据。大多数订单销售收据都成功与quickbook同步,没有任何问题。但其中一个抛出错误:

{
  "Fault": {
    "Error": [
      {
        "Message": "A business validation error has occurred while processing your request",
        "Detail": "Business Validation Error: Amount must be zero for bundle line items.",
        "code": "6000",
        "element": ""
      }
    ],
    "type": "ValidationFault"
  },
  "time": "2017-05-04T03:05:42.098-07:00"
}

以下是我的json销售收据请求:

{
  "SalesReceiptEx": null,
  "AutoDocNumber": null,
  "CustomerRef": {
    "name": "Natalie",
    "type": null,
    "value": "359"
  },
  "CustomerMemo": null,
  "BillAddr": {
    "Id": "1",
    "Line1": "Natalie Bespomostsnova",
    "Line2": "7 Curzon Street",
    "Line3": "London",
    "Line4": "United Kingdom,GB",
    "Line5": "W1J 5HG",
    "City": null,
    "Country": null,
    "CountryCode": null,
    "CountrySubDivisionCode": null,
    "PostalCode": null,
    "PostalCodeSuffix": null,
    "Lat": null,
    "Long": null,
    "Tag": null,
    "Note": null
  },
  "ShipAddr": {
    "Id": "2",
    "Line1": "Natalie Bespomostsnova",
    "Line2": "28 Dawson Place",
    "Line3": null,
    "Line4": null,
    "Line5": null,
    "City": "London",
    "Country": "United Kingdom",
    "CountryCode": null,
    "CountrySubDivisionCode": "GB",
    "PostalCode": "W2 4TJ",
    "PostalCodeSuffix": null,
    "Lat": null,
    "Long": null,
    "Tag": null,
    "Note": null
  },
  "RemitToRef": null,
  "ClassRef": null,
  "SalesTermRef": null,
  "DueDate": null,
  "SalesRepRef": null,
  "PONumber": null,
  "FOB": null,
  "ShipMethodRef": null,
  "ShipDate": null,
  "TrackingNum": null,
  "GlobalTaxCalculation": null,
  "TotalAmt": "278.90000",
  "HomeTotalAmt": null,
  "ApplyTaxAfterDiscount": null,
  "TemplateRef": null,
  "PrintStatus": null,
  "EmailStatus": null,
  "BillEmail": {
    "Id": null,
    "Address": "pa@biliuk.com",
    "Default": null,
    "Tag": null
  },
  "ARAccountRef": null,
  "Balance": null,
  "HomeBalance": null,
  "FinanceCharge": null,
  "PaymentMethodRef": null,
  "PaymentRefNum": null,
  "PaymentType": null,
  "CheckPayment": null,
  "CreditCardPayment": null,
  "DepositToAccountRef": {
    "name": "Business Bank Account HSBC",
    "type": null,
    "value": 58
  },
  "DeliveryInfo": null,
  "DiscountRate": null,
  "DiscountAmt": null,
  "GovtTxnRefIdentifier": null,
  "DocNumber": 382713263,
  "TxnDate": "2017-05-04",
  "DepartmentRef": null,
  "CurrencyRef": null,
  "ExchangeRate": null,
  "PrivateNote": null,
  "TxnStatus": null,
  "LinkedTxn": null,
  "Line": [
    {
      "Id": 1,
      "LineNum": 1,
      "Description": "Custom Product",
      "Amount": "100.00000",
      "LinkedTxn": null,
      "DetailType": "SalesItemLineDetail",
      "PaymentLineDetail": null,
      "DiscountLineDetail": null,
      "TaxLineDetail": null,
      "SalesItemLineDetail": {
        "ServiceDate": null,
        "TaxInclusiveAmt": null,
        "DiscountRate": null,
        "DiscountAmt": null,
        "SalesItemLineDetailEx": null,
        "ItemRef": {
          "name": "Custom Product",
          "type": null,
          "value": "5"
        },
        "ClassRef": null,
        "UnitPrice": "20.00000",
        "RatePercent": null,
        "PriceLevelRef": null,
        "MarkupInfo": null,
        "Qty": "5",
        "UOMRef": null,
        "ItemAccountRef": null,
        "InventorySiteRef": null,
        "TaxCodeRef": {
          "name": null,
          "type": null,
          "value": 2
        }
      },
      "DescriptionLineDetail": null,
      "ItemBasedExpenseLineDetail": null,
      "AccountBasedExpenseLineDetail": null,
      "DepositLineDetail": null,
      "PurchaseOrderItemLineDetail": null,
      "ItemReceiptLineDetail": null,
      "JournalEntryLineDetail": null,
      "GroupLineDetail": null,
      "SubTotalLineDetail": null,
      "TDSLineDetail": null,
      "CustomField": null,
      "LineEx": null
    },
    {
      "Id": 2,
      "LineNum": 2,
      "Description": "10 Balloon Bunch",
      "Amount": "99.91666",
      "LinkedTxn": null,
      "DetailType": "SalesItemLineDetail",
      "PaymentLineDetail": null,
      "DiscountLineDetail": null,
      "TaxLineDetail": null,
      "SalesItemLineDetail": {
        "ServiceDate": null,
        "TaxInclusiveAmt": null,
        "DiscountRate": null,
        "DiscountAmt": null,
        "SalesItemLineDetailEx": null,
        "ItemRef": {
          "name": "10 Balloon Bunch",
          "type": null,
          "value": "2"
        },
        "ClassRef": null,
        "UnitPrice": "49.95833",
        "RatePercent": null,
        "PriceLevelRef": null,
        "MarkupInfo": null,
        "Qty": "2",
        "UOMRef": null,
        "ItemAccountRef": null,
        "InventorySiteRef": null,
        "TaxCodeRef": {
          "name": null,
          "type": null,
          "value": 2
        }
      },
      "DescriptionLineDetail": null,
      "ItemBasedExpenseLineDetail": null,
      "AccountBasedExpenseLineDetail": null,
      "DepositLineDetail": null,
      "PurchaseOrderItemLineDetail": null,
      "ItemReceiptLineDetail": null,
      "JournalEntryLineDetail": null,
      "GroupLineDetail": null,
      "SubTotalLineDetail": null,
      "TDSLineDetail": null,
      "CustomField": null,
      "LineEx": null
    },
    {
      "Id": 3,
      "LineNum": 3,
      "Description": "Shipping Cost",
      "Amount": "32.50000",
      "LinkedTxn": null,
      "DetailType": "SalesItemLineDetail",
      "PaymentLineDetail": null,
      "DiscountLineDetail": null,
      "TaxLineDetail": null,
      "SalesItemLineDetail": {
        "ServiceDate": null,
        "TaxInclusiveAmt": null,
        "DiscountRate": null,
        "DiscountAmt": null,
        "SalesItemLineDetailEx": null,
        "ItemRef": {
          "name": "Shipping Cost",
          "type": null,
          "value": "1"
        },
        "ClassRef": null,
        "UnitPrice": "32.50000",
        "RatePercent": null,
        "PriceLevelRef": null,
        "MarkupInfo": null,
        "Qty": "1",
        "UOMRef": null,
        "ItemAccountRef": null,
        "InventorySiteRef": null,
        "TaxCodeRef": {
          "name": null,
          "type": null,
          "value": 2
        }
      },
      "DescriptionLineDetail": null,
      "ItemBasedExpenseLineDetail": null,
      "AccountBasedExpenseLineDetail": null,
      "DepositLineDetail": null,
      "PurchaseOrderItemLineDetail": null,
      "ItemReceiptLineDetail": null,
      "JournalEntryLineDetail": null,
      "GroupLineDetail": null,
      "SubTotalLineDetail": null,
      "TDSLineDetail": null,
      "CustomField": null,
      "LineEx": null
    }
  ],
  "TxnTaxDetail": null,
  "TxnSource": null,
  "TaxFormType": null,
  "TaxFormNum": null,
  "TransactionLocationType": null,
  "Id": null,
  "SyncToken": null,
  "MetaData": null,
  "CustomField": null,
  "AttachableRef": null,
  "domain": null,
  "status": null,
  "sparse": null
}

任何人都可以协助这个json中的实际错误吗? 任何帮助真的很感激。

1 个答案:

答案 0 :(得分:0)

错误说:

  

业务验证错误:捆绑订单项的金额必须为零。

您的哪个订单项是捆绑项目?

您为捆绑项目提供的金额是否为零?