MoySklad

Interact with MoySklad API v1.2

Overview

This node integrates with the MoySklad API v1.2 to perform operations on various resources, including Supply. Specifically, the Supply - Get operation retrieves detailed information about a single supply record by its ID. It supports expanding related entities and applying filters, limits, and offsets for refined data retrieval.

Common scenarios where this node is beneficial include:

  • Fetching detailed supply order information for inventory or procurement workflows.
  • Integrating supply data into ERP or warehouse management systems.
  • Automating reporting or auditing processes that require up-to-date supply details.

For example, you can use this node to get a specific supply order by its ID, optionally expanding related entities such as linked products or counterparties, and applying filters to narrow down the results.

Properties

Name Meaning
ID The unique identifier of the supply record to retrieve. This is required for the Get operation.
Additional Options A collection of optional parameters:
  Expand Comma-separated list of related entities to expand in the response (e.g., linked documents or attributes).
  Filters Semicolon-separated filters to apply, supporting custom fields (e.g., attributes.name=value).
  Limit Maximum number of records to return (default 100, min 1, max 1000).
  Offset Number of records to skip before starting to collect the result set (default 0).

Output

The output JSON structure contains the full data object of the requested supply entity as returned by the MoySklad API. This includes all standard fields of the supply record plus any expanded relations specified via the expand option.

Example output snippet (simplified):

{
  "id": "some-supply-id",
  "name": "Supply Order #1234",
  "moment": "2023-01-01T12:00:00Z",
  "state": { /* status info */ },
  "positions": [ /* array of supply positions */ ],
  "counterparty": { /* expanded counterparty info if requested */ }
}

No binary data output is produced by this operation.

Dependencies

  • Requires an API token credential for authenticating with the MoySklad API.
  • The node uses Axios HTTP client internally to communicate with the MoySklad REST API endpoint at https://api.moysklad.ru/api/remap/1.2.
  • Network connectivity to the MoySklad API service is necessary.
  • No additional environment variables are required beyond the API token credential.

Troubleshooting

  • Missing API credentials error: If the node throws "Missing MoySklad API credentials," ensure that a valid API token credential is configured in n8n.
  • HTTP errors (status >= 400): The node surfaces API errors with status codes and messages. Common causes include invalid IDs, insufficient permissions, or malformed filters. Verify the correctness of the ID and filter syntax.
  • Rate limiting (HTTP 429): The node implements retry logic with exponential backoff when rate limited. If requests continue to fail, consider reducing request frequency or contacting MoySklad support.
  • Invalid JSON body: For other operations requiring JSON input, ensure the JSON is well-formed. For the Get operation, this is not applicable.
  • Empty or missing data: If no supply is found for the given ID, verify the ID exists and is accessible with your credentials.

Links and References

Discussion