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 Delivery, Inventory, Log, Order, and Shipment.
For the Delivery resource with the Commit Delivery operation, this node enables you to commit (finalize) a delivery by providing its unique increment ID. This is useful in workflows where you need to programmatically confirm or finalize deliveries after certain conditions are met, such as after payment confirmation or inventory checks.

Example use cases:

  • Automatically committing a delivery once an order status changes.
  • Integrating with other systems to trigger delivery commits based on external events.

Properties

Name Type Meaning
Delivery Increment ID String The unique identifier (increment ID) of the delivery you want to commit. Required field.

Output

The output will be a JSON object (or array of objects) representing the response from the Red Stage API for the "commit" operation on the Delivery resource.
The exact structure depends on the API's response, but typically it will include fields relevant to the committed delivery, such as status, IDs, timestamps, etc.

If an error occurs and "Continue On Fail" is enabled, the output will contain an error field with the error message.

Example output:

[
  {
    "delivery_id": "12345",
    "status": "committed",
    "timestamp": "2024-06-10T12:34:56Z"
  }
]

Or, in case of error:

[
  {
    "error": "Delivery not found"
  }
]

Dependencies

  • External Service: Requires access to the Red Stage API.
  • API Credentials: You must configure the redStageApi credential in n8n.
  • Environment: No special environment variables required beyond standard n8n setup.

Troubleshooting

  • Common Issues:

    • Invalid Delivery Increment ID: If the provided ID does not exist, the API may return an error such as "Delivery not found".
    • Missing Credentials: If the redStageApi credential is not set up, the node will fail to authenticate.
    • Unknown Resource/Operation: If the resource or operation is misspecified, you may see errors like The resource "X" is not known!.
  • Error Handling:

    • If "Continue On Fail" is enabled, errors will be returned in the output as an error field.
    • Otherwise, the workflow execution will stop on error.

Links and References

  • n8n Documentation
  • Consult your Red Stage API documentation for details on the "commit" delivery endpoint and expected responses.

Discussion