Actions30
Overview
This node interacts with the MoySklad API v1.2 to manage various resources, including Counterparties. Specifically, the Get Many operation for the Counterparty resource retrieves multiple counterparty records from MoySklad with support for filtering, pagination, and expanding related entities.
Common scenarios where this node is beneficial include:
- Synchronizing a list of counterparties from MoySklad into another system.
- Fetching filtered subsets of counterparties based on custom attributes or conditions.
- Paginating through large sets of counterparties to process or analyze them in batches.
- Expanding related data (e.g., linked contacts or addresses) for richer information retrieval.
Practical example:
- Retrieve up to 100 counterparties whose custom attribute "VIP" is set to true, starting from the 50th record, and expand their linked contact details.
Properties
| Name | Meaning |
|---|---|
| Additional Options | A collection of optional parameters to customize the query: |
| - Expand | Comma-separated list of related entities to expand in the response (e.g., linked contacts). |
| - Filters | Semicolon-separated filters to narrow down results, supporting custom fields (e.g., attributes.name=value). |
| - Limit | Maximum number of counterparties to retrieve (1 to 1000). |
| - Offset | Number of counterparties to skip before starting to collect the result set (for pagination). |
Output
The node outputs an array of JSON objects under the json field with the following structure for the Get Many operation:
{
"rows": [
{
// Counterparty object as returned by MoySklad API,
// including standard and expanded fields if requested.
},
...
]
}
- The
rowsarray contains multiple counterparty records. - Each record includes all available data fields for a counterparty, potentially enriched with expanded relations.
- 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:
https://api.moysklad.ru/api/remap/1.2. - Network connectivity to MoySklad's API service is necessary.
- No additional external libraries beyond Axios (bundled) are required.
Troubleshooting
- Missing Credentials Error: If the API token is not provided or invalid, the node will throw an error indicating missing credentials. Ensure that a valid MoySklad API token is configured in n8n credentials.
- HTTP Errors from MoySklad: The node surfaces HTTP errors with status codes and response details. Common issues include:
400or422: Invalid request parameters or malformed filters/body JSON.401or403: Authentication failure due to invalid or expired API token.429: Rate limiting; the node implements retries with exponential backoff but may fail after repeated attempts.
- Filter Syntax: Filters must be semicolon-separated strings matching MoySklad's filtering syntax. Incorrect filter format can cause errors or empty results.
- Pagination Limits: Setting very high limits or offsets beyond available data may return empty arrays.
- JSON Parsing: For operations requiring JSON bodies (not applicable here), ensure valid JSON syntax.