Actions30
Overview
This node integrates with the MoySklad API v1.2 to manage various resources, including Demands. Specifically, the Delete Demand operation allows users to delete a demand entity by its unique ID.
Typical use cases include:
- Automating cleanup of outdated or incorrect demand records in MoySklad.
- Integrating demand deletion into larger workflows where demands are conditionally removed based on business logic.
- Managing inventory and order flows by programmatically removing demands that are no longer relevant.
For example, a user might set up an automation that deletes demands older than a certain date or those linked to canceled orders.
Properties
| Name | Meaning |
|---|---|
| ID | The unique identifier of the demand to delete. This is required to specify which demand to remove. |
| Additional Options | A collection of optional parameters: |
| - Expand | Comma-separated list of related entities to expand in the response (not typically used for delete). |
| - Filters | Semicolon-separated filters to narrow down results (not applicable for delete operation). |
| - Limit | Maximum number of items to return (default 100, max 1000) — not applicable for delete but part of options. |
| - Offset | Number of items to skip before starting to collect the result set (default 0) — also not applicable here. |
Note: For the Delete operation, only the ID property is strictly required; additional options do not affect the delete request.
Output
The output JSON for a successful delete operation contains:
{
"success": true,
"id": "<deleted-demand-id>"
}
success: Boolean indicating the deletion was successful.id: The ID of the demand that was deleted.
No binary data is returned by this operation.
Dependencies
- Requires an API token credential for MoySklad API authentication.
- The node uses Axios HTTP client internally to communicate with the MoySklad REST API at
https://api.moysklad.ru/api/remap/1.2. - Network connectivity to MoySklad API endpoint is necessary.
- No other external dependencies.
Troubleshooting
- Missing API credentials: If the API token is not provided or invalid, the node will throw an error "Missing MoySklad API credentials". Ensure the API key is configured correctly in n8n credentials.
- HTTP errors from MoySklad: Errors with status codes >= 400 will be thrown with details from the API response. Common causes include:
- Invalid or non-existent demand ID.
- Insufficient permissions for the API token.
- Network issues or rate limiting.
- Rate limiting: The node implements retry logic with exponential backoff if the API returns HTTP 429 (Too Many Requests). If retries exceed limits, the operation fails.
- Invalid input: Ensure the ID is provided and correctly formatted as a string.