# Purchases/payables document integration

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

# Purchases/payables document integration

Understand the requirements for integrating purchases and payables documents with AvaTax.

This section describes requirements for how to pass information from an invoice or quote.

Requirement

Use case

Endpoints/Models

Type

[Display and store the AP status code in responses](/avatax-for-ap/dvn5792559685220/)

Users should display and store the AP status code returned by the AvaTax engine in the ERP transaction record.

N/A

Suggested

[Display and store the AP status in responses](/avatax-for-ap/jdz4144215644169/)

Users must display and store the AvaTax user's AP status and the status description returned by the AvaTax engine in the ERP transaction record.

N/A

Suggested

[Document code](/avatax-for-ap/qas5858459796247/)

Users must have a way to enter a document code to tie transactions in AvaTax to the transactions in their underlying system.

[CreateTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/)

Required

[Vendor code](/avatax-for-ap/ljb6126595847789/)

Your integration must include a vendor identifier field (typically the database key in the vendor master) to map to the `customerCode` field in Avalara.

[CreateTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/)

Required

[Document date](/avatax-for-ap/ymy9883159941929/)

Users must be able to specify the calendar date when a transaction occurs.

[CreateTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/)

Required

[Tax calculation date](/avatax-for-ap/cdd9046418961420/)

Users must be able to override the date used to calculate tax.

[TaxOverrideModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/TaxOverrideModel/)

Required

[Ship-to address (header and line levels)](/avatax-for-ap/msv6576574471148/)

Your integration must be able to store at the header and line levels the address where items are shipped from.

[AddressModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/AddressesModel/)

Required

[Ship-from address (header and line levels)](/avatax-for-ap/qww2303860312217/)

Your integration must be able to store at both the header or line levels the address where items are shipped to.

[AddressModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/AddressesModel/)

Required

[Line number](/avatax-for-ap/hkl1327965172249/)

Users must be able to include multiple lines on a transaction, with each line specified using a unique line number.

[LineItemModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/LineItemModel/)

Required

[Item/commodity code](/avatax-for-ap/gcn3637476720760/)

Merchants/users must be able to specify an item code for each line in a transaction in order to associate a tax code for that item.

[LineItemModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/LineItemModel/)

Required

[Item/commodity description](/avatax-for-ap/jcf3088112073555/)

Merchants/users must be able to include a description of an item on each line of a transaction.

[LineItemModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/LineItemModel/)

Required

[Quantity](/avatax-for-ap/gdv7841482021117/)

Users must be able to specify the quantity of an item for each line of a transaction.

[LineItemModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/LineItemModel/)

Required

[Amount](/avatax-for-ap/kfm5440082235614/)

Users must be able to specify the total amount for each line item in a transaction, keeping in mind the status of the `isTaxIncluded` flag.

[LineItemModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/LineItemModel/)

Required

[Tax code](/avatax-for-ap/tdz2243002239631/)

Users must be able to specify a tax code for each line item in a transaction.

[LineItemModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/LineItemModel/)

Required

[Tax overrides](/avatax-for-ap/fjt7473730198264/)

Users must be able to set a tax override type of `VendorChargedTax` along with the override amount and reason.

[TaxOverrideModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/TaxOverrideModel/)

Required

[Verify that the transaction uses the Avalara-calculated tax amount](/avatax-for-ap/tkp5657407139175/)

Users must ensure that the tax amount value from a transaction response is used to populate the tax field in the integration.

N/A

Required

[Shipping/freight handling](/avatax-for-ap/ahd4498431253874/)

The handling of shipping and freight in AvaTax must match your system's implementation.

[LineItemModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/LineItemModel/)

Required

[Discount transactions](/avatax-for-ap/pzd9321148239934/)

Users must ensure that discounts on transactions are processed appropriately.

[CreateTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/)

[LineItemModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/LineItemModel/)

Required

[Transaction lifecycle](/avatax-for-ap/tnr1028507839773/)

Your integration must mirror your system's workflow as it relates to orders and invoices and use the appropriate document types.

[CreateTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/)

Required

[Commit transactions](/avatax-for-ap/omn9500535169037/)

Your integration must mirror your system's workflow for a transaction lifecycle when committing documents.

[CommitTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CommitTransaction/)

Required

[Void/delete a document](/avatax-for-ap/swy0295872906071/)

If the merchant's source application supports voiding/deleting invoices, then they must allow users to void/delete invoices in AvaTax.

[VoidTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/enums/VoidTransactionModel%20%3E%20code/)

Conditional. This is required if the source application supports voiding/deleting invoices.

[Point-of-order origin address (header and line levels)](/avatax-for-ap/dri3877653117061/)

If the merchant's source application supports a Point of Order Origin address, then they must provide this option to users in AvaTax at the header and line levels.

[AddressModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/AddressesModel/)

Conditional. This is required if the source application supports a Point of Order Origin address.

[Point-of-order acceptance address (header and line levels)](/avatax-for-ap/qzx9951514489115/)

If the merchant's source application supports a Point of Order Acceptance address, then they must provide this option to users in AvaTax and the header and line levels.

[AddressModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/AddressesModel/)

Conditional. This is required if the source application supports a Point of Order Acceptance address.

[Reporting location code](/avatax-for-ap/eto9540365955597/)

If the merchant's source application supports multiple origin addresses, then they must provide an option for users to specify a reporting location code in the determination request.

[CreateTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/)

Conditional for core. Required if the source application supports multiple origin addresses.

Required for POS.

[Purchase order number](/avatax-for-ap/uao6796860045692/)

Merchants/users should be able to specify a purchase order number for a transaction.

[CreateTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/)

Suggested

[Latitude/longitude support](/avatax-for-ap/cet8054780624690/)

Merchants/users should be able to pass latitude and longitude values into each address type to pinpoint that address by geo location. This is supported for US addresses only.

[AddressModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/AddressesModel/)

Suggested