Shopware icon

Shopware

Shopware

Actions778

Country State → Create Country State

AI-generated

Overview

This node operation creates a new country state in the Shopware system. It is useful for managing geographical subdivisions within countries, such as states or provinces, which can be important for tax calculations, shipping rules, and regional settings in e-commerce platforms. For example, a user can create a new state with specific details like its ID, country association, short code, name, and other optional attributes such as position, active status, custom fields, and timestamps.

Use Case Examples

  1. Creating a new state 'California' under the country 'USA' with a specific short code and marking it as active.
  2. Adding a new state with custom fields for additional metadata relevant to business needs.

Properties

Name Meaning
Response Data format for the response, either basic or detailed.
Id Unique identifier for the country state to be created.
Country Id Identifier of the country to which the state belongs.
Short Code Short code representing the state, often used for abbreviations.
Name Name of the country state.
Position Optional numeric position for ordering or sorting.
Active Boolean flag indicating if the state is active.
Custom Fields JSON object for any custom fields associated with the state.
Created At Timestamp string indicating when the state was created.
Updated At Timestamp string indicating when the state was last updated.
Translated JSON object containing translated versions of the state data.
Country JSON object representing the country details associated with the state.
Customer Addresses JSON array of customer addresses related to the state.
Order Addresses JSON array of order addresses related to the state.
Request Options Collection of request options such as batching, SSL settings, proxy, and timeout.

Output

JSON

  • id - Unique identifier of the created country state.
  • countryId - Identifier of the country the state belongs to.
  • shortCode - Short code of the state.
  • name - Name of the state.
  • position - Position or order of the state.
  • active - Active status of the state.
  • customFields - Custom fields associated with the state.
  • createdAt - Creation timestamp of the state.
  • updatedAt - Last update timestamp of the state.
  • translated - Translated data for the state.
  • country - Country details associated with the state.
  • customerAddresses - Customer addresses related to the state.
  • orderAddresses - Order addresses related to the state.

Dependencies

  • An API key credential for Shopware Admin API

Troubleshooting

  • Ensure all required fields (Id, Country Id, Short Code, Name) are provided to avoid validation errors.
  • If the API returns authentication errors, verify the API key credential and base URL configuration.
  • For SSL issues, consider enabling the 'Ignore SSL Issues' option if using self-signed certificates.
  • Batching options should be configured properly to avoid request throttling or timeouts.

Discussion