How do I upload Line Items via Spreadsheet?

TaxJar Professional subscribers can upload line item details via spreadsheets.

In this article:

To upload line items via spreadsheet, please use the sample Line Item Template (V2).

provider Required.
Please use lowercase to map to known providers (such as “ebay” and “amazon”)
transaction_id Required
transaction_type Accepts “Order” or “Refund”. Empty defaults to “Order”.
transaction_reference_id Link refunds to the original order by filling in the order’s transaction_id here. 
Requirement: Needs rows with transaction_type = "Refund"   
transaction_date Required. Please use the ISO-8601 format in either Date or DateTime (YYYY-MM-DD).
Cannot be in a future year. Other date formats can be used, however,  ISO-8601 will always be parsed correctly. 
exemption_type Accepts “wholesale”, “government”, “other”, “marketplace” and “non_exempt”.
If “marketplace” with a known provider such as “amazon”, then we will consult with our research to determine if it’s marketplace exempt.
If sales_tax is nonzero and exemption_type is “wholesale”, “government”, or “other”, then we will reject the row since it should be non-taxed.

item_product_tax_code wins over exemption_type if conflicting.

from_country Use 2-letter country codes (eg: US, CA)
from_zip
from_state Use 2-letter codes. (eg: NY, NC)
from_city
from_street
to_country Required. Use 2-letter country codes (eg: US, CA)
to_zip Required
to_state Required. Use 2-letter or 3-letter codes. (eg: NY, NC)
to_city
to_name
total_shipping If not provided or is 0 and line item shipping is provided, then we will calculate automatically based on provided line items.
total_handling If not provided or is 0 and line item handling is provided, then we will calculate automatically based on provided line items.
total_sales_tax If not provided or is 0 and line item sales tax is provided, then we will calculate automatically based on provided line items.
**If you see an error about the total_sales_tax not matching, please see below here.
item_product_identifier
item_description
item_quantity Empty defaults to 1. Must be positive, even on refunds.
item_unit_price Required
item_shipping Empty defaults to 0. If provided alongside total_shipping, then math will be validated. If the total_shipping is provided and item_shipping is empty or 0, then we will automatically distribute to line items.
item_handling Empty defaults to 0. If provided alongside total_handling, then math will be validated. If the total_handling is provided and item_handling is empty or 0, then we will automatically distribute to line items.
item_discount Empty defaults to 0
item_sales_tax Empty defaults to 0. If provided alongside total_sales_tax, then math will be validated. If the total_sales_tax is provided and item_sales_tax is empty or 0, then we will automatically distribute to line items.
item_product_tax_code If provided, then item_sales_tax should also be supplied for clarity.

Can I still use the Order Level Template (v1)?

Yes, absolutely! 

What happens if transactions fail to upload?

As we mention here, we will provide an error column to specify the errors for transactions that failed to upload. 

  • We offer examples of common transaction errors in your TaxJar account. 
    PLEASE BE SURE NOT TO USE THIS FILE AS A TEMPLATE.
  • If you receive this specific error: total_sales_tax does not match expected <value> from line_itemsthen your total_sales_tax does not equal the sum of your item_sales_tax. 
    To correct, please choose one of the following options:
    • a) Do not pass any values for item_sales_tax for each line item in that order. We'll automatically distribute the total_sales_tax among those line items
    • b) Manually distribute the remaining sales tax from shipping across all of their line item rows in the item_sales_tax so that the total_sales_tax and sum of the item_sales_tax rows are equal

 How do I delete line items from an Order?

If you are updating existing transactions, we show you how to do this here by uploading a spreadsheet file by ensuring the provider and transaction_id values remain the same. 

  • In the V1 template, the order_id column is equivalent to the transaction_id column in the V2 template.
  • In the Order, if you do not include the same line items that were uploaded originally, then any line items that are not included when uploading a CSV to edit an Order, will be deleted.
  • If you wish to delete line items from an Order, then you simply exclude them when uploading the CSV to edit and correct your existing transactions.