VendorCredits
Represents vendor credits at the header level, used to apply credits to bills or reimburse the company for returns or overpayments.
Table Specific Information
VendorCredits may be inserted, queried, or updated via the VendorCredits or VendorCreditLineItems tables. VendorCredits may be deleted by using the VendorCredits table.
Select
All filterable columns support the following operators:
- =
- !=
- >=
- <=
- >
- <
- IN
- LIKE
- CONTAINS
The driver processes other filters client-side within the driver.
Insert
To add a VendorCredit, specify a Vendor, TotalAmt, and at least one Line Item. The LineAggregate column may be used to specify an XML aggregate of Line Item data. Each _ denotes hierarchy. Use <Line> at the base level. The contents of LineAggregate will be sent to the API as is. All values for each field in the aggregate should adhere to the API's specifications (e.g. for dates in format yyyy-MM-dd, for date times in format yyyy-MM-dd'T'HH:mm:sszzz). The columns that may be used in the aggregates begin with the prefix 'Line_' to indicate they are part of the line item. Use the Line_ column along with the DocNumber to indicate which lines go with which VendorCredits. For example:
INSERT INTO VendorCredits (VendorRef, TotalAmt, LineAggregate)
VALUES ('21', '0.03', '
<Line><Amount>0.01</Amount><DetailType>AccountBasedExpenseLineDetail</DetailType><AccountBasedExpenseLineDetail><CustomerRef>4</CustomerRef><AccountRef>41</AccountRef></AccountBasedExpenseLineDetail></Line>
<Line><Amount>0.02</Amount><DetailType>AccountBasedExpenseLineDetail</DetailType><AccountBasedExpenseLineDetail><CustomerRef>4</CustomerRef><AccountRef>41</AccountRef></AccountBasedExpenseLineDetail></Line>
')
Columns
| Name | Type | ReadOnly | References | Filterable | Sortable | Description |
| Id [KEY] | String | True | True | True |
The unique identifier (Id) that is assigned by QuickBooks Online to this vendor-credit transaction. It is used to retrieve or reference the vendor credit programmatically and is required for updates or deletions. | |
| SyncToken | String | True | False | False |
The version control token for this vendor-credit transaction that is used to prevent conflicting updates. QuickBooks Online increments this sync token each time the transaction is modified, and only the latest sync token is accepted for edits. | |
| MetaData_CreateTime | Datetime | True | True | True |
The date and time stamp (Coordinated Universal Time) when QuickBooks Online created this vendor-credit transaction record. | |
| MetaData_LastUpdatedTime | Datetime | True | True | True |
The date and time stamp (Coordinated Universal Time) when this vendor-credit transaction record was last modified in QuickBooks Online. | |
| DocNumber | String | False | True | True |
The external or system-generated reference number that is assigned to this vendor credit. If no number is provided, QuickBooks Online automatically assigns the next sequential document number based on the company's numbering preferences. | |
| TxnDate | Date | False | True | True |
The transaction date that determines when this vendor credit is posted to the books. For example, a vendor credit can be created on one date but backdated to affect a prior period's financial statements. | |
| PrivateNote | String | False | False | False |
An internal memo or private note that is recorded on this vendor credit. These notes are not printed on customer-facing or vendor-facing forms by default and are intended for internal reference. | |
| DepartmentRef | String | False |
Departments.Id | False | False |
The unique Id of the department or location that is linked to this vendor-credit transaction when location tracking is enabled in QuickBooks Online. |
| DepartmentRef_Name | String | True |
Departments.Name | False | False |
The display name of the department or location that is linked to this vendor-credit transaction when location tracking is enabled in QuickBooks Online. |
| LineAggregate | String | False | False | False |
An XML aggregate that contains all individual line-item entries that are included in this vendor-credit transaction. Each line element typically includes details such as Line/Id, Line/LineNum, Line/Amount, Line/DetailType, Line/Description, and either Line/AccountBasedExpenseLineDetail (with AccountRef, ClassRef, CustomerRef, TaxCodeRef, BillableStatus) or Line/ItemBasedExpenseLineDetail (with ItemRef, Qty, UnitPrice, TaxCodeRef). This collection enables you to view or maintain the complete set of expense or item details that QuickBooks Online applies to the vendor credit. | |
| VendorRef | String | False |
Vendors.Id | True | False |
The unique Id of the vendor to whom this credit is issued. |
| VendorRef_Name | String | True |
Vendors.DisplayName | False | False |
The display name of the vendor to whom this credit is issued. |
| APAccountRef | String | False |
Accounts.Id | True | True |
The unique Id of the accounts-payable liability account to which this vendor credit is posted. If the company has a single accounts-payable account, QuickBooks Online implies it automatically. When specified, the account must be a Liability account with a subtype of Payables. |
| APAccountRef_Name | String | True |
Accounts.Name | False | False |
The display name of the accounts-payable liability account to which this vendor credit is posted. If the company has a single accounts-payable account, QuickBooks Online implies it automatically. When specified, the account must be a Liability account with a subtype of Payables. |
| TotalAmt | Decimal | False | True | True |
The total monetary amount of the vendor-credit transaction. This total is determined by summing the amounts of all included line items, charges, allowances, taxes, and discounts. | |
| CurrencyRef | String | False | False | False |
The unique Id of the currency in which this vendor-credit transaction is recorded when multicurrency is enabled. | |
| CurrencyRef_Name | String | True | False | False |
The display name of the currency in which this vendor-credit transaction is recorded when multicurrency is enabled. | |
| ExchangeRate | Decimal | False | False | False |
The currency exchange rate that QuickBooks Online applies to convert this vendor credit amount into the home currency. This field is valid only when multicurrency is enabled. In QuickBooks Online, exchange rates are always recorded as the number of home currency units it takes to equal one foreign currency unit. This field is available for the UK, AU, and CA editions. | |
| GlobalTaxCalculation | String | False | False | False |
The method by which QuickBooks Online applies tax to this vendor-credit transaction. This field is valid in the UK, AU, and CA editions. The allowed values are TaxExcluded, TaxInclusive, NotApplicable. | |
| TransactionLocationType | String | False | False | False |
The account location type that is associated with this vendor-credit transaction. This field is valid only in the FR editions. The allowed values are WithinFrance, FranceOverseas, OutsideFranceWithEU, OutsideEU. | |
| RecurDataRef | String | True | False | False |
The unique Id of the reference to the recurring transaction template from which this vendor credit was created. This field captures which recurring transaction template the vendor credit originated from. | |
| LinkedTxnAggregate | String | False | False | False |
An XML aggregate that contains zero or more linked transactions that are associated with this vendor credit. Each LinkedTxn element typically includes the Id, Type, and an optional sequence number of the related transaction (for example, Bill, PurchaseOrder, or CreditMemo). This collection enables you to view or maintain the cross-references that QuickBooks Online uses to apply the vendor credit to one or more other transactions. | |
| IncludeInAnnualTPAR | Boolean | True | False | False |
Indicates whether the supplier that is associated with this vendor credit should be included in the annual Taxable Payments Annual Report (TPAR). This field helps Australian companies meet Australian Tax Office reporting obligations. | |
| Balance | Decimal | True | True | True |
Specifies the open balance amount or the amount of this vendor credit that remains unapplied. This shows how much of the credit is still available to offset other transactions. |