Module: AvaTax::Client::Items

Included in:
AvaTax::Client
Defined in:
lib/avatax/client/items.rb

Instance Method Summary collapse

Instance Method Details

#a_isearch(companyId, model) ⇒ Object

Parse natural language query into structured filters

Parse natural language queries into structured API filters. This endpoint forwards the query to NLQ (Natural Language Query) service for interpretation and returns only the intent and structured filters.

Example queries:

  • "give me items created in last 1 week which are having status complete"
  • "show me all items with item code CERMUG"
  • "find items containing 'mug' in description"

Response format: { "intent": "GET", "filters": { "createdDate": { "value": "from: 2025-09-12 to: 2025-09-19" }, "itemStatus": { "value": ["Complete"] } } }

Raw NLQ responses are logged for debugging purposes.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns these items

  • model (Object)

    Natural language search request

Returns:

  • (Object)


34
35
# File 'lib/avatax/client/items.rb', line 34

def a_isearch(companyId, model)        path = "/api/v2/companies/#{companyId}/items/nlq/$parse"
post(path, model, {}, AvaTax::VERSION)      end

#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, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item.

  • itemId (Integer)

    The ID of the item you wish to delete the classifications.

Returns:

  • (AssociatedObjectDeletedErrorDetailsModel[])


52
53
# File 'lib/avatax/client/items.rb', line 52

def batch_delete_item_classifications(companyId, itemId)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
delete(path, {}, AvaTax::VERSION)      end

#batch_delete_item_custom_parameters(companyId, itemId) ⇒ AssociatedObjectDeletedErrorDetailsModel[]

Delete all custom parameters for an item

Delete all the custom parameters for a given item.

Custom parameters provide extra information about an item that can be used for various business purposes. These parameters are stored as key-value pairs where the parameter name is the key and the value is the corresponding data.

Custom parameters can be used to store custom attributes, metadata, or any other supplementary information that doesn't fit into the standard item fields.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item.

  • itemId (Integer)

    The ID of the item you wish to delete the custom parameters.

Returns:

  • (AssociatedObjectDeletedErrorDetailsModel[])


72
73
# File 'lib/avatax/client/items.rb', line 72

def batch_delete_item_custom_parameters(companyId, itemId)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/custom-parameters"
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, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item.

  • itemId (Integer)

    The ID of the item you wish to delete the parameters.

Returns:

  • (AssociatedObjectDeletedErrorDetailsModel[])


92
93
# File 'lib/avatax/client/items.rb', line 92

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.

Recommended number of items to create/update in a single call is upto 100.

Currently, the maximum number of items that can be created/updated in a single call is 500 (This 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.

The tax code takes precedence over the tax code id if both are provided.

Please provide all the countries of destination values as a valid two letter ISO-3166 country code. Refer to 'ListCountries' api to get valid country code for any country if needed.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this items.

  • model (Object)

    The items you wish to upload.

Returns:

  • (Object)


121
122
# File 'lib/avatax/client/items.rb', line 121

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, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id.

  • itemId (Integer)

    The item id.

  • model (ItemClassificationInputModel[])

    The item classifications you wish to create.

Returns:

  • (ItemClassificationOutputModel[])


142
143
# File 'lib/avatax/client/items.rb', line 142

def create_item_classifications(companyId, itemId, model)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
post(path, model, {}, AvaTax::VERSION)      end

#create_item_custom_parameters(companyId, itemId, model) ⇒ ItemCustomParametersModel[]

Add custom parameters to an item.

Add custom parameters to an item.

Custom parameters provide extra information about an item that can be used for various business purposes. These parameters are stored as key-value pairs where the parameter name is the key and the value is the corresponding data.

Custom parameters can be used to store custom attributes, metadata, or any other supplementary information that doesn't fit into the standard item fields.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item custom parameter.

  • itemId (Integer)

    The item id.

  • model (ItemCustomParametersModel[])

    The item custom parameters you wish to create.

Returns:

  • (ItemCustomParametersModel[])


163
164
# File 'lib/avatax/client/items.rb', line 163

def create_item_custom_parameters(companyId, itemId, model)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/custom-parameters"
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. Please provide all the countries parameter values as a valid two letter ISO-3166 country code. Refer to 'ListCountries' api to get valid country code for any country if needed.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item parameter.

  • itemId (Integer)

    The item id.

  • model (ItemParameterModel[])

    The item parameters you wish to create.

Returns:

  • (ItemParameterModel[])


190
191
# File 'lib/avatax/client/items.rb', line 190

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, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that defined these items

  • itemId (Integer)

    The ID of the item as defined by the company that owns this tag.

  • model (ItemTagDetailInputModel[])

    Tags you wish to associate with the Item

Returns:

  • (ItemTagDetailOutputModel[])


237
238
# File 'lib/avatax/client/items.rb', line 237

def create_item_tags(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.

Recommended number of items to create in a single call is upto 50.

Currently, the maximum number of items that can be created in a single call is 500 (This 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.

Please provide all the countries of destination values as a valid two letter ISO-3166 country code. Refer to 'ListCountries' api to get valid country code for any country if needed.

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, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item.

  • processRecommendationsSynchronously (Boolean)

    If true then Indix api will be called synchronously to get tax code recommendations.

  • model (ItemModel[])

    The item you wish to create.

Returns:

  • (ItemModel[])


220
221
# File 'lib/avatax/client/items.rb', line 220

def create_items(companyId, model, options={})        path = "/api/v2/companies/#{companyId}/items"
post(path, model, options, 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, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that creates this request.

  • model (Object)

    The request you wish to create.

Returns:

  • (Object)


274
275
# File 'lib/avatax/client/items.rb', line 274

def create_tax_code_classification_request(companyId, model)        path = "/api/v2/companies/#{companyId}/classificationrequests/taxcode"
post(path, model, {}, AvaTax::VERSION)      end

#create_taxcode_batch(companyId, model) ⇒ TaxcodeBatchOutputModel[]

Creates a batch to generate tax code recommendations asynchronously.

Creates a new batch for asynchronous tax code recommendations processing. The batch is processed asynchronously, and you can check the status using the GetBatchTaxCodeRecommendations endpoint.

Maximum items created per request: 2,000 (subject to change).

Batches are automatically deleted after 1 day.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The unique ID of the company.

  • model (ItemTaxcodeRecommendationBatchesInputModel[])

    The list of items to include in the batch (maximum 2,000).

Returns:

  • (TaxcodeBatchOutputModel[])


256
257
# File 'lib/avatax/client/items.rb', line 256

def create_taxcode_batch(companyId, model)        path = "/api/v2/companies/#{companyId}/taxcode-recommendations/batches"
post(path, model, {}, AvaTax::VERSION)      end

#delete_batch_tax_code_recommendations(companyId, batchId) ⇒ ObjectDeletedErrorModel[]

Deletes a tax code recommendation batch.

Deletes the specified tax code recommendation batch.

Returns '404 Not Found' if the batch is already deleted, does not exist, or belongs to a different company.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The unique ID of the company.

  • batchId (Integer)

    The unique ID of the batch to delete.

Returns:

  • (ObjectDeletedErrorModel[])


290
291
# File 'lib/avatax/client/items.rb', line 290

def delete_batch_tax_code_recommendations(companyId, batchId)        path = "/api/v2/companies/#{companyId}/taxcode-recommendations/batches/#{batchId}"
delete(path, {}, 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, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item.

  • itemCode (String)

    The code of the item you want to delete.

Returns:

  • (ObjectDeletedErrorModel[])


318
319
# File 'lib/avatax/client/items.rb', line 318

def delete_catalogue_item(companyId, itemCode)        path = "/api/v2/companies/#{companyId}/itemcatalogue/#{itemCode}"
delete(path, {}, AvaTax::VERSION)      end

#delete_h_s_code_classification_status(companyId, itemId, id) ⇒ Object

Deletes HS Code classification status for the item by status id.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company to which this item belongs

  • itemId (Integer)

    The ID of the item

  • id (String)

    The HS Code classification status id.

Returns:

  • []



331
332
# File 'lib/avatax/client/items.rb', line 331

def delete_h_s_code_classification_status(companyId, itemId, id)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/hscode-classifications-status/#{id}"
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, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item.

  • id (Integer)

    The ID of the item you wish to delete.

Returns:

  • (ObjectDeletedErrorModel[])


353
354
# File 'lib/avatax/client/items.rb', line 353

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, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id.

  • itemId (Integer)

    The item id.

  • id (Integer)

    The item classification id.

Returns:

  • (ObjectDeletedErrorModel[])


372
373
# File 'lib/avatax/client/items.rb', line 372

def delete_item_classification(companyId, itemId, id)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
delete(path, {}, AvaTax::VERSION)      end

#delete_item_custom_parameter(companyId, itemId, id) ⇒ ObjectDeletedErrorModel[]

Delete a single item custom parameter

Delete a single item custom parameter.

Custom parameters provide extra information about an item that can be used for various business purposes. These parameters are stored as key-value pairs where the parameter name is the key and the value is the corresponding data.

Custom parameters can be used to store custom attributes, metadata, or any other supplementary information that doesn't fit into the standard item fields.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id

  • itemId (Integer)

    The item id

  • id (Integer)

    The custom parameter id

Returns:

  • (ObjectDeletedErrorModel[])


393
394
# File 'lib/avatax/client/items.rb', line 393

def delete_item_custom_parameter(companyId, itemId, id)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/custom-parameters/#{id}"
delete(path, {}, AvaTax::VERSION)      end

#delete_item_image(companyId, itemId, imageId) ⇒ AssociatedObjectDeletedErrorDetailsModel[]

Delete the image associated with an item.

Delete the image associated with an item.

Permanently deletes both the image and its association with the specified item. This endpoint allows users to manage product visual representations by removing outdated or incorrect images, and cleaning up unused resources in the system. Once deleted, the image association cannot be recovered. To use the image again, it must be re-uploaded and re-linked with the item.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The unique ID of the company.

  • itemId (Integer)

    The unique ID of the item.

  • imageId (String)

    The unique ID of the image to delete.

Returns:

  • (AssociatedObjectDeletedErrorDetailsModel[])


414
415
# File 'lib/avatax/client/items.rb', line 414

def delete_item_image(companyId, itemId, imageId)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/images/#{imageId}"
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, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id

  • itemId (Integer)

    The item id

  • id (Integer)

    The parameter id

Returns:

  • (ObjectDeletedErrorModel[])


435
436
# File 'lib/avatax/client/items.rb', line 435

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, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that defined these items

  • itemId (Integer)

    The ID of the item as defined by the company that owns this tag.

  • itemTagDetailId (Integer)

    The ID of the item tag detail you wish to delete.

Returns:

  • (ObjectDeletedErrorModel[])


452
453
# File 'lib/avatax/client/items.rb', line 452

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, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that defined these items.

  • itemId (Integer)

    The ID of the item as defined by the company that owns this tag.

Returns:

  • (AssociatedObjectDeletedErrorDetailsModel[])


468
469
# File 'lib/avatax/client/items.rb', line 468

def delete_item_tags(companyId, itemId)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
delete(path, {}, AvaTax::VERSION)      end

#dismiss_h_s_code_classification_status(companyId, itemId, options = {}) ⇒ Object

Dismiss the Status and Details values of the given ItemHSCodeClassificationStatus.

Dismiss the existing Status and Details of the ItemHSCodeClassificationStatus object at this URL with an updated object.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company to which this item belongs.

  • itemId (Integer)

    The ID of the item whose classification status you want to update.

  • country (String)

    The country of the HS code classification request status record that is to be updated.

Returns:

  • (Object)


483
484
# File 'lib/avatax/client/items.rb', line 483

def dismiss_h_s_code_classification_status(companyId, itemId, options={})        path = "/api/v2/companies/#{companyId}/items/#{itemId}/hscode-classifications-status/$dismiss"
put(path, options, AvaTax::VERSION)      end

#fetch_additional_h_s_code_duty_details(companyId, itemId, model) ⇒ ItemHSCodeDutyDetailModel[]

Fetch Additional HS Duty Details for items

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company for which you want to get additional HS Duty Details.

  • itemId (Integer)

    The unique ID of the item for which you want to get additional HS Duty Details.

  • model (ItemAdditionalHSCodeDutyInputModel[])

    Additional HS Code Duty Details input Model

Returns:

  • (ItemHSCodeDutyDetailModel[])


496
497
# File 'lib/avatax/client/items.rb', line 496

def fetch_additional_h_s_code_duty_details(companyId, itemId, model)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/hsdutydetails/$fetch-additional-hsdutydetails"
post(path, model, {}, AvaTax::VERSION)      end

#get_batch_tax_code_recommendations(companyId, batchId) ⇒ Object

Retrieves the status and results of a tax code recommendation batch.

Retrieves the status and results of a tax code recommendation batch for the specified company. If the batch status is "Completed", the response includes the tax code recommendations for all items in the batch. If the batch status is "Waiting", "Processing", or any other non-complete status, only the status information is returned. Returns '404 Not Found' if the batch has been deleted or does not exist.

Batches are automatically deleted after 1 day.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The unique ID of the company.

  • batchId (Integer)

    The unique ID of the recommendation batch.

Returns:

  • (Object)


515
516
# File 'lib/avatax/client/items.rb', line 515

def get_batch_tax_code_recommendations(companyId, batchId)        path = "/api/v2/companies/#{companyId}/taxcode-recommendations/batches/#{batchId}"
get(path, {}, AvaTax::VERSION)      end

#get_h_s_code_classification_s_l_a(companyId) ⇒ Object

Retrieve the HS code classification SLA details for a company.

This endpoint returns the SLA details for HS code classification for the specified company. The response includes information about processing times, service commitments, and other relevant SLA terms.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company for which to retrieve the SLA details.

Returns:

  • (Object)


530
531
# File 'lib/avatax/client/items.rb', line 530

def get_h_s_code_classification_s_l_a(companyId)        path = "/api/v2/companies/#{companyId}/items/hscode-classification/$get-sla"
get(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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item object

  • id (Integer)

    The primary key of this item

  • include (String)

    A comma separated list of additional data to retrieve.

Returns:

  • (Object)


551
552
# File 'lib/avatax/client/items.rb', line 551

def get_item(companyId, id, options={})        path = "/api/v2/companies/#{companyId}/items/#{id}"
get(path, options, 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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id.

  • itemId (Integer)

    The item id.

  • id (Integer)

    The item classification id.

Returns:

  • (Object)


570
571
# File 'lib/avatax/client/items.rb', line 570

def get_item_classification(companyId, itemId, id)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}"
get(path, {}, AvaTax::VERSION)      end

#get_item_custom_parameter(companyId, itemId, id) ⇒ Object

Retrieve a single item custom parameter

Retrieve a single item custom parameter.

Custom parameters provide extra information about an item that can be used for various business purposes. These parameters are stored as key-value pairs where the parameter name is the key and the value is the corresponding data.

Custom parameters can be used to store custom attributes, metadata, or any other supplementary information that doesn't fit into the standard item fields.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id

  • itemId (Integer)

    The item id

  • id (Integer)

    The custom parameter id

Returns:

  • (Object)


591
592
# File 'lib/avatax/client/items.rb', line 591

def get_item_custom_parameter(companyId, itemId, id)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/custom-parameters/#{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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id

  • itemId (Integer)

    The item id

  • id (Integer)

    The parameter id

Returns:

  • (Object)


612
613
# File 'lib/avatax/client/items.rb', line 612

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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that defined these items

  • itemId (Integer)

    The ID of the item as defined by the company that owns this tag.

  • filter (String)

    A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.
    Not filterable: tagName

  • top (Integer)

    If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

Returns:

  • (FetchResult)


631
632
# File 'lib/avatax/client/items.rb', line 631

def get_item_tags(companyId, itemId, options={})        path = "/api/v2/companies/#{companyId}/items/#{itemId}/tags"
get(path, options, 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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)
  • itemId (Integer)

Returns:

  • (TaxCodeRecommendationOutputModel[])


645
646
# File 'lib/avatax/client/items.rb', line 645

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, options = {}) ⇒ 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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item object

  • itemCode (String)

    The ItemCode of the item for which you want to retrieve premium classification

  • systemCode (String)

    The SystemCode for which you want to retrieve premium classification

  • country (String)

    Optional: Provide the country for which you want to retrieve the premium classification.

Returns:

  • (Object)


670
671
# File 'lib/avatax/client/items.rb', line 670

def get_premium_classification(companyId, itemCode, systemCode, options={})        path = "/api/v2/companies/#{companyId}/items/#{itemCode}/premiumClassification/#{systemCode}"
get(path, options, AvaTax::VERSION)      end

#get_product_image(companyId, itemId, imageId) ⇒ Object

Get the image associated with an item.

Get the image file for the specified image ID linked to the item.

This endpoint allows users to retrieve and display product images in user interfaces or to verify the current image associated with a specific item.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The unique ID of the company.

  • itemId (Integer)

    The unique ID of the item.

  • imageId (String)

    The unique ID of the image to retrieve.

Returns:

  • (Object)


688
689
# File 'lib/avatax/client/items.rb', line 688

def get_product_image(companyId, itemId, imageId)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/images/#{imageId}"
get(path, {}, AvaTax::VERSION)      end

#get_sync_tax_code_recommendations(companyId, model) ⇒ ItemTaxcodeRecommendationBatchesOutputModel[]

Get the real-time tax code recommendations for the specified items without saving item data.

Provides immediate tax code recommendations for item details submitted in the request. Item data is processed only for recommendation purposes and is not persisted.

Maximum items per request: 50 (subject to change).

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The unique ID of the company.

  • model (ItemTaxcodeRecommendationBatchesInputModel[])

    The list of items to analyze for tax code recommendations (maximum 50).

Returns:

  • (ItemTaxcodeRecommendationBatchesOutputModel[])


704
705
# File 'lib/avatax/client/items.rb', line 704

def get_sync_tax_code_recommendations(companyId, model)        path = "/api/v2/companies/#{companyId}/$taxcode-recommendations"
post(path, model, {}, AvaTax::VERSION)      end

#initiate_h_s_code_classification(companyId, model) ⇒ ItemHSCodeClassificationOutputModel[]

Create an HS code classification request.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company for which you want to create this HS code classification request.

  • model (ItemHSCodeClassificationInputModel[])

    Item HSCodeClassification input Model

Returns:

  • (ItemHSCodeClassificationOutputModel[])


716
717
# File 'lib/avatax/client/items.rb', line 716

def initiate_h_s_code_classification(companyId, model)        path = "/api/v2/companies/#{companyId}/items/$initiate-hscode-classification"
post(path, model, {}, 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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item object

  • itemCode (String)

    ItemCode for the item

  • countryOfImport (String)

    Country for which you want the restrictions for the Item.

  • top (Integer)

    If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • orderBy (String)

    A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

Returns:

  • (FetchResult)


743
744
# File 'lib/avatax/client/items.rb', line 743

def list_import_restrictions(companyId, itemCode, countryOfImport, options={})        path = "/api/v2/companies/#{companyId}/items/#{itemCode}/restrictions/import/#{countryOfImport}"
get(path, options, 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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id.

  • itemId (Integer)

    The item id.

  • filter (String)

    A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.
    Not filterable: productCode, systemCode, country, IsPremium, ClassificationEvent

  • top (Integer)

    If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • orderBy (String)

    A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

Returns:

  • (FetchResult)


768
769
# File 'lib/avatax/client/items.rb', line 768

def list_item_classifications(companyId, itemId, options={})        path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
get(path, options, AvaTax::VERSION)      end

#list_item_custom_parameters(companyId, itemId, options = {}) ⇒ FetchResult

Retrieve custom parameters for an item

List custom parameters for an item.

Custom parameters provide extra information about an item that can be used for various business purposes. These parameters are stored as key-value pairs where the parameter name is the key and the value is the corresponding data.

Custom parameters can be used to store custom attributes, metadata, or any other supplementary information that doesn't fit into the standard item fields.

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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id

  • itemId (Integer)

    The item id

  • filter (String)

    A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.
    Not filterable: id, name, value

  • top (Integer)

    If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • orderBy (String)

    A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

Returns:

  • (FetchResult)


795
796
# File 'lib/avatax/client/items.rb', line 795

def list_item_custom_parameters(companyId, itemId, options={})        path = "/api/v2/companies/#{companyId}/items/#{itemId}/custom-parameters"
get(path, options, 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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id

  • itemId (Integer)

    The item id

  • filter (String)

    A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.
    Not filterable: name, unit, isNeededForCalculation, isNeededForReturns, isNeededForClassification

  • top (Integer)

    If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • orderBy (String)

    A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

Returns:

  • (FetchResult)


822
823
# File 'lib/avatax/client/items.rb', line 822

def list_item_parameters(companyId, itemId, options={})        path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
get(path, options, AvaTax::VERSION)      end

#list_item_premium_classifications(companyId, itemCode, options = {}) ⇒ FetchResult

Retrieve premium classification for an item based on its companyId and itemCode.

Retrieve the premium classification for an Item based on its itemCode and companyId.

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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item object.

  • itemCode (String)

    The item code of the item for which you want to retrieve premium classification.

  • filter (String)

    A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.
    Not filterable: HsCode, justification, createdDate, createdUserId

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • orderBy (String)

    A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

  • top (Integer)

    If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

Returns:

  • (FetchResult)


849
850
# File 'lib/avatax/client/items.rb', line 849

def list_item_premium_classifications(companyId, itemCode, options={})        path = "/api/v2/companies/#{companyId}/items/#{itemCode}/premiumClassifications"
get(path, options, 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 can specify an HS code classification status in the hsCodeClassificationStatus query parameter if you want to filter items based on an HS code classification status.

You can specify a comma-separated list of countries in the hsCodeExistsInCountries query parameter if you want to filter items based on whether an HS code exists for the provided countries.

You can specify a comma-separated list of countries in the hsCodeDoesNotExistsInCountries query parameter if you want to filter items on the basis of whether an HS code does not exist for the provided countries.

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
  • HsCodeClassificationStatus
  • TaxCodeDetails

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that defined these items

  • filter (String)

    A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.
    Not filterable: taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, customParameters, tags, properties, itemStatus, taxCodeRecommendationStatus, taxCodeRecommendations, taxCodeDetails, hsCodeClassificationStatus, image

  • include (String)

    A comma separated list of additional data to retrieve.

  • top (Integer)

    If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • orderBy (String)

    A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

  • tagName (String)

    Tag Name on the basis of which you want to filter Items

  • itemStatus (String)

    A comma separated list of item status on the basis of which you want to filter Items

  • taxCodeRecommendationStatus (String)

    Tax code recommendation status on the basis of which you want to filter Items

  • hsCodeClassificationStatus (String)

    HS code classification status on the basis of which you want to filter items.

  • hsCodeExistsInCountries (String)

    A comma-separated list of countries for which the HS code is assigned and based on which you want to filter the items.

  • hsCodeDoesNotExistsInCountries (String)

    A comma-separated list of countries for which the HS code is not assigned and based on which you want to filter the items.

Returns:

  • (FetchResult)


905
906
# File 'lib/avatax/client/items.rb', line 905

def list_items_by_company(companyId, options={})        path = "/api/v2/companies/#{companyId}/items"
get(path, options, AvaTax::VERSION)      end

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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    Company Identifier.

  • itemId (Integer)

    Item Identifier.

  • filter (String)

    A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.
    Not filterable: serviceTypes, regularExpression, attributeSubType, values

  • top (Integer)

    If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • orderBy (String)

    A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

Returns:

  • (FetchResult)


925
926
# File 'lib/avatax/client/items.rb', line 925

def list_recommended_parameter_by_company_id_and_item_id(companyId, itemId, options={})        path = "/api/v2/definitions/companies/#{companyId}/items/#{itemId}/parameters"
get(path, options, AvaTax::VERSION)      end

#patch_item(companyId, id, model) ⇒ Object

Patch a single item

Update the existing item object at this URL with the specified patch changes.

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.

Only specified fields in the existing object will be updated with the data you provide via PATCH. To set a field's value to null, you can either set the field to null explicitly or omit it from the PATCH request.

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, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that this item belongs to.

  • id (Integer)

    The ID of the item you want to update.

  • model (Operation[])

Returns:

  • (Object)


951
952
# File 'lib/avatax/client/items.rb', line 951

def patch_item(companyId, id, model)        path = "/api/v2/companies/#{companyId}/items/#{id}"
patch(path, model, {}, 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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • filter (String)

    A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.
    Not filterable: taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, customParameters, tags, properties, itemStatus, taxCodeRecommendationStatus, taxCodeRecommendations, taxCodeDetails, hsCodeClassificationStatus, image

  • include (String)

    A comma separated list of additional data to retrieve.

  • top (Integer)

    If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • orderBy (String)

    A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

Returns:

  • (FetchResult)


978
979
# File 'lib/avatax/client/items.rb', line 978

def query_items(options={})        path = "/api/v2/items"
get(path, options, 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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that defined these items

  • systemCode (String)

    System code on the basis of which you want to filter Items

  • top (Integer)

    If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • orderBy (String)

    A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

  • model (Object)

    A filter statement to select specific records, as defined by https://github.com/Microsoft/api-guidelines/blob/master/Guidelines.md#97-filtering .

Returns:

  • (FetchResult)


1006
1007
# File 'lib/avatax/client/items.rb', line 1006

def query_items_by_system_code(companyId, systemCode, model, options={})        path = "/api/v2/companies/#{companyId}/items/internal/bySystemCode/#{systemCode}"
post(path, model, options, 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, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that defined these items.

  • tag (String)

    The master tag to be associated with item.

  • filter (String)

    A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.
    Not filterable: taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, customParameters, tags, properties, itemStatus, taxCodeRecommendationStatus, taxCodeRecommendations, taxCodeDetails, hsCodeClassificationStatus, image

  • include (String)

    A comma separated list of additional data to retrieve.

  • top (Integer)

    If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • skip (Integer)

    If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • orderBy (String)

    A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

Returns:

  • (FetchResult)


1035
1036
# File 'lib/avatax/client/items.rb', line 1035

def query_items_by_tag(companyId, tag, options={})        path = "/api/v2/companies/#{companyId}/items/bytags/#{tag}"
get(path, options, 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.

Recommended number of items to create/update in a single call is upto 100.

Currently, the maximum number of items that can be created/updated in a single call is 1000 (This limit is subject to change).

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.

Please provide all the countries parameter values as a valid two letter ISO-3166 country code. Refer to 'ListCountries' api to get valid country code for any country if needed.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item.

  • model (ItemCatalogueInputModel[])

    The items you want to create or update.

Returns:

  • (Object)


1062
1063
# File 'lib/avatax/client/items.rb', line 1062

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 500 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.

Please provide all the countries of destination values as a valid two letter ISO-3166 country code. Refer to 'ListCountries' api to get valid country code for any country if needed.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that owns this item.

  • model (Object)

    The request object.

Returns:

  • (Object)


1090
1091
# File 'lib/avatax/client/items.rb', line 1090

def sync_items(companyId, model)        path = "/api/v2/companies/#{companyId}/items/sync"
post(path, model, {}, AvaTax::VERSION)      end

#update_image(companyId, itemId, imageId) ⇒ Object

Update an existing image for an item.

This endpoint allows users to update the existing image associated with a specific item by uploading a new image file.

The updated image serves as the item's visual representation and will be used for tax code recommendation purposes.

Restrictions:

  • Supported formats: JPEG, GIF, PNG
  • Maximum file size: 10MB
  • Maximum file name length allowed: 200 characters Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The unique ID of the company.

  • itemId (Integer)

    The unique ID of the item.

  • imageId (String)

    The unique ID of the image to update.

  • imageFile (Object)

Returns:

  • (Object)


1109
1110
# File 'lib/avatax/client/items.rb', line 1109

def update_image(companyId, itemId, imageId)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/images/#{imageId}"
put(path, {}, 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, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that this item belongs to.

  • id (Integer)

    The ID of the item you wish to update

  • isRecommendationSelected (Boolean)

    If true then Set recommendation status to RecommendationSelected

  • isRecommendationRejected (Boolean)

    If true then Set recommendation status to RecommendationRejected, When the taxCode recommendation status is RecommendationAvailable. Else will be thrown as error

  • model (Object)

    The item object you wish to update.

Returns:

  • (Object)


1137
1138
# File 'lib/avatax/client/items.rb', line 1137

def update_item(companyId, id, model, options={})        path = "/api/v2/companies/#{companyId}/items/#{id}"
put(path, model, options, 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, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id.

  • itemId (Integer)

    The item id.

  • id (Integer)

    The item classification id.

  • model (Object)

    The item object you wish to update.

Returns:

  • (Object)


1159
1160
# File 'lib/avatax/client/items.rb', line 1159

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_custom_parameter(companyId, itemId, id, model) ⇒ Object

Update an item custom parameter

Update an item custom parameter.

Custom parameters provide extra information about an item that can be used for various business purposes. These parameters are stored as key-value pairs where the parameter name is the key and the value is the corresponding data.

Custom parameters can be used to store custom attributes, metadata, or any other supplementary information that doesn't fit into the standard item fields.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id.

  • itemId (Integer)

    The item id

  • id (Integer)

    The item custom parameter id

  • model (Object)

    The item custom parameter object you wish to update.

Returns:

  • (Object)


1181
1182
# File 'lib/avatax/client/items.rb', line 1181

def update_item_custom_parameter(companyId, itemId, id, model)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/custom-parameters/#{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.

Please provide all the countries parameter values as a valid two letter ISO-3166 country code. Refer to 'ListCountries' api to get valid country code for any country if needed.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id.

  • itemId (Integer)

    The item id

  • id (Integer)

    The item parameter id

  • model (Object)

    The item object you wish to update.

Returns:

  • (Object)


1206
1207
# File 'lib/avatax/client/items.rb', line 1206

def update_item_parameter(companyId, itemId, id, model)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}"
put(path, model, {}, AvaTax::VERSION)      end

#upload_image(companyId, itemId) ⇒ Object

Upload an image for an item.

This endpoint allows users to upload an image file for a specific item.

The uploaded image serves as the item's visual representation and will be used for tax code recommendation purposes.

Restrictions:

  • Supported formats: JPEG, GIF, PNG
  • Maximum file size: 10MB
  • Maximum file name length allowed: 200 characters Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The unique ID of the company.

  • itemId (Integer)

    The unique ID of the item.

  • imageFile (Object)

Returns:

  • (Object)


1224
1225
# File 'lib/avatax/client/items.rb', line 1224

def upload_image(companyId, itemId)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/images"
post(path, {}, {}, AvaTax::VERSION)      end

#upsert_item_classifications(companyId, itemId, model) ⇒ ItemClassificationOutputModel[]

Add/update item classifications.

Add/update 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 that 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 per country.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company ID.

  • itemId (Integer)

    The item ID.

  • model (ItemClassificationInputModel[])

    The item classifications you want to create.

Returns:

  • (ItemClassificationOutputModel[])


1245
1246
# File 'lib/avatax/client/items.rb', line 1245

def upsert_item_classifications(companyId, itemId, model)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications"
put(path, model, {}, AvaTax::VERSION)      end

#upsert_item_custom_parameter(companyId, itemId, model) ⇒ ItemCustomParametersModel[]

Add/update an item custom parameter

Add/update an item custom parameter.

Custom parameters provide extra information about an item that can be used for various business purposes. These parameters are stored as key-value pairs where the parameter name is the key and the value is the corresponding data.

Custom parameters can be used to store custom attributes, metadata, or any other supplementary information that doesn't fit into the standard item fields.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The company id.

  • itemId (Integer)

    The item id

  • model (ItemCustomParametersModel[])

    The item custom parameter object you wish to Upsert.

Returns:

  • (ItemCustomParametersModel[])


1266
1267
# File 'lib/avatax/client/items.rb', line 1266

def upsert_item_custom_parameter(companyId, itemId, model)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/custom-parameters"
put(path, model, {}, AvaTax::VERSION)      end

#upsert_item_parameter(companyId, itemId, model) ⇒ ItemParameterModel[]

Add/update an item parameter.

Add/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.

Please provide all the countries parameter values as a valid two letter ISO-3166 country code. Refer to 'ListCountries' api to get valid country code for any country if needed.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The ID of the company that this item belongs to.

  • itemId (Integer)

    The ID of the item you want to update.

  • model (ItemParameterModel[])

    The item parameter object you want to upsert.

Returns:

  • (ItemParameterModel[])


1290
1291
# File 'lib/avatax/client/items.rb', line 1290

def upsert_item_parameter(companyId, itemId, model)        path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters"
put(path, model, {}, AvaTax::VERSION)      end

#verify_h_s_code(companyId, model) ⇒ Object

Verify the HSCode to be valid/invalid

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. Swagger Name: AvaTaxClient

Parameters:

  • companyId (Integer)

    The unique ID of the company

  • model (ItemHSCodeVerificationInputModel[])

    The request model for HS Code Verification

Returns:

  • (Object)


1302
1303
# File 'lib/avatax/client/items.rb', line 1302

def verify_h_s_code(companyId, model)        path = "/api/v2/companies/#{companyId}/items/hscodes/$verify"
post(path, model, {}, AvaTax::VERSION)      end