# Estimate taxes for advanced features

Source: https://developer.avalara.com/products/crossborder/integration-guides/avatax-for-cdit/trv6207402105248/

Guide: AvaTax Cross-Border (Customs Duty and Import Tax)

# Estimate taxes for advanced features

Learn how to create a sales order transaction to estimate taxes for shipping items without using the AvaTax item catalog.

This example creates a sales order transaction to estimate the taxes that will be calculated when shipping an item without using the AvaTax item catalog. Specifically in this example:

-   The document `type` is a sales order.
-   The `shipFrom` address is in the US.
-   The `shipTo` address is in Germany.
-   The `amount` charged for the item is $950 USD.
-   The `taxCode` is P00000000.
-   The `hsCode` is 6204420090.
-   The `description` is "Cuban Links".
-   The `category` is "Man > Jewelry ; Gold > Bracelet".
-   The `deliveryTerms` are DDP.

The response shows the total tax as well as detailed information about amounts for each tax type.

**Example request**

Create the quote:

```
{
  "lines": [
    {
      "number": "1",
      "quantity": 1,
      "amount": 950,
      "itemCode": "SKU 1000.6",
      "taxCode": "P00000000",
      "description": "Cuban Links",
      "hsCode": "6204420090", // Send customs grade HS Codes by Country and pass to AvaTax
      "category" : "Man > Jewelry ; Gold > Bracelet", // Optionally send category; assuming only partial HS Code provided to get estimated duty
"taxIncluded": false,
"parameters": [
{
  "name": "NetWeight", // If applicable, API will raise an data validation exception if a parameter is missing
  "value": "5",
  "unit": "Pound"
},
{
  "name": "IsPreferredProgram",
  "value": true
},
{
  "name": "CountryOfManufacture",
  "value": "US"
}
      ]
    }
      // Send Freight and Insurance as separate lines where applicable with appropriate Avalara goods and Service Code
   ],
  "type": "SalesOrder",
  "companyCode": "DEFAULT",
  "date": "11-21-2021",
  "customerCode": "test-customer",
  "addresses": {
    "shipFrom": {
      "line1": "",
      "city": "",
      "region": "WA",
      "country": "US",
      "postalCode": "98110"
    },
    "shipTo": {
      "line1": "",
      "city": "",
      "region": "",
      "country": "DE",
      "postalCode": ""
    }
  },
  "isSellerImporterOfRecord": "true",
  "deliveryTerms": "DDP",
  "currencyCode": "USD"
}
```

**Example response**

The response returns a total tax of 316.16 USD broken down into Landed Cost and Output tax types.

```
{
  "id": 0,
  ...
  "totalAmount": 950,
  "totalExempt": 0,
  "totalDiscount": 0,
  "totalTax": 316.16,
  "totalTaxable": 1064,
  "totalTaxCalculated": 316.16,
  ...
  "summary": [
    {
      "country": "DE",
      "region": "DE",
      "jurisType": "Country",
      "jurisCode": "DE",
      "jurisName": "GERMANY",
      "taxAuthorityType": 45,
      "stateAssignedNo": "",
      "taxType": "LandedCost",
      "taxSubType": "ImportDuty",
      "taxName": "DE LandedCost",
      "rateType": "Standard",
      "taxable": 950,
      "rate": 0.12,
      "tax": 114,
      "taxCalculated": 114,
      "nonTaxable": 0,
      "exemption": 0
    },
    {
      "country": "DE",
      "region": "DE",
      "jurisType": "Country",
      "jurisCode": "DE",
      "jurisName": "GERMANY",
      "taxAuthorityType": 45,
      "stateAssignedNo": "",
      "taxType": "Output",
      "taxSubType": "O",
      "taxName": "Standard",
      "rateType": "Standard",
      "taxable": 1064,
      "rate": 0.19,
      "tax": 202.16,
      "taxCalculated": 202.16,
      "nonTaxable": 0,
      "exemption": 0
    }
  ],
  ...
}
```