Skip to content
Desktop Accounting API

Custom fields

QuickBooks Desktop lets users add their own fields, such as “Region” on customers or “Lot color” on invoice lines. QuickBooks calls them data extensions; the API calls them custom fields.

Records and lines that can carry custom fields return them in customFields:

"customFields": [
{ "ownerId": "0", "name": "Region", "value": "West" },
{ "ownerId": "0", "name": "Sales channel", "value": "Distributor" }
]
Field Meaning
ownerId "0" for the custom fields people create and see in QuickBooks. Other values belong to fields an application created for its own use.
name The field’s name as defined in QuickBooks.
value The value, always as a string. QuickBooks also stores numbers, dates and amounts as text here.

Fields with no value on a record are not listed. More than 50 resource schemas expose customFields, including customers, vendors, employees, items, accounts and most transactions and their lines. Whether a field can hold a value depends on the record type and the company’s definitions; an exposed property does not mean every company has populated fields on that resource. The API reference lists the property for each resource.

When you create an invoice, estimate, sales order, sales receipt, credit memo, purchase order or bill, each item and expense line accepts customFields:

POST /v1/quickbooks-desktop/invoices
{
"customerId": "80000012-1730312001",
"lines": [
{
"itemId": "80000003-1730311000",
"quantity": 2,
"rate": "125.00",
"customFields": [{ "ownerId": "0", "name": "Lot color", "value": "Blue" }]
}
]
}

The field must already be defined in the company file for that kind of line. QuickBooks rejects an unknown name with a QBD_REQUEST_ERROR that carries its status code and message.

Changing custom fields on existing records

Section titled “Changing custom fields on existing records”

QuickBooks stores custom-field values separately from the record, so the record’s own update does not change them. Every record type that carries customFields has a custom-fields endpoint instead:

POST /v1/quickbooks-desktop/customers/80000012-1730312001/custom-fields
{
"operation": "update",
"ownerId": "0",
"name": "Region",
"value": "East"
}
Field Meaning
operation update (qbXML DataExtMod) writes the value. For public fields (ownerId "0") it works whether or not the record already has a value, so it is the one to use. add (DataExtAdd) gives a record its first value of a private field, the way an application initializes its own data. delete (DataExtDel) clears the value on this record and keeps the field definition. If QuickBooks refuses the request, the error carries its status code and message.
ownerId "0" (the default) for the public fields people see in QuickBooks, or the GUID of the application that owns a private field.
name The field’s name, up to 31 characters. The field must already be defined for this kind of record.
value The new value as text. Required for add and update; leave it out for delete.
transactionLineId Transactions only: write the value on this line instead of the transaction.

The response is the stored value, { "objectType": "qbd_custom_field_value", "ownerId": "0", "name": "Region", "type": "string_255_type", "value": "East" }; after delete, type and value are null. Send an Idempotency-Key and reuse it for retries within its seven-day retention period. The SDKs expose it as setCustomField on each resource, for example client.qbd.customers.setCustomField(id, {...}).

For private fields, arrange maintenance in single-user mode. Initializing or changing a value can fail in multi-user mode with QBD_REQUIRES_SINGLE_USER_MODE for the native missing-definition messages observed on Enterprise 24. Other native errors keep their own codes. See Multi-user office.

/v1/quickbooks-desktop/custom-field-definitions lists, creates, changes and deletes the field definitions themselves:

  • GET lists the definitions. Without filters it returns the public definitions (ownerId "0"): QuickBooks answers an unfiltered query with nothing, and it returns a private definition only to a query that names its owner. ownerIds lists the definitions of those owners. assignToObjects (for example customer or invoice) on its own returns public definitions only; send it with ownerIds to filter private definitions by record type too.
  • POST creates one: ownerId, name, type (such as string_255_type or amount_type) and the record types in assignToObjects. A public definition (ownerId "0") can be assigned only to customer, vendor, employee and item; QuickBooks refuses other record types for public fields (status 3351), so the API answers 400 INVALID_PARAMETER before sending. Public fields on customers and items also show on transactions. Use a private ownerId for other record types.
  • POST /v1/quickbooks-desktop/custom-field-definitions/{definitionName} renames a field (newName), assigns it to more record types (assignToObjects) or removes it from some (removeFromObjects). ownerId is required: "0" for a public field.
  • DELETE /v1/quickbooks-desktop/custom-field-definitions/{definitionName}?ownerId={guid}&confirm=true asks QuickBooks to delete a private definition that was never assigned to an object type. See Deleting definitions: QuickBooks cannot delete public or assigned definitions.

A definition is identified by its owner and name, so the path holds the URL-encoded name and the request names the owner: ownerId is required on update and delete, with no default. Changing definitions changes what your customer sees in QuickBooks, so do it only with their agreement.

Intuit’s QuickBooks SDK documents two limits:

  • Public definitions cannot be deleted through the SDK. A delete with ownerId "0" is refused with 400 INVALID_PARAMETER (param ownerId) and nothing is sent. Remove a public field in the QuickBooks window instead.
  • A private definition that has ever been assigned to an object type cannot be deleted through the SDK. QuickBooks may answer success yet keep it; it then cannot be written, and a definition with the same owner and name cannot be created again. Removing its assignments first is not a documented way around this.

The API reads the definition before deleting it (a separate read in the request log). While it is assigned to any object type, the delete is refused with 422 QBD_OPERATION_UNSUPPORTED and nothing is sent. The read cannot see whether a definition was assigned in the past, so do not delete definitions that are or were in use: keep them. Only a private definition that was never assigned is safe to delete, and QuickBooks’ success answer is a request result, not proof that it is gone; list the definitions with its ownerIds to check.

Private definition deletes are refused before sending when the session reports multi-user mode. The result reports deleted: true only after readback finds the definition absent, false with retainedBecause when it remains, or null when readback failed. See Delete and merge records.

Clearing a value on one record is a different operation: use the record’s custom-fields endpoint with "operation": "delete", which keeps the definition.

Custom fields with an ownerId other than "0" were created by an application for its own use and are hidden in the QuickBooks window. Leave them alone unless they are yours.

After setup, our service stores one private data extension on the company itself: a random identifier that lets the connection recognize the company file, even after a backup is restored or the file is moved. It has its own owner ID, does not show in the QuickBooks window, and never appears in customFields. The Web Connector keeps private data of its own in the company file too, under the owner ID of the connector file.

The custom field endpoints never read, write or delete either: a request with one of those owner IDs is refused with 400 INVALID_PARAMETER before anything is sent, and their definitions are left out of the definitions list. Do not change them through passthrough either; without our identifier, the connection falls back to recognizing the company by its name and details, and without its own data the Web Connector stops connecting.