Actions65
- Order Actions
- Product Actions
- Store Shipping Account Actions
- Delivery Companies API Actions
- Team User Actions
- Store Actions
- State Actions
- Stop Desk Actions
- City Or Municipality Actions
- Store Client Actions
- Store Coupon Actions
- Store Pro Stock Actions
City Or Municipality → Create City
AI-generatedSummary
Create a new city or municipality within a specified state in the Dukan system by sending the city's details via the API.
Inputs
- Force Custom Auth Header — Optionally use a custom API key specific to this node instead of the configured Dukan credentials.
- Force Custom Base URL — Optionally override the API Base URL from credentials with a custom URL for this node's requests.
- Custom Base URL — The custom base URL to use when 'Force Custom Base URL' is enabled (without the /v1/external suffix).
- Custom API Key — The custom API key to use when 'Force Custom Auth Header' is enabled.
- Use JSON — Choose whether to provide the city data as raw JSON rather than using individual fields.
- JSON — JSON string defining the city data, used only if 'Use JSON' is true.
- City Name (required) — Name of the city or municipality to create, used if 'Use JSON' is false.
- State ID (required) — MongoDB ObjectId of the parent state to which this city belongs, used if 'Use JSON' is false.
- City Custom ID — Optional custom identifier for the city, used if 'Use JSON' is false.
- Is Active — Boolean flag indicating whether the city is active; defaults to true if omitted, used if 'Use JSON' is false.
Output shape
a JSON object representing the created city resource as returned by the Dukan API
If the operation uses JSON input, the entire city data is sent from the 'JSON' parameter parsed as JSON; otherwise, individual fields (City Name, State ID, optional Custom ID, and active status) are sent. The operation supports request options like batching, proxy, timeout, and SSL handling through the node settings. Errors are returned as the API response.
Examples
Example 1: Create a city with specified name and parent state
Set 'Use JSON' to false and provide 'City Name' and 'State ID'. Optionally set 'Is Active' and 'City Custom ID'. Enable force custom auth or base URL if you want to override credentials per node.
Example 2: Create a city by providing full JSON data
Set 'Use JSON' to true and provide a JSON string with the complete city data structure in the 'JSON' field. Overrides the per-field inputs.