BCL icon

BCL

Consume BCL Payment API

Form → Update Stock

AI-generated

Overview

This node operation updates the stock quantities of items in a specified form using the BCL Payment API. It is useful for managing inventory levels directly within a form, ensuring that stock information is accurate and up-to-date. For example, an e-commerce platform can use this operation to adjust stock counts after sales or restocking events.

Use Case Examples

  1. Updating stock quantities for multiple items in a form to reflect recent sales or inventory changes.
  2. Synchronizing stock levels between an external inventory system and the form used for order processing.

Properties

Name Meaning
Form ID The unique identifier of the form whose stock is to be updated.
Stock Items A collection of items with their respective IDs and new stock quantities to update in the form.

Output

JSON

  • items - Array of updated stock items with their IDs and quantities as returned by the API.

Dependencies

  • BCL Payment API with an API token credential

Troubleshooting

  • Ensure that at least one stock item is provided; otherwise, the node throws an error indicating that stock items are required.
  • Authentication errors may occur if the API token is invalid or expired; verify credentials if you encounter a 401 error.
  • Validation errors (422) indicate issues with the data format or missing required fields; check the input values for correctness.
  • Bad request errors (400) suggest improperly formatted requests or invalid parameters; review the request payload.
  • Permission errors (403) mean the API token does not have access rights; confirm the token's permissions.
  • Not found errors (404) indicate the specified form or items do not exist; verify the form ID and item IDs.
  • Server errors (500+) indicate issues on the BCL server side; retry later or contact support if persistent.

Discussion