Actions30
Overview
This node interacts with the MoySklad API v1.2 to manage various resources, including Products. Specifically, the Delete Product operation allows users to delete a product by its unique ID from their MoySklad inventory system.
Typical use cases include:
- Automating cleanup of obsolete or discontinued products.
- Integrating product lifecycle management into workflows where products are removed based on external triggers.
- Synchronizing product deletions between MoySklad and other systems.
For example, a user might set up an automation that deletes a product in MoySklad when it is marked as discontinued in another database.
Properties
| Name | Meaning |
|---|---|
| ID | The unique identifier of the product to delete. This is required for the delete operation. |
| Additional Options | A collection of optional parameters: |
| - Expand | Comma-separated list of related entities to expand in the response (not typically used in delete). |
| - Filters | Semicolon-separated filters to narrow down results (not applicable for delete but available for other operations). |
| - Limit | Maximum number of items to return (used in listing operations, not delete). |
| - Offset | Number of items to skip before starting to collect the result set (used in listing operations, not delete). |
Note: For the Delete operation on Product resource, only the ID property is strictly required and used.
Output
The output JSON for the Delete Product operation has the following structure:
{
"success": true,
"id": "string"
}
success: A boolean indicating whether the deletion was successful.id: The ID of the deleted product.
No binary data is returned by this operation.
Dependencies
- Requires an API token credential for MoySklad API authentication.
- The node uses the official MoySklad REST API endpoint at
https://api.moysklad.ru/api/remap/1.2. - Axios HTTP client is used internally for making API requests.
- Network connectivity to MoySklad API must be available.
- Properly configured credentials with valid API tokens are mandatory.
Troubleshooting
- Missing Credentials Error: If the API token is missing or invalid, the node will throw an error stating "Missing MoySklad API credentials". Ensure that the API token is correctly set up in n8n credentials.
- HTTP Errors: If the API returns an error status (400 or above), the node throws an error with the status code and response data. Common causes include:
- Invalid or non-existent product ID.
- Insufficient permissions for the API token.
- Network issues or API downtime.
- Rate Limiting: The node implements retry logic with exponential backoff if the API responds with HTTP 429 (Too Many Requests). If retries exceed limits, the request fails.
- Invalid ID Format: Ensure the product ID is correctly formatted as expected by MoySklad API.