Shopware icon

Shopware

Shopware

Actions778

Tax Rule → Create Tax Rule

AI-generated

Overview

This node operation creates a new Tax Rule in the Shopware system. It is useful for automating the addition of tax rules based on various parameters such as tax rule type, country, tax rate, and associated tax details. For example, it can be used to programmatically set tax rules for different countries or regions in an e-commerce platform to ensure correct tax calculations.

Use Case Examples

  1. Creating a tax rule for a specific country with a defined tax rate and tax rule type.
  2. Adding tax rules that include detailed JSON data about states, country, and tax configurations.

Properties

Name Meaning
Response Specifies the data format for the response, either basic or detailed.
Id Unique identifier for the tax rule.
Tax Rule Type Id Identifier for the type of tax rule.
Country Id Identifier for the country to which the tax rule applies.
Tax Rate The tax rate percentage for the tax rule.
Data Additional JSON data related to the tax rule, such as states information.
Tax Id Identifier for the associated tax.
Active From The date from which the tax rule is active.
Created At The creation date of the tax rule.
Updated At The last update date of the tax rule.
Type Complex JSON structure describing the type details and nested rules related to the tax rule.
Country Complex JSON structure describing the country details and nested related entities.
Tax Complex JSON structure describing the tax details and nested related entities.
Request Options Node settings for request options such as batching, SSL issues, proxy, and timeout.

Output

JSON

  • id - The unique identifier of the created tax rule.
  • taxRuleTypeId - The type identifier of the created tax rule.
  • countryId - The country identifier associated with the tax rule.
  • taxRate - The tax rate set in the tax rule.
  • data - Additional data related to the tax rule, typically JSON with states information.
  • taxId - The tax identifier associated with the tax rule.
  • activeFrom - The activation date of the tax rule.
  • createdAt - The creation timestamp of the tax rule.
  • updatedAt - The last update timestamp of the tax rule.
  • type - Detailed JSON structure describing the type and nested rules of the tax rule.
  • country - Detailed JSON structure describing the country and related nested entities.
  • tax - Detailed JSON structure describing the tax and related nested entities.

Dependencies

  • An API key credential for Shopware Admin API

Troubleshooting

  • Ensure all required fields (Id, Tax Rule Type Id, Country Id, Tax Rate, Tax Id) are provided to avoid validation errors.
  • If the API returns authentication errors, verify that the Shopware Admin API credentials are correctly configured and valid.
  • For JSON fields (Data, Type, Country, Tax), ensure the JSON is well-formed to prevent parsing errors.
  • Timeouts can occur if the server is slow; adjust the timeout setting in Request Options accordingly.

Links

Discussion