Avalara Developer Network Developer communications

Chapter 5.5 - Line Item

Line Item

The LineItem object contains detailed information about a single transaction:

Key Value
ref [string]Reference code
Reference ID for line item.
from [Location] The point of origin for the line item
There are several ways to input location information. See the Location section for more details.
to [Location] The destination of the line item
There are several ways to input location information. See the Location section for more details.
chg [double] Charge Amount
line [int] Number of lines
loc [int] Number of locations
min [double] Number of minutes
sale [int] required Sale Type
Indicates the type transaction, such as retail or wholesale.
  • 0 Wholesale
  • 1 Retail
  • 2 Consumed (Sales and Use Only)
  • 3 Vendor Use (Sales and Use Only)
plsp [double] Private Line Split
A percentage used to split a transaction charge between two points. For example:
  • A transaction has two points: Point 'A' and Point 'Z'
  • A plsp of 0.25 means 25% of the taxes are attributed to Point 'A', the remaining 75% to Point 'Z'
incl [bool] Tax Inclusive
Indicates if the charge for this line item is tax inclusive.
  • true Tax is included in the charge
  • false Tax is exclusive to the charge
pror [double] Pro-rated Percentage
A percentage used for the pro-rated calculation of fixed taxes.
brdg [BridgeData] Bridge Data
A list of Bridge Conference specific settings to apply to the line item.
tran [int] required Transaction Type ID
The first part of the T/S Pair that defines the product to be taxed.
For a list of transaction/service types, check out the /api/v2/afc/tspairs endpoint.
serv [int] required Service Type ID
The second part of the T/S Pair that defines the product to be taxed.
For a list of transaction/service types, check out the /api/v2/afc/tspairs endpoint.
dbt [bool] Debit
Indicates if this line item is a debit card transaction.
  • true Apply debit card logic to the transaction
  • false Not a debit card transaction
adj [bool] IsAdjustment
Indicates if this line item is an adjustment.
  • true The transaction represents a credit or adjustment
  • false The transaction does not represent a credit or adjustment
adjm [int] Adjustment Method
Always set to 0. The use of this field has been deprecated
disc [int] Discount Type for adjustments
  • 0 None
  • 1 Retail Product: An amount subtracted from the original price to arrive at a lower price.
  • 2 Manufacturer Product: A discount of the total amount reimbursed to either the retailer or the customer by the manufacturer.
  • 3 Account Level: A stand-alone discount that is not applied against any service but instead as a stand-alone product.
  • 4 Subsidized: A discount caused exclusively in telephone service where the telephone provider provides a service to a lifeline eligible customer. The discount will be on the local exchange service.
  • 5 Goodwill: The total discount of a service that is recorded for accounting purposes but never billed to a customer.
opt [KeyValuePair] Optional Fields
A list of Optional Fields to apply to the line item.
prop [int] Attribute Property
The Attribute property used for supported Sales and Use Transaction/Service pairs.
bill [Location] Bill To Location
There are several ways to input location information. See the Location section for more details.
cust [int] Customer Type
  • 0: Residential
  • 1: Business
  • 2: Senior Citizen
  • 3: Industrial
lfln [bool] Lifeline
  • true: The customer is a Lifeline participant
  • false: The customer is not a Lifeline participant
Lifeline is a federal program that subsidizes the cost of phone and internet for eligible customers.
date [timestamp] Invoice Date
ex. 2009-12-01T03:00:00
The date when the transaction took place. An accurate timestamp in this field is important! This will affect the rules our tax engine applies when calculating taxes.

For example, if you submit a CalcTaxes request with a date of 7/1/2018, our tax engine will use the rules that apply for your jurisdiction on 7/1/2018. If the transaction actually occurred on 7/25/2018, and the tax rate for this transaction changed after 7/1/2018, you may receive incorrect tax information.

Note

These fields override the same fields set on the Invoice:

  • Bill To (bill)
  • Customer Type (cust)
  • Lifeline (lfln)
  • Invoice Date (date)

Example

"itms": [
  {
    "ref": "Reference Code for Line Item",
    "from": {
      // Location
    },
    "to": {
      // Location
    },
    "chg": 100,
    "line": 0,
    "loc": 0,
    "min": 0,
    "sale": 1,
    "plsp": 0,
    "incl": false,
    "pror": 0,
    "brdg": {
      // Bridge Data
    },
    "tran": 19,
    "serv": 6,
    "dbt": false,
    "adj": false,
    "adjm": 0,
    "disc": 0,
    "opt": [
      {
        // Key Value Pair
      }
    ],
    "prop": 0,
    "bill": {
      // Location
    },
    "cust": 0,
    "lfln": false,
    "date": "2018-09-23T20:31:53.452Z"
  }
]