You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用v3-php-sdk创建Category类型Item时触发6000业务验证错误

Fixing "6000: Business Validation Error" When Creating Category-Type Items with QBO v3-PHP-SDK

I've run into this exact issue before with the QuickBooks Online v3 PHP SDK—category-type items have stricter implicit validation rules than regular items, even if the docs don't always spell them out clearly. Let's break down what's going wrong and how to fix it.

The Root Cause

Your current array only includes Name, FullyQualifiedName, and Type, but the QBO API requires explicit values for certain boolean fields when creating category items. The generated IPPItem object shows Active and SubItem as empty (not set to true or false), which triggers the 6000 business validation error. QBO doesn't accept null/empty values for these fields for category-type items.

Step-by-Step Fix

Update your item array to include the required boolean fields with explicit values:

$arrayItem = [
    'Name' => 'Item',
    'FullyQualifiedName' => 'Item',
    'Type' => 'Category',
    'Active' => true, // Required explicit boolean
    'SubItem' => false // Required explicit boolean (set to true if this is a sub-category)
];

Why This Works

  • Active: QBO expects all items (including categories) to have a clear active status. Setting this to true aligns with the default behavior for new items.
  • SubItem: Since this is a top-level category (no parent), we explicitly set this to false. If you were creating a sub-category, you'd set this to true and add a ParentRef with the parent category's ID.

Additional Checks

If you still get the error after adding these fields:

  • Double-check that FullyQualifiedName exactly matches Name for top-level categories (this is required to avoid path conflicts).
  • Ensure there are no existing categories with the same Name or FullyQualifiedName in your QBO company (duplicates will also trigger validation errors).

Once you update the array with these values, calling Item::create($arrayItem) should successfully create the category item without the 6000 error.

内容的提问来源于stack exchange,提问作者Aljay

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 06:42:31