Actions30
Overview
This node integrates with the MoySklad API v1.2 to manage various resources, including Customer Orders. Specifically, the Update operation for the Customer Order resource allows users to modify an existing customer order by providing its ID and a JSON body describing the changes.
Common scenarios where this node is beneficial include:
- Automating updates to customer orders based on external triggers or workflows.
- Synchronizing order data between MoySklad and other systems.
- Adjusting order details such as status, quantities, or custom fields programmatically.
For example, you might use this node to update the delivery date or add notes to a customer order when a related event occurs in another system.
Properties
| Name | Meaning |
|---|---|
| ID | The unique identifier of the customer order to update. Required for update operations. |
| Body | Raw JSON string representing the fields and values to update on the customer order, following the API schema. |
| 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). - Offset: Number specifying the offset for pagination (default 0). |
Output
The output is a JSON object representing the updated customer order as returned by the MoySklad API. It contains all the fields of the customer order after the update has been applied.
Example structure (simplified):
{
"id": "string",
"name": "string",
"state": { /* order state info */ },
"positions": [ /* array of order positions */ ],
"attributes": [ /* custom attributes */ ],
// ... other fields as per MoySklad API response
}
No binary data output is produced by this operation.
Dependencies
- Requires an API token credential for authenticating with the MoySklad API.
- The node uses the official MoySklad REST API endpoint at
https://api.moysklad.ru/api/remap/1.2. - Network connectivity to the MoySklad API service is necessary.
- No additional external dependencies beyond Axios HTTP client bundled internally.
Troubleshooting
- Missing API credentials: The node will throw an error if the required API token is not provided or invalid. Ensure that 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 the API's error message. Common causes include invalid IDs, malformed JSON bodies, or insufficient permissions.
- Rate limiting (HTTP 429): The node implements retry logic with exponential backoff for rate-limited requests. If retries are exhausted, the error is thrown. To mitigate, reduce request frequency or check API usage limits.
- Invalid JSON in Body property: Since the Body input expects raw JSON, ensure it is well-formed. Invalid JSON will cause parsing errors before sending the request.
- Incorrect ID or resource path: Providing an incorrect or non-existent customer order ID will result in a 404 or similar error from the API.
Links and References
- MoySklad API Documentation: https://dev.moysklad.ru/doc/api/remap/1.2/
- MoySklad Customer Order Entity Reference: https://dev.moysklad.ru/doc/api/remap/1.2/dictionaries/#suschnosti-zakaz-klienta
- n8n Documentation on Credentials: https://docs.n8n.io/credentials/overview/