Shopware icon

Shopware

Shopware

Actions778

Country → Create Country

AI-generated

Overview

This node operation allows creating a new country entry in the Shopware system. It is useful for managing country data within an e-commerce platform, enabling the addition of countries with detailed attributes such as tax rules, address formats, and shipping availability. For example, a user can create a country with specific VAT requirements, postal code patterns, and associated states to tailor the e-commerce experience to different regions.

Use Case Examples

  1. Creating a new country with its ISO codes, tax rules, and address format to support localized shipping and billing.
  2. Adding a country with custom fields and sales channel assignments to integrate with specific sales channels and customer groups.

Properties

Name Meaning
Response Data format for response, either basic or detailed.
Id Unique identifier for the country, required.
Name Name of the country, required.
Iso ISO code of the country.
Position Position or order of the country in listings.
Active Whether the country is active or not.
Shipping Available Indicates if shipping is available to this country.
Iso 3 Three-letter ISO code of the country.
Display State In Registration Whether to display state selection during registration.
Force State In Registration Whether state selection is mandatory during registration.
Check Vat Id Pattern Whether to validate VAT ID pattern.
Vat Id Required Whether VAT ID is required.
Vat Id Pattern Pattern for validating VAT ID.
Custom Fields Custom fields as JSON object.
Customer Tax Customer tax details as JSON object.
Company Tax Company tax details as JSON object.
Postal Code Required Whether postal code is required.
Check Postal Code Pattern Whether to validate postal code pattern.
Check Advanced Postal Code Pattern Whether to validate advanced postal code pattern.
Advanced Postal Code Pattern Pattern for validating advanced postal code.
Address Format Address format details as JSON object, required.
Default Postal Code Pattern Default pattern for postal code.
Is Eu Indicates if the country is part of the European Union.
Created At Creation timestamp of the country entry.
Updated At Last update timestamp of the country entry.
Translated Translated fields as JSON object.
States States associated with the country as JSON array.
Customer Addresses Customer addresses related to the country as JSON array.
Order Addresses Order addresses related to the country as JSON array.
Sales Channel Default Assignments Default sales channel assignments as JSON array.
Sales Channels Sales channels associated with the country as JSON array.
Tax Rules Tax rules applicable to the country as JSON array.
Currency Country Roundings Currency rounding rules for the country as JSON array.

Output

JSON

  • id - Unique identifier of the created country.
  • name - Name of the created country.
  • iso - ISO code of the created country.
  • active - Indicates if the country is active.
  • shippingAvailable - Indicates if shipping is available to the country.
  • states - List of states associated with the country.
  • taxRules - Tax rules applied to the country.
  • createdAt - Timestamp when the country was created.
  • updatedAt - Timestamp when the country was last updated.

Dependencies

  • An API key credential for Shopware Admin API

Troubleshooting

  • Ensure all required fields (Id, Name, Address Format) are provided to avoid validation errors.
  • Check JSON formatting for fields like customFields, customerTax, companyTax, states, and others to prevent parsing errors.
  • Verify API credentials and endpoint URL to avoid authentication or connection issues.
  • If the response format is set to 'detail', expect a more comprehensive response which might be larger and slower to process.

Discussion