v48

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-262621423.8 MB

Create a discount item

Creates a discount item that subtracts either a percentage or fixed amount from transaction totals. Percentage discounts only affect the preceding line, while fixed-amount discounts reduce the accumulated amount above them unless you bound the target lines with a subtotal item.

post/quickbooks-desktop/discount-items

Headers

Conductor-End-User-Idstring required

The ID of the End-User to receive this request.

Example:end_usr_1234567abcdefg

The ID of the End-User to receive this request.

Request body

namestring required

The case-insensitive name of this discount item. Not guaranteed to be unique because it does not include the names of its hierarchical parent objects like fullName does. For example, two discount items could both have the name "10% labor discount", but they could have unique fullName values, such as "Discounts:10% labor discount" and "Promotions:10% labor discount".

Maximum length: 31 characters.

isActiveboolean

Indicates whether this discount item is active. Inactive objects are typically hidden from views and reports in QuickBooks. Defaults to true.

classIdstring

The discount item's class. Classes can be used to categorize objects into meaningful segments, such as department, location, or type of work. In QuickBooks, class tracking is off by default.

parentIdstring

The parent discount item one level above this one in the hierarchy. For example, if this discount item has a fullName of "Discounts:10% labor discount", its parent has a fullName of "Discounts". If this discount item is at the top level, this field will be null.

descriptionstring

The discount item's description that will appear on sales forms that include this item.

salesTaxCodeIdstring

The default sales-tax code for this discount item, determining whether it is taxable or non-taxable. This can be overridden at the transaction-line level.

Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes can also be created in QuickBooks Desktop. If QuickBooks Desktop is not set up to charge sales tax (via the "Do You Charge Sales Tax?" preference), it assigns the default non-taxable sales-tax code configured in the company file to all sales.

discountRatestring

The monetary amount to subtract from the total or subtotal when applying this discount item to a transaction, represented as a decimal string.

NOTE: A flat rate discount applies to ALL lines recorded above it and distributes the discount amount equally across those lines, which affects tax calculations. For example, a $10 discount applied to a $100 taxable item and $100 non-taxable item would result in a $5 taxable discount and $5 non-taxable discount.

Decimal string format: up to 5 decimal places and up to 10 digits before the decimal point (for example, "123.45").

discountRatePercentstring

The percentage amount to subtract from the total or subtotal when applying this discount item to a transaction.

NOTE: A percentage discount only applies to the line immediately above it, so tax implications only affect that specific line.

accountIdstring required

The posting account to which transactions involving this discount item are posted for tracking discounts.

externalIdstring uuid

A globally unique identifier (GUID) you, the developer, can provide for tracking this object in your external system. This field is immutable and can only be set during object creation.

IMPORTANT: This field must be formatted as a valid GUID; otherwise, QuickBooks will return an error.

Example request

{
  "name": "10% labor discount",
  "barcode": {
    "value": "012345678905"
  },
  "isActive": true,
  "classId": "80000001-1234567890",
  "parentId": "80000001-1234567890",
  "description": "10% discount for early payment on labor charges",
  "salesTaxCodeId": "80000001-1234567890",
  "discountRate": "25.00",
  "discountRatePercent": "10.5",
  "accountId": "80000001-1234567890",
  "externalId": "12345678-abcd-1234-abcd-1234567890ab"
}

Response

Returns the newly created discount item.

idstring required

The unique identifier assigned by QuickBooks to this discount item. This ID is unique across all discount items but not across different QuickBooks object types.

objectType'qbd_discount_item' required

The type of object. This value is always "qbd_discount_item".

createdAtstring required

The date and time when this discount item was created, in ISO 8601 format (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks Desktop interprets in the local timezone of the end-user's computer.

updatedAtstring required

The date and time when this discount item was last updated, in ISO 8601 format (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks Desktop interprets in the local timezone of the end-user's computer.

revisionNumberstring required

The current QuickBooks-assigned revision number of this discount item object, which changes each time the object is modified. When updating this object, you must provide the most recent revisionNumber to ensure you're working with the latest data; otherwise, the update will return an error.

namestring required

The case-insensitive name of this discount item. Not guaranteed to be unique because it does not include the names of its hierarchical parent objects like fullName does. For example, two discount items could both have the name "10% labor discount", but they could have unique fullName values, such as "Discounts:10% labor discount" and "Promotions:10% labor discount".

fullNamestring required

The case-insensitive fully-qualified unique name of this discount item, formed by combining the names of its hierarchical parent objects with its own name, separated by colons. For example, if a discount item is under "Discounts" and has the name "10% labor discount", its fullName would be "Discounts:10% labor discount".

NOTE: Unlike name, fullName is guaranteed to be unique across all discount item objects. However, fullName can still be arbitrarily changed by the QuickBooks user when they modify the underlying name field.

barcodestring nullable required

The discount item's barcode.

isActiveboolean required

Indicates whether this discount item is active. Inactive objects are typically hidden from views and reports in QuickBooks. Defaults to true.

sublevelnumber required

The depth level of this discount item in the hierarchy. A top-level discount item has a sublevel of 0; each subsequent sublevel increases this number by 1. For example, a discount item with a fullName of "Discounts:10% labor discount" would have a sublevel of 1.

descriptionstring nullable required

The discount item's description that will appear on sales forms that include this item.

discountRatestring nullable required

The monetary amount to subtract from the total or subtotal when applying this discount item to a transaction, represented as a decimal string.

NOTE: A flat rate discount applies to ALL lines recorded above it and distributes the discount amount equally across those lines, which affects tax calculations. For example, a $10 discount applied to a $100 taxable item and $100 non-taxable item would result in a $5 taxable discount and $5 non-taxable discount.

discountRatePercentstring nullable required

The percentage amount to subtract from the total or subtotal when applying this discount item to a transaction.

NOTE: A percentage discount only applies to the line immediately above it, so tax implications only affect that specific line.

externalIdstring nullable required

A globally unique identifier (GUID) you, the developer, can provide for tracking this object in your external system. This field is immutable and can only be set during object creation.

Example response

{
  "id": "80000001-1234567890",
  "objectType": "qbd_discount_item",
  "createdAt": "2025-01-01T12:34:56+00:00",
  "updatedAt": "2025-02-01T12:34:56+00:00",
  "revisionNumber": "1721172183",
  "name": "10% labor discount",
  "fullName": "Discounts:10% labor discount",
  "barcode": "012345678905",
  "isActive": true,
  "class": {
    "id": "80000001-1234567890",
    "fullName": "Discounts"
  },
  "parent": {
    "id": "80000001-1234567890",
    "fullName": "Discounts"
  },
  "sublevel": 1,
  "description": "10% discount for early payment on labor charges",
  "salesTaxCode": {
    "id": "80000001-1234567890",
    "fullName": "Non"
  },
  "discountRate": "25.00",
  "discountRatePercent": "10.5",
  "account": {
    "id": "80000001-1234567890",
    "fullName": "Discounts"
  },
  "externalId": "12345678-abcd-1234-abcd-1234567890ab",
  "customFields": [
    {
      "ownerId": "0",
      "name": "Customer Rating",
      "type": "string_1024_type",
      "value": "Premium"
    }
  ]
}