Module: AvaTax::Client::Items
- Included in:
- AvaTax::Client
- Defined in:
- lib/avatax/client/items.rb
Instance Method Summary collapse
-
#batch_delete_item_classifications(companyId, itemId) ⇒ AssociatedObjectDeletedErrorDetailsModel[]
Delete all classifications for an item.
-
#batch_delete_item_parameters(companyId, itemId) ⇒ AssociatedObjectDeletedErrorDetailsModel[]
Delete all parameters for an item.
-
#bulk_upload_items(companyId, model) ⇒ Object
Bulk upload items from a product catalog.
-
#create_item_classifications(companyId, itemId, model) ⇒ ItemClassificationOutputModel[]
Add classifications to an item.
-
#create_item_parameters(companyId, itemId, model) ⇒ ItemParameterModel[]
Add parameters to an item.
-
#create_item_tags(companyId, itemId, model) ⇒ ItemTagDetailOutputModel[]
Create tags for a item.
-
#create_items(companyId, model, options = {}) ⇒ ItemModel[]
Create a new item.
-
#create_tax_code_classification_request(companyId, model) ⇒ Object
Create a new tax code classification request.
-
#delete_catalogue_item(companyId, itemCode) ⇒ ObjectDeletedErrorModel[]
Delete a single item.
-
#delete_item(companyId, id) ⇒ ObjectDeletedErrorModel[]
Delete a single item.
-
#delete_item_classification(companyId, itemId, id) ⇒ ObjectDeletedErrorModel[]
Delete a single item classification.
-
#delete_item_parameter(companyId, itemId, id) ⇒ ObjectDeletedErrorModel[]
Delete a single item parameter.
-
#delete_item_tag(companyId, itemId, itemTagDetailId) ⇒ ObjectDeletedErrorModel[]
Delete item tag by id.
-
#delete_item_tags(companyId, itemId) ⇒ AssociatedObjectDeletedErrorDetailsModel[]
Delete all item tags.
-
#get_item(companyId, id, options = {}) ⇒ Object
Retrieve a single item.
-
#get_item_classification(companyId, itemId, id) ⇒ Object
Retrieve a single item classification.
-
#get_item_parameter(companyId, itemId, id) ⇒ Object
Retrieve a single item parameter.
-
#get_item_tags(companyId, itemId, options = {}) ⇒ FetchResult
Retrieve tags for an item.
-
#get_item_tax_code_recommendations(companyId, itemId) ⇒ TaxCodeRecommendationOutputModel[]
Get Item TaxCode Recommendations.
-
#get_premium_classification(companyId, itemCode, systemCode) ⇒ Object
Retrieve premium classification for a company's item based on its ItemCode and SystemCode.
-
#list_import_restrictions(companyId, itemCode, countryOfImport, options = {}) ⇒ FetchResult
Retrieve Restrictions for Item by CountryOfImport.
-
#list_item_classifications(companyId, itemId, options = {}) ⇒ FetchResult
Retrieve classifications for an item.
-
#list_item_parameters(companyId, itemId, options = {}) ⇒ FetchResult
Retrieve parameters for an item.
-
#list_items_by_company(companyId, options = {}) ⇒ FetchResult
Retrieve items for this company.
-
#list_recommended_parameter_by_company_id_and_item_id(companyId, itemId, options = {}) ⇒ FetchResult
Retrieve the parameters by companyId and itemId.
-
#query_items(options = {}) ⇒ FetchResult
Retrieve all items.
-
#query_items_by_system_code(companyId, systemCode, model, options = {}) ⇒ FetchResult
Retrieve items for this company based on System Code and filter criteria(optional) provided.
-
#query_items_by_tag(companyId, tag, options = {}) ⇒ FetchResult
Retrieve all items associated with given tag.
-
#sync_item_catalogue(companyId, model) ⇒ Object
Create or update items from a product catalog.
-
#sync_items(companyId, model) ⇒ Object
Sync items from a product catalog.
-
#update_item(companyId, id, model, options = {}) ⇒ Object
Update a single item.
-
#update_item_classification(companyId, itemId, id, model) ⇒ Object
Update an item classification.
-
#update_item_parameter(companyId, itemId, id, model) ⇒ Object
Update an item parameter.
Instance Method Details
#batch_delete_item_classifications(companyId, itemId) ⇒ AssociatedObjectDeletedErrorDetailsModel[]
Delete all classifications for an item
Delete all the classifications for a given item.
A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product.
When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
21 22 |
# File 'lib/avatax/client/items.rb', line 21 def batch_delete_item_classifications(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications" delete(path, {}, AvaTax::VERSION) end |
#batch_delete_item_parameters(companyId, itemId) ⇒ AssociatedObjectDeletedErrorDetailsModel[]
Delete all parameters for an item
Delete all the parameters for a given item.
Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
41 42 |
# File 'lib/avatax/client/items.rb', line 41 def batch_delete_item_parameters(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters" delete(path, {}, AvaTax::VERSION) end |
#bulk_upload_items(companyId, model) ⇒ Object
Bulk upload items from a product catalog
Create/Update one or more item objects attached to this company.
Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
can provide itemCode
values for each CreateTransaction()
API call rather than specifying tax codes, parameters, descriptions,
and other data fields. AvaTax will automatically look up each itemCode
and apply the correct tax codes and parameters
from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
The tax code takes precedence over the tax code id if both are provided.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
63 64 |
# File 'lib/avatax/client/items.rb', line 63 def bulk_upload_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/upload" post(path, model, {}, AvaTax::VERSION) end |
#create_item_classifications(companyId, itemId, model) ⇒ ItemClassificationOutputModel[]
Add classifications to an item.
Add classifications to an item.
A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product.
When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
An item may only have one classification per tax system.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
84 85 |
# File 'lib/avatax/client/items.rb', line 84 def create_item_classifications(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications" post(path, model, {}, AvaTax::VERSION) end |
#create_item_parameters(companyId, itemId, model) ⇒ ItemParameterModel[]
Add parameters to an item.
Add parameters to an item.
Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
To see available parameters for this item, call /api/v2/definitions/parameters?$filter=attributeType eq Product
Some parameters are only available for use if you have subscribed to specific AvaTax services. To see which parameters you are able to use, add the query parameter "$showSubscribed=true" to the parameter definition call above.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
109 110 |
# File 'lib/avatax/client/items.rb', line 109 def create_item_parameters(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters" post(path, model, {}, AvaTax::VERSION) end |
#create_item_tags(companyId, itemId, model) ⇒ ItemTagDetailOutputModel[]
Create tags for a item
Creates one or more new Tag
objects attached to this Item.
Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
149 150 |
# File 'lib/avatax/client/items.rb', line 149 def (companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags" post(path, model, {}, AvaTax::VERSION) end |
#create_items(companyId, model, options = {}) ⇒ ItemModel[]
Create a new item
Creates one or more new item objects attached to this company.
Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
can provide itemCode
values for each CreateTransaction()
API call rather than specifying tax codes, parameters, descriptions,
and other data fields. AvaTax will automatically look up each itemCode
and apply the correct tax codes and parameters
from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
The tax code takes precedence over the tax code id if both are provided.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
132 133 |
# File 'lib/avatax/client/items.rb', line 132 def create_items(companyId, model, ={}) path = "/api/v2/companies/#{companyId}/items" post(path, model, , AvaTax::VERSION) end |
#create_tax_code_classification_request(companyId, model) ⇒ Object
Create a new tax code classification request
Creates a new tax code classification request.
Avalara AvaTax system tax codes represent various goods and services classified by industry or consumer categories and major physical similarities. Taxability rules are associated with tax codes. Customers can map their Items to tax codes allowing them to take advantage of thousands of tax rules in the AvaTax engine resulting in accurate taxability determinations.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
167 168 |
# File 'lib/avatax/client/items.rb', line 167 def create_tax_code_classification_request(companyId, model) path = "/api/v2/companies/#{companyId}/classificationrequests/taxcode" post(path, model, {}, AvaTax::VERSION) end |
#delete_catalogue_item(companyId, itemCode) ⇒ ObjectDeletedErrorModel[]
Delete a single item
Deletes the item object at this URL.
Items are a way of separating your tax calculation process from your tax configuration details. Use this endpoint to delete an existing item with item code.
Deleting an item will also delete the parameters, classifications, and product categories associated with that item.
NOTE: If your item code contains any of these characters /, +, ? or a space, please use the following encoding before making a request:
- Replace '/' with '_-ava2f-_' For example: 'Item/Code' becomes 'Item_-ava2f-_Code'
- Replace '+' with '_-ava2b-_' For example: 'Item+Code' becomes 'Item_-ava2b-_Code'
- Replace '?' with '_-ava3f-_' For example: 'Item?Code' becomes 'Item_-ava3f-_Code'
- Replace '%' with '_-ava25-_' For example: 'Item%Code' becomes 'Item_-ava25-_Code'
- Replace '#' with '_-ava23-_' For example: 'Item#Code' becomes 'Item_-ava23-_Code'
- Replace ''' with '_-ava27-_' For example: 'Item'Code' becomes 'Item_-ava27-_Code'
- Replace '"' with '_-ava22-_' For example: 'Item"Code' becomes 'Item_-ava22-_Code'
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
195 196 |
# File 'lib/avatax/client/items.rb', line 195 def delete_catalogue_item(companyId, itemCode) path = "/api/v2/companies/#{companyId}/itemcatalogue/#{itemCode}" delete(path, {}, AvaTax::VERSION) end |
#delete_item(companyId, id) ⇒ ObjectDeletedErrorModel[]
Delete a single item
Deletes the item object at this URL.
Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
can provide itemCode
values for each CreateTransaction()
API call rather than specifying tax codes, parameters, descriptions,
and other data fields. AvaTax will automatically look up each itemCode
and apply the correct tax codes and parameters
from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
Deleting an item will also delete the parameters and classifications associated with that item.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
217 218 |
# File 'lib/avatax/client/items.rb', line 217 def delete_item(companyId, id) path = "/api/v2/companies/#{companyId}/items/#{id}" delete(path, {}, AvaTax::VERSION) end |
#delete_item_classification(companyId, itemId, id) ⇒ ObjectDeletedErrorModel[]
Delete a single item classification.
Delete a single item classification.
A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product.
When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
236 237 |
# File 'lib/avatax/client/items.rb', line 236 def delete_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}" delete(path, {}, AvaTax::VERSION) end |
#delete_item_parameter(companyId, itemId, id) ⇒ ObjectDeletedErrorModel[]
Delete a single item parameter
Delete a single item parameter.
Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
257 258 |
# File 'lib/avatax/client/items.rb', line 257 def delete_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}" delete(path, {}, AvaTax::VERSION) end |
#delete_item_tag(companyId, itemId, itemTagDetailId) ⇒ ObjectDeletedErrorModel[]
Delete item tag by id
Deletes the Tag
object of an Item at this URL.
Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
274 275 |
# File 'lib/avatax/client/items.rb', line 274 def delete_item_tag(companyId, itemId, itemTagDetailId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags/#{itemTagDetailId}" delete(path, {}, AvaTax::VERSION) end |
#delete_item_tags(companyId, itemId) ⇒ AssociatedObjectDeletedErrorDetailsModel[]
Delete all item tags
Deletes all Tags
objects of an Item at this URL.
Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
290 291 |
# File 'lib/avatax/client/items.rb', line 290 def (companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags" delete(path, {}, AvaTax::VERSION) end |
#get_item(companyId, id, options = {}) ⇒ Object
Retrieve a single item
Get the Item
object identified by this URL.
Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
can provide itemCode
values for each CreateTransaction()
API call rather than specifying tax codes, parameters, descriptions,
and other data fields. AvaTax will automatically look up each itemCode
and apply the correct tax codes and parameters
from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
311 312 |
# File 'lib/avatax/client/items.rb', line 311 def get_item(companyId, id, ={}) path = "/api/v2/companies/#{companyId}/items/#{id}" get(path, , AvaTax::VERSION) end |
#get_item_classification(companyId, itemId, id) ⇒ Object
Retrieve a single item classification.
Retrieve a single item classification.
A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product.
When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
330 331 |
# File 'lib/avatax/client/items.rb', line 330 def get_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}" get(path, {}, AvaTax::VERSION) end |
#get_item_parameter(companyId, itemId, id) ⇒ Object
Retrieve a single item parameter
Retrieve a single item parameter.
Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
351 352 |
# File 'lib/avatax/client/items.rb', line 351 def get_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}" get(path, {}, AvaTax::VERSION) end |
#get_item_tags(companyId, itemId, options = {}) ⇒ FetchResult
Retrieve tags for an item
Get the Tag
objects of an Item identified by this URL.
Item tags puts multiple labels for an item. So that item can be easily grouped by these tags.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
370 371 |
# File 'lib/avatax/client/items.rb', line 370 def (companyId, itemId, ={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags" get(path, , AvaTax::VERSION) end |
#get_item_tax_code_recommendations(companyId, itemId) ⇒ TaxCodeRecommendationOutputModel[]
Get Item TaxCode Recommendations
Provides at least three tax-code recommendations for the given company ID and item ID
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
384 385 |
# File 'lib/avatax/client/items.rb', line 384 def get_item_tax_code_recommendations(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/taxcoderecommendations" get(path, {}, AvaTax::VERSION) end |
#get_premium_classification(companyId, itemCode, systemCode) ⇒ Object
Retrieve premium classification for a company's item based on its ItemCode and SystemCode.
Retrieves the premium classification for an ItemCode and SystemCode.
NOTE: If your item code contains any of these characters /, +, ?,",' ,% or #, please use the following encoding before making a request:
- Replace '/' with '_-ava2f-_' For example: 'Item/Code' becomes 'Item_-ava2f-_Code'
- Replace '+' with '_-ava2b-_' For example: 'Item+Code' becomes 'Item_-ava2b-_Code'
- Replace '?' with '_-ava3f-_' For example: 'Item?Code' becomes 'Item_-ava3f-_Code'
- Replace '%' with '_-ava25-_' For example: 'Item%Code' becomes 'Item_-ava25-_Code'
- Replace '#' with '_-ava23-_' For example: 'Item#Code' becomes 'Item_-ava23-_Code'
- Replace ''' with '_-ava27-_' For example: 'Item'Code' becomes 'Item_-ava27-_Code'
- Replace '"' with '_-ava22-_' For example: 'Item"Code' becomes 'Item_-ava22-_Code'
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
408 409 |
# File 'lib/avatax/client/items.rb', line 408 def get_premium_classification(companyId, itemCode, systemCode) path = "/api/v2/companies/#{companyId}/items/#{itemCode}/premiumClassification/#{systemCode}" get(path, {}, AvaTax::VERSION) end |
#list_import_restrictions(companyId, itemCode, countryOfImport, options = {}) ⇒ FetchResult
Retrieve Restrictions for Item by CountryOfImport
Retrieve Restrictions for Item by CountryOfImport. This API will only return import restriction for the countryOfImport.
NOTE: If your item code contains any of these characters /, +, ? or a space, please use the following encoding before making a request:
- Replace '/' with '_-ava2f-_' For example: 'Item/Code' becomes 'Item_-ava2f-_Code'
- Replace '+' with '_-ava2b-_' For example: 'Item+Code' becomes 'Item_-ava2b-_Code'
- Replace '?' with '_-ava3f-_' For example: 'Item?Code' becomes 'Item_-ava3f-_Code'
- Replace '%' with '_-ava25-_' For example: 'Item%Code' becomes 'Item_-ava25-_Code'
- Replace '#' with '_-ava23-_' For example: 'Item#Code' becomes 'Item_-ava23-_Code'
- Replace ''' with '_-ava27-_' For example: 'Item'Code' becomes 'Item_-ava27-_Code'
- Replace '"' with '_-ava22-_' For example: 'Item"Code' becomes 'Item_-ava22-_Code'
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
435 436 |
# File 'lib/avatax/client/items.rb', line 435 def list_import_restrictions(companyId, itemCode, countryOfImport, ={}) path = "/api/v2/companies/#{companyId}/items/#{itemCode}/restrictions/import/#{countryOfImport}" get(path, , AvaTax::VERSION) end |
#list_item_classifications(companyId, itemId, options = {}) ⇒ FetchResult
Retrieve classifications for an item.
List classifications for an item.
A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product.
When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
Search for specific objects using the criteria in the $filter
classification; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
classifications.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
460 461 |
# File 'lib/avatax/client/items.rb', line 460 def list_item_classifications(companyId, itemId, ={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications" get(path, , AvaTax::VERSION) end |
#list_item_parameters(companyId, itemId, options = {}) ⇒ FetchResult
Retrieve parameters for an item
List parameters for an item.
Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
Search for specific objects using the criteria in the $filter
parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
parameters.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
487 488 |
# File 'lib/avatax/client/items.rb', line 487 def list_item_parameters(companyId, itemId, ={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters" get(path, , AvaTax::VERSION) end |
#list_items_by_company(companyId, options = {}) ⇒ FetchResult
Retrieve items for this company
List all items defined for the current company.
Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
can provide itemCode
values for each CreateTransaction()
API call rather than specifying tax codes, parameters, descriptions,
and other data fields. AvaTax will automatically look up each itemCode
and apply the correct tax codes and parameters
from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
Search for specific objects using the criteria in the $filter
parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
parameters.
You may specify Tag Name in the tagName
query parameter if you want to filter items on the basis of tagName
You may specify comma seperated item status in the itemStatus
query parameter if you want to filter items on the basis of item status
You may specify Tax Code recommendation status in the taxCodeRecommendationStatus
query parameter if you want to filter items on the basis of tax code recommendation status
You may specify one or more of the following values in the $include
parameter to fetch additional nested data, using commas to separate multiple values:
- Parameters
- Classifications
- Tags
- Properties
- TaxCodeRecommendationStatus
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
532 533 |
# File 'lib/avatax/client/items.rb', line 532 def list_items_by_company(companyId, ={}) path = "/api/v2/companies/#{companyId}/items" get(path, , AvaTax::VERSION) end |
#list_recommended_parameter_by_company_id_and_item_id(companyId, itemId, options = {}) ⇒ FetchResult
Retrieve the parameters by companyId and itemId.
Returns the list of parameters based on the company's service types and the item code. Ignores nexus if a service type is configured in the 'IgnoreNexusForServiceTypes' configuration section. Ignores nexus for the AvaAlcohol service type.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
552 553 |
# File 'lib/avatax/client/items.rb', line 552 def list_recommended_parameter_by_company_id_and_item_id(companyId, itemId, ={}) path = "/api/v2/definitions/companies/#{companyId}/items/#{itemId}/parameters" get(path, , AvaTax::VERSION) end |
#query_items(options = {}) ⇒ FetchResult
Retrieve all items
Get multiple item objects across all companies.
Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
can provide itemCode
values for each CreateTransaction()
API call rather than specifying tax codes, parameters, descriptions,
and other data fields. AvaTax will automatically look up each itemCode
and apply the correct tax codes and parameters
from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
Search for specific objects using the criteria in the $filter
parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
parameters.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
579 580 |
# File 'lib/avatax/client/items.rb', line 579 def query_items(={}) path = "/api/v2/items" get(path, , AvaTax::VERSION) end |
#query_items_by_system_code(companyId, systemCode, model, options = {}) ⇒ FetchResult
Retrieve items for this company based on System Code and filter criteria(optional) provided
Retrieve items based on System Code
Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
can provide itemCode
values for each CreateTransaction()
API call rather than specifying tax codes, parameters, descriptions,
and other data fields. AvaTax will automatically look up each itemCode
and apply the correct tax codes and parameters
from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
Search for specific objects by passing the $filter
criteria in the body; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
parameters.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
607 608 |
# File 'lib/avatax/client/items.rb', line 607 def query_items_by_system_code(companyId, systemCode, model, ={}) path = "/api/v2/companies/#{companyId}/items/internal/bySystemCode/#{systemCode}" post(path, model, , AvaTax::VERSION) end |
#query_items_by_tag(companyId, tag, options = {}) ⇒ FetchResult
Retrieve all items associated with given tag
Get multiple item objects associated with given tag.
Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
can provide itemCode
values for each CreateTransaction()
API call rather than specifying tax codes, parameters, descriptions,
and other data fields. AvaTax will automatically look up each itemCode
and apply the correct tax codes and parameters
from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
Search for specific objects using the criteria in the $filter
parameter; full documentation is available on Filtering in REST .
Paginate your results using the $top
, $skip
, and $orderby
parameters.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient
636 637 |
# File 'lib/avatax/client/items.rb', line 636 def query_items_by_tag(companyId, tag, ={}) path = "/api/v2/companies/#{companyId}/items/bytags/#{tag}" get(path, , AvaTax::VERSION) end |
#sync_item_catalogue(companyId, model) ⇒ Object
Create or update items from a product catalog.
Creates/updates one or more item objects with additional properties and the AvaTax category attached to this company.
Items are a way of separating your tax calculation process from your tax configuration details. Use this endpoint to create a new or update an existing item. This can be used to sync the items with Avalara. For example, an accounting software system can use this to sync all their items from an ERP with Avalara.
Parameters and Classifications can be added with the Item.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
656 657 |
# File 'lib/avatax/client/items.rb', line 656 def sync_item_catalogue(companyId, model) path = "/api/v2/companies/#{companyId}/itemcatalogue" post(path, model, {}, AvaTax::VERSION) end |
#sync_items(companyId, model) ⇒ Object
Sync items from a product catalog
Syncs a list of items with AvaTax without waiting for them to be created. It is ideal for syncing large product catalogs with AvaTax.
Any invalid or duplicate items will be ignored. To diagnose why an item is not created, use the normal create transaction API to receive validation information.
This API is currently limited to 1000 items per call (the limit is subject to change).
Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
can provide itemCode
values for each CreateTransaction()
API call rather than specifying tax codes, parameters, descriptions,
and other data fields. AvaTax will automatically look up each itemCode
and apply the correct tax codes and parameters
from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
681 682 |
# File 'lib/avatax/client/items.rb', line 681 def sync_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/sync" post(path, model, {}, AvaTax::VERSION) end |
#update_item(companyId, id, model, options = {}) ⇒ Object
Update a single item
Replace the existing Item
object at this URL with an updated object.
Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you
can provide itemCode
values for each CreateTransaction()
API call rather than specifying tax codes, parameters, descriptions,
and other data fields. AvaTax will automatically look up each itemCode
and apply the correct tax codes and parameters
from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance
team can manage your item catalog and adjust the tax behavior of items without having to modify your software.
All data from the existing object will be replaced with data in the object you PUT. To set a field's value to null, you may either set its value to null or omit that field from the object you post.
The tax code takes precedence over the tax code id if both are provided.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
708 709 |
# File 'lib/avatax/client/items.rb', line 708 def update_item(companyId, id, model, ={}) path = "/api/v2/companies/#{companyId}/items/#{id}" put(path, model, , AvaTax::VERSION) end |
#update_item_classification(companyId, itemId, id, model) ⇒ Object
Update an item classification.
Update an item classification.
A classification is the code for a product in a particular tax system. Classifications enable an item to be used in multiple tax systems which may have different tax rates for a product.
When an item is used in a transaction, the applicable classification will be used to determine the appropriate tax rate.
An item may only have one classification per tax system.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
730 731 |
# File 'lib/avatax/client/items.rb', line 730 def update_item_classification(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}" put(path, model, {}, AvaTax::VERSION) end |
#update_item_parameter(companyId, itemId, id, model) ⇒ Object
Update an item parameter
Update an item parameter.
Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
Security Policies
- This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient
752 753 |
# File 'lib/avatax/client/items.rb', line 752 def update_item_parameter(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}" put(path, model, {}, AvaTax::VERSION) end |