RedStage icon

RedStage

Consume Red Stage API

Overview

The RedStage node for n8n allows you to interact with the Red Stage API, specifically targeting various resources such as Inventory.
For the Inventory → Get Detailed operation, this node retrieves detailed inventory information from the Red Stage system.
This is useful in scenarios where you need up-to-date stock levels or want to track changes in inventory for specific SKUs (Stock Keeping Units) or since a particular date.

Practical examples:

  • Fetching current inventory details for a list of products by their SKUs.
  • Monitoring which products have had inventory updates since a certain timestamp.
  • Integrating real-time inventory data into your e-commerce workflows.

Properties

Name Type Meaning
Additional Fields Collection A group of optional fields to refine the inventory query.
Inventory SKUs JSON List of product SKUs to filter the inventory results. If omitted, returns all SKUs.
Last Update Date DateTime Only return SKUs that have been updated since this date/time.

Output

  • The output is an array of objects, each representing inventory details for a SKU.
  • Each object contains the fields returned by the Red Stage API for the requested inventory items.
  • If an error occurs and "Continue On Fail" is enabled, the output will include an object with an error field containing the error message.

Example output:

[
  {
    "sku": "product_sku",
    "quantity": 100,
    "last_update": "2024-06-01T12:00:00Z"
    // ...other fields as provided by the API
  }
]

or, on error:

[
  {
    "error": "Error message here"
  }
]

Dependencies

  • External Service: Requires access to the Red Stage API.
  • Credentials: You must configure the redStageApi credential in n8n for authentication.

Troubleshooting

  • Common Issues:

    • Invalid Credentials: If the API credentials are incorrect or missing, the node will throw an authentication error.
    • Unknown Resource/Operation: If the resource or operation name is misspelled or not supported, you'll see an error like:
      "The resource \"inventory\" is not known!"
    • Malformed Input: Providing invalid JSON for SKUs or an incorrectly formatted date may result in API errors.
  • Error Handling:

    • If "Continue On Fail" is enabled, errors are returned in the output as objects with an error property.
    • Otherwise, execution stops at the first error.

Links and References

  • n8n Documentation
  • Consult your Red Stage API documentation for details on available fields and authentication setup.

Discussion