Actions30
Overview
This node interacts with the MoySklad API v1.2 to manage various resources such as products, customer orders, counterparties, supplies, and demands. Specifically, for the Supply resource with the Delete operation, it deletes a supply record identified by its unique ID.
Common scenarios where this node is beneficial include automating inventory or order management workflows where supplies need to be programmatically removed from the system, for example:
- Removing outdated or incorrect supply entries.
- Cleaning up test data after automated testing.
- Integrating with other systems that trigger supply deletions based on business logic.
Properties
| Name | Meaning |
|---|---|
| ID | The unique identifier of the supply to delete. This is required to specify which supply to remove. |
| 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 queries (not applicable for delete operation). |
| - Limit | Maximum number of items to return (not applicable for delete operation). |
| - Offset | Number of items to skip before starting to collect the result set (not applicable for delete). |
Note: For the Delete operation on Supply, only the ID property is essential; additional options are generally not used.
Output
The output JSON object confirms the success of the deletion and echoes back the ID of the deleted supply:
{
"success": true,
"id": "the-supply-id"
}
This simple confirmation allows downstream nodes or workflows to verify that the deletion was successful.
Dependencies
- Requires an API token credential for authenticating with the MoySklad API.
- The node uses the official MoySklad REST API endpoint
https://api.moysklad.ru/api/remap/1.2. - Network connectivity to the MoySklad API service is necessary.
- No binary data output is involved in this operation.
Troubleshooting
- Missing Credentials Error: If the API token is not provided or invalid, the node will throw an error indicating missing credentials. Ensure the API token is correctly configured in n8n credentials.
- HTTP Errors (Status >= 400): The node throws errors containing the HTTP status code and response body if the API call fails. Common causes include:
- Invalid or non-existent supply ID.
- Insufficient permissions for the API token.
- Network issues or API downtime.
- Rate Limiting (HTTP 429): The node implements retry logic with exponential backoff when rate limited. If retries fail, the error is thrown. To mitigate, reduce request frequency or contact MoySklad support.
- Invalid ID Format: Ensure the ID is a valid string matching MoySklad's supply entity identifiers.