Skip to content

QuickBooks: Create a vendor

QuickBooks vendor.create: arguments, response, policy and SDK examples.

← Vendor operations · Get started

Operation quickbooks.vendor.create_a_vendor

Provider route: POST /v3/company/{realmID}/vendor. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/quickbooks with npm, or alter-sdk-quickbooks with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { QuickBooksIntegration } from "@alter-ai/quickbooks";
async function execute(input: Parameters<QuickBooksIntegration["vendor"]["create"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new QuickBooksIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.vendor.create(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_quickbooks import QuickBooksIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = QuickBooksIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.vendor.create(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.minorversionintegerOptionalMust equal: 75
query.requestidstringOptionalMinimum length: 1
query.includestringOptionalOne of: enhancedAllCustomFields
bodyobjectRequired within parentFields not accepted: Id, SyncToken
Additional keys: not allowed
body.AcctNumstringOptionalName or number of the account associated with this vendor.
body.ActiveJSONOptionalIf true, this object is currently enabled for use by QuickBooks.
body.Active (anyOf 1)booleanAlternative
body.Active (anyOf 2)stringAlternativeOne of: true, false
body.AlternatePhoneModelOptionalExpand Create a vendor — request body — body Fax
Alternate phone number.
body.BalanceJSONOptionalSpecifies the open balance amount or the amount unpaid by the customer. For the create operation, this represents the opening balance for the customer. When returned in response to the query request it represents the current open balance (unpaid amount) for that customer. Write-on-create, read-only otherwise.
Decimal string
Read only: true
body.Balance (anyOf 1)numberAlternative
body.Balance (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?$
body.BillAddrModelOptionalExpand Create a vendor — request body — body Bill Addr
Default billing address. If a physical address is updated from within the transaction object, the QuickBooks Online API flows individual address components differently into the Line elements of the transaction response then when the transaction was first created: Line1 and Line2 elements are populated with the customer name and company name. Original Line1 through Line 5 contents, City , SubDivisionCode , and PostalCode flow into Line3 through Line5 as a free format strings.
body.BillRateJSONOptionalBillRate can be set to specify this vendor’s hourly billing rate.
Decimal string
body.BillRate (anyOf 1)numberAlternative
body.BillRate (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?$
body.CompanyNamestringOptionalThe name of the company associated with the person or organization.
body.CostRateJSONOptionalPay rate of the vendor
Decimal string
body.CostRate (anyOf 1)numberAlternative
body.CostRate (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?$
body.CurrencyRefModelOptionalExpand Create a bill — request body — body Currency Ref
Reference to the currency in which all amounts associated with this vendor are expressed. Once set, it cannot be changed. If specified currency is not currently in the company’s currency list, it is added. If not specified, currency for this vendor is the home currency of the company, as defined by Preferences.CurrencyPrefs.HomeCurrency . Read-only after object is created.
Read only: true
body.DisplayNamestringOptionalThe name of the vendor as displayed. Must be unique across all Vendor, Customer, and Employee objects. Cannot be removed with sparse update. If not supplied, the system generates DisplayName by concatenating vendor name components supplied in the request from the following list: Title , GivenName , MiddleName , FamilyName , and Suffix .
body.FamilyNamestringOptionalFamily name or the last name of the person. The DisplayName attribute or at least one of Title , GivenName , MiddleName , FamilyName , or Suffix attributes is required for object create.
Conditionally required
body.FaxModelOptionalExpand Create a vendor — request body — body Fax
Fax number.
body.GivenNamestringOptionalGiven name or first name of a person. The DisplayName attribute or at least one of Title , GivenName , MiddleName , FamilyName , or Suffix attributes is required for object create.
Conditionally required
body.HasTPARJSONOptionalIndicate if the vendor has TPAR enabled. TPAR stands for Taxable Payments Annual Report. The TPAR is mandated by ATO to get the details payments that businesses make to contractors for providing services. Some government entities also need to report the grants they have paid in a TPAR.
body.HasTPAR (anyOf 1)booleanAlternative
body.HasTPAR (anyOf 2)stringAlternativeOne of: true, false
body.MetaDataModelOptionalExpand Read a bill — response body — Bill Meta Data
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
body.MiddleNamestringOptionalMiddle name of the person. The person can have zero or more middle names. The DisplayName attribute or at least one of Title , GivenName , MiddleName , FamilyName , or Suffix attributes is required for object create.
Conditionally required
body.MobileModelOptionalExpand Create a vendor — request body — body Fax
Mobile phone number.
body.OtherContactInfoarrayOptionalList of ContactInfo entities of any contact info type.
body.OtherContactInfo[]ModelEach itemExpand Create a vendor — request body — body Other Contact Info item
body.PrimaryEmailAddrModelOptionalExpand Full update companyinfo — request body — body Email
Primary email address.
body.PrimaryPhoneModelOptionalExpand Create a vendor — request body — body Fax
Primary phone number.
body.PrintOnCheckNamestringOptionalName of the person or organization as printed on a check. If not provided, this is populated from DisplayName . Cannot be removed with sparse update.
body.SourcestringOptionalThe Source type of the transactions created by QuickBooks Commerce. Valid values include: QBCommerce
body.SuffixstringOptionalSuffix of the name. For example, Jr . The DisplayName attribute or at least one of Title , GivenName , MiddleName , FamilyName , or Suffix attributes is required for object create.
Conditionally required
body.T4AEligibleJSONOptionalTrue if vendor is T4A eligible. Valid for CA locale
body.T4AEligible (anyOf 1)booleanAlternative
body.T4AEligible (anyOf 2)stringAlternativeOne of: true, false
body.T5018EligibleJSONOptionalTrue if vendor is T5018 eligible. Valid for CA locale
body.T5018Eligible (anyOf 1)booleanAlternative
body.T5018Eligible (anyOf 2)stringAlternativeOne of: true, false
body.TaxIdentifierstringOptionalThe tax ID of the Person or Organization. The value is masked in responses, exposing only last four characters. For example, the ID of 123-45-6789 is returned as XXXXXXX6789 .
body.TermRefModelOptionalExpand Create a purchase order — request body — body Ship To
Reference to a default Term associated with this Vendor object. Query the Term name list resource to determine the appropriate Term object for this reference. Use Term.Id and Term.Name from that object for TermRef.value and TermRef.name , respectively.
body.TitlestringOptionalTitle of the person. This tag supports i18n, all locales. The DisplayName attribute or at least one of Title , GivenName , MiddleName , FamilyName , Suffix , or FullyQualifiedName attributes are required during create.
Conditionally required
body.Vendor1099JSONOptionalThis vendor is an independent contractor; someone who is given a 1099-MISC form at the end of the year. A 1099 vendor is paid with regular checks, and taxes are not withheld on their behalf.
body.Vendor1099 (anyOf 1)booleanAlternative
body.Vendor1099 (anyOf 2)stringAlternativeOne of: true, false
body.VendorPaymentBankDetailModelOptionalExpand Create a vendor — request body — body Vendor Payment Bank Detail
Vendor Payment Bank Detail.
body.WebAddrModelOptionalExpand Create a vendor — request body — body Web Addr
Website address.
body.domainstringOptional
body.sparsebooleanOptional

Referenced models: Create a vendor — request body — body Other Contact Info item, Full update companyinfo — request body — body Email, Read a bill — response body — Bill Meta Data, Create a vendor — request body — body Bill Addr, Create a vendor — request body — body Fax, Create a vendor — request body — body Vendor Payment Bank Detail, Create a vendor — request body — body Web Addr, Create a bill — request body — body Currency Ref, Create a purchase order — request body — body Ship To

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
timestringOptional
VendorModelOptionalExpand Read a vendor — response body — Vendor

Referenced models: Read a vendor — response body — Vendor

1 more schema is linked from the tables above, on the schema pages.

Create a vendor — request body — body Other Contact Info item
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
TelephonestringOptional
TypestringOptionalThe type of contact information. Valid values: TelephoneNumber
Full update companyinfo — request body — body Email
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
AddressstringOptionalAn email address. The address format must follow the RFC 822 standard.
Read a bill — response body — Bill Meta Data
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
CreateTimestringOptionalTime the entity was created in the source domain.
Read only: true
LastUpdatedTimestringOptionalTime the entity was last updated in the source domain.
Read only: true
Create a vendor — request body — body Bill Addr
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
CitystringOptionalCity name.
CountrystringOptionalFor international addresses, the request can be an ISO alpha-3 code or the full name of the country. The response for update and read operations returns ISO alpha-3 country codes only.
CountrySubDivisionCodestringOptionalRegion within a country. For example, state name for USA, province name for Canada.
IdstringOptionalUnique identifier of the QuickBooks object for the address, autoincremented when the address is changed. This is an internal value included for backwards compatibility and can be ignored.
Read only: true
Line1stringOptionalFirst line of the address.
Line2stringOptionalSecond line of the address.
Line3stringOptionalThird line of the address.
Line4stringOptionalFourth line of the address.
Line5stringOptionalFifth line of the address.
PostalCodestringOptionalPostal code. For example, zip code for USA and Canada
Create a vendor — request body — body Fax
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
FreeFormNumberstringOptionalSpecifies the telephone number in free form.
Create a vendor — request body — body Vendor Payment Bank Detail
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
BankAccountNamestringOptionalName on the Bank Account
BankAccountNumberstringOptionalVendor's Bank Account number.
BankBranchIdentifierstringOptionalbank identification number used to identify the Bank Branch. 6 digit value in format xxx-xxx.
StatementTextstringOptionalText/note/comment for Remmittance
Create a vendor — request body — body Web Addr
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
URIstringOptionalUniform Resource Identifier for the web site.
Create a bill — request body — body Currency Ref
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
namestringOptionalThe full name of the currency.
valueJSONRequired within parent
value (anyOf 1)stringAlternative
value (anyOf 2)integerAlternativeMinimum: 0
Maximum: 9007199254740991
Create a purchase order — request body — body Ship To
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
namestringOptionalAn identifying name for the object being referenced by value and is derived from the field that holds the common name of that object. This varies by context and specific type of object referenced. For example, references to a Customer object use Customer.DisplayName to populate this field. Optionally returned in responses, implementation dependent.
valueJSONRequired within parent
value (anyOf 1)stringAlternative
value (anyOf 2)integerAlternativeMinimum: 0
Maximum: 9007199254740991
Read a bill — response body — Bill Currency Ref
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
namestringOptionalThe full name of the currency.
valueJSONOptional
value (anyOf 1)stringAlternative
value (anyOf 2)JSONAlternative
value (anyOf 2) (anyOf 1)integerAlternative
value (anyOf 2) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
Read an item — response body — Item Class Ref
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
namestringOptionalAn identifying name for the object being referenced by value and is derived from the field that holds the common name of that object. This varies by context and specific type of object referenced. For example, references to a Customer object use Customer.DisplayName to populate this field. Optionally returned in responses, implementation dependent.
valueJSONOptional
value (anyOf 1)stringAlternative
value (anyOf 2)JSONAlternative
value (anyOf 2) (anyOf 1)integerAlternative
value (anyOf 2) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

SDK function policy ID: quickbooks.vendor.create_a_vendor. Catalog operation: vendors/create. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.