# Trusted vendor

Source: https://developer.avalara.com/avatax-for-ap/yaa3884310085398/

# Trusted vendor

In this example, you'll use AvaTax to confirm consumer use tax for the trusted vendor that we created in the [Set up vendors](https://developer.avalara.com/avatax-for-ap/configure-your-avatax-account/set-up-vendors) step. This example shows goods being purchased from and shipped to locations in Hawaii. The `VendorChargedTax` override amount is $42.10.

The response indicates that the `totalTaxCalculated` is $0.00, and the `totalTax` on the transaction is $45.00.

The recommended action for this transaction is that the vendor is trusted, and you can use their calculated tax.

View request:

```
{
  "createTransactionModel": {
    "addresses": {
      "shipFrom": {
        "RequestId": 2,
        "type": "shipFrom",
        "country": "US",
        "line1": "530 S King St",
        "city": "Honolulu",
        "region": "HI",
        "postalCode": "96813-3014"
      },
      "shipTo": {
        "RequestId": 2,
        "type": "shipTo",
        "country": "US",
        "line1": "530 S King St",
        "city": "Honolulu",
        "region": "HI",
        "postalCode": "96813-3014"
      }
    },
    "description": "",
    "parameters": [],
    "taxOverride": {
      "type": "VendorChargedTax",
      "reason": "VCT Reason",
      "taxAmount": "42.1"
    },
    "lines": [
      {
        "RequestLineId": "1",
        "RequestId": 2,
        "number": "1",
        "quantity": "1",
        "amount": "1000",
        "discounted": false,
        "taxIncluded": false,
        "marketplaceLiabilityType": "Seller",
        "taxOverride": {},
        "parameters": [],
        "addresses": {}
      }
    ],
    "type": "PurchaseInvoice",
    "date": "2024-08-02",
    "debugLevel": "Normal",
    "detailLevel": "Summary",
    "RequestId": 2,
    "customerCode": "VendorTrusted",
    "commit": true,
    "companyCode": "BARTZTEST"
  },
  "adjustmentReason": "ReconciledWithGeneralLedger",
  "adjustmentDescription": "sdf"
}
```

**View response**:

```
{
    "id": 0,
    "code": "0f3adfc3-01c0-46c4-8e9e-47f425393e46",
    "companyId": 7825858,
    "date": "2024-08-02",
    "paymentDate": "2024-08-02",
    "status": "Temporary",
    "type": "PurchaseOrder",
    "batchCode": "",
    "currencyCode": "USD",
    "exchangeRateCurrencyCode": "USD",
    "customerUsageType": "",
    "entityUseCode": "",
    "customerVendorCode": "VendorTrusted",
    "customerCode": "VendorTrusted",
    "exemptNo": "",
    "reconciled": false,
    "locationCode": "",
    "reportingLocationCode": "",
    "purchaseOrderNo": "",
    "referenceCode": "",
    "salespersonCode": "",
    "taxOverrideType": "VendorChargedTax",
    "taxOverrideAmount": 42.1,
    "taxOverrideReason": "VCT Reason",
    "totalAmount": 1000.0,
    "totalExempt": 0.0,
    "totalDiscount": 0.0,
    "totalTax": 0.0,
    "totalTaxable": 1000.0,
    "totalTaxCalculated": 45.0,
    "adjustmentReason": "NotAdjusted",
    "locked": false,
    "version": 1,
    "exchangeRateEffectiveDate": "2024-08-02",
    "exchangeRate": 1.0,
    "description": "",
    "modifiedDate": "2024-08-02T16:01:49.3539229Z",
    "modifiedUserId": 1443662,
    "taxDate": "2024-08-02",
    "lines": [
        {
            "id": 0,
            "transactionId": 0,
            "lineNumber": "1",
            "customerUsageType": "",
            "entityUseCode": "",
            "discountAmount": 0.0,
            "exemptAmount": 0.0,
            "exemptCertId": 0,
            "exemptNo": "",
            "isItemTaxable": true,
            "itemCode": "",
            "lineAmount": 1000.0,
            "quantity": 1.0,
            "ref1": "",
            "ref2": "",
            "reportingDate": "2024-08-02",
            "revAccount": "",
            "sourcing": "Destination",
            "tax": 0.0,
            "taxableAmount": 1000.0,
            "taxCalculated": 45.0,
            "taxCode": "P0000000",
            "taxCodeId": 8087,
            "taxDate": "2024-08-02",
            "taxIncluded": false,
            "details": [
                {
                    "id": 0,
                    "transactionLineId": 0,
                    "transactionId": 0,
                    "country": "US",
                    "region": "HI",
                    "stateFIPS": "15",
                    "exemptAmount": 0.0,
                    "jurisCode": "15",
                    "jurisName": "HAWAII",
                    "jurisdictionId": 15,
                    "stateAssignedNo": "Oahu District",
                    "jurisType": "STA",
                    "jurisdictionType": "State",
                    "nonTaxableAmount": 0.0,
                    "rate": 0.040000,
                    "sourcing": "Destination",
                    "tax": 0.0,
                    "taxableAmount": 1000.0,
                    "taxType": "Sales",
                    "taxSubTypeId": "S",
                    "taxName": "HI STATE TAX",
                    "taxAuthorityTypeId": 45,
                    "taxCalculated": 40.0,
                    "rateType": "General",
                    "rateTypeCode": "G",
                    "taxableUnits": 1000.0000,
                    "nonTaxableUnits": 0.0000,
                    "exemptUnits": 0.0000,
                    "unitOfBasis": "PerCurrencyUnit",
                    "isNonPassThru": false,
                    "isFee": false,
                    "reportingTaxableUnits": 1000.0,
                    "reportingNonTaxableUnits": 0.0,
                    "reportingExemptUnits": 0.0,
                    "reportingTax": 0.0,
                    "reportingTaxCalculated": 40.0,
                    "liabilityType": "Seller",
                    "chargedTo": "Buyer"
                },
                {
                    "id": 0,
                    "transactionLineId": 0,
                    "transactionId": 0,
                    "country": "US",
                    "region": "HI",
                    "stateFIPS": "15",
                    "exemptAmount": 0.0,
                    "jurisCode": "003",
                    "jurisName": "HONOLULU",
                    "jurisdictionId": 596,
                    "stateAssignedNo": "Oahu District",
                    "jurisType": "CTY",
                    "jurisdictionType": "County",
                    "nonTaxableAmount": 0.0,
                    "rate": 0.005000,
                    "sourcing": "Destination",
                    "tax": 0.0,
                    "taxableAmount": 1000.0,
                    "taxType": "Sales",
                    "taxSubTypeId": "S",
                    "taxName": "HI COUNTY TAX",
                    "taxAuthorityTypeId": 45,
                    "taxCalculated": 5.0,
                    "rateType": "General",
                    "rateTypeCode": "G",
                    "taxableUnits": 1000.0000,
                    "nonTaxableUnits": 0.0000,
                    "exemptUnits": 0.0000,
                    "unitOfBasis": "PerCurrencyUnit",
                    "isNonPassThru": false,
                    "isFee": false,
                    "reportingTaxableUnits": 1000.0,
                    "reportingNonTaxableUnits": 0.0,
                    "reportingExemptUnits": 0.0,
                    "reportingTax": 0.0,
                    "reportingTaxCalculated": 5.0,
                    "liabilityType": "Seller",
                    "chargedTo": "Buyer"
                }
            ],
            "nonPassthroughDetails": [],
            "parameters": [
                {
                    "name": "APDocumentStatus",
                    "value": "Ignore",
                    "unit": ""
                },
                {
                    "name": "APRuleApplied",
                    "value": "Rule Applied to line, with Rule Type : WhenToIgnore, Cause : Vendor VendorTrusted is defined as trusted Vendor.",
                    "unit": ""
                },
                {
                    "name": "VarianceCalculatedForLine",
                    "value": "2.90",
                    "unit": ""
                },
                {
                    "name": "SalesVarianceCalculatedForLine",
                    "value": "2.90",
                    "unit": ""
                },
                {
                    "name": "UseVarianceCalculatedForLine",
                    "value": "2.90",
                    "unit": ""
                },
                {
                    "name": "VendorChargedTaxForLine",
                    "value": "42.1",
                    "unit": ""
                }
            ],
            "hsCode": "",
            "costInsuranceFreight": 0.0,
            "vatCode": "",
            "vatNumberTypeId": 0
        }
    ],
    "addresses": [
        {
            "id": 0,
            "transactionId": 0,
            "boundaryLevel": "Address",
            "line1": "530 S King St",
            "line2": "",
            "line3": "",
            "city": "Honolulu",
            "region": "HI",
            "postalCode": "96813-3014",
            "country": "US",
            "taxRegionId": 2060806,
            "latitude": "21.30462",
            "longitude": "-157.857202"
        }
    ],
    "summary": [
        {
            "country": "US",
            "region": "HI",
            "jurisType": "State",
            "jurisCode": "15",
            "jurisName": "HAWAII",
            "taxAuthorityType": 45,
            "stateAssignedNo": "Oahu District",
            "taxType": "Sales",
            "taxSubType": "S",
            "taxName": "HI STATE TAX",
            "rateType": "General",
            "taxable": 1000.0,
            "rate": 0.040000,
            "tax": 0.0,
            "taxCalculated": 40.0,
            "nonTaxable": 0.0,
            "exemption": 0.0
        },
        {
            "country": "US",
            "region": "HI",
            "jurisType": "County",
            "jurisCode": "003",
            "jurisName": "HONOLULU",
            "taxAuthorityType": 45,
            "stateAssignedNo": "Oahu District",
            "taxType": "Sales",
            "taxSubType": "S",
            "taxName": "HI COUNTY TAX",
            "rateType": "General",
            "taxable": 1000.0,
            "rate": 0.005000,
            "tax": 0.0,
            "taxCalculated": 5.0,
            "nonTaxable": 0.0,
            "exemption": 0.0
        }
    ],
    "parameters": [
        {
            "name": "APRuleApplied",
            "value": "Rule Applied to line, with Rule Type : WhenToIgnore, Cause : Vendor VendorTrusted is defined as trusted Vendor."
        },
        {
            "name": "VarianceCalculatedForDocument",
            "value": "2.90"
        },
        {
            "name": "ApplicableAPPostActions",
            "value": "AccruedUndercharge"
        }
    ],
    "apStatusCode": "NoAccrualTrustedVendor",
    "apStatus": "Ignored - Use trusted vendor calculation"
}
```