Actions30
Overview
This node interacts with the MoySklad API v1.2 to manage supply entities, specifically allowing users to update the status of a supply record. It is useful in scenarios where you need to programmatically change the state or status of supplies within your inventory or order management workflows.
For example, you might use this node to mark a supply as "received," "in transit," or "cancelled" based on external triggers or automated processes, ensuring your inventory system stays up-to-date without manual intervention.
Properties
| Name | Meaning |
|---|---|
| ID | The unique identifier of the supply entity to update. Required for operations that target a specific supply. |
| Body | Raw JSON body containing the data to update the supply's status. Must conform to the MoySklad API schema for supply updates. |
| Additional Options | A collection of optional parameters: - Expand: Comma-separated relations to expand in the response. - Filters: Semicolon-separated filters supporting custom fields (e.g., attributes.name=value). - Limit: Number limiting the number of results returned (default 100, max 1000). - Offset: Number specifying the offset for pagination (default 0). |
Output
The node outputs a JSON object representing the updated supply entity as returned by the MoySklad API after the status update operation. This includes all fields of the supply resource, potentially expanded relations if requested.
No binary data is output by this node.
Example output structure (simplified):
{
"id": "string",
"name": "string",
"status": {
"id": "string",
"name": "string"
},
"otherFields": "..."
}
Dependencies
- Requires an API token credential for authenticating with the MoySklad API.
- The node uses the Axios HTTP client internally to make requests to
https://api.moysklad.ru/api/remap/1.2. - Network connectivity to the MoySklad API endpoint is necessary.
- No additional environment variables are required beyond the API token credential.
Troubleshooting
- Missing API credentials: The node will throw an error if the API token is not provided or invalid. Ensure the API token credential is configured correctly in n8n.
- HTTP errors from MoySklad API: Errors with status codes 400 and above will be thrown with details from the API response. Common causes include invalid IDs, malformed JSON bodies, or insufficient permissions.
- Rate limiting (HTTP 429): The node implements retry logic with exponential backoff when receiving rate limit responses. If retries fail, the error is propagated. To avoid this, reduce request frequency or increase limits cautiously.
- Invalid JSON in Body property: The Body input must be valid JSON. Malformed JSON will cause parsing errors before the request is sent.
- Incorrect ID or resource path: Ensure the ID corresponds to an existing supply entity; otherwise, the API will return an error.