salesreceipt

A SalesReceipt object represents the sales receipt that is given to a customer. A sales receipt is similar to an invoice. However, for a sales receipt, payment is received as part of the sale of goods and services. The sales receipt specifies a deposit account where the customer's payment is deposited. If the deposit account is not specified, the Undeposited Account is used.

The salesreceipt object

SAMPLE OBJECT
{ "SalesReceipt": { "domain": "QBO", "sparse": false, "Id": "11", "SyncToken": "0", "MetaData": { "CreateTime": "2014-09-16T14:59:48-07:00", "LastUpdatedTime": "2014-09-16T14:59:48-07:00" }, "CustomField": [ { "DefinitionId": "1", "Name": "Crew #", "Type": "StringType" } ], "DocNumber": "1003", "TxnDate": "2014-09-14", "Line": [ { "Id": "1", "LineNum": 1, "Description": "Custom Design", "Amount": 337.5, "DetailType": "SalesItemLineDetail", "SalesItemLineDetail": { "ItemRef": { "value": "4", "name": "Design" }, "UnitPrice": 75, "Qty": 4.5, "TaxCodeRef": { "value": "NON" } } }, { "Amount": 337.5, "DetailType": "SubTotalLineDetail", "SubTotalLineDetail": {} } ], "TxnTaxDetail": { "TotalTax": 0 }, "CustomerRef": { "value": "6", "name": "Dylan Sollfrank" }, "CustomerMemo": { "value": "Thank you for your business and have a great day!" }, "BillAddr": { "Id": "49", "Line1": "Dylan Sollfrank", "Lat": "INVALID", "Long": "INVALID" }, "TotalAmt": 337.5, "ApplyTaxAfterDiscount": false, "PrintStatus": "NotSet", "EmailStatus": "NotSet", "Balance": 0, "PaymentMethodRef": { "value": "2", "name": "Check" }, "PaymentRefNum": "10264", "DepositToAccountRef": { "value": "35", "name": "Checking" } }, "time": "2015-07-29T09:29:56.229-07:00" }

SAMPLE OBJECT
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2015-07-29T09:29:33.366-07:00"> <SalesReceipt domain="QBO" sparse="false"> <Id>11</Id> <SyncToken>0</SyncToken> <MetaData> <CreateTime>2014-09-16T14:59:48-07:00</CreateTime> <LastUpdatedTime>2014-09-16T14:59:48-07:00</LastUpdatedTime> </MetaData> <CustomField> <DefinitionId>1</DefinitionId> <Name>Crew #</Name> <Type>StringType</Type> </CustomField> <DocNumber>1003</DocNumber> <TxnDate>2014-09-14</TxnDate> <Line> <Id>1</Id> <LineNum>1</LineNum> <Description>Custom Design</Description> <Amount>337.50</Amount> <DetailType>SalesItemLineDetail</DetailType> <SalesItemLineDetail> <ItemRef name="Design">4</ItemRef> <UnitPrice>75</UnitPrice> <Qty>4.5</Qty> <TaxCodeRef>NON</TaxCodeRef> </SalesItemLineDetail> </Line> <Line> <Amount>337.50</Amount> <DetailType>SubTotalLineDetail</DetailType> <SubTotalLineDetail /> </Line> <TxnTaxDetail> <TotalTax>0</TotalTax> </TxnTaxDetail> <CustomerRef name="Dylan Sollfrank">6</CustomerRef> <CustomerMemo>Thank you for your business and have a great day!</CustomerMemo> <BillAddr> <Id>49</Id> <Line1>Dylan Sollfrank</Line1> <Lat>INVALID</Lat> <Long>INVALID</Long> </BillAddr> <TotalAmt>337.50</TotalAmt> <ApplyTaxAfterDiscount>false</ApplyTaxAfterDiscount> <PrintStatus>NotSet</PrintStatus> <EmailStatus>NotSet</EmailStatus> <Balance>0</Balance> <PaymentMethodRef name="Check">2</PaymentMethodRef> <PaymentRefNum>10264</PaymentRefNum> <DepositToAccountRef name="Checking">35</DepositToAccountRef> </SalesReceipt> </IntuitResponse>

Id:
required for update
String, filterable, sortable
Unique identifier for this object.
Sort order is ASC by default.
SyncToken:
required for update
String
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData:
optional
ModificationMetaData
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
CustomField [0..3]:
optional
CustomField
Custom field or data extension.
DocNumber:
optional
String, maximum of 21 chars, filterable, sortable
Reference number for the transaction. If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:
  • If Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
  • If Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.
If Preferences:CustomTxnNumber is false and a value is supplied, that value is stored even if it is a duplicate. Recommended best practice: check the setting of Preferences:CustomTxnNumber before setting DocNumber.
Sort order is ASC by default.
TxnDate:
optional
Date, filterable, sortable, default is current server date
The date entered by the user when this transaction occurred.
For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
Sort order is ASC by default.
DepartmentRef:
optional
ReferenceType, default is null
A reference to a Department object specifying the location of the transaction. Available if Preferences.AccountingInfoPrefs.TrackDepartments is set to true.
Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.
PrivateNote:
optional
String, max of 4000 chars, default is null
User entered, organization-private note about the transaction. This note does not appear on the transaction form to the customer. This field maps to the Memo field on the Sales Receipt form.
Line [0..n]: <
required
Line
Individual line items of a transaction. Valid Line types include:
Sales item line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Group item line type:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
DetailType:
required
LineDetailTypeEnum
Set to GroupLineDetailfor this type of line.
GroupLineDetail:
required
GroupLineDetail
GroupItemRef:
optional
ReferenceType
Reference to a group item for all the lines that belong to the bundle. Query the Item name list resource to determine the appropriate Item group object (Item.Type=Group) for this reference. Use Item.Id and Item.Name from that object for GroupItemRef.value and GroupItemRef.name, respectively.
Quantity:
optional
Decimal, default is 1
Quantity of the group item.
Line [0..n]:
optional
Line
Individual ItemLine elements that comprise a bundle. Returned in responses.
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Description only:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars A string representing one of the following:
  • Free form text description of the line item that appears in the printed record.
  • A subtotal line inline with other lines on the sales form and holds the sum of amounts on all lines above it. This is distinct from the overall transaction subtotal represented with a SubTotal detail line.
    • In create requests, set to Subtotal: (case sensitive) to create the subtotal line; the amount is generated by QuickBooks Online business logic.
    • In read requests, lines with Subtotal: nn.nn returned in this field denote subtotal lines in the object.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DescriptionOnlyfor this type of line.
DescriptionLineDetail:
optional
DescriptionLineDetail
ServiceDate:
optional
Date
Date when the service is performed.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Discount line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation. Not supported for BillPayment, Estimate, Invoice, or Payment objects.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DiscountLineDetailfor this type of line.
DiscountLineDetail:
optional
DiscountLineDetail
Discount detail type for the entire transaction. This is in contrast to a discount applied to a specific line. The company preference Sales Form Entry | Discounts must be enabled for this type of line to be available.
PercentBased:
optional
Boolean
True if the discount is a percentage; null or false if discount based on amount.
DiscountPercent:
optional
Decimal
Percentage by which the amount due is reduced, from 0% to 100%. To enter a discount of 8.5% use 8.5, not 0.085.
DiscountAccountRef:
optional
ReferenceType
Income account used to track discounts. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Income and Account.AccountSubType=DiscountsRefundsGiven. Use Account.Id and Account.Name from that object for DiscountAccountRef.value and DiscountAccountRef.name, respectively.
ClassRef:
optional
ReferenceType
Reference to the Class associated with this discount. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
TaxCodeRef:
optional
ReferenceType
The TaxCodeassociated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Subtotal Line (read-only):
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to SubtotalLineDetailfor this type of line.
SubtotalLineDetail:
optional
Subtotal LineDetail
ItemRef:
optional
ReferenceType
Reference to the Item. Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively. When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored.
For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
TxnTaxDetail:
optional
TxnTaxDetail
This element provides information for taxes charged on the transaction as a whole. It captures the details sales taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction. See Global tax model for more information about this element.
CustomerRef:
required
ReferenceType, filterable
Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
CustomerMemo:
optional
MemoRef
User-entered message to the customer; this message is visible to end user on their transactions.
BillAddr:
optional
PhysicalAddress
Bill-to address of the Invoice. If BillAddris not specified, and a default Customer:BillingAddr is specified in QuickBooks for this customer, the default bill-to address is used by QuickBooks.
ShipAddr:
optional
PhysicalAddress
Identifies the address where the goods must be shipped. If ShipAddris not specified, and a default Customer:ShippingAddr is specified in QuickBooks for this customer, the default ship-to address will be used by QuickBooks.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the transaction. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerTxn is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
ShipMethodRef:
optional
ReferenceType
Reference to the ShipMethod associated with the transaction. There is no shipping method list. Reference resolves to a string.
ShipDate:
optional
Date, default is null
Location of the transaction, as defined using location tracking in QuickBooks Online.
TrackingNum:
optional
String, default is null
Shipping provider's tracking number for the delivery of the goods associated with the transaction.
TotalAmt:
optional
BigDecimal, filterable, read-only
Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
PrintStatus:
optional
String, default is NotSet
; Printing status of the invoice.
Valid values: NotSet, NeedToPrint, PrintComplete .
EmailStatus:
optional
String, default is Null
EMail status of the receipt.
Valid values: NotSet, NeedToSend, EmailSent .
BillEmail:
required if EmailStatus=NeedToSend
EmailAddress
Identifies the e-mail address where the invoice is sent.
DeliveryInfo:
optional
DeliveryInfo, read-only
Email delivery information. Returned when a request has been made to deliver email with the send operation.
Balance:
optional
Decimal, filterable, sortable, read-only
The balance reflecting any payments made against the transaction. Initially set to the value of TotalAmt. A Balance of 0 indicates the invoice is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
HomeBalance:
optional
minor version 3
Decimal, read-only, applicable if multicurrency is enabled for the company
Convenience field containing the amount in Balance expressed in terms of the home currency. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified and available when endpoint is evoked with the minorversion=3 query parameter.
PaymentMethodRef:
optional
ReferenceType, default is null
Reference to a PaymentMethod associated with this transaction. Query the PaymentMethod name list resource to determine the appropriate PaymentMethod object for this reference. Use PaymentMethod.Id and PaymentMethod.Name from that object for PaymentMethodRef.value and PaymentMethodRef.name, respectively.
PaymentRefNum:
optional
String, max 21 characters
The reference number for the payment received. For example,  Check # for a check, envelope # for a cash donation.
CreditCardPayment:
optional
CreditCardPayment
Information about a credit card payment for the transaction. Used when PaymentType is CreditCard. Inject with data only if the payment was transacted through Intuit Payments API.
TxnSource:
optional
String
Used internally to specify originating source of a credit card transaction.
ApplyTaxAfterDiscount:
optional
Boolean
If false or null, calculate the sales tax first, and then apply the discount. If true, subtract the discount first and then calculate the sales tax.
Default Value: false
Constraints: US versions of QuickBooks only.
DepositToAccountRef:
optional
ReferenceType
Account from which payment money is deposited. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType is Other Current Asset or Bank. Use Account.Id and Account.Name from that object for DepositToAccountRef.value and DepositToAccountRef.name, respectively.
If you do not specify this account, payment is applied to the Undeposited Funds account.
CurrencyRef:
required if multicurrency is enabled for the company
CurrencyRefType
Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
Multicurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here.
ExchangeRate:
optional
Decimal, default is 1, applicable if multicurrency is enabled for the company
The number of home currency units it takes to equal one unit of currency specified by CurrencyRef.
HomeTotalAmt:
optional
Decimal, read-only, applicable if multicurrency is enabled for the company
Total amount of the transaction in the home currency. Includes the total of all the charges, allowances and taxes. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified.
GlobalTaxCalculation:
optional
GlobalTaxCalculationEnum, default is TaxExcluded
Method in which tax is applied. Allowed values are: TaxExcluded, TaxInclusive, and NotApplicable.
TransactionLocationType:
optional
minor version 4
String, default is WithinFrance
The account location. Valid values include:
  • WithinFrance
  • FranceOverseas
  • OutsideFranceWithEU
  • OutsideEU

For France locales, only.

Create a salesreceipt

REQUEST URL
Sandbox Base URL: https://sandbox-quickbooks.api.intuit.com
Production Base URL: https://quickbooks.api.intuit.com

Operation: POST /v3/company/<realmID>/salesreceipt
Content type: application/json
  • A SalesReceipt object must have at least one line that describes an item and an amount.
Request body
SAMPLE REQUEST
{ "Line": [{ "Id": "1", "LineNum": 1, "Description": "Pest Control Services", "Amount": 35.0, "DetailType": "SalesItemLineDetail", "SalesItemLineDetail": { "ItemRef": { "value": "10", "name": "Pest Control" }, "UnitPrice": 35, "Qty": 1, "TaxCodeRef": { "value": "NON" } } }] }

SAMPLE REQUEST
<SalesReceipt xmlns="http://schema.intuit.com/finance/v3" domain="QBO" sparse="false"> <Line> <Id>1</Id> <LineNum>1</LineNum> <Description>Pest Control Services</Description> <Amount>35.00</Amount> <DetailType>SalesItemLineDetail</DetailType> <SalesItemLineDetail> <ItemRef name="Pest Control">10</ItemRef> <UnitPrice>35</UnitPrice> <Qty>1</Qty> <TaxCodeRef>NON</TaxCodeRef> </SalesItemLineDetail> </Line> </SalesReceipt>

The minimum elements to create a salesreceipt are listed here.

Line [0..n]:
required

The minimum line item required for the request is one of the following.
Sales item line type:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Group item line type:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
DetailType:
required
LineDetailTypeEnum
Set to GroupLineDetailfor this type of line.
GroupLineDetail:
required
GroupLineDetail
GroupItemRef:
optional
ReferenceType
Reference to a group item for all the lines that belong to the bundle. Query the Item name list resource to determine the appropriate Item group object (Item.Type=Group) for this reference. Use Item.Id and Item.Name from that object for GroupItemRef.value and GroupItemRef.name, respectively.
Quantity:
optional
Decimal, default is 1
Quantity of the group item.
Line [0..n]:
optional
Line
Individual ItemLine elements that comprise a bundle. Returned in responses.
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.
CurrencyRef:
required if multicurrency is enabled for the company
CurrencyRefType
Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
Multicurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here.
Returns
SAMPLE RESPONSE
{ "SalesReceipt": { "domain": "QBO", "sparse": false, "Id": "263", "SyncToken": "0", "MetaData": { "CreateTime": "2015-07-29T09:25:02-07:00", "LastUpdatedTime": "2015-07-29T09:25:02-07:00" }, "CustomField": [ { "DefinitionId": "1", "Name": "Crew #", "Type": "StringType" } ], "DocNumber": "1074", "TxnDate": "2015-07-29", "Line": [ { "Id": "1", "LineNum": 1, "Description": "Pest Control Services", "Amount": 35.0, "DetailType": "SalesItemLineDetail", "SalesItemLineDetail": { "ItemRef": { "value": "10", "name": "Pest Control" }, "UnitPrice": 35, "Qty": 1, "TaxCodeRef": { "value": "NON" } } }, { "Amount": 35.0, "DetailType": "SubTotalLineDetail", "SubTotalLineDetail": {} } ], "TxnTaxDetail": { "TotalTax": 0 }, "TotalAmt": 35.0, "ApplyTaxAfterDiscount": false, "PrintStatus": "NeedToPrint", "EmailStatus": "NotSet", "Balance": 0, "DepositToAccountRef": { "value": "4", "name": "Undeposited Funds" } }, "time": "2015-07-29T09:25:04.214-07:00" }

SAMPLE RESPONSE
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2015-07-29T09:26:40.184-07:00"> <SalesReceipt domain="QBO" sparse="false"> <Id>264</Id> <SyncToken>0</SyncToken> <MetaData> <CreateTime>2015-07-29T09:26:38-07:00</CreateTime> <LastUpdatedTime>2015-07-29T09:26:38-07:00</LastUpdatedTime> </MetaData> <CustomField> <DefinitionId>1</DefinitionId> <Name>Crew #</Name> <Type>StringType</Type> </CustomField> <DocNumber>1075</DocNumber> <TxnDate>2015-07-29</TxnDate> <Line> <Id>1</Id> <LineNum>1</LineNum> <Description>Pest Control Services</Description> <Amount>35.00</Amount> <DetailType>SalesItemLineDetail</DetailType> <SalesItemLineDetail> <ItemRef name="Pest Control">10</ItemRef> <UnitPrice>35</UnitPrice> <Qty>1</Qty> <TaxCodeRef>NON</TaxCodeRef> </SalesItemLineDetail> </Line> <Line> <Amount>35.00</Amount> <DetailType>SubTotalLineDetail</DetailType> <SubTotalLineDetail /> </Line> <TxnTaxDetail> <TotalTax>0</TotalTax> </TxnTaxDetail> <TotalAmt>35.00</TotalAmt> <ApplyTaxAfterDiscount>false</ApplyTaxAfterDiscount> <PrintStatus>NeedToPrint</PrintStatus> <EmailStatus>NotSet</EmailStatus> <Balance>0</Balance> <DepositToAccountRef name="Undeposited Funds">4</DepositToAccountRef> </SalesReceipt> </IntuitResponse>

The salesreceipt response body.

Id:
required for update
String, filterable, sortable
Unique identifier for this object.
Sort order is ASC by default.
SyncToken:
required for update
String
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData:
optional
ModificationMetaData
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
CustomField [0..3]:
optional
CustomField
Custom field or data extension.
DocNumber:
optional
String, maximum of 21 chars, filterable, sortable
Reference number for the transaction. If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:
  • If Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
  • If Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.
If Preferences:CustomTxnNumber is false and a value is supplied, that value is stored even if it is a duplicate. Recommended best practice: check the setting of Preferences:CustomTxnNumber before setting DocNumber.
Sort order is ASC by default.
TxnDate:
optional
Date, filterable, sortable, default is current server date
The date entered by the user when this transaction occurred.
For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
Sort order is ASC by default.
DepartmentRef:
optional
ReferenceType, default is null
A reference to a Department object specifying the location of the transaction. Available if Preferences.AccountingInfoPrefs.TrackDepartments is set to true.
Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.
PrivateNote:
optional
String, max of 4000 chars, default is null
User entered, organization-private note about the transaction. This note does not appear on the transaction form to the customer. This field maps to the Memo field on the Sales Receipt form.
Line [0..n]: <
required
Line
Individual line items of a transaction. Valid Line types include:
Sales item line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Group item line type:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
DetailType:
required
LineDetailTypeEnum
Set to GroupLineDetailfor this type of line.
GroupLineDetail:
required
GroupLineDetail
GroupItemRef:
optional
ReferenceType
Reference to a group item for all the lines that belong to the bundle. Query the Item name list resource to determine the appropriate Item group object (Item.Type=Group) for this reference. Use Item.Id and Item.Name from that object for GroupItemRef.value and GroupItemRef.name, respectively.
Quantity:
optional
Decimal, default is 1
Quantity of the group item.
Line [0..n]:
optional
Line
Individual ItemLine elements that comprise a bundle. Returned in responses.
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Description only:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars A string representing one of the following:
  • Free form text description of the line item that appears in the printed record.
  • A subtotal line inline with other lines on the sales form and holds the sum of amounts on all lines above it. This is distinct from the overall transaction subtotal represented with a SubTotal detail line.
    • In create requests, set to Subtotal: (case sensitive) to create the subtotal line; the amount is generated by QuickBooks Online business logic.
    • In read requests, lines with Subtotal: nn.nn returned in this field denote subtotal lines in the object.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DescriptionOnlyfor this type of line.
DescriptionLineDetail:
optional
DescriptionLineDetail
ServiceDate:
optional
Date
Date when the service is performed.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Discount line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation. Not supported for BillPayment, Estimate, Invoice, or Payment objects.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DiscountLineDetailfor this type of line.
DiscountLineDetail:
optional
DiscountLineDetail
Discount detail type for the entire transaction. This is in contrast to a discount applied to a specific line. The company preference Sales Form Entry | Discounts must be enabled for this type of line to be available.
PercentBased:
optional
Boolean
True if the discount is a percentage; null or false if discount based on amount.
DiscountPercent:
optional
Decimal
Percentage by which the amount due is reduced, from 0% to 100%. To enter a discount of 8.5% use 8.5, not 0.085.
DiscountAccountRef:
optional
ReferenceType
Income account used to track discounts. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Income and Account.AccountSubType=DiscountsRefundsGiven. Use Account.Id and Account.Name from that object for DiscountAccountRef.value and DiscountAccountRef.name, respectively.
ClassRef:
optional
ReferenceType
Reference to the Class associated with this discount. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
TaxCodeRef:
optional
ReferenceType
The TaxCodeassociated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Subtotal Line (read-only):
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to SubtotalLineDetailfor this type of line.
SubtotalLineDetail:
optional
Subtotal LineDetail
ItemRef:
optional
ReferenceType
Reference to the Item. Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively. When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored.
For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
TxnTaxDetail:
optional
TxnTaxDetail
This element provides information for taxes charged on the transaction as a whole. It captures the details sales taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction. See Global tax model for more information about this element.
CustomerRef:
required
ReferenceType, filterable
Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
CustomerMemo:
optional
MemoRef
User-entered message to the customer; this message is visible to end user on their transactions.
BillAddr:
optional
PhysicalAddress
Bill-to address of the Invoice. If BillAddris not specified, and a default Customer:BillingAddr is specified in QuickBooks for this customer, the default bill-to address is used by QuickBooks.
ShipAddr:
optional
PhysicalAddress
Identifies the address where the goods must be shipped. If ShipAddris not specified, and a default Customer:ShippingAddr is specified in QuickBooks for this customer, the default ship-to address will be used by QuickBooks.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the transaction. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerTxn is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
ShipMethodRef:
optional
ReferenceType
Reference to the ShipMethod associated with the transaction. There is no shipping method list. Reference resolves to a string.
ShipDate:
optional
Date, default is null
Location of the transaction, as defined using location tracking in QuickBooks Online.
TrackingNum:
optional
String, default is null
Shipping provider's tracking number for the delivery of the goods associated with the transaction.
TotalAmt:
optional
BigDecimal, filterable, read-only
Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
PrintStatus:
optional
String, default is NotSet
; Printing status of the invoice.
Valid values: NotSet, NeedToPrint, PrintComplete .
EmailStatus:
optional
String, default is Null
EMail status of the receipt.
Valid values: NotSet, NeedToSend, EmailSent .
BillEmail:
required if EmailStatus=NeedToSend
EmailAddress
Identifies the e-mail address where the invoice is sent.
DeliveryInfo:
optional
DeliveryInfo, read-only
Email delivery information. Returned when a request has been made to deliver email with the send operation.
Balance:
optional
Decimal, filterable, sortable, read-only
The balance reflecting any payments made against the transaction. Initially set to the value of TotalAmt. A Balance of 0 indicates the invoice is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
HomeBalance:
optional
minor version 3
Decimal, read-only, applicable if multicurrency is enabled for the company
Convenience field containing the amount in Balance expressed in terms of the home currency. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified and available when endpoint is evoked with the minorversion=3 query parameter.
PaymentMethodRef:
optional
ReferenceType, default is null
Reference to a PaymentMethod associated with this transaction. Query the PaymentMethod name list resource to determine the appropriate PaymentMethod object for this reference. Use PaymentMethod.Id and PaymentMethod.Name from that object for PaymentMethodRef.value and PaymentMethodRef.name, respectively.
PaymentRefNum:
optional
String, max 21 characters
The reference number for the payment received. For example,  Check # for a check, envelope # for a cash donation.
CreditCardPayment:
optional
CreditCardPayment
Information about a credit card payment for the transaction. Used when PaymentType is CreditCard. Inject with data only if the payment was transacted through Intuit Payments API.
TxnSource:
optional
String
Used internally to specify originating source of a credit card transaction.
ApplyTaxAfterDiscount:
optional
Boolean
If false or null, calculate the sales tax first, and then apply the discount. If true, subtract the discount first and then calculate the sales tax.
Default Value: false
Constraints: US versions of QuickBooks only.
DepositToAccountRef:
optional
ReferenceType
Account from which payment money is deposited. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType is Other Current Asset or Bank. Use Account.Id and Account.Name from that object for DepositToAccountRef.value and DepositToAccountRef.name, respectively.
If you do not specify this account, payment is applied to the Undeposited Funds account.
CurrencyRef:
required if multicurrency is enabled for the company
CurrencyRefType
Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
Multicurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here.
ExchangeRate:
optional
Decimal, default is 1, applicable if multicurrency is enabled for the company
The number of home currency units it takes to equal one unit of currency specified by CurrencyRef.
HomeTotalAmt:
optional
Decimal, read-only, applicable if multicurrency is enabled for the company
Total amount of the transaction in the home currency. Includes the total of all the charges, allowances and taxes. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified.
GlobalTaxCalculation:
optional
GlobalTaxCalculationEnum, default is TaxExcluded
Method in which tax is applied. Allowed values are: TaxExcluded, TaxInclusive, and NotApplicable.
TransactionLocationType:
optional
minor version 4
String, default is WithinFrance
The account location. Valid values include:
  • WithinFrance
  • FranceOverseas
  • OutsideFranceWithEU
  • OutsideEU

For France locales, only.

Read a salesreceipt

REQUEST URL
Sandbox Base URL: https://sandbox-quickbooks.api.intuit.com
Production Base URL: https://quickbooks.api.intuit.com

Operation: GET /v3/company/<realmID>/salesreceipt/<salesreceiptId>

Retrieves the details of a SalesReceipt object that has been previously created.

Returns

The salesreceipt response body.

SAMPLE RESPONSE
{ "SalesReceipt": { "domain": "QBO", "sparse": false, "Id": "11", "SyncToken": "0", "MetaData": { "CreateTime": "2014-09-16T14:59:48-07:00", "LastUpdatedTime": "2014-09-16T14:59:48-07:00" }, "CustomField": [ { "DefinitionId": "1", "Name": "Crew #", "Type": "StringType" } ], "DocNumber": "1003", "TxnDate": "2014-09-14", "Line": [ { "Id": "1", "LineNum": 1, "Description": "Custom Design", "Amount": 337.5, "DetailType": "SalesItemLineDetail", "SalesItemLineDetail": { "ItemRef": { "value": "4", "name": "Design" }, "UnitPrice": 75, "Qty": 4.5, "TaxCodeRef": { "value": "NON" } } }, { "Amount": 337.5, "DetailType": "SubTotalLineDetail", "SubTotalLineDetail": {} } ], "TxnTaxDetail": { "TotalTax": 0 }, "CustomerRef": { "value": "6", "name": "Dylan Sollfrank" }, "CustomerMemo": { "value": "Thank you for your business and have a great day!" }, "BillAddr": { "Id": "49", "Line1": "Dylan Sollfrank", "Lat": "INVALID", "Long": "INVALID" }, "TotalAmt": 337.5, "ApplyTaxAfterDiscount": false, "PrintStatus": "NotSet", "EmailStatus": "NotSet", "Balance": 0, "PaymentMethodRef": { "value": "2", "name": "Check" }, "PaymentRefNum": "10264", "DepositToAccountRef": { "value": "35", "name": "Checking" } }, "time": "2015-07-29T09:29:56.229-07:00" }

SAMPLE RESPONSE
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2015-07-29T09:29:33.366-07:00"> <SalesReceipt domain="QBO" sparse="false"> <Id>11</Id> <SyncToken>0</SyncToken> <MetaData> <CreateTime>2014-09-16T14:59:48-07:00</CreateTime> <LastUpdatedTime>2014-09-16T14:59:48-07:00</LastUpdatedTime> </MetaData> <CustomField> <DefinitionId>1</DefinitionId> <Name>Crew #</Name> <Type>StringType</Type> </CustomField> <DocNumber>1003</DocNumber> <TxnDate>2014-09-14</TxnDate> <Line> <Id>1</Id> <LineNum>1</LineNum> <Description>Custom Design</Description> <Amount>337.50</Amount> <DetailType>SalesItemLineDetail</DetailType> <SalesItemLineDetail> <ItemRef name="Design">4</ItemRef> <UnitPrice>75</UnitPrice> <Qty>4.5</Qty> <TaxCodeRef>NON</TaxCodeRef> </SalesItemLineDetail> </Line> <Line> <Amount>337.50</Amount> <DetailType>SubTotalLineDetail</DetailType> <SubTotalLineDetail /> </Line> <TxnTaxDetail> <TotalTax>0</TotalTax> </TxnTaxDetail> <CustomerRef name="Dylan Sollfrank">6</CustomerRef> <CustomerMemo>Thank you for your business and have a great day!</CustomerMemo> <BillAddr> <Id>49</Id> <Line1>Dylan Sollfrank</Line1> <Lat>INVALID</Lat> <Long>INVALID</Long> </BillAddr> <TotalAmt>337.50</TotalAmt> <ApplyTaxAfterDiscount>false</ApplyTaxAfterDiscount> <PrintStatus>NotSet</PrintStatus> <EmailStatus>NotSet</EmailStatus> <Balance>0</Balance> <PaymentMethodRef name="Check">2</PaymentMethodRef> <PaymentRefNum>10264</PaymentRefNum> <DepositToAccountRef name="Checking">35</DepositToAccountRef> </SalesReceipt> </IntuitResponse>

Id:
required for update
String, filterable, sortable
Unique identifier for this object.
Sort order is ASC by default.
SyncToken:
required for update
String
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData:
optional
ModificationMetaData
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
CustomField [0..3]:
optional
CustomField
Custom field or data extension.
DocNumber:
optional
String, maximum of 21 chars, filterable, sortable
Reference number for the transaction. If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:
  • If Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
  • If Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.
If Preferences:CustomTxnNumber is false and a value is supplied, that value is stored even if it is a duplicate. Recommended best practice: check the setting of Preferences:CustomTxnNumber before setting DocNumber.
Sort order is ASC by default.
TxnDate:
optional
Date, filterable, sortable, default is current server date
The date entered by the user when this transaction occurred.
For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
Sort order is ASC by default.
DepartmentRef:
optional
ReferenceType, default is null
A reference to a Department object specifying the location of the transaction. Available if Preferences.AccountingInfoPrefs.TrackDepartments is set to true.
Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.
PrivateNote:
optional
String, max of 4000 chars, default is null
User entered, organization-private note about the transaction. This note does not appear on the transaction form to the customer. This field maps to the Memo field on the Sales Receipt form.
Line [0..n]: <
required
Line
Individual line items of a transaction. Valid Line types include:
Sales item line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Group item line type:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
DetailType:
required
LineDetailTypeEnum
Set to GroupLineDetailfor this type of line.
GroupLineDetail:
required
GroupLineDetail
GroupItemRef:
optional
ReferenceType
Reference to a group item for all the lines that belong to the bundle. Query the Item name list resource to determine the appropriate Item group object (Item.Type=Group) for this reference. Use Item.Id and Item.Name from that object for GroupItemRef.value and GroupItemRef.name, respectively.
Quantity:
optional
Decimal, default is 1
Quantity of the group item.
Line [0..n]:
optional
Line
Individual ItemLine elements that comprise a bundle. Returned in responses.
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Description only:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars A string representing one of the following:
  • Free form text description of the line item that appears in the printed record.
  • A subtotal line inline with other lines on the sales form and holds the sum of amounts on all lines above it. This is distinct from the overall transaction subtotal represented with a SubTotal detail line.
    • In create requests, set to Subtotal: (case sensitive) to create the subtotal line; the amount is generated by QuickBooks Online business logic.
    • In read requests, lines with Subtotal: nn.nn returned in this field denote subtotal lines in the object.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DescriptionOnlyfor this type of line.
DescriptionLineDetail:
optional
DescriptionLineDetail
ServiceDate:
optional
Date
Date when the service is performed.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Discount line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation. Not supported for BillPayment, Estimate, Invoice, or Payment objects.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DiscountLineDetailfor this type of line.
DiscountLineDetail:
optional
DiscountLineDetail
Discount detail type for the entire transaction. This is in contrast to a discount applied to a specific line. The company preference Sales Form Entry | Discounts must be enabled for this type of line to be available.
PercentBased:
optional
Boolean
True if the discount is a percentage; null or false if discount based on amount.
DiscountPercent:
optional
Decimal
Percentage by which the amount due is reduced, from 0% to 100%. To enter a discount of 8.5% use 8.5, not 0.085.
DiscountAccountRef:
optional
ReferenceType
Income account used to track discounts. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Income and Account.AccountSubType=DiscountsRefundsGiven. Use Account.Id and Account.Name from that object for DiscountAccountRef.value and DiscountAccountRef.name, respectively.
ClassRef:
optional
ReferenceType
Reference to the Class associated with this discount. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
TaxCodeRef:
optional
ReferenceType
The TaxCodeassociated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Subtotal Line (read-only):
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to SubtotalLineDetailfor this type of line.
SubtotalLineDetail:
optional
Subtotal LineDetail
ItemRef:
optional
ReferenceType
Reference to the Item. Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively. When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored.
For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
TxnTaxDetail:
optional
TxnTaxDetail
This element provides information for taxes charged on the transaction as a whole. It captures the details sales taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction. See Global tax model for more information about this element.
CustomerRef:
required
ReferenceType, filterable
Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
CustomerMemo:
optional
MemoRef
User-entered message to the customer; this message is visible to end user on their transactions.
BillAddr:
optional
PhysicalAddress
Bill-to address of the Invoice. If BillAddris not specified, and a default Customer:BillingAddr is specified in QuickBooks for this customer, the default bill-to address is used by QuickBooks.
ShipAddr:
optional
PhysicalAddress
Identifies the address where the goods must be shipped. If ShipAddris not specified, and a default Customer:ShippingAddr is specified in QuickBooks for this customer, the default ship-to address will be used by QuickBooks.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the transaction. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerTxn is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
ShipMethodRef:
optional
ReferenceType
Reference to the ShipMethod associated with the transaction. There is no shipping method list. Reference resolves to a string.
ShipDate:
optional
Date, default is null
Location of the transaction, as defined using location tracking in QuickBooks Online.
TrackingNum:
optional
String, default is null
Shipping provider's tracking number for the delivery of the goods associated with the transaction.
TotalAmt:
optional
BigDecimal, filterable, read-only
Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
PrintStatus:
optional
String, default is NotSet
; Printing status of the invoice.
Valid values: NotSet, NeedToPrint, PrintComplete .
EmailStatus:
optional
String, default is Null
EMail status of the receipt.
Valid values: NotSet, NeedToSend, EmailSent .
BillEmail:
required if EmailStatus=NeedToSend
EmailAddress
Identifies the e-mail address where the invoice is sent.
DeliveryInfo:
optional
DeliveryInfo, read-only
Email delivery information. Returned when a request has been made to deliver email with the send operation.
Balance:
optional
Decimal, filterable, sortable, read-only
The balance reflecting any payments made against the transaction. Initially set to the value of TotalAmt. A Balance of 0 indicates the invoice is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
HomeBalance:
optional
minor version 3
Decimal, read-only, applicable if multicurrency is enabled for the company
Convenience field containing the amount in Balance expressed in terms of the home currency. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified and available when endpoint is evoked with the minorversion=3 query parameter.
PaymentMethodRef:
optional
ReferenceType, default is null
Reference to a PaymentMethod associated with this transaction. Query the PaymentMethod name list resource to determine the appropriate PaymentMethod object for this reference. Use PaymentMethod.Id and PaymentMethod.Name from that object for PaymentMethodRef.value and PaymentMethodRef.name, respectively.
PaymentRefNum:
optional
String, max 21 characters
The reference number for the payment received. For example,  Check # for a check, envelope # for a cash donation.
CreditCardPayment:
optional
CreditCardPayment
Information about a credit card payment for the transaction. Used when PaymentType is CreditCard. Inject with data only if the payment was transacted through Intuit Payments API.
TxnSource:
optional
String
Used internally to specify originating source of a credit card transaction.
ApplyTaxAfterDiscount:
optional
Boolean
If false or null, calculate the sales tax first, and then apply the discount. If true, subtract the discount first and then calculate the sales tax.
Default Value: false
Constraints: US versions of QuickBooks only.
DepositToAccountRef:
optional
ReferenceType
Account from which payment money is deposited. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType is Other Current Asset or Bank. Use Account.Id and Account.Name from that object for DepositToAccountRef.value and DepositToAccountRef.name, respectively.
If you do not specify this account, payment is applied to the Undeposited Funds account.
CurrencyRef:
required if multicurrency is enabled for the company
CurrencyRefType
Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
Multicurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here.
ExchangeRate:
optional
Decimal, default is 1, applicable if multicurrency is enabled for the company
The number of home currency units it takes to equal one unit of currency specified by CurrencyRef.
HomeTotalAmt:
optional
Decimal, read-only, applicable if multicurrency is enabled for the company
Total amount of the transaction in the home currency. Includes the total of all the charges, allowances and taxes. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified.
GlobalTaxCalculation:
optional
GlobalTaxCalculationEnum, default is TaxExcluded
Method in which tax is applied. Allowed values are: TaxExcluded, TaxInclusive, and NotApplicable.
TransactionLocationType:
optional
minor version 4
String, default is WithinFrance
The account location. Valid values include:
  • WithinFrance
  • FranceOverseas
  • OutsideFranceWithEU
  • OutsideEU

For France locales, only.

Send a salesreceipt

REQUEST URL
Sandbox Base URL: https://sandbox-quickbooks.api.intuit.com
Production Base URL: https://quickbooks.api.intuit.com

Operation: 

Using email address supplied in SalesReceipt.BillEmail.EmailAddress: 

   POST /v3/company/<realmID>/SalesReceipt/<salesreceiptId>/send
   Content type: application/octet-stream

Specifying an explicit email address: 

   POST /v3/company/<realmID>/SalesReceipt/<salesreceiptId>/send?sendTo=<emailAddr>
   Content type: application/octet-stream

Send the specified SalesReceipt object via email. Once email is sent, the following actions happen:

  • The SalesReceipt.EmailStatus parameter is set to EmailSent.
  • The SalesReceipt.DeliveryInfo element is populated with sending information.
  • The SalesReceipt.BillEmail.Address parameter is updated to the address specified with the value of the sendTo query parameter, if specified.
Returns
SAMPLE RESPONSE
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2013-04-23T08:54:06.917-07:00"> <SalesReceipt domain="QBO" sparse="false"> <Id>3084</Id> <SyncToken>1</SyncToken> <MetaData> <CreateTime>2013-04-23T08:53:46-07:00</CreateTime> <LastUpdatedTime>2014-11-19T11:56:30-08:00</LastUpdatedTime> </MetaData> <CustomField> <Name>Custom 1</Name> <Type>StringType</Type> </CustomField> <CustomField> <Name>Custom 2</Name> <Type>StringType</Type> </CustomField> <CustomField> <Name>Custom 3</Name> <Type>StringType</Type> </CustomField> <DocNumber>3026</DocNumber> <TxnDate>2012-12-18</TxnDate> <CurrencyRef name="United States Dollar">USD</CurrencyRef> <PrivateNote>Customer Sales Receipt</PrivateNote> <Line> <Id>1</Id> <LineNum>1</LineNum> <Description>Sales only</Description> <Amount>5.00</Amount> <DetailType>SalesItemLineDetail</DetailType> <SalesItemLineDetail> <ItemRef name="Sales">1</ItemRef> <UnitPrice>0.5</UnitPrice> <Qty>10</Qty> <TaxCodeRef>TAX</TaxCodeRef> </SalesItemLineDetail> </Line> <Line> <Amount>5.00</Amount> <DetailType>SubTotalLineDetail</DetailType> <SubTotalLineDetail/> </Line> <Line> <Amount>0.50</Amount> <DetailType>DiscountLineDetail</DetailType> <DiscountLineDetail> <PercentBased>true</PercentBased> <DiscountPercent>10</DiscountPercent> <DiscountAccountRef name="Discounts given">30</DiscountAccountRef> </DiscountLineDetail> </Line> <TxnTaxDetail> <TxnTaxCodeRef>9</TxnTaxCodeRef> <TotalTax>0.75</TotalTax> <TaxLine> <Amount>0.75</Amount> <DetailType>TaxLineDetail</DetailType> <TaxLineDetail> <TaxRateRef>18</TaxRateRef> <PercentBased>true</PercentBased> <TaxPercent>15</TaxPercent> <NetAmountTaxable>5.00</NetAmountTaxable> </TaxLineDetail> </TaxLine> </TxnTaxDetail> <CustomerRef name="sn71lPmH0Y zOv1blD5Vq">1105</CustomerRef> <CustomerMemo>Sales Receipt with customer</CustomerMemo> <BillAddr> <Id>65</Id> <Line1>2500 Garcia Avenue</Line1> <City>Mountain View</City> <Country>USA</Country> <CountrySubDivisionCode>CA</CountrySubDivisionCode> <PostalCode>94043</PostalCode> <Lat>37.428314</Lat> <Long>-122.0961024</Long> </BillAddr> <ShipAddr> <Id>66</Id> <Line1>Ms. Anupama Madhavapeddi</Line1> <Line2>Intuit Systems</Line2> <Line3>3400 Garcia Avenue</Line3> <Line4>Mountain View, CA 94043 USA</Line4> <Lat>37.428434</Lat> <Long>-122.0723816</Long> </ShipAddr> <ShipDate>2012-04-18</ShipDate> <TrackingNum>1232</TrackingNum> <TotalAmt>5.25</TotalAmt> <ApplyTaxAfterDiscount>false</ApplyTaxAfterDiscount> <PrintStatus>NotSet</PrintStatus> <EmailStatus>EmailSent</EmailStatus> <BillEmail> <Address>test@abc.com</Address> </BillEmail> <DeliveryInfo> <DeliveryType>Email</DeliveryType> <DeliveryTime>2014-11-19T11:56:28-08:00</DeliveryTime> </DeliveryInfo> <Balance>0</Balance> <DepositToAccountRef name="Undeposited Funds">4</DepositToAccountRef> </SalesReceipt> </IntuitResponse>

SAMPLE RESPONSE
{ "SalesReceipt": { "domain": "QBO", "sparse": false, "Id": "97", "SyncToken": "0", "MetaData": { "CreateTime": "2013-03-13T13:31:43-07:00", "LastUpdatedTime": "2014-12-17T11:50:54-08:00" }, "CustomField": [ { "Name": "Custom 1", "Type": "StringType" }, { "Name": "Custom 2", "Type": "StringType" }, { "Name": "Custom 3", "Type": "StringType" }], "DocNumber": "1047", "TxnDate": "2013-03-13", "DepartmentRef": { "value": "1", "name": "Department1" }, "CurrencyRef": { "value": "USD", "name": "United States Dollar" }, "PrivateNote": "Memo for SalesReceipt", "Line": [ { "Id": "1", "LineNum": 1, "Description": "123189403765", "Amount": 5, "DetailType": "SalesItemLineDetail", "SalesItemLineDetail": { "ItemRef": { "value": "1", "name": "Sales" }, "UnitPrice": 0.5, "Qty": 10, "TaxCodeRef": { "value": "NON" } } }, { "Amount": 5, "DetailType": "SubTotalLineDetail", "SubTotalLineDetail": {} }], "TxnTaxDetail": { "TotalTax": 0 }, "TotalAmt": 5, "ApplyTaxAfterDiscount": false, "PrintStatus": "NeedToPrint", "EmailStatus": "EmailSent", "Balance": 0, "DeliveryInfo": { "DeliveryType": "Email", "DeliveryTime": "2014-12-17T11:50:52-08:00" }, "DepositToAccountRef": { "value": "4", "name": "Undeposited Funds" } }, "time": "2013-03-13T13:31:42.956-07:00" }

The invoice response body.

Id:
required for update
String, filterable, sortable
Unique identifier for this object.
Sort order is ASC by default.
SyncToken:
required for update
String
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData:
optional
ModificationMetaData
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
CustomField [0..3]:
optional
CustomField
Custom field or data extension.
DocNumber:
optional
String, maximum of 21 chars, filterable, sortable
Reference number for the transaction. If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:
  • If Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
  • If Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.
If Preferences:CustomTxnNumber is false and a value is supplied, that value is stored even if it is a duplicate. Recommended best practice: check the setting of Preferences:CustomTxnNumber before setting DocNumber.
Sort order is ASC by default.
TxnDate:
optional
Date, filterable, sortable, default is current server date
The date entered by the user when this transaction occurred.
For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
Sort order is ASC by default.
DepartmentRef:
optional
ReferenceType, default is null
A reference to a Department object specifying the location of the transaction. Available if Preferences.AccountingInfoPrefs.TrackDepartments is set to true.
Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.
PrivateNote:
optional
String, max of 4000 chars, default is null
User entered, organization-private note about the transaction. This note does not appear on the transaction form to the customer. This field maps to the Memo field on the Sales Receipt form.
Line [0..n]: <
required
Line
Individual line items of a transaction. Valid Line types include:
Sales item line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Group item line type:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
DetailType:
required
LineDetailTypeEnum
Set to GroupLineDetailfor this type of line.
GroupLineDetail:
required
GroupLineDetail
GroupItemRef:
optional
ReferenceType
Reference to a group item for all the lines that belong to the bundle. Query the Item name list resource to determine the appropriate Item group object (Item.Type=Group) for this reference. Use Item.Id and Item.Name from that object for GroupItemRef.value and GroupItemRef.name, respectively.
Quantity:
optional
Decimal, default is 1
Quantity of the group item.
Line [0..n]:
optional
Line
Individual ItemLine elements that comprise a bundle. Returned in responses.
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Description only:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars A string representing one of the following:
  • Free form text description of the line item that appears in the printed record.
  • A subtotal line inline with other lines on the sales form and holds the sum of amounts on all lines above it. This is distinct from the overall transaction subtotal represented with a SubTotal detail line.
    • In create requests, set to Subtotal: (case sensitive) to create the subtotal line; the amount is generated by QuickBooks Online business logic.
    • In read requests, lines with Subtotal: nn.nn returned in this field denote subtotal lines in the object.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DescriptionOnlyfor this type of line.
DescriptionLineDetail:
optional
DescriptionLineDetail
ServiceDate:
optional
Date
Date when the service is performed.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Discount line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation. Not supported for BillPayment, Estimate, Invoice, or Payment objects.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DiscountLineDetailfor this type of line.
DiscountLineDetail:
optional
DiscountLineDetail
Discount detail type for the entire transaction. This is in contrast to a discount applied to a specific line. The company preference Sales Form Entry | Discounts must be enabled for this type of line to be available.
PercentBased:
optional
Boolean
True if the discount is a percentage; null or false if discount based on amount.
DiscountPercent:
optional
Decimal
Percentage by which the amount due is reduced, from 0% to 100%. To enter a discount of 8.5% use 8.5, not 0.085.
DiscountAccountRef:
optional
ReferenceType
Income account used to track discounts. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Income and Account.AccountSubType=DiscountsRefundsGiven. Use Account.Id and Account.Name from that object for DiscountAccountRef.value and DiscountAccountRef.name, respectively.
ClassRef:
optional
ReferenceType
Reference to the Class associated with this discount. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
TaxCodeRef:
optional
ReferenceType
The TaxCodeassociated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Subtotal Line (read-only):
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to SubtotalLineDetailfor this type of line.
SubtotalLineDetail:
optional
Subtotal LineDetail
ItemRef:
optional
ReferenceType
Reference to the Item. Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively. When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored.
For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
TxnTaxDetail:
optional
TxnTaxDetail
This element provides information for taxes charged on the transaction as a whole. It captures the details sales taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction. See Global tax model for more information about this element.
CustomerRef:
required
ReferenceType, filterable
Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
CustomerMemo:
optional
MemoRef
User-entered message to the customer; this message is visible to end user on their transactions.
BillAddr:
optional
PhysicalAddress
Bill-to address of the Invoice. If BillAddris not specified, and a default Customer:BillingAddr is specified in QuickBooks for this customer, the default bill-to address is used by QuickBooks.
ShipAddr:
optional
PhysicalAddress
Identifies the address where the goods must be shipped. If ShipAddris not specified, and a default Customer:ShippingAddr is specified in QuickBooks for this customer, the default ship-to address will be used by QuickBooks.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the transaction. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerTxn is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
ShipMethodRef:
optional
ReferenceType
Reference to the ShipMethod associated with the transaction. There is no shipping method list. Reference resolves to a string.
ShipDate:
optional
Date, default is null
Location of the transaction, as defined using location tracking in QuickBooks Online.
TrackingNum:
optional
String, default is null
Shipping provider's tracking number for the delivery of the goods associated with the transaction.
TotalAmt:
optional
BigDecimal, filterable, read-only
Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
PrintStatus:
optional
String, default is NotSet
; Printing status of the invoice.
Valid values: NotSet, NeedToPrint, PrintComplete .
EmailStatus:
optional
String, default is Null
EMail status of the receipt.
Valid values: NotSet, NeedToSend, EmailSent .
BillEmail:
required if EmailStatus=NeedToSend
EmailAddress
Identifies the e-mail address where the invoice is sent.
DeliveryInfo:
optional
DeliveryInfo, read-only
Email delivery information. Returned when a request has been made to deliver email with the send operation.
Balance:
optional
Decimal, filterable, sortable, read-only
The balance reflecting any payments made against the transaction. Initially set to the value of TotalAmt. A Balance of 0 indicates the invoice is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
HomeBalance:
optional
minor version 3
Decimal, read-only, applicable if multicurrency is enabled for the company
Convenience field containing the amount in Balance expressed in terms of the home currency. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified and available when endpoint is evoked with the minorversion=3 query parameter.
PaymentMethodRef:
optional
ReferenceType, default is null
Reference to a PaymentMethod associated with this transaction. Query the PaymentMethod name list resource to determine the appropriate PaymentMethod object for this reference. Use PaymentMethod.Id and PaymentMethod.Name from that object for PaymentMethodRef.value and PaymentMethodRef.name, respectively.
PaymentRefNum:
optional
String, max 21 characters
The reference number for the payment received. For example,  Check # for a check, envelope # for a cash donation.
CreditCardPayment:
optional
CreditCardPayment
Information about a credit card payment for the transaction. Used when PaymentType is CreditCard. Inject with data only if the payment was transacted through Intuit Payments API.
TxnSource:
optional
String
Used internally to specify originating source of a credit card transaction.
ApplyTaxAfterDiscount:
optional
Boolean
If false or null, calculate the sales tax first, and then apply the discount. If true, subtract the discount first and then calculate the sales tax.
Default Value: false
Constraints: US versions of QuickBooks only.
DepositToAccountRef:
optional
ReferenceType
Account from which payment money is deposited. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType is Other Current Asset or Bank. Use Account.Id and Account.Name from that object for DepositToAccountRef.value and DepositToAccountRef.name, respectively.
If you do not specify this account, payment is applied to the Undeposited Funds account.
CurrencyRef:
required if multicurrency is enabled for the company
CurrencyRefType
Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
Multicurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here.
ExchangeRate:
optional
Decimal, default is 1, applicable if multicurrency is enabled for the company
The number of home currency units it takes to equal one unit of currency specified by CurrencyRef.
HomeTotalAmt:
optional
Decimal, read-only, applicable if multicurrency is enabled for the company
Total amount of the transaction in the home currency. Includes the total of all the charges, allowances and taxes. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified.
GlobalTaxCalculation:
optional
GlobalTaxCalculationEnum, default is TaxExcluded
Method in which tax is applied. Allowed values are: TaxExcluded, TaxInclusive, and NotApplicable.
TransactionLocationType:
optional
minor version 4
String, default is WithinFrance
The account location. Valid values include:
  • WithinFrance
  • FranceOverseas
  • OutsideFranceWithEU
  • OutsideEU

For France locales, only.

Get a salesreceipt as PDF

REQUEST URL
Sandbox Base URL: https://sandbox-quickbooks.api.intuit.com
Production Base URL: https://quickbooks.api.intuit.com

Operation: 

GET /v3/company/<realmID>/salesreceipt/<salesreceiptId>/pdf
Content type: application/pdf

Returns

This resource returns the specified object in the response body as an Adobe Portable Document Format (PDF) file. The resulting PDF file is formatted according to custom form styles in the company settings.

SAMPLE RESPONSE
%PDF-1.4 ... %%EOF

SAMPLE RESPONSE
%PDF-1.4 ... %%EOF

Delete a salesreceipt

REQUEST URL
Sandbox Base URL: https://sandbox-quickbooks.api.intuit.com
Production Base URL: https://quickbooks.api.intuit.com

Operation: POST /v3/company/<realmID>/salesreceipt?operation=delete
Content type: application/json or application/xml

This operation deletes the SalesReceipt object specified in the request body. Include a minimum of SalesReceipt.Id and SalesReceipt.SyncToken in the request body.

Request Body

SAMPLE REQUEST
{ "Id": "98", "SyncToken": "1" }

SAMPLE REQUEST
<SalesReceipt xmlns="http://schema.intuit.com/finance/v3" domain="QBO" sparse="false"> <Id>3084</Id> <SyncToken>2</SyncToken> </SalesReceipt>

Id:
required for update
String, filterable, sortable
Unique identifier for this object.
Sort order is ASC by default.
SyncToken:
required for update
String
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData:
optional
ModificationMetaData
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
CustomField [0..3]:
optional
CustomField
Custom field or data extension.
DocNumber:
optional
String, maximum of 21 chars, filterable, sortable
Reference number for the transaction. If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:
  • If Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
  • If Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.
If Preferences:CustomTxnNumber is false and a value is supplied, that value is stored even if it is a duplicate. Recommended best practice: check the setting of Preferences:CustomTxnNumber before setting DocNumber.
Sort order is ASC by default.
TxnDate:
optional
Date, filterable, sortable, default is current server date
The date entered by the user when this transaction occurred.
For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
Sort order is ASC by default.
DepartmentRef:
optional
ReferenceType, default is null
A reference to a Department object specifying the location of the transaction. Available if Preferences.AccountingInfoPrefs.TrackDepartments is set to true.
Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.
PrivateNote:
optional
String, max of 4000 chars, default is null
User entered, organization-private note about the transaction. This note does not appear on the transaction form to the customer. This field maps to the Memo field on the Sales Receipt form.
Line [0..n]: <
required
Line
Individual line items of a transaction. Valid Line types include:
Sales item line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Group item line type:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
DetailType:
required
LineDetailTypeEnum
Set to GroupLineDetailfor this type of line.
GroupLineDetail:
required
GroupLineDetail
GroupItemRef:
optional
ReferenceType
Reference to a group item for all the lines that belong to the bundle. Query the Item name list resource to determine the appropriate Item group object (Item.Type=Group) for this reference. Use Item.Id and Item.Name from that object for GroupItemRef.value and GroupItemRef.name, respectively.
Quantity:
optional
Decimal, default is 1
Quantity of the group item.
Line [0..n]:
optional
Line
Individual ItemLine elements that comprise a bundle. Returned in responses.
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Description only:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars A string representing one of the following:
  • Free form text description of the line item that appears in the printed record.
  • A subtotal line inline with other lines on the sales form and holds the sum of amounts on all lines above it. This is distinct from the overall transaction subtotal represented with a SubTotal detail line.
    • In create requests, set to Subtotal: (case sensitive) to create the subtotal line; the amount is generated by QuickBooks Online business logic.
    • In read requests, lines with Subtotal: nn.nn returned in this field denote subtotal lines in the object.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DescriptionOnlyfor this type of line.
DescriptionLineDetail:
optional
DescriptionLineDetail
ServiceDate:
optional
Date
Date when the service is performed.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Discount line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation. Not supported for BillPayment, Estimate, Invoice, or Payment objects.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DiscountLineDetailfor this type of line.
DiscountLineDetail:
optional
DiscountLineDetail
Discount detail type for the entire transaction. This is in contrast to a discount applied to a specific line. The company preference Sales Form Entry | Discounts must be enabled for this type of line to be available.
PercentBased:
optional
Boolean
True if the discount is a percentage; null or false if discount based on amount.
DiscountPercent:
optional
Decimal
Percentage by which the amount due is reduced, from 0% to 100%. To enter a discount of 8.5% use 8.5, not 0.085.
DiscountAccountRef:
optional
ReferenceType
Income account used to track discounts. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Income and Account.AccountSubType=DiscountsRefundsGiven. Use Account.Id and Account.Name from that object for DiscountAccountRef.value and DiscountAccountRef.name, respectively.
ClassRef:
optional
ReferenceType
Reference to the Class associated with this discount. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
TaxCodeRef:
optional
ReferenceType
The TaxCodeassociated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Subtotal Line (read-only):
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to SubtotalLineDetailfor this type of line.
SubtotalLineDetail:
optional
Subtotal LineDetail
ItemRef:
optional
ReferenceType
Reference to the Item. Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively. When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored.
For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
TxnTaxDetail:
optional
TxnTaxDetail
This element provides information for taxes charged on the transaction as a whole. It captures the details sales taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction. See Global tax model for more information about this element.
CustomerRef:
required
ReferenceType, filterable
Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
CustomerMemo:
optional
MemoRef
User-entered message to the customer; this message is visible to end user on their transactions.
BillAddr:
optional
PhysicalAddress
Bill-to address of the Invoice. If BillAddris not specified, and a default Customer:BillingAddr is specified in QuickBooks for this customer, the default bill-to address is used by QuickBooks.
ShipAddr:
optional
PhysicalAddress
Identifies the address where the goods must be shipped. If ShipAddris not specified, and a default Customer:ShippingAddr is specified in QuickBooks for this customer, the default ship-to address will be used by QuickBooks.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the transaction. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerTxn is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
ShipMethodRef:
optional
ReferenceType
Reference to the ShipMethod associated with the transaction. There is no shipping method list. Reference resolves to a string.
ShipDate:
optional
Date, default is null
Location of the transaction, as defined using location tracking in QuickBooks Online.
TrackingNum:
optional
String, default is null
Shipping provider's tracking number for the delivery of the goods associated with the transaction.
TotalAmt:
optional
BigDecimal, filterable, read-only
Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
PrintStatus:
optional
String, default is NotSet
; Printing status of the invoice.
Valid values: NotSet, NeedToPrint, PrintComplete .
EmailStatus:
optional
String, default is Null
EMail status of the receipt.
Valid values: NotSet, NeedToSend, EmailSent .
BillEmail:
required if EmailStatus=NeedToSend
EmailAddress
Identifies the e-mail address where the invoice is sent.
DeliveryInfo:
optional
DeliveryInfo, read-only
Email delivery information. Returned when a request has been made to deliver email with the send operation.
Balance:
optional
Decimal, filterable, sortable, read-only
The balance reflecting any payments made against the transaction. Initially set to the value of TotalAmt. A Balance of 0 indicates the invoice is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
HomeBalance:
optional
minor version 3
Decimal, read-only, applicable if multicurrency is enabled for the company
Convenience field containing the amount in Balance expressed in terms of the home currency. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified and available when endpoint is evoked with the minorversion=3 query parameter.
PaymentMethodRef:
optional
ReferenceType, default is null
Reference to a PaymentMethod associated with this transaction. Query the PaymentMethod name list resource to determine the appropriate PaymentMethod object for this reference. Use PaymentMethod.Id and PaymentMethod.Name from that object for PaymentMethodRef.value and PaymentMethodRef.name, respectively.
PaymentRefNum:
optional
String, max 21 characters
The reference number for the payment received. For example,  Check # for a check, envelope # for a cash donation.
CreditCardPayment:
optional
CreditCardPayment
Information about a credit card payment for the transaction. Used when PaymentType is CreditCard. Inject with data only if the payment was transacted through Intuit Payments API.
TxnSource:
optional
String
Used internally to specify originating source of a credit card transaction.
ApplyTaxAfterDiscount:
optional
Boolean
If false or null, calculate the sales tax first, and then apply the discount. If true, subtract the discount first and then calculate the sales tax.
Default Value: false
Constraints: US versions of QuickBooks only.
DepositToAccountRef:
optional
ReferenceType
Account from which payment money is deposited. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType is Other Current Asset or Bank. Use Account.Id and Account.Name from that object for DepositToAccountRef.value and DepositToAccountRef.name, respectively.
If you do not specify this account, payment is applied to the Undeposited Funds account.
CurrencyRef:
required if multicurrency is enabled for the company
CurrencyRefType
Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
Multicurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here.
ExchangeRate:
optional
Decimal, default is 1, applicable if multicurrency is enabled for the company
The number of home currency units it takes to equal one unit of currency specified by CurrencyRef.
HomeTotalAmt:
optional
Decimal, read-only, applicable if multicurrency is enabled for the company
Total amount of the transaction in the home currency. Includes the total of all the charges, allowances and taxes. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified.
GlobalTaxCalculation:
optional
GlobalTaxCalculationEnum, default is TaxExcluded
Method in which tax is applied. Allowed values are: TaxExcluded, TaxInclusive, and NotApplicable.
TransactionLocationType:
optional
minor version 4
String, default is WithinFrance
The account location. Valid values include:
  • WithinFrance
  • FranceOverseas
  • OutsideFranceWithEU
  • OutsideEU

For France locales, only.

Returns

SAMPLE RESPONSE
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2013-04-23T08:54:09.001-07:00"> <SalesReceipt domain="QBO" status="Deleted"> <Id>3084</Id> </SalesReceipt> </IntuitResponse>

SAMPLE RESPONSE
{ "SalesReceipt": { "domain": "QBO", "status": "Deleted", "Id": "98" }, "time": "2013-03-13T13:39:58.505-07:00" }

Returns the delete response.

Full update a salesreceipt

REQUEST URL
Sandbox Base URL: https://sandbox-quickbooks.api.intuit.com
Production Base URL: https://quickbooks.api.intuit.com

Operation: POST /v3/company/<realmID>/salesreceipt
Content type: application/json

Use this operation to update any of the writable fields of an existing SalesReceipt object. The request body must include all writable fields of the existing object as returned in a read response. Writable fields omitted from the request body are set to NULL. The ID of the object to update is specified in the request body.

Request body
SAMPLE REQUEST
{ "domain": "QBO", "sparse": false, "Id": "11", "SyncToken": "0", "MetaData": { "CreateTime": "2014-09-16T14:59:48-07:00", "LastUpdatedTime": "2014-09-16T14:59:48-07:00" }, "CustomField": [ { "DefinitionId": "1", "Name": "Crew #", "Type": "StringType" } ], "DocNumber": "1003", "TxnDate": "2014-09-14", "Line": [ { "Id": "1", "LineNum": 1, "Description": "Custom Design", "Amount": 337.5, "DetailType": "SalesItemLineDetail", "SalesItemLineDetail": { "ItemRef": { "value": "4", "name": "Design" }, "UnitPrice": 75, "Qty": 4.5, "TaxCodeRef": { "value": "NON" } } }, { "Amount": 337.5, "DetailType": "SubTotalLineDetail", "SubTotalLineDetail": {} } ], "TxnTaxDetail": { "TotalTax": 0 }, "CustomerRef": { "value": "6", "name": "Dylan Sollfrank" }, "CustomerMemo": { "value": "An updated customer memo." }, "BillAddr": { "Id": "49", "Line1": "Dylan Sollfrank", "Lat": "INVALID", "Long": "INVALID" }, "TotalAmt": 337.5, "ApplyTaxAfterDiscount": false, "PrintStatus": "NotSet", "EmailStatus": "NotSet", "Balance": 0, "PaymentMethodRef": { "value": "2", "name": "Check" }, "PaymentRefNum": "10264", "DepositToAccountRef": { "value": "35", "name": "Checking" } }

SAMPLE REQUEST
<SalesReceipt xmlns="http://schema.intuit.com/finance/v3" sparse="false"> <Id>3084</Id> <SyncToken>0</SyncToken> <MetaData> <CreateTime>2013-04-23T08:53:46-07:00</CreateTime> <LastUpdatedTime>2013-04-23T08:53:46-07:00</LastUpdatedTime> </MetaData> <PrivateNote>Sales Receipt Update testing</PrivateNote> <Line> <Id>1</Id> <Description>Sales only</Description> <Amount>5.00</Amount> <DetailType>SalesItemLineDetail</DetailType> <SalesItemLineDetail> <ItemRef name="Services">1</ItemRef> <UnitPrice>0.5</UnitPrice> <Qty>10</Qty> <TaxCodeRef>TAX</TaxCodeRef> </SalesItemLineDetail> </Line> <Line> <Amount>5.00</Amount> <DetailType>SubTotalLineDetail</DetailType> <SubTotalLineDetail/> </Line> <Line> <Amount>0.50</Amount> <DetailType>DiscountLineDetail</DetailType> <DiscountLineDetail> <PercentBased>true</PercentBased> <DiscountPercent>10</DiscountPercent> </DiscountLineDetail> </Line> <TxnTaxDetail> <TxnTaxCodeRef>9</TxnTaxCodeRef> <TotalTax>0.75</TotalTax> <TaxLine> <Amount>0.75</Amount> <DetailType>TaxLineDetail</DetailType> <TaxLineDetail> <TaxRateRef>18</TaxRateRef> <PercentBased>true</PercentBased> <TaxPercent>15</TaxPercent> <NetAmountTaxable>5.00</NetAmountTaxable> </TaxLineDetail> </TaxLine> </TxnTaxDetail> <CustomerRef>1105</CustomerRef> <CustomerMemo>Sales Receipt with customer</CustomerMemo> <BillAddr> <Line1>2700 Garcia Avenue</Line1> <City>Mountain View</City> <Country>USA</Country> <CountrySubDivisionCode>CA</CountrySubDivisionCode> <PostalCode>94043</PostalCode> </BillAddr> <ShipAddr> <Line1>Ms. Anupama Madhavapeddi</Line1> <Line2>Intuit Systems</Line2> <Line3>3700 Garcia Avenue</Line3> <Line4>Mountain View, CA 94043 USA</Line4> </ShipAddr> <ShipDate>2012-04-18</ShipDate> <TrackingNum>1232</TrackingNum> <ApplyTaxAfterDiscount>false</ApplyTaxAfterDiscount> <PrintStatus>NeedToPrint</PrintStatus> <EmailStatus>NeedToSend</EmailStatus> <BillEmail> <Address>test@abc.com</Address> </BillEmail> <Balance>0</Balance> </SalesReceipt>

Id:
required for update
String, filterable, sortable
Unique identifier for this object.
Sort order is ASC by default.
SyncToken:
required for update
String
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData:
optional
ModificationMetaData
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
CustomField [0..3]:
optional
CustomField
Custom field or data extension.
DocNumber:
optional
String, maximum of 21 chars, filterable, sortable
Reference number for the transaction. If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:
  • If Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
  • If Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.
If Preferences:CustomTxnNumber is false and a value is supplied, that value is stored even if it is a duplicate. Recommended best practice: check the setting of Preferences:CustomTxnNumber before setting DocNumber.
Sort order is ASC by default.
TxnDate:
optional
Date, filterable, sortable, default is current server date
The date entered by the user when this transaction occurred.
For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
Sort order is ASC by default.
DepartmentRef:
optional
ReferenceType, default is null
A reference to a Department object specifying the location of the transaction. Available if Preferences.AccountingInfoPrefs.TrackDepartments is set to true.
Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.
PrivateNote:
optional
String, max of 4000 chars, default is null
User entered, organization-private note about the transaction. This note does not appear on the transaction form to the customer. This field maps to the Memo field on the Sales Receipt form.
Line [0..n]: <
required
Line
Individual line items of a transaction. Valid Line types include:
Sales item line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Group item line type:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
DetailType:
required
LineDetailTypeEnum
Set to GroupLineDetailfor this type of line.
GroupLineDetail:
required
GroupLineDetail
GroupItemRef:
optional
ReferenceType
Reference to a group item for all the lines that belong to the bundle. Query the Item name list resource to determine the appropriate Item group object (Item.Type=Group) for this reference. Use Item.Id and Item.Name from that object for GroupItemRef.value and GroupItemRef.name, respectively.
Quantity:
optional
Decimal, default is 1
Quantity of the group item.
Line [0..n]:
optional
Line
Individual ItemLine elements that comprise a bundle. Returned in responses.
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Description only:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars A string representing one of the following:
  • Free form text description of the line item that appears in the printed record.
  • A subtotal line inline with other lines on the sales form and holds the sum of amounts on all lines above it. This is distinct from the overall transaction subtotal represented with a SubTotal detail line.
    • In create requests, set to Subtotal: (case sensitive) to create the subtotal line; the amount is generated by QuickBooks Online business logic.
    • In read requests, lines with Subtotal: nn.nn returned in this field denote subtotal lines in the object.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DescriptionOnlyfor this type of line.
DescriptionLineDetail:
optional
DescriptionLineDetail
ServiceDate:
optional
Date
Date when the service is performed.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Discount line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation. Not supported for BillPayment, Estimate, Invoice, or Payment objects.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DiscountLineDetailfor this type of line.
DiscountLineDetail:
optional
DiscountLineDetail
Discount detail type for the entire transaction. This is in contrast to a discount applied to a specific line. The company preference Sales Form Entry | Discounts must be enabled for this type of line to be available.
PercentBased:
optional
Boolean
True if the discount is a percentage; null or false if discount based on amount.
DiscountPercent:
optional
Decimal
Percentage by which the amount due is reduced, from 0% to 100%. To enter a discount of 8.5% use 8.5, not 0.085.
DiscountAccountRef:
optional
ReferenceType
Income account used to track discounts. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Income and Account.AccountSubType=DiscountsRefundsGiven. Use Account.Id and Account.Name from that object for DiscountAccountRef.value and DiscountAccountRef.name, respectively.
ClassRef:
optional
ReferenceType
Reference to the Class associated with this discount. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
TaxCodeRef:
optional
ReferenceType
The TaxCodeassociated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Subtotal Line (read-only):
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to SubtotalLineDetailfor this type of line.
SubtotalLineDetail:
optional
Subtotal LineDetail
ItemRef:
optional
ReferenceType
Reference to the Item. Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively. When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored.
For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
TxnTaxDetail:
optional
TxnTaxDetail
This element provides information for taxes charged on the transaction as a whole. It captures the details sales taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction. See Global tax model for more information about this element.
CustomerRef:
required
ReferenceType, filterable
Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
CustomerMemo:
optional
MemoRef
User-entered message to the customer; this message is visible to end user on their transactions.
BillAddr:
optional
PhysicalAddress
Bill-to address of the Invoice. If BillAddris not specified, and a default Customer:BillingAddr is specified in QuickBooks for this customer, the default bill-to address is used by QuickBooks.
ShipAddr:
optional
PhysicalAddress
Identifies the address where the goods must be shipped. If ShipAddris not specified, and a default Customer:ShippingAddr is specified in QuickBooks for this customer, the default ship-to address will be used by QuickBooks.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the transaction. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerTxn is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
ShipMethodRef:
optional
ReferenceType
Reference to the ShipMethod associated with the transaction. There is no shipping method list. Reference resolves to a string.
ShipDate:
optional
Date, default is null
Location of the transaction, as defined using location tracking in QuickBooks Online.
TrackingNum:
optional
String, default is null
Shipping provider's tracking number for the delivery of the goods associated with the transaction.
TotalAmt:
optional
BigDecimal, filterable, read-only
Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
PrintStatus:
optional
String, default is NotSet
; Printing status of the invoice.
Valid values: NotSet, NeedToPrint, PrintComplete .
EmailStatus:
optional
String, default is Null
EMail status of the receipt.
Valid values: NotSet, NeedToSend, EmailSent .
BillEmail:
required if EmailStatus=NeedToSend
EmailAddress
Identifies the e-mail address where the invoice is sent.
DeliveryInfo:
optional
DeliveryInfo, read-only
Email delivery information. Returned when a request has been made to deliver email with the send operation.
Balance:
optional
Decimal, filterable, sortable, read-only
The balance reflecting any payments made against the transaction. Initially set to the value of TotalAmt. A Balance of 0 indicates the invoice is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
HomeBalance:
optional
minor version 3
Decimal, read-only, applicable if multicurrency is enabled for the company
Convenience field containing the amount in Balance expressed in terms of the home currency. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified and available when endpoint is evoked with the minorversion=3 query parameter.
PaymentMethodRef:
optional
ReferenceType, default is null
Reference to a PaymentMethod associated with this transaction. Query the PaymentMethod name list resource to determine the appropriate PaymentMethod object for this reference. Use PaymentMethod.Id and PaymentMethod.Name from that object for PaymentMethodRef.value and PaymentMethodRef.name, respectively.
PaymentRefNum:
optional
String, max 21 characters
The reference number for the payment received. For example,  Check # for a check, envelope # for a cash donation.
CreditCardPayment:
optional
CreditCardPayment
Information about a credit card payment for the transaction. Used when PaymentType is CreditCard. Inject with data only if the payment was transacted through Intuit Payments API.
TxnSource:
optional
String
Used internally to specify originating source of a credit card transaction.
ApplyTaxAfterDiscount:
optional
Boolean
If false or null, calculate the sales tax first, and then apply the discount. If true, subtract the discount first and then calculate the sales tax.
Default Value: false
Constraints: US versions of QuickBooks only.
DepositToAccountRef:
optional
ReferenceType
Account from which payment money is deposited. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType is Other Current Asset or Bank. Use Account.Id and Account.Name from that object for DepositToAccountRef.value and DepositToAccountRef.name, respectively.
If you do not specify this account, payment is applied to the Undeposited Funds account.
CurrencyRef:
required if multicurrency is enabled for the company
CurrencyRefType
Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
Multicurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here.
ExchangeRate:
optional
Decimal, default is 1, applicable if multicurrency is enabled for the company
The number of home currency units it takes to equal one unit of currency specified by CurrencyRef.
HomeTotalAmt:
optional
Decimal, read-only, applicable if multicurrency is enabled for the company
Total amount of the transaction in the home currency. Includes the total of all the charges, allowances and taxes. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified.
GlobalTaxCalculation:
optional
GlobalTaxCalculationEnum, default is TaxExcluded
Method in which tax is applied. Allowed values are: TaxExcluded, TaxInclusive, and NotApplicable.
TransactionLocationType:
optional
minor version 4
String, default is WithinFrance
The account location. Valid values include:
  • WithinFrance
  • FranceOverseas
  • OutsideFranceWithEU
  • OutsideEU

For France locales, only.
Returns
SAMPLE RESPONSE
{ "SalesReceipt": { "domain": "QBO", "sparse": false, "Id": "11", "SyncToken": "1", "MetaData": { "CreateTime": "2014-09-16T14:59:48-07:00", "LastUpdatedTime": "2015-07-29T09:43:18-07:00" }, "CustomField": [{ "DefinitionId": "1", "Name": "Crew #", "Type": "StringType" }], "DocNumber": "1003", "TxnDate": "2014-09-14", "Line": [{ "Id": "1", "LineNum": 1, "Description": "Custom Design", "Amount": 337.5, "DetailType": "SalesItemLineDetail", "SalesItemLineDetail": { "ItemRef": { "value": "4", "name": "Design" }, "UnitPrice": 75, "Qty": 4.5, "TaxCodeRef": { "value": "NON" } } }, { "Amount": 337.5, "DetailType": "SubTotalLineDetail", "SubTotalLineDetail": {} }], "TxnTaxDetail": { "TotalTax": 0 }, "CustomerRef": { "value": "6", "name": "Dylan Sollfrank" }, "CustomerMemo": { "value": "An updated customer memo." }, "BillAddr": { "Id": "49", "Line1": "Dylan Sollfrank", "Lat": "INVALID", "Long": "INVALID" }, "TotalAmt": 337.5, "ApplyTaxAfterDiscount": false, "PrintStatus": "NotSet", "EmailStatus": "NotSet", "Balance": 0, "PaymentMethodRef": { "value": "2", "name": "Check" }, "PaymentRefNum": "10264", "DepositToAccountRef": { "value": "35", "name": "Checking" } }, "time": "2015-07-29T09:43:01.436-07:00" }

SAMPLE RESPONSE
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2013-04-23T08:54:07.001-07:00"> <SalesReceipt domain="QBO" sparse="false"> <Id>3084</Id> <SyncToken>1</SyncToken> <MetaData> <CreateTime>2013-04-23T08:53:46-07:00</CreateTime> <LastUpdatedTime>2013-04-23T08:53:47-07:00</LastUpdatedTime> </MetaData> <CustomField> <Name>Custom 1</Name> <Type>StringType</Type> </CustomField> <CustomField> <Name>Custom 2</Name> <Type>StringType</Type> </CustomField> <CustomField> <Name>Custom 3</Name> <Type>StringType</Type> </CustomField> <DocNumber>3026</DocNumber> <TxnDate>2012-12-18</TxnDate> <CurrencyRef name="United States Dollar">USD</CurrencyRef> <PrivateNote>Sales Receipt Update testing</PrivateNote> <Line> <Id>1</Id> <LineNum>1</LineNum> <Description>Sales only</Description> <Amount>5.00</Amount> <DetailType>SalesItemLineDetail</DetailType> <SalesItemLineDetail> <ItemRef name="Sales">1</ItemRef> <UnitPrice>0.5</UnitPrice> <Qty>10</Qty> <TaxCodeRef>TAX</TaxCodeRef> </SalesItemLineDetail> </Line> <Line> <Amount>5.00</Amount> <DetailType>SubTotalLineDetail</DetailType> <SubTotalLineDetail/> </Line> <Line> <Amount>0.50</Amount> <DetailType>DiscountLineDetail</DetailType> <DiscountLineDetail> <PercentBased>true</PercentBased> <DiscountPercent>10</DiscountPercent> <DiscountAccountRef name="Discounts given">30</DiscountAccountRef> </DiscountLineDetail> </Line> <TxnTaxDetail> <TxnTaxCodeRef>9</TxnTaxCodeRef> <TotalTax>0.75</TotalTax> <TaxLine> <Amount>0.75</Amount> <DetailType>TaxLineDetail</DetailType> <TaxLineDetail> <TaxRateRef>18</TaxRateRef> <PercentBased>true</PercentBased> <TaxPercent>15</TaxPercent> <NetAmountTaxable>5.00</NetAmountTaxable> </TaxLineDetail> </TaxLine> </TxnTaxDetail> <CustomerRef name="sn71lPmH0Y zOv1blD5Vq">1105</CustomerRef> <CustomerMemo>Sales Receipt with customer</CustomerMemo> <BillAddr> <Id>65</Id> <Line1>2700 Garcia Avenue</Line1> <City>Mountain View</City> <Country>USA</Country> <CountrySubDivisionCode>CA</CountrySubDivisionCode> <PostalCode>94043</PostalCode> <Lat>37.4276176</Lat> <Long>-122.099344</Long> </BillAddr> <ShipAddr> <Id>66</Id> <Line1>Ms. Anupama Madhavapeddi</Line1> <Line2>Intuit Systems</Line2> <Line3>3700 Garcia Avenue</Line3> <Line4>Mountain View, CA 94043 USA</Line4> <Lat>37.428434</Lat> <Long>-122.0723816</Long> </ShipAddr> <ShipDate>2012-04-18</ShipDate> <TrackingNum>1232</TrackingNum> <TotalAmt>5.25</TotalAmt> <ApplyTaxAfterDiscount>false</ApplyTaxAfterDiscount> <PrintStatus>NeedToPrint</PrintStatus> <EmailStatus>NeedToSend</EmailStatus> <BillEmail> <Address>test@abc.com</Address> </BillEmail> <Balance>0</Balance> <DepositToAccountRef name="Undeposited Funds">4</DepositToAccountRef> </SalesReceipt> </IntuitResponse>

The salesreceipt response body.

Id:
required for update
String, filterable, sortable
Unique identifier for this object.
Sort order is ASC by default.
SyncToken:
required for update
String
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData:
optional
ModificationMetaData
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
CustomField [0..3]:
optional
CustomField
Custom field or data extension.
DocNumber:
optional
String, maximum of 21 chars, filterable, sortable
Reference number for the transaction. If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:
  • If Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
  • If Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.
If Preferences:CustomTxnNumber is false and a value is supplied, that value is stored even if it is a duplicate. Recommended best practice: check the setting of Preferences:CustomTxnNumber before setting DocNumber.
Sort order is ASC by default.
TxnDate:
optional
Date, filterable, sortable, default is current server date
The date entered by the user when this transaction occurred.
For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
Sort order is ASC by default.
DepartmentRef:
optional
ReferenceType, default is null
A reference to a Department object specifying the location of the transaction. Available if Preferences.AccountingInfoPrefs.TrackDepartments is set to true.
Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.
PrivateNote:
optional
String, max of 4000 chars, default is null
User entered, organization-private note about the transaction. This note does not appear on the transaction form to the customer. This field maps to the Memo field on the Sales Receipt form.
Line [0..n]: <
required
Line
Individual line items of a transaction. Valid Line types include:
Sales item line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Group item line type:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
DetailType:
required
LineDetailTypeEnum
Set to GroupLineDetailfor this type of line.
GroupLineDetail:
required
GroupLineDetail
GroupItemRef:
optional
ReferenceType
Reference to a group item for all the lines that belong to the bundle. Query the Item name list resource to determine the appropriate Item group object (Item.Type=Group) for this reference. Use Item.Id and Item.Name from that object for GroupItemRef.value and GroupItemRef.name, respectively.
Quantity:
optional
Decimal, default is 1
Quantity of the group item.
Line [0..n]:
optional
Line
Individual ItemLine elements that comprise a bundle. Returned in responses.
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Description only:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars A string representing one of the following:
  • Free form text description of the line item that appears in the printed record.
  • A subtotal line inline with other lines on the sales form and holds the sum of amounts on all lines above it. This is distinct from the overall transaction subtotal represented with a SubTotal detail line.
    • In create requests, set to Subtotal: (case sensitive) to create the subtotal line; the amount is generated by QuickBooks Online business logic.
    • In read requests, lines with Subtotal: nn.nn returned in this field denote subtotal lines in the object.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DescriptionOnlyfor this type of line.
DescriptionLineDetail:
optional
DescriptionLineDetail
ServiceDate:
optional
Date
Date when the service is performed.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Discount line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation. Not supported for BillPayment, Estimate, Invoice, or Payment objects.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DiscountLineDetailfor this type of line.
DiscountLineDetail:
optional
DiscountLineDetail
Discount detail type for the entire transaction. This is in contrast to a discount applied to a specific line. The company preference Sales Form Entry | Discounts must be enabled for this type of line to be available.
PercentBased:
optional
Boolean
True if the discount is a percentage; null or false if discount based on amount.
DiscountPercent:
optional
Decimal
Percentage by which the amount due is reduced, from 0% to 100%. To enter a discount of 8.5% use 8.5, not 0.085.
DiscountAccountRef:
optional
ReferenceType
Income account used to track discounts. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Income and Account.AccountSubType=DiscountsRefundsGiven. Use Account.Id and Account.Name from that object for DiscountAccountRef.value and DiscountAccountRef.name, respectively.
ClassRef:
optional
ReferenceType
Reference to the Class associated with this discount. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
TaxCodeRef:
optional
ReferenceType
The TaxCodeassociated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Subtotal Line (read-only):
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to SubtotalLineDetailfor this type of line.
SubtotalLineDetail:
optional
Subtotal LineDetail
ItemRef:
optional
ReferenceType
Reference to the Item. Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively. When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored.
For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
TxnTaxDetail:
optional
TxnTaxDetail
This element provides information for taxes charged on the transaction as a whole. It captures the details sales taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction. See Global tax model for more information about this element.
CustomerRef:
required
ReferenceType, filterable
Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
CustomerMemo:
optional
MemoRef
User-entered message to the customer; this message is visible to end user on their transactions.
BillAddr:
optional
PhysicalAddress
Bill-to address of the Invoice. If BillAddris not specified, and a default Customer:BillingAddr is specified in QuickBooks for this customer, the default bill-to address is used by QuickBooks.
ShipAddr:
optional
PhysicalAddress
Identifies the address where the goods must be shipped. If ShipAddris not specified, and a default Customer:ShippingAddr is specified in QuickBooks for this customer, the default ship-to address will be used by QuickBooks.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the transaction. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerTxn is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
ShipMethodRef:
optional
ReferenceType
Reference to the ShipMethod associated with the transaction. There is no shipping method list. Reference resolves to a string.
ShipDate:
optional
Date, default is null
Location of the transaction, as defined using location tracking in QuickBooks Online.
TrackingNum:
optional
String, default is null
Shipping provider's tracking number for the delivery of the goods associated with the transaction.
TotalAmt:
optional
BigDecimal, filterable, read-only
Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
PrintStatus:
optional
String, default is NotSet
; Printing status of the invoice.
Valid values: NotSet, NeedToPrint, PrintComplete .
EmailStatus:
optional
String, default is Null
EMail status of the receipt.
Valid values: NotSet, NeedToSend, EmailSent .
BillEmail:
required if EmailStatus=NeedToSend
EmailAddress
Identifies the e-mail address where the invoice is sent.
DeliveryInfo:
optional
DeliveryInfo, read-only
Email delivery information. Returned when a request has been made to deliver email with the send operation.
Balance:
optional
Decimal, filterable, sortable, read-only
The balance reflecting any payments made against the transaction. Initially set to the value of TotalAmt. A Balance of 0 indicates the invoice is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
HomeBalance:
optional
minor version 3
Decimal, read-only, applicable if multicurrency is enabled for the company
Convenience field containing the amount in Balance expressed in terms of the home currency. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified and available when endpoint is evoked with the minorversion=3 query parameter.
PaymentMethodRef:
optional
ReferenceType, default is null
Reference to a PaymentMethod associated with this transaction. Query the PaymentMethod name list resource to determine the appropriate PaymentMethod object for this reference. Use PaymentMethod.Id and PaymentMethod.Name from that object for PaymentMethodRef.value and PaymentMethodRef.name, respectively.
PaymentRefNum:
optional
String, max 21 characters
The reference number for the payment received. For example,  Check # for a check, envelope # for a cash donation.
CreditCardPayment:
optional
CreditCardPayment
Information about a credit card payment for the transaction. Used when PaymentType is CreditCard. Inject with data only if the payment was transacted through Intuit Payments API.
TxnSource:
optional
String
Used internally to specify originating source of a credit card transaction.
ApplyTaxAfterDiscount:
optional
Boolean
If false or null, calculate the sales tax first, and then apply the discount. If true, subtract the discount first and then calculate the sales tax.
Default Value: false
Constraints: US versions of QuickBooks only.
DepositToAccountRef:
optional
ReferenceType
Account from which payment money is deposited. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType is Other Current Asset or Bank. Use Account.Id and Account.Name from that object for DepositToAccountRef.value and DepositToAccountRef.name, respectively.
If you do not specify this account, payment is applied to the Undeposited Funds account.
CurrencyRef:
required if multicurrency is enabled for the company
CurrencyRefType
Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
Multicurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here.
ExchangeRate:
optional
Decimal, default is 1, applicable if multicurrency is enabled for the company
The number of home currency units it takes to equal one unit of currency specified by CurrencyRef.
HomeTotalAmt:
optional
Decimal, read-only, applicable if multicurrency is enabled for the company
Total amount of the transaction in the home currency. Includes the total of all the charges, allowances and taxes. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified.
GlobalTaxCalculation:
optional
GlobalTaxCalculationEnum, default is TaxExcluded
Method in which tax is applied. Allowed values are: TaxExcluded, TaxInclusive, and NotApplicable.
TransactionLocationType:
optional
minor version 4
String, default is WithinFrance
The account location. Valid values include:
  • WithinFrance
  • FranceOverseas
  • OutsideFranceWithEU
  • OutsideEU

For France locales, only.

Sparse update a salesreceipt

REQUEST URL
Sandbox Base URL: https://sandbox-quickbooks.api.intuit.com
Production Base URL: https://quickbooks.api.intuit.com

Operation: POST /v3/company/<realmID>/salesreceipt
Content type: application/json

Sparse updating provides the ability to update a subset of properties for a given object; only elements specified in the request are updated. Missing elements are left untouched. The ID of the object to update is specified in the request body.​

Request body

SAMPLE REQUEST
{ "sparse": true, "Id": "97", "SyncToken": "0", "MetaData": { "CreateTime": "2013-03-13T13:39:57-07:00", "LastUpdatedTime": "2013-03-13T13:39:57-07:00" }, "Line": [ { "Description": "UpdatedDescription", "Amount": 5, "DetailType": "SalesItemLineDetail", "SalesItemLineDetail": { "ItemRef": { "value": "1" }, "UnitPrice": 0.5, "Qty": 10 } } ] }

SAMPLE REQUEST
<SalesReceipt xmlns="http://schema.intuit.com/finance/v3" sparse="true"> <Id>11</Id> <SyncToken>3</SyncToken> <MetaData> <CreateTime>2014-09-16T14:59:48-07:00</CreateTime> <LastUpdatedTime>2014-09-16T14:59:48-07:00</LastUpdatedTime> </MetaData> <Line> <Id>1</Id> <LineNum>1</LineNum> <Description>Custom Design</Description> <Amount>337.50</Amount> <DetailType>SalesItemLineDetail</DetailType> <SalesItemLineDetail> <ItemRef name="Design">4</ItemRef> <UnitPrice>75</UnitPrice> <Qty>4.5</Qty> <TaxCodeRef>NON</TaxCodeRef> </SalesItemLineDetail> </Line> <CustomerMemo>Updated customer memo via sparse update operation.</CustomerMemo> </SalesReceipt>

Id:
required for update
String, filterable, sortable
Unique identifier for this object.
Sort order is ASC by default.
SyncToken:
required for update
String
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData:
optional
ModificationMetaData
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
CustomField [0..3]:
optional
CustomField
Custom field or data extension.
DocNumber:
optional
String, maximum of 21 chars, filterable, sortable
Reference number for the transaction. If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:
  • If Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
  • If Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.
If Preferences:CustomTxnNumber is false and a value is supplied, that value is stored even if it is a duplicate. Recommended best practice: check the setting of Preferences:CustomTxnNumber before setting DocNumber.
Sort order is ASC by default.
TxnDate:
optional
Date, filterable, sortable, default is current server date
The date entered by the user when this transaction occurred.
For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
Sort order is ASC by default.
DepartmentRef:
optional
ReferenceType, default is null
A reference to a Department object specifying the location of the transaction. Available if Preferences.AccountingInfoPrefs.TrackDepartments is set to true.
Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.
PrivateNote:
optional
String, max of 4000 chars, default is null
User entered, organization-private note about the transaction. This note does not appear on the transaction form to the customer. This field maps to the Memo field on the Sales Receipt form.
Line [0..n]: <
required
Line
Individual line items of a transaction. Valid Line types include:
Sales item line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Group item line type:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
DetailType:
required
LineDetailTypeEnum
Set to GroupLineDetailfor this type of line.
GroupLineDetail:
required
GroupLineDetail
GroupItemRef:
optional
ReferenceType
Reference to a group item for all the lines that belong to the bundle. Query the Item name list resource to determine the appropriate Item group object (Item.Type=Group) for this reference. Use Item.Id and Item.Name from that object for GroupItemRef.value and GroupItemRef.name, respectively.
Quantity:
optional
Decimal, default is 1
Quantity of the group item.
Line [0..n]:
optional
Line
Individual ItemLine elements that comprise a bundle. Returned in responses.
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Description only:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars A string representing one of the following:
  • Free form text description of the line item that appears in the printed record.
  • A subtotal line inline with other lines on the sales form and holds the sum of amounts on all lines above it. This is distinct from the overall transaction subtotal represented with a SubTotal detail line.
    • In create requests, set to Subtotal: (case sensitive) to create the subtotal line; the amount is generated by QuickBooks Online business logic.
    • In read requests, lines with Subtotal: nn.nn returned in this field denote subtotal lines in the object.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DescriptionOnlyfor this type of line.
DescriptionLineDetail:
optional
DescriptionLineDetail
ServiceDate:
optional
Date
Date when the service is performed.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Discount line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation. Not supported for BillPayment, Estimate, Invoice, or Payment objects.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DiscountLineDetailfor this type of line.
DiscountLineDetail:
optional
DiscountLineDetail
Discount detail type for the entire transaction. This is in contrast to a discount applied to a specific line. The company preference Sales Form Entry | Discounts must be enabled for this type of line to be available.
PercentBased:
optional
Boolean
True if the discount is a percentage; null or false if discount based on amount.
DiscountPercent:
optional
Decimal
Percentage by which the amount due is reduced, from 0% to 100%. To enter a discount of 8.5% use 8.5, not 0.085.
DiscountAccountRef:
optional
ReferenceType
Income account used to track discounts. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Income and Account.AccountSubType=DiscountsRefundsGiven. Use Account.Id and Account.Name from that object for DiscountAccountRef.value and DiscountAccountRef.name, respectively.
ClassRef:
optional
ReferenceType
Reference to the Class associated with this discount. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
TaxCodeRef:
optional
ReferenceType
The TaxCodeassociated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Subtotal Line (read-only):
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to SubtotalLineDetailfor this type of line.
SubtotalLineDetail:
optional
Subtotal LineDetail
ItemRef:
optional
ReferenceType
Reference to the Item. Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively. When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored.
For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
TxnTaxDetail:
optional
TxnTaxDetail
This element provides information for taxes charged on the transaction as a whole. It captures the details sales taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction. See Global tax model for more information about this element.
CustomerRef:
required
ReferenceType, filterable
Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
CustomerMemo:
optional
MemoRef
User-entered message to the customer; this message is visible to end user on their transactions.
BillAddr:
optional
PhysicalAddress
Bill-to address of the Invoice. If BillAddris not specified, and a default Customer:BillingAddr is specified in QuickBooks for this customer, the default bill-to address is used by QuickBooks.
ShipAddr:
optional
PhysicalAddress
Identifies the address where the goods must be shipped. If ShipAddris not specified, and a default Customer:ShippingAddr is specified in QuickBooks for this customer, the default ship-to address will be used by QuickBooks.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the transaction. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerTxn is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
ShipMethodRef:
optional
ReferenceType
Reference to the ShipMethod associated with the transaction. There is no shipping method list. Reference resolves to a string.
ShipDate:
optional
Date, default is null
Location of the transaction, as defined using location tracking in QuickBooks Online.
TrackingNum:
optional
String, default is null
Shipping provider's tracking number for the delivery of the goods associated with the transaction.
TotalAmt:
optional
BigDecimal, filterable, read-only
Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
PrintStatus:
optional
String, default is NotSet
; Printing status of the invoice.
Valid values: NotSet, NeedToPrint, PrintComplete .
EmailStatus:
optional
String, default is Null
EMail status of the receipt.
Valid values: NotSet, NeedToSend, EmailSent .
BillEmail:
required if EmailStatus=NeedToSend
EmailAddress
Identifies the e-mail address where the invoice is sent.
DeliveryInfo:
optional
DeliveryInfo, read-only
Email delivery information. Returned when a request has been made to deliver email with the send operation.
Balance:
optional
Decimal, filterable, sortable, read-only
The balance reflecting any payments made against the transaction. Initially set to the value of TotalAmt. A Balance of 0 indicates the invoice is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
HomeBalance:
optional
minor version 3
Decimal, read-only, applicable if multicurrency is enabled for the company
Convenience field containing the amount in Balance expressed in terms of the home currency. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified and available when endpoint is evoked with the minorversion=3 query parameter.
PaymentMethodRef:
optional
ReferenceType, default is null
Reference to a PaymentMethod associated with this transaction. Query the PaymentMethod name list resource to determine the appropriate PaymentMethod object for this reference. Use PaymentMethod.Id and PaymentMethod.Name from that object for PaymentMethodRef.value and PaymentMethodRef.name, respectively.
PaymentRefNum:
optional
String, max 21 characters
The reference number for the payment received. For example,  Check # for a check, envelope # for a cash donation.
CreditCardPayment:
optional
CreditCardPayment
Information about a credit card payment for the transaction. Used when PaymentType is CreditCard. Inject with data only if the payment was transacted through Intuit Payments API.
TxnSource:
optional
String
Used internally to specify originating source of a credit card transaction.
ApplyTaxAfterDiscount:
optional
Boolean
If false or null, calculate the sales tax first, and then apply the discount. If true, subtract the discount first and then calculate the sales tax.
Default Value: false
Constraints: US versions of QuickBooks only.
DepositToAccountRef:
optional
ReferenceType
Account from which payment money is deposited. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType is Other Current Asset or Bank. Use Account.Id and Account.Name from that object for DepositToAccountRef.value and DepositToAccountRef.name, respectively.
If you do not specify this account, payment is applied to the Undeposited Funds account.
CurrencyRef:
required if multicurrency is enabled for the company
CurrencyRefType
Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
Multicurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here.
ExchangeRate:
optional
Decimal, default is 1, applicable if multicurrency is enabled for the company
The number of home currency units it takes to equal one unit of currency specified by CurrencyRef.
HomeTotalAmt:
optional
Decimal, read-only, applicable if multicurrency is enabled for the company
Total amount of the transaction in the home currency. Includes the total of all the charges, allowances and taxes. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified.
GlobalTaxCalculation:
optional
GlobalTaxCalculationEnum, default is TaxExcluded
Method in which tax is applied. Allowed values are: TaxExcluded, TaxInclusive, and NotApplicable.
TransactionLocationType:
optional
minor version 4
String, default is WithinFrance
The account location. Valid values include:
  • WithinFrance
  • FranceOverseas
  • OutsideFranceWithEU
  • OutsideEU

For France locales, only.

Returns

The salesreceipt response body.

SAMPLE RESPONSE
{ "SalesReceipt": { "domain": "QBO", "sparse": false, "Id": "11", "SyncToken": "2", "MetaData": { "CreateTime": "2014-09-16T14:59:48-07:00", "LastUpdatedTime": "2015-07-29T09:45:55-07:00" }, "CustomField": [ { "DefinitionId": "1", "Name": "Crew #", "Type": "StringType" } ], "DocNumber": "1003", "TxnDate": "2015-07-29", "Line": [ { "Id": "1", "LineNum": 1, "Description": "Custom Design", "Amount": 337.5, "DetailType": "SalesItemLineDetail", "SalesItemLineDetail": { "ItemRef": { "value": "4", "name": "Design" }, "UnitPrice": 75, "Qty": 4.5, "TaxCodeRef": { "value": "NON" } } }, { "Amount": 337.5, "DetailType": "SubTotalLineDetail", "SubTotalLineDetail": {} } ], "TxnTaxDetail": { "TotalTax": 0 }, "CustomerMemo": { "value": "A sparsely updated customer memo." }, "TotalAmt": 337.5, "ApplyTaxAfterDiscount": false, "PrintStatus": "NeedToPrint", "EmailStatus": "NotSet", "Balance": 0, "DepositToAccountRef": { "value": "4", "name": "Undeposited Funds" } }, "time": "2015-07-29T09:45:39.381-07:00" }

SAMPLE RESPONSE
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2015-07-29T09:49:20.113-07:00"> <SalesReceipt domain="QBO" sparse="false"> <Id>11</Id> <SyncToken>3</SyncToken> <MetaData> <CreateTime>2014-09-16T14:59:48-07:00</CreateTime> <LastUpdatedTime>2015-07-29T09:48:53-07:00</LastUpdatedTime> </MetaData> <CustomField> <DefinitionId>1</DefinitionId> <Name>Crew #</Name> <Type>StringType</Type> </CustomField> <DocNumber>1003</DocNumber> <TxnDate>2014-09-14</TxnDate> <Line> <Id>1</Id> <LineNum>1</LineNum> <Description>Custom Design</Description> <Amount>337.50</Amount> <DetailType>SalesItemLineDetail</DetailType> <SalesItemLineDetail> <ItemRef name="Design">4</ItemRef> <UnitPrice>75</UnitPrice> <Qty>4.5</Qty> <TaxCodeRef>NON</TaxCodeRef> </SalesItemLineDetail> </Line> <Line> <Amount>337.50</Amount> <DetailType>SubTotalLineDetail</DetailType> <SubTotalLineDetail /> </Line> <TxnTaxDetail> <TotalTax>0</TotalTax> </TxnTaxDetail> <CustomerRef name="Dylan Sollfrank">6</CustomerRef> <CustomerMemo>Updated customer memo via sparse update operation.</CustomerMemo> <BillAddr> <Id>122</Id> <Line1>Dylan Sollfrank</Line1> </BillAddr> <TotalAmt>337.50</TotalAmt> <ApplyTaxAfterDiscount>false</ApplyTaxAfterDiscount> <PrintStatus>NotSet</PrintStatus> <EmailStatus>NotSet</EmailStatus> <Balance>0</Balance> <PaymentMethodRef name="Check">2</PaymentMethodRef> <PaymentRefNum>10264</PaymentRefNum> <DepositToAccountRef name="Checking">35</DepositToAccountRef> </SalesReceipt> </IntuitResponse>

Id:
required for update
String, filterable, sortable
Unique identifier for this object.
Sort order is ASC by default.
SyncToken:
required for update
String
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData:
optional
ModificationMetaData
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
CustomField [0..3]:
optional
CustomField
Custom field or data extension.
DocNumber:
optional
String, maximum of 21 chars, filterable, sortable
Reference number for the transaction. If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:
  • If Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
  • If Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.
If Preferences:CustomTxnNumber is false and a value is supplied, that value is stored even if it is a duplicate. Recommended best practice: check the setting of Preferences:CustomTxnNumber before setting DocNumber.
Sort order is ASC by default.
TxnDate:
optional
Date, filterable, sortable, default is current server date
The date entered by the user when this transaction occurred.
For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
Sort order is ASC by default.
DepartmentRef:
optional
ReferenceType, default is null
A reference to a Department object specifying the location of the transaction. Available if Preferences.AccountingInfoPrefs.TrackDepartments is set to true.
Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.
PrivateNote:
optional
String, max of 4000 chars, default is null
User entered, organization-private note about the transaction. This note does not appear on the transaction form to the customer. This field maps to the Memo field on the Sales Receipt form.
Line [0..n]: <
required
Line
Individual line items of a transaction. Valid Line types include:
Sales item line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Group item line type:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
DetailType:
required
LineDetailTypeEnum
Set to GroupLineDetailfor this type of line.
GroupLineDetail:
required
GroupLineDetail
GroupItemRef:
optional
ReferenceType
Reference to a group item for all the lines that belong to the bundle. Query the Item name list resource to determine the appropriate Item group object (Item.Type=Group) for this reference. Use Item.Id and Item.Name from that object for GroupItemRef.value and GroupItemRef.name, respectively.
Quantity:
optional
Decimal, default is 1
Quantity of the group item.
Line [0..n]:
optional
Line
Individual ItemLine elements that comprise a bundle. Returned in responses.
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Description only:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars A string representing one of the following:
  • Free form text description of the line item that appears in the printed record.
  • A subtotal line inline with other lines on the sales form and holds the sum of amounts on all lines above it. This is distinct from the overall transaction subtotal represented with a SubTotal detail line.
    • In create requests, set to Subtotal: (case sensitive) to create the subtotal line; the amount is generated by QuickBooks Online business logic.
    • In read requests, lines with Subtotal: nn.nn returned in this field denote subtotal lines in the object.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DescriptionOnlyfor this type of line.
DescriptionLineDetail:
optional
DescriptionLineDetail
ServiceDate:
optional
Date
Date when the service is performed.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Discount line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation. Not supported for BillPayment, Estimate, Invoice, or Payment objects.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DiscountLineDetailfor this type of line.
DiscountLineDetail:
optional
DiscountLineDetail
Discount detail type for the entire transaction. This is in contrast to a discount applied to a specific line. The company preference Sales Form Entry | Discounts must be enabled for this type of line to be available.
PercentBased:
optional
Boolean
True if the discount is a percentage; null or false if discount based on amount.
DiscountPercent:
optional
Decimal
Percentage by which the amount due is reduced, from 0% to 100%. To enter a discount of 8.5% use 8.5, not 0.085.
DiscountAccountRef:
optional
ReferenceType
Income account used to track discounts. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Income and Account.AccountSubType=DiscountsRefundsGiven. Use Account.Id and Account.Name from that object for DiscountAccountRef.value and DiscountAccountRef.name, respectively.
ClassRef:
optional
ReferenceType
Reference to the Class associated with this discount. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
TaxCodeRef:
optional
ReferenceType
The TaxCodeassociated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Subtotal Line (read-only):
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to SubtotalLineDetailfor this type of line.
SubtotalLineDetail:
optional
Subtotal LineDetail
ItemRef:
optional
ReferenceType
Reference to the Item. Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively. When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored.
For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
TxnTaxDetail:
optional
TxnTaxDetail
This element provides information for taxes charged on the transaction as a whole. It captures the details sales taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction. See Global tax model for more information about this element.
CustomerRef:
required
ReferenceType, filterable
Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
CustomerMemo:
optional
MemoRef
User-entered message to the customer; this message is visible to end user on their transactions.
BillAddr:
optional
PhysicalAddress
Bill-to address of the Invoice. If BillAddris not specified, and a default Customer:BillingAddr is specified in QuickBooks for this customer, the default bill-to address is used by QuickBooks.
ShipAddr:
optional
PhysicalAddress
Identifies the address where the goods must be shipped. If ShipAddris not specified, and a default Customer:ShippingAddr is specified in QuickBooks for this customer, the default ship-to address will be used by QuickBooks.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the transaction. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerTxn is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
ShipMethodRef:
optional
ReferenceType
Reference to the ShipMethod associated with the transaction. There is no shipping method list. Reference resolves to a string.
ShipDate:
optional
Date, default is null
Location of the transaction, as defined using location tracking in QuickBooks Online.
TrackingNum:
optional
String, default is null
Shipping provider's tracking number for the delivery of the goods associated with the transaction.
TotalAmt:
optional
BigDecimal, filterable, read-only
Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
PrintStatus:
optional
String, default is NotSet
; Printing status of the invoice.
Valid values: NotSet, NeedToPrint, PrintComplete .
EmailStatus:
optional
String, default is Null
EMail status of the receipt.
Valid values: NotSet, NeedToSend, EmailSent .
BillEmail:
required if EmailStatus=NeedToSend
EmailAddress
Identifies the e-mail address where the invoice is sent.
DeliveryInfo:
optional
DeliveryInfo, read-only
Email delivery information. Returned when a request has been made to deliver email with the send operation.
Balance:
optional
Decimal, filterable, sortable, read-only
The balance reflecting any payments made against the transaction. Initially set to the value of TotalAmt. A Balance of 0 indicates the invoice is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
HomeBalance:
optional
minor version 3
Decimal, read-only, applicable if multicurrency is enabled for the company
Convenience field containing the amount in Balance expressed in terms of the home currency. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified and available when endpoint is evoked with the minorversion=3 query parameter.
PaymentMethodRef:
optional
ReferenceType, default is null
Reference to a PaymentMethod associated with this transaction. Query the PaymentMethod name list resource to determine the appropriate PaymentMethod object for this reference. Use PaymentMethod.Id and PaymentMethod.Name from that object for PaymentMethodRef.value and PaymentMethodRef.name, respectively.
PaymentRefNum:
optional
String, max 21 characters
The reference number for the payment received. For example,  Check # for a check, envelope # for a cash donation.
CreditCardPayment:
optional
CreditCardPayment
Information about a credit card payment for the transaction. Used when PaymentType is CreditCard. Inject with data only if the payment was transacted through Intuit Payments API.
TxnSource:
optional
String
Used internally to specify originating source of a credit card transaction.
ApplyTaxAfterDiscount:
optional
Boolean
If false or null, calculate the sales tax first, and then apply the discount. If true, subtract the discount first and then calculate the sales tax.
Default Value: false
Constraints: US versions of QuickBooks only.
DepositToAccountRef:
optional
ReferenceType
Account from which payment money is deposited. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType is Other Current Asset or Bank. Use Account.Id and Account.Name from that object for DepositToAccountRef.value and DepositToAccountRef.name, respectively.
If you do not specify this account, payment is applied to the Undeposited Funds account.
CurrencyRef:
required if multicurrency is enabled for the company
CurrencyRefType
Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
Multicurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here.
ExchangeRate:
optional
Decimal, default is 1, applicable if multicurrency is enabled for the company
The number of home currency units it takes to equal one unit of currency specified by CurrencyRef.
HomeTotalAmt:
optional
Decimal, read-only, applicable if multicurrency is enabled for the company
Total amount of the transaction in the home currency. Includes the total of all the charges, allowances and taxes. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified.
GlobalTaxCalculation:
optional
GlobalTaxCalculationEnum, default is TaxExcluded
Method in which tax is applied. Allowed values are: TaxExcluded, TaxInclusive, and NotApplicable.
TransactionLocationType:
optional
minor version 4
String, default is WithinFrance
The account location. Valid values include:
  • WithinFrance
  • FranceOverseas
  • OutsideFranceWithEU
  • OutsideEU

For France locales, only.

Void a salesreceipt

REQUEST URL
Sandbox Base URL: https://sandbox-quickbooks.api.intuit.com
Production Base URL: https://quickbooks.api.intuit.com

Operation: POST /v3/company/<realmID>/salesreceipt?operation=update&include=void or
           POST /v3/company/<realmID>/salesreceipt?include=void
Content type: application/json

Use a sparse update operation with include=void to void an existing SalesReceipt object; include a minimum of SalesReceipt.Id and SalesReceipt.SyncToken. The transaction remains active but all amounts and quantities are zeroed and the string, Voided, is injected into SalesReceipt.PrivateNote, prepended to existing text if present. If a sales receipt is paid and funds have been deposited, you must delete the associated deposit object before voiding the salesreceipt object.

Request body
SAMPLE REQUEST
{ "sparse": true, "Id": "161", "SyncToken": "0" }

SAMPLE REQUEST
<SalesReceipt xmlns="http://schema.intuit.com/finance/v3" domain="QBO" sparse="true"> <Id>38</Id> <SyncToken>0</SyncToken> </SalesReceipt>

Id:
required for update
String, filterable, sortable
Unique identifier for this object.
Sort order is ASC by default.
SyncToken:
required for update
String
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData:
optional
ModificationMetaData
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
CustomField [0..3]:
optional
CustomField
Custom field or data extension.
DocNumber:
optional
String, maximum of 21 chars, filterable, sortable
Reference number for the transaction. If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:
  • If Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
  • If Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.
If Preferences:CustomTxnNumber is false and a value is supplied, that value is stored even if it is a duplicate. Recommended best practice: check the setting of Preferences:CustomTxnNumber before setting DocNumber.
Sort order is ASC by default.
TxnDate:
optional
Date, filterable, sortable, default is current server date
The date entered by the user when this transaction occurred.
For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
Sort order is ASC by default.
DepartmentRef:
optional
ReferenceType, default is null
A reference to a Department object specifying the location of the transaction. Available if Preferences.AccountingInfoPrefs.TrackDepartments is set to true.
Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.
PrivateNote:
optional
String, max of 4000 chars, default is null
User entered, organization-private note about the transaction. This note does not appear on the transaction form to the customer. This field maps to the Memo field on the Sales Receipt form.
Line [0..n]: <
required
Line
Individual line items of a transaction. Valid Line types include:
Sales item line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Group item line type:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
DetailType:
required
LineDetailTypeEnum
Set to GroupLineDetailfor this type of line.
GroupLineDetail:
required
GroupLineDetail
GroupItemRef:
optional
ReferenceType
Reference to a group item for all the lines that belong to the bundle. Query the Item name list resource to determine the appropriate Item group object (Item.Type=Group) for this reference. Use Item.Id and Item.Name from that object for GroupItemRef.value and GroupItemRef.name, respectively.
Quantity:
optional
Decimal, default is 1
Quantity of the group item.
Line [0..n]:
optional
Line
Individual ItemLine elements that comprise a bundle. Returned in responses.
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Description only:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars A string representing one of the following:
  • Free form text description of the line item that appears in the printed record.
  • A subtotal line inline with other lines on the sales form and holds the sum of amounts on all lines above it. This is distinct from the overall transaction subtotal represented with a SubTotal detail line.
    • In create requests, set to Subtotal: (case sensitive) to create the subtotal line; the amount is generated by QuickBooks Online business logic.
    • In read requests, lines with Subtotal: nn.nn returned in this field denote subtotal lines in the object.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DescriptionOnlyfor this type of line.
DescriptionLineDetail:
optional
DescriptionLineDetail
ServiceDate:
optional
Date
Date when the service is performed.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Discount line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation. Not supported for BillPayment, Estimate, Invoice, or Payment objects.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DiscountLineDetailfor this type of line.
DiscountLineDetail:
optional
DiscountLineDetail
Discount detail type for the entire transaction. This is in contrast to a discount applied to a specific line. The company preference Sales Form Entry | Discounts must be enabled for this type of line to be available.
PercentBased:
optional
Boolean
True if the discount is a percentage; null or false if discount based on amount.
DiscountPercent:
optional
Decimal
Percentage by which the amount due is reduced, from 0% to 100%. To enter a discount of 8.5% use 8.5, not 0.085.
DiscountAccountRef:
optional
ReferenceType
Income account used to track discounts. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Income and Account.AccountSubType=DiscountsRefundsGiven. Use Account.Id and Account.Name from that object for DiscountAccountRef.value and DiscountAccountRef.name, respectively.
ClassRef:
optional
ReferenceType
Reference to the Class associated with this discount. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
TaxCodeRef:
optional
ReferenceType
The TaxCodeassociated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Subtotal Line (read-only):
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to SubtotalLineDetailfor this type of line.
SubtotalLineDetail:
optional
Subtotal LineDetail
ItemRef:
optional
ReferenceType
Reference to the Item. Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively. When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored.
For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
TxnTaxDetail:
optional
TxnTaxDetail
This element provides information for taxes charged on the transaction as a whole. It captures the details sales taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction. See Global tax model for more information about this element.
CustomerRef:
required
ReferenceType, filterable
Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
CustomerMemo:
optional
MemoRef
User-entered message to the customer; this message is visible to end user on their transactions.
BillAddr:
optional
PhysicalAddress
Bill-to address of the Invoice. If BillAddris not specified, and a default Customer:BillingAddr is specified in QuickBooks for this customer, the default bill-to address is used by QuickBooks.
ShipAddr:
optional
PhysicalAddress
Identifies the address where the goods must be shipped. If ShipAddris not specified, and a default Customer:ShippingAddr is specified in QuickBooks for this customer, the default ship-to address will be used by QuickBooks.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the transaction. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerTxn is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
ShipMethodRef:
optional
ReferenceType
Reference to the ShipMethod associated with the transaction. There is no shipping method list. Reference resolves to a string.
ShipDate:
optional
Date, default is null
Location of the transaction, as defined using location tracking in QuickBooks Online.
TrackingNum:
optional
String, default is null
Shipping provider's tracking number for the delivery of the goods associated with the transaction.
TotalAmt:
optional
BigDecimal, filterable, read-only
Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
PrintStatus:
optional
String, default is NotSet
; Printing status of the invoice.
Valid values: NotSet, NeedToPrint, PrintComplete .
EmailStatus:
optional
String, default is Null
EMail status of the receipt.
Valid values: NotSet, NeedToSend, EmailSent .
BillEmail:
required if EmailStatus=NeedToSend
EmailAddress
Identifies the e-mail address where the invoice is sent.
DeliveryInfo:
optional
DeliveryInfo, read-only
Email delivery information. Returned when a request has been made to deliver email with the send operation.
Balance:
optional
Decimal, filterable, sortable, read-only
The balance reflecting any payments made against the transaction. Initially set to the value of TotalAmt. A Balance of 0 indicates the invoice is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
HomeBalance:
optional
minor version 3
Decimal, read-only, applicable if multicurrency is enabled for the company
Convenience field containing the amount in Balance expressed in terms of the home currency. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified and available when endpoint is evoked with the minorversion=3 query parameter.
PaymentMethodRef:
optional
ReferenceType, default is null
Reference to a PaymentMethod associated with this transaction. Query the PaymentMethod name list resource to determine the appropriate PaymentMethod object for this reference. Use PaymentMethod.Id and PaymentMethod.Name from that object for PaymentMethodRef.value and PaymentMethodRef.name, respectively.
PaymentRefNum:
optional
String, max 21 characters
The reference number for the payment received. For example,  Check # for a check, envelope # for a cash donation.
CreditCardPayment:
optional
CreditCardPayment
Information about a credit card payment for the transaction. Used when PaymentType is CreditCard. Inject with data only if the payment was transacted through Intuit Payments API.
TxnSource:
optional
String
Used internally to specify originating source of a credit card transaction.
ApplyTaxAfterDiscount:
optional
Boolean
If false or null, calculate the sales tax first, and then apply the discount. If true, subtract the discount first and then calculate the sales tax.
Default Value: false
Constraints: US versions of QuickBooks only.
DepositToAccountRef:
optional
ReferenceType
Account from which payment money is deposited. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType is Other Current Asset or Bank. Use Account.Id and Account.Name from that object for DepositToAccountRef.value and DepositToAccountRef.name, respectively.
If you do not specify this account, payment is applied to the Undeposited Funds account.
CurrencyRef:
required if multicurrency is enabled for the company
CurrencyRefType
Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
Multicurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here.
ExchangeRate:
optional
Decimal, default is 1, applicable if multicurrency is enabled for the company
The number of home currency units it takes to equal one unit of currency specified by CurrencyRef.
HomeTotalAmt:
optional
Decimal, read-only, applicable if multicurrency is enabled for the company
Total amount of the transaction in the home currency. Includes the total of all the charges, allowances and taxes. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified.
GlobalTaxCalculation:
optional
GlobalTaxCalculationEnum, default is TaxExcluded
Method in which tax is applied. Allowed values are: TaxExcluded, TaxInclusive, and NotApplicable.
TransactionLocationType:
optional
minor version 4
String, default is WithinFrance
The account location. Valid values include:
  • WithinFrance
  • FranceOverseas
  • OutsideFranceWithEU
  • OutsideEU

For France locales, only.
Returns
SAMPLE RESPONSE
{ "SalesReceipt": { "domain": "QBO", "sparse": false, "Id": "161", "SyncToken": "1", "MetaData": { "CreateTime": "2014-12-31T16:17:23-08:00", "LastUpdatedTime": "2015-02-09T12:29:53-08:00" }, "CustomField": [ { "DefinitionId": "1", "Name": "Crew #", "Type": "StringType" } ], "DocNumber": "1038", "TxnDate": "2014-12-31", "CurrencyRef": { "value": "USD", "name": "United States Dollar" }, "PrivateNote": "Voided", "Line": [ { "Id": "1", "LineNum": 1, "Amount": 0, "DetailType": "SalesItemLineDetail", "SalesItemLineDetail": { "ItemRef": { "value": "1", "name": "Services" }, "Qty": 0, "TaxCodeRef": { "value": "NON" } } }, { "Amount": 0, "DetailType": "SubTotalLineDetail", "SubTotalLineDetail": {} } ], "TxnTaxDetail": { "TotalTax": 0 }, "CustomerRef": { "value": "1", "name": "Amy's Bird Sanctuary" }, "CustomerMemo": { "value": "Thank you for your business and have a great day!" }, "BillAddr": { "Id": "97", "Line1": "4581 Finch St.", "City": "Bayshore", "CountrySubDivisionCode": "CA", "PostalCode": "94326" }, "ShipAddr": { "Id": "98", "Line1": "4581 Finch St.", "City": "Bayshore", "CountrySubDivisionCode": "CA", "PostalCode": "94326" }, "TotalAmt": 0, "ApplyTaxAfterDiscount": false, "PrintStatus": "NeedToPrint", "EmailStatus": "NotSet", "BillEmail": { "Address": "virti_vora@Intuit.com" }, "Balance": 0, "DepositToAccountRef": { "value": "4", "name": "Undeposited Funds" } }, "time": "2015-02-09T12:29:52.970-08:00" }

SAMPLE RESPONSE
<IntuitResponse xmlns="http://schema.intuit.com/finance/v3" time="2015-02-09T12:25:12.488-08:00"> <SalesReceipt domain="QBO" sparse="false"> <Id>38</Id> <SyncToken>1</SyncToken> <MetaData> <CreateTime>2014-11-07T11:15:46-08:00</CreateTime> <LastUpdatedTime>2015-02-09T12:25:12-08:00</LastUpdatedTime> </MetaData> <CustomField> <DefinitionId>1</DefinitionId> <Name>Crew #</Name> <Type>StringType</Type> </CustomField> <DocNumber>1011</DocNumber> <TxnDate>2014-11-07</TxnDate> <PrivateNote>Voided</PrivateNote> <Line> <Id>1</Id> <LineNum>1</LineNum> <Description>Pest Control Services</Description> <Amount>0</Amount> <DetailType>SalesItemLineDetail</DetailType> <SalesItemLineDetail> <ItemRef name="Pest Control">10</ItemRef> <Qty>0</Qty> <TaxCodeRef>NON</TaxCodeRef> </SalesItemLineDetail> </Line> <Line> <Amount>0</Amount> <DetailType>SubTotalLineDetail</DetailType> <SubTotalLineDetail/> </Line> <TxnTaxDetail> <TotalTax>0</TotalTax> </TxnTaxDetail> <CustomerRef name="Pye's Cakes">15</CustomerRef> <CustomerMemo>Thank you for your business and have a great day!</CustomerMemo> <BillAddr> <Id>57</Id> <Line1>Karen Pye Pye's Cakes 350 Mountain View Dr. South Orange, NJ 07079</Line1> </BillAddr> <ShipAddr> <Id>96</Id> <Line1>350 Mountain View Dr.</Line1> <City>South Orange</City> <CountrySubDivisionCode>NJ</CountrySubDivisionCode> <PostalCode>07079</PostalCode> </ShipAddr> <TotalAmt>0</TotalAmt> <ApplyTaxAfterDiscount>false</ApplyTaxAfterDiscount> <PrintStatus>NotSet</PrintStatus> <EmailStatus>NotSet</EmailStatus> <BillEmail> <Address>karen@pye.com</Address> </BillEmail> <Balance>0</Balance> <PaymentMethodRef name="Cash">1</PaymentMethodRef> <DepositToAccountRef name="Undeposited Funds">4</DepositToAccountRef> </SalesReceipt> </IntuitResponse>

The SalesReceipt response body.

Id:
required for update
String, filterable, sortable
Unique identifier for this object.
Sort order is ASC by default.
SyncToken:
required for update
String
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData:
optional
ModificationMetaData
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
CustomField [0..3]:
optional
CustomField
Custom field or data extension.
DocNumber:
optional
String, maximum of 21 chars, filterable, sortable
Reference number for the transaction. If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:
  • If Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
  • If Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.
If Preferences:CustomTxnNumber is false and a value is supplied, that value is stored even if it is a duplicate. Recommended best practice: check the setting of Preferences:CustomTxnNumber before setting DocNumber.
Sort order is ASC by default.
TxnDate:
optional
Date, filterable, sortable, default is current server date
The date entered by the user when this transaction occurred.
For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
Sort order is ASC by default.
DepartmentRef:
optional
ReferenceType, default is null
A reference to a Department object specifying the location of the transaction. Available if Preferences.AccountingInfoPrefs.TrackDepartments is set to true.
Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.
PrivateNote:
optional
String, max of 4000 chars, default is null
User entered, organization-private note about the transaction. This note does not appear on the transaction form to the customer. This field maps to the Memo field on the Sales Receipt form.
Line [0..n]: <
required
Line
Individual line items of a transaction. Valid Line types include:
Sales item line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Group item line type:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
DetailType:
required
LineDetailTypeEnum
Set to GroupLineDetailfor this type of line.
GroupLineDetail:
required
GroupLineDetail
GroupItemRef:
optional
ReferenceType
Reference to a group item for all the lines that belong to the bundle. Query the Item name list resource to determine the appropriate Item group object (Item.Type=Group) for this reference. Use Item.Id and Item.Name from that object for GroupItemRef.value and GroupItemRef.name, respectively.
Quantity:
optional
Decimal, default is 1
Quantity of the group item.
Line [0..n]:
optional
Line
Individual ItemLine elements that comprise a bundle. Returned in responses.
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
For Invoice objects in global locales: when updating Amount, remove the TxnTaxDetail element in the object before submitting it in the update request payload.
DetailType:
required
LineDetailTypeEnum
Set to SalesItemLineDetailfor this type of line.
SalesItemLineDetail:
optional
SalesItemLineDetail
ItemRef:
optional
ReferenceType
Reference to an Item object.
  • Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively.
  • Set ItemRef.value to SHIPPING_ITEM_ID when Line.amount represents transaction-wide shipping charges. Valid when Preferences.SalesFormsPrefs.AllowShipping is set to true.
  • When a line lacks an ItemRef it is treated as documentation and the Line.Amountattribute is ignored.

For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class for the line item. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal
Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency. You can override the unit price of the subject item by supplying a new value with create or update operations.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
ServiceDate:
optional
Date
Date when the service is performed.
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Description only:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars A string representing one of the following:
  • Free form text description of the line item that appears in the printed record.
  • A subtotal line inline with other lines on the sales form and holds the sum of amounts on all lines above it. This is distinct from the overall transaction subtotal represented with a SubTotal detail line.
    • In create requests, set to Subtotal: (case sensitive) to create the subtotal line; the amount is generated by QuickBooks Online business logic.
    • In read requests, lines with Subtotal: nn.nn returned in this field denote subtotal lines in the object.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DescriptionOnlyfor this type of line.
DescriptionLineDetail:
optional
DescriptionLineDetail
ServiceDate:
optional
Date
Date when the service is performed.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Discount line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation. Not supported for BillPayment, Estimate, Invoice, or Payment objects.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to DiscountLineDetailfor this type of line.
DiscountLineDetail:
optional
DiscountLineDetail
Discount detail type for the entire transaction. This is in contrast to a discount applied to a specific line. The company preference Sales Form Entry | Discounts must be enabled for this type of line to be available.
PercentBased:
optional
Boolean
True if the discount is a percentage; null or false if discount based on amount.
DiscountPercent:
optional
Decimal
Percentage by which the amount due is reduced, from 0% to 100%. To enter a discount of 8.5% use 8.5, not 0.085.
DiscountAccountRef:
optional
ReferenceType
Income account used to track discounts. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Income and Account.AccountSubType=DiscountsRefundsGiven. Use Account.Id and Account.Name from that object for DiscountAccountRef.value and DiscountAccountRef.name, respectively.
ClassRef:
optional
ReferenceType
Reference to the Class associated with this discount. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
TaxCodeRef:
optional
ReferenceType
The TaxCodeassociated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.

Subtotal Line (read-only):
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to SubtotalLineDetailfor this type of line.
SubtotalLineDetail:
optional
Subtotal LineDetail
ItemRef:
optional
ReferenceType
Reference to the Item. Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively. When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored.
For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
TxnTaxDetail:
optional
TxnTaxDetail
This element provides information for taxes charged on the transaction as a whole. It captures the details sales taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction. See Global tax model for more information about this element.
CustomerRef:
required
ReferenceType, filterable
Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
CustomerMemo:
optional
MemoRef
User-entered message to the customer; this message is visible to end user on their transactions.
BillAddr:
optional
PhysicalAddress
Bill-to address of the Invoice. If BillAddris not specified, and a default Customer:BillingAddr is specified in QuickBooks for this customer, the default bill-to address is used by QuickBooks.
ShipAddr:
optional
PhysicalAddress
Identifies the address where the goods must be shipped. If ShipAddris not specified, and a default Customer:ShippingAddr is specified in QuickBooks for this customer, the default ship-to address will be used by QuickBooks.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the transaction. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerTxn is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
ShipMethodRef:
optional
ReferenceType
Reference to the ShipMethod associated with the transaction. There is no shipping method list. Reference resolves to a string.
ShipDate:
optional
Date, default is null
Location of the transaction, as defined using location tracking in QuickBooks Online.
TrackingNum:
optional
String, default is null
Shipping provider's tracking number for the delivery of the goods associated with the transaction.
TotalAmt:
optional
BigDecimal, filterable, read-only
Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
PrintStatus:
optional
String, default is NotSet
; Printing status of the invoice.
Valid values: NotSet, NeedToPrint, PrintComplete .
EmailStatus:
optional
String, default is Null
EMail status of the receipt.
Valid values: NotSet, NeedToSend, EmailSent .
BillEmail:
required if EmailStatus=NeedToSend
EmailAddress
Identifies the e-mail address where the invoice is sent.
DeliveryInfo:
optional
DeliveryInfo, read-only
Email delivery information. Returned when a request has been made to deliver email with the send operation.
Balance:
optional
Decimal, filterable, sortable, read-only
The balance reflecting any payments made against the transaction. Initially set to the value of TotalAmt. A Balance of 0 indicates the invoice is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
HomeBalance:
optional
minor version 3
Decimal, read-only, applicable if multicurrency is enabled for the company
Convenience field containing the amount in Balance expressed in terms of the home currency. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified and available when endpoint is evoked with the minorversion=3 query parameter.
PaymentMethodRef:
optional
ReferenceType, default is null
Reference to a PaymentMethod associated with this transaction. Query the PaymentMethod name list resource to determine the appropriate PaymentMethod object for this reference. Use PaymentMethod.Id and PaymentMethod.Name from that object for PaymentMethodRef.value and PaymentMethodRef.name, respectively.
PaymentRefNum:
optional
String, max 21 characters
The reference number for the payment received. For example,  Check # for a check, envelope # for a cash donation.
CreditCardPayment:
optional
CreditCardPayment
Information about a credit card payment for the transaction. Used when PaymentType is CreditCard. Inject with data only if the payment was transacted through Intuit Payments API.
TxnSource:
optional
String
Used internally to specify originating source of a credit card transaction.
ApplyTaxAfterDiscount:
optional
Boolean
If false or null, calculate the sales tax first, and then apply the discount. If true, subtract the discount first and then calculate the sales tax.
Default Value: false
Constraints: US versions of QuickBooks only.
DepositToAccountRef:
optional
ReferenceType
Account from which payment money is deposited. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType is Other Current Asset or Bank. Use Account.Id and Account.Name from that object for DepositToAccountRef.value and DepositToAccountRef.name, respectively.
If you do not specify this account, payment is applied to the Undeposited Funds account.
CurrencyRef:
required if multicurrency is enabled for the company
CurrencyRefType
Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
Multicurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here.
ExchangeRate:
optional
Decimal, default is 1, applicable if multicurrency is enabled for the company
The number of home currency units it takes to equal one unit of currency specified by CurrencyRef.
HomeTotalAmt:
optional
Decimal, read-only, applicable if multicurrency is enabled for the company
Total amount of the transaction in the home currency. Includes the total of all the charges, allowances and taxes. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified.
GlobalTaxCalculation:
optional
GlobalTaxCalculationEnum, default is TaxExcluded
Method in which tax is applied. Allowed values are: TaxExcluded, TaxInclusive, and NotApplicable.
TransactionLocationType:
optional
minor version 4
String, default is WithinFrance
The account location. Valid values include:
  • WithinFrance
  • FranceOverseas
  • OutsideFranceWithEU
  • OutsideEU

For France locales, only.

Query a salesreceipt

REQUEST URL
Sandbox Base URL: https://sandbox-quickbooks.api.intuit.com
Production Base URL: https://quickbooks.api.intuit.com

Operation: GET /v3/company/<realmID>/query?query=<selectStatement>
Content type: application/text

Sample queries

SAMPLE QUERY
select * from SalesReceipt where id='11'

SAMPLE QUERY
select * from SalesReceipt where id = '11'

Returns

Returns the results of the query.

All complex types are listed below.

accountrequest

Name:
required
String, required, max 100 characters
User recognizable name for the Account. Account.Name attribute must not contain double quotes (") or colon (:).
AccountType:
required if AccountSubType is not specified
AccountTypeEnum,required if AccountSubType is not specified, filterable
A detailed account classification that specifies the use of this account. The type is based on the Classification.
AccountSubType:
required if AccountType is not specified
String, required if AccountType is not specified, filterable
AThe account sub-type classification and is based on the AccountType value.
AcctNum:
required for France locales
String, default is null
User-defined account number to help the user in identifying the account within the chart-of-accounts and in deciding what should be posted to the account. The Account.AcctNum attribute must not contain colon (:).
For France locales:
  • Name must be unique.
  • Length must be between 6 and 15 characters
  • Must start with the account number from the master category list.
  • Name limited to alpha-numeric characters.
TaxCodeRef:
required for France locales
minor version 3
ReferenceType
Reference to the default tax code used by this account. Tax codes are referenced by the TaxCode.Id in the TaxCode object. Available when endpoint is invoked with the minorversion=3 query parameter. For global locales, only.

accountresponse

Id:
required for update
String, filterable, sortable
Unique identifier for this object.
Sort order is ASC by default.
SyncToken:
required for update
String
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData:
optional
ModificationMetaData
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
Name:
required
String, max 100 characters
User recognizable name for the Account. Account.Name attribute must not contain double quotes (") or colon (:).
SubAccount:
optional
Boolean, system generated, filterable, sortable, read-only
Specifies whether this object represents a parent (false) or subaccount (true).
ParentRef:
optional
ReferenceType, filterable, sortable, default is null
Specifies the Parent AccountId if this represents a SubAccount.
Description:
optional
String, maximum of 100 chars, filterable, sortable, default is null
User entered description for the account, which may include user entered information to guide bookkeepers/accountants in deciding what journal entries to post to the account.
FullyQualifiedName:
optional
String, system generated, filterable, sortable, read-only
Fully qualified name of the object; derived from Name and ParentRef. The fully qualified name prepends the topmost parent, followed by each subaccount separated by colons and takes the form of Parent:Account1:SubAccount1:SubAccount2. System generated. Limited to 5 levels.
Active:
optional
Boolean, filterable, default is true
Whether or not active inactive accounts may be hidden from most display purposes and may not be posted to.
Classification:
optional
String, filterable, default is derived from AccountType and AccountSubtype
The classification of an account. Not supported for non-posting accounts.
Valid values include: Asset, Equity, Expense, Liability, Revenue
AccountType:
required if AccountSubType is not specified
AccountTypeEnum, filterable
A detailed account classification that specifies the use of this account. The type is based on the Classification.
AccountSubType:
required if AccountType is not specified
String, filterable
The account sub-type classification and is based on the AccountType value.
AcctNum:
required for France locales
String, default is null
User-defined account number to help the user in identifying the account within the chart-of-accounts and in deciding what should be posted to the account. The Account.AcctNum attribute must not contain colon (:).
For France locales:
  • Name must be unique.
  • Length must be between 6 and 15 characters
  • Must start with the account number from the master category list.
  • Name limited to alpha-numeric characters.
CurrentBalance:
optional
Decimal, filterable, sortable, read-only
Specifies the balance amount for the current Account. Valid for Balance Sheet accounts.
CurrentBalanceWithSubAccounts:
optional
Decimal, filterable, sortable, read-only
Specifies the cumulative balance amount for the current Account and all its sub-accounts.
CurrencyRef:
optional
CurrencyRef
Reference to the currency in which this account holds amounts.
TaxCodeRef:
minor version 3
ReferenceType, default is null
Reference to the default tax code used by this account. Tax codes are referenced by the TaxCode.Id in the TaxCode object. Available when endpoint is invoked with the minorversion=3 query parameter. For global locales, only.
AccountAlias:
minor version 5
String, default is value of Account.Name
A user friendly name for the account. It must be unique across all account categories. For France locales, only.
For example, if an account is created under category 211 with AccountAlias of Terrains, then the system does not allow creation of an account with same AccountAlias of Terrains for any other category except 211. In other words, 211001 and 215001 accounts cannot have same AccountAlias because both belong to different account category.
For France locales, only.
TxnLocationType
minor version 5
String, default is WithinFrance
The account location. Valid values include:
  • WithinFrance
  • FranceOverseas
  • OutsideFranceWithEU
  • OutsideEU

For France locales, only.

attachablerequest

AttachableRef [0..n]:
optional
AttachableRef
Specifies the transaction object to which this attachable file is to be linked.
FileName:
required for file attachments
String, maximum 1000 chars, filterable, sortable, default is null
FileName of the attachment.
Note:
required for note attachments
String, max 2000 chars, filterable, sortable
The note is either related to the attachment specified with the FileName attribute, or as a standalone note.

attachableresponse

Id:
required for update
IdType, filterable, sortable
Unique Identifier for an Intuit entity (object).
Required for the update operation.
SyncToken:
required for update
String, read-only
Version number of the entity.
Required for the update operation.
MetaData:
optional
ModificationMetaData
Descriptive information about the entity. The MetaData values are set by Data Services and are read only for all applications.
AttachableRef [0..n]:
optional
AttachableRef
Specifies the transaction object to which this attachable file is to be linked.
FileName:
required for file attachments
String, maximum 1000 chars, filterable, sortable, default is null
FileName of the attachment.
Note:
required for standalone notes
String, max 2000 chars, filterable, sortable
This note is either related to the attachment specified by FileName or is a standalone note.
FileAccessUri:
optional
String, read-only, default is null
FullPath FileAccess URI of the attachment. Returned for file attachments.
TempDownloadUri:
optional
String, read-only, default is null
TempDownload URI which can be directly downloaded by clients. Returned for file attachments.
Size:
optional
Decimal, filterable, sortable, default is null
Size of the attachment. Returned for file attachments.
ContentType:
optional
String, max 100 chars, filterable, sortable, default is null
ContentType of the attachment. Returned for file attachments.
Category:
optional
String, max 100 chars, filterable, sortable, default is null
Category of the attachment. Valid values include (case sensitive): Contact Photo, Document, Image, Receipt, Signature, Sound, Other.
Lat:
optional
String, max 100 chars, filterable, sortable, default is null
Latitude from where the attachment was requested.
Long:
optional
String, max 100 chars, filterable, sortable, default is null
Longitude from where the attachment was requested.
PlaceName:
optional
String, max 2000 chars, filterable, sortable, default is null
PlaceName from where the attachment was requested.
Tag:
optional
String, max 2000 chars, filterable, sortable, default is null
Tag name for the requested attachment.
ThumbnailFileAccessUri:
optional
String, read-only, default is null
FullPath FileAccess URI of the attachment thumbnail if the attachment file is of a content type with thumbnail support. Returned for file attachments.
ThumbnailTempDownloadUri:
optional
String, read-only, filterable, sortable
Thumbnail TempDownload URI which can be directly downloaded by clients. This is only available if the attachment file is of a content type with thumbnail support. Returned for file attachments.

accounttypes

Classification

AccountType

AccountSubType

Asset Bank CashOnHand (default)
Checking
MoneyMarket
RentsHeldInTrust
Savings
TrustAccounts
Other Current Asset AllowanceForBadDebts
DevelopmentCosts
EmployeeCashAdvances (default)
OtherCurrentAssets
Inventory
Investment_MortgageRealEstateLoans
Investment_Other
Investment_TaxExemptSecurities
Investment_USGovernmentObligations
LoansToOfficers
LoansToOthers
LoansToStockholders
PrepaidExpenses
Retainage
UndepositedFunds
Fixed Asset AccumulatedDepletion
AccumulatedDepreciation
DepletableAssets
FurnitureAndFixtures (default)
Land
LeaseholdImprovements
OtherFixedAssets
AccumulatedAmortization
Buildings
IntangibleAssets
MachineryAndEquipment
Vehicles
Other Asset LeaseBuyout
OtherLongTermAssets
SecurityDeposits
AccumulatedAmortizationOfOtherAssets
Goodwill
Licenses (default)
OrganizationalCosts
Accounts Receivable AccountsReceivable
Equity Equity OpeningBalanceEquity (default)
PartnersEquity
RetainedEarnings
AccumulatedAdjustment
OwnersEquity
PaidInCapitalOrSurplus
​PartnerContributions
PartnerDistributions
PreferredStock
CommonStock
TreasuryStock
Expense Expense AdvertisingPromotional
BadDebts
BankCharges
CharitableContributions
Entertainment
EntertainmentMeals
EquipmentRental
FinanceCosts
GlobalTaxExpense
Insurance
InterestPaid
LegalProfessionalFees
OfficeGeneralAdministrativeExpenses
OtherMiscellaneousServiceCost
PromotionalMeals
RentOrLeaseOfBuildings
RepairMaintenance
ShippingFreightDelivery
SuppliesMaterials
Travel (default)
TravelMeals
Utilities
Auto
CostOfLabor
DuesSubscriptions
PayrollExpenses
TaxesPaid
UnappliedCashBillPaymentExpense
OtherExpense Depreciation (default)
ExchangeGainOrLoss
OtherMiscellaneousExpense
PenaltiesSettlements
Amortization
CostOfGoodsSold EquipmentRentalCos
OtherCostsOfServiceCos
ShippingFreightDeliveryCos
SuppliesMaterialsCogs
CostOfLaborCos (default)
Liability Accounts Payable AccountsPayable
CreditCard CreditCard
LongTermLiability NotesPayable (default)
OtherLongTermLiabilities
ShareholderNotesPayable
OtherCurrentLiability DirectDepositPayable
LineOfCredit
LoanPayable
GlobalTaxPayable
GlobalTaxSuspense
OtherCurrentLiabilities (default)
PayrollClearing
PayrollTaxPayable
PrepaidExpensesPayable
RentsInTrustLiability
TrustAccountsLiabilities
FederalIncomeTaxPayable
InsurancePayable
SalesTaxPayable
StateLocalIncomeTaxPayable
Revenue Income NonProfitIncome
OtherPrimaryIncome (default)
SalesOfProductIncome
ServiceFeeIncome
DiscountsRefundsGiven
UnappliedCashPaymentIncome
OtherIncome DividendIncome
InterestEarned
OtherInvestmentIncome (default)
OtherMiscellaneousIncome
TaxExemptInterest

accountbasedexpenseline

Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to AccountBasedExpenseLineDetailfor this type of line.
AccountBasedExpenseLineDetail:
optional
AccountBasedExpense LineDetail
CustomerRef:
optional
ReferenceType
​Reference to the Customer associated with the expense. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the expense. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
AccountRef:
optional
ReferenceType
Reference to the Expense account associated with this item. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Expense. Use Account.Id and Account.Name from that object for AccountRef.value and AccountRef.name, respectively.
For France locales: The account associated with the referenced Account object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then this account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
BillableStatus:
optional
String
The billable status of the expense.
Constraints: Valid values: Billable, NotBillable, HasBeenBilled
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
TaxAmount:
optional
Decimal
Sales tax paid as part of the expense.
TaxCodeRef:
optional
ReferenceType
The TaxCodeassociated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
TaxInclusiveAmt:
optional
minor version 1
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

accountbasedexpenselinedetail

CustomerRef:
optional
ReferenceType
​Reference to the Customer associated with the expense. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the expense. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
AccountRef:
optional
ReferenceType
Reference to the Expense account associated with this item. Query the Account name list resource to determine the appropriate Account object for this reference, where Account.AccountType=Expense. Use Account.Id and Account.Name from that object for AccountRef.value and AccountRef.name, respectively.
For France locales: The account associated with the referenced Account object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then this account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
BillableStatus:
optional
String
The billable status of the expense.
Constraints: Valid values: Billable, NotBillable, HasBeenBilled
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
TaxAmount:
optional
Decimal
Sales tax paid as part of the expense.
TaxCodeRef:
optional
ReferenceType
The TaxCodeassociated with the sales tax for the expense. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
TaxInclusiveAmt:
optional
minor version 1
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

attachableref

EntityRef:
optional
ReferenceType, Filterable
Object reference to which this attachment is linked.
  • Set EntityRef.value with the Id of the target object as returned in its response body when queried.
  • Set EntityRef.type with the specific type of the target object. For example, invoice, bill, item, etc.
LineInfo:
optional
String, Filterable
For transaction objects, used to reference a transaction detail line.
IncludeOnSend:
optional
Boolean, Filterable
Used when EntityRef.type references a transaction object. This field indicates whether or not the attachment is sent with the transaction when Save and Send button is clicked in the QuickBooks UI or when the Send endpoint (send email) is invoked for the object.
Inactive:
optional
Boolean, Filterable, default is false
Indicates whether or not to include references to hidden entities when filtering. When set to true , hidden references are returned in the result set.
For filtering results, it works with AttachableRef.EntityRef.Type , AttachableRef.EntityRef.Value and AttachableRef.NoRefOnly filters in combination.
NoRefOnly:
optional
Boolean, Filterable
Indicates whether or not to find attachable records that have no references to any entity. Combine with AttachableRef.Inactiveto return hidden references.
CustomField: [0..n]
optional
CustomField
If the user tries to fetch a record without permission, the permission denied message is conveyed through this field.
DefinitionId:
required
String, read-only.
Unique identifier of the CustomFieldDefinition that corresponds to this CustomField.
Name:
optional
String, read-only
Name of the custom field.
Type:
optional
CustomFieldTypeEnum, read-only
Data type of custom field. Only one type is currently supported: StringType.
StringValue:
optional
String
The value for the StringTypecustom field.

batchrequest

BatchItemRequest [0..n]:
required
batchitemrequest
A wrapper around all request objects for this batch operation.

batchitemrequest

bId:
required
String
Unique identifier for the batch item.
operation:
required for create, update, and delete
String
The operation to perform with the supplied request object payload. Do not use if this batchitemrequest object is for a query operation.
Valid values include: create, update, delete
resourceName:
optional
Request object
The payload for the request for create, update, and delete operations.
Query:
optional
string
The SELECT statement for the query. When Query is defined, do not define the operation attribute. See Querying data for information about creating SELECT statements.

batchresponse

BatchItemResponse [0..n]:
required
batchitemresponse
A wrapper around all response objects for this batch operation.

batchitemresonse

resourceName:
Response object
The payload for the response. If the operation results in an error, a Fault object is returned.
QueryResponse:
array of response objects
The payload for the query response. Returned only if a query operation is specified in the batch request. If the operation results in an error, a Fault object is returned.
bId:
required
String
Unique identifier for the batch item. This corresponds to the id supplied in the corresponding batch item request.

billresponse

Id:
required for update
String, filterable, sortable
Unique identifier for this object.
Sort order is ASC by default.
SyncToken:
required for update
String
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData:
optional
ModificationMetaData
Descriptive information about the object. The MetaData values are set by Data Services and are read only for all applications.
DocNumber:
optional
String, maximum of 21 chars, filterable, sortable
Reference number for the transaction. If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:
  • If Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
  • If Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.
If Preferences:CustomTxnNumber is false and a value is supplied, that value is stored even if it is a duplicate. Recommended best practice: check the setting of Preferences:CustomTxnNumber before setting DocNumber.
Sort order is ASC by default.
TxnDate:
optional
Date, filterable, sortable, default is current server date
The date entered by the user when this transaction occurred.
For posting transactions, this is the posting date that affects the financial statements. If the date is not supplied, the current date on the server is used.
Sort order is ASC by default.
DepartmentRef:
optional
ReferenceType, default is null
A reference to a Department object specifying the location of the transaction, as defined using location tracking in QuickBooks Online. Query the Department name list resource to determine the appropriate department object for this reference. Use Department.Id and Department.Name from that object for DepartmentRef.value and DepartmentRef.name, respectively.
PrivateNote:
optional
String, max of 4000 chars
User entered, organization-private note about the transaction. This note does not appear on the invoice to the customer. This field maps to the Memo field on the Invoice form.
LinkedTxn [0..n]:
optional
LinkedTxn, read-only
Zero or more bill payment transactions linked to this Bill object. The LinkedTxn.TxnType is always set to BillPaymentCheck regardless of payment method. Determine actual payment method by querying the BillPayment.PayType attribute.
Use LinkedTxn.TxnId as the ID in a separate BillPayment read request to retrieve details of the linked object.
Line [0..n]:
required
Line
Individual line items of a transaction. Valid Line types include:
Item based expense line:
Id:
required for update
String
The Id of the line item. Its use in requests is as folllows:
  • If Idis greater than zero and exists for the company, the request is considered an update operation for a line item.
  • If no Idis provided, the Idprovided is less than or equal to zero, or the Idprovided is greater than zero and does not exist for the company then the request is considered a create operation for a line item.
Available in all objects that use lines and support the update operation.
LineNum:
optional
Decimal, positive integer
Specifies the position of the line in the collection of transaction lines.
Description:
optional
String, max 4000 chars
Free form text description of the line item that appears in the printed record.
Amount:
required
Decimal, max 15 digits in 10.5 format
The amount of the line item.
DetailType:
required
LineDetailTypeEnum
Set to ItemBasedExpenseLineDetail for this type of line.
ItemBasedExpenseLineDetail:
optional
ItemBasedExpenseLineDetail
ItemRef:
optional
ReferenceType
Reference to the Item. Query the Item name list resource to determine the appropriate Item object for this reference. Use Item.Id and Item.Name from that object for ItemRef.value and ItemRef.name, respectively. When a line lacks an ItemRef it is treated as documentation and the Line.Amount attribute is ignored.
For France locales: The account associated with the referenced Item object is looked up in the account category list.
  • If this account has same location as specified in the transaction by the TransactionLocationType attribute and the same VAT as in the line item TaxCodeRef attribute, then the item account is used.
  • If there is a mismatch, then the account from the account category list that matches the transaction location and VAT is used.
  • If this account is not present in the account category list, then a new account is created with the new location, new VAT code, and all other attributes as in the default account.
ClassRef:
optional
ReferenceType
Reference to the Class associated with the expense. Available if Preferences.AccountingInfoPrefs.ClassTrackingPerLine is set to true. Query the Class name list resource to determine the appropriate Class object for this reference. Use Class.Id and Class.Name from that object for ClassRef.value and ClassRef.name, respectively.
UnitPrice:
optional
Decimal

Unit price of the subject item as referenced by ItemRef. Corresponds to the Rate column on the QuickBooks Online UI to specify either unit price, a discount, or a tax rate for item.
If used for unit price, the monetary value of the service or product, as expressed in the home currency.
If used for a discount or tax rate, express the percentage as a fraction. For example, specify 0.4 for 40% tax.
PriceLevelRef:
optional
ReferenceType
Reference to the PriceLevel of the service or item for the line. Support for this element will be available in the coming months.
MarkupInfo:
optional
MarkupInfo
Markup information for the expense.
PercentBased:
optional
Boolean
True if the markup is expressed as a percentage.
Value:
optional
Decimal
Markup value.
Percent:
optional
Decimal
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01.
PriceLevelRef:
optional
ReferenceType
Reference to a PriceLevel for the markup. Support for this element will be available in the coming months.
Qty:
optional
Decimal
Number of items for the line.
TaxCodeRef:
optional
ReferenceType
Reference to the TaxCodefor this item. Query the TaxCode name list resource to determine the appropriate TaxCode object for this reference. Use TaxCode.Id and TaxCode.Name from that object for TaxCodeRef.value and TaxCodeRef.name, respectively.
CustomerRef:
optional
ReferenceType
Reference to a customer or job. Query the Customer name list resource to determine the appropriate Customer object for this reference. Use Customer.Id and Customer.DisplayName from that object for CustomerRef.value and CustomerRef.name, respectively.
BillableStatus:
optional
BillableStatusEnum
The billable status of the expense.
Valid values: Billable, NotBillable, HasBeenBill (not available for Bill objects)
TaxInclusiveAmt:
optional
Decimal
The total amount of the line item including tax.
Constraints: Available when endpoint is evoked with the minorversion=1query parameter.

Account based expense line:
TxnTaxDetail:
optional
TxnTaxDetail
This data type provides information for taxes charged on the transaction as a whole. It captures the details of all taxes calculated for the transaction based on the tax codes referenced by the transaction. This can be calculated by QuickBooks business logic or you may supply it when adding a transaction.
VendorRef:
required
ReferenceType, filterable, sortable
Reference to the vendor for this transaction. Query the Vendor name list resource to determine the appropriate Vendor object for this reference. Use Vendor.Id and Vendor.Name from that object for VendorRef.value and VendorRef.name, respectively.
APAccountRef:
optional
ReferenceType, filterable, sortable
Specifies to which AP account the bill is credited. Query the Account name list resource to determine the appropriate Account object for this reference. Use Account.Id and Account.Name from that object for APAccountRef.value and APAccountRef.name, respectively. The specified account must have Account.Classification set to Liability and Account.AccountSubType set to AccountsPayable.
If the company has a single AP account, the account is implied. However, it is recommended that the AP Account be explicitly specified in all cases to prevent unexpected errors when relating transactions to each other.
TotalAmt:
optional
BigDecimal, filterable, sortable, read-only
Indicates the total amount of the transaction. This includes the total of all the charges, allowances, and taxes. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
GlobalTaxCalculation:
optional
GlobalTaxCalculationEnum, default is TaxExcluded
Method in which tax is applied. Allowed values are: TaxExcluded, TaxInclusive, and NotApplicable.
SalesTermRef:
optional
ReferenceType, filterable, sortable
Reference to the Term associated with the transaction. 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 SalesTermRef.value and SalesTermRef.name, respectively.
DueDate:
optional
Date, filterable, sortable
Date when the payment of the transaction is due. If date is not provided, the number of days specified in SalesTermRef added the transaction date will be used.
Balance:
optional
Decimal, filterable, read-only
The balance reflecting any payments made against the transaction. Initially set to the value of TotalAmt. A Balance of 0 indicates the invoice is fully paid. Calculated by QuickBooks business logic; any value you supply is over-written by QuickBooks.
CurrencyRef:
required if multicurrency is enabled for the company
CurrencyRefType
Reference to the currency in which all amounts on the associated transaction are expressed. This must be defined if multicurrency is enabled for the company.
Multicurrency is enabled for the company if Preferences.MultiCurrencyEnabled is set to true. Read more about multicurrency support here.
ExchangeRate:
optional
Decimal, default is 1, applicable if multicurrency is enabled for the company
The number of home currency units it takes to equal one unit of currency specified by CurrencyRef.
HomeBalance:
optional
minor version 3
Decimal, read-only, applicable if multicurrency is enabled for the company
Convenience field containing the amount in Balance expressed in terms of the home currency. Calculated by QuickBooks business logic.
Value is valid only when CurrencyRef is specified and available when endpoint is evoked with the minorversion=3 query parameter.
TransactionLocationType:
optional
minor version 4
String, default is WithinFrance
The account location. Valid values include:
  • WithinFrance
  • FranceOverseas
  • OutsideFranceWithEU
  • OutsideEU

For France locales, only.

billpaymentcheck

BankAccountRef:
required
ReferenceType, filterable, sortable
Reference to the bank account. Query the Account name list resource to determine the appropriate Account object for this reference. Use Account.Id and Account.Name from that object for APAccountRef.value and APAccountRef.name, respectively. The specified account must have Account.AccountType set to Bank and Account.AccountSubType set to Checking.
PrintStatus:
optional
PrintStatusEnum, default is NeedToPrint
Printing status of the invoice.
Valid values: NotSet, NeedToPrint, PrintComplete.

billpaymentcreditcard