Actions30
Overview
This node interacts with the MoySklad API v1.2 to manage various resources, including Counterparties. Specifically, for the Counterparty - Delete operation, it deletes a counterparty entity identified by its unique ID from the MoySklad system.
Common scenarios where this node is beneficial include:
- Automating cleanup of outdated or incorrect counterparty records.
- Integrating MoySklad with other systems where counterparties need to be programmatically removed.
- Managing data lifecycle by removing entities that are no longer relevant.
Example use case: A business wants to automatically delete a counterparty after an account closure event in their CRM system. This node can be triggered with the counterparty ID to remove it from MoySklad.
Properties
| Name | Meaning |
|---|---|
| ID | The unique identifier of the counterparty to delete. Required for delete operation. |
| Additional Options | Optional parameters to customize the request: |
| - 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 ops). |
| - Limit | Maximum number of items to return (default 100, max 1000). Not applicable for delete operation. |
| - Offset | Number of items to skip before starting to collect the result set (default 0). Not applicable for delete. |
Output
The output JSON for the Delete operation contains:
{
"success": true,
"id": "<deleted-counterparty-id>"
}
success: Boolean indicating if the deletion was successful.id: The ID of the counterparty that was deleted.
No binary data is output 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 base URL
https://api.moysklad.ru/api/remap/1.2. - Properly configured credentials with a valid API token must be set up in n8n for this node to function.
Troubleshooting
- Missing Credentials Error: If the API token is not provided or invalid, the node will throw an error "Missing MoySklad API credentials". Ensure the API token is correctly configured 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 body. Common causes:
- Invalid or non-existent counterparty ID.
- Insufficient permissions for the API token.
- Network or connectivity issues.
- Rate Limiting: The node handles HTTP 429 responses by retrying with exponential backoff. However, excessive requests may still cause failures.
- Invalid Input: Ensure the ID property is provided and correctly formatted as a string.