How to Consume External Services with the Rest API v2 Component in Wolkvox Studio
Table of Contents
Introduction
The "Rest API v2" component allows you to integrate your flows with external services or systems using HTTP requests (e.g., sending or receiving data from CRMs, ERPs, payment platforms, or cloud services).
This component enables direct API consumption within flows created in different types of routing points or Agent Scripting. Whenever the flow reaches this component, it will automatically execute the configured request (GET, POST, PUT, DELETE, or PATCH) and store the response in a variable for use in subsequent steps.
Configuration
- Drag the Rest API v2 component from the panel and drop it into the desired position in your flow.
- In the "Configuration" tab, fill in the fields based on the API you want to consume.
- Los campos son los siguientes:
- URL: Enter the address of the service you want to connect to.
-
Method: Select the type of request:
- GET: Retrieve data.
- POST: Send or create records.
- PUT: Update existing information.
- DELETE: Remove records.
- PATCH: Partially update a record.
-
Headers: Add custom HTTP headers (e.g., Authorization, Content-Type).
- Use the "Add" button to include new header lines.
- Delete header lines by right-clicking and selecting "Delete Item".
-
Body: Choose the format for sending data.
- form-data.
- raw (ideal for JSON or other structured formats).
- Enter the body content in the large text field.
- Time out (Secs): Define the maximum time (in seconds) the system will wait for the API response before ending the request.
- Result: Enter the name of the variable where the API response will be stored (e.g., $res_api_cliente).
-
Default Variables: The component automatically generates two variables:
- $rest_api_time: Total execution time of the request.
- $rest_api_code: HTTP status code returned by the API (e.g., 200, 404, 500).
- Click "Save" to apply the changes.

- To ensure your connection works correctly:
- Go to the "Test API" tab.
- Press the "Test API" button to execute the request with the defined parameters. The response will appear in the main panel of this tab.
- This feature allows you to validate the endpoint and adjust headers, body, or format before compiling the entire flow.
