Skip to main content
The API Connections hub lets you configure external service integrations without modifying any PHP code. All connection credentials and validation rules are stored in the database under utb_pb_table_config and managed entirely through the admin UI. In the WordPress admin sidebar, click UTB Builder, then click Configuración API. The page has two sections:
  • Conexiones a APIs Externas — define root endpoint connections and credentials
  • Reglas de Validación API — define rules that query those connections and can be attached to form fields

Creating a new API connection

1

Open the connections section

On the Configuración API page, locate the Conexiones a APIs Externas section and click + Agregar Conexión. A new connection block appears.
2

Set the Connection ID

Enter a unique identifier in the Connection ID field. This is the internal key used when linking rules to this connection.
API_BANNER_PROD
Use uppercase and underscores. The ID must be unique across all connections.
3

Set a friendly name

Enter a human-readable label in the Nombre Amigable field, for example Banner Producción. This name appears in rule selectors inside the Form Builder.
4

Enter the Base URL

Enter the root URL of the API in the Base URL de la API field, for example:
https://api.utb.edu.co
Do not include a trailing slash. The base URL is prepended to every endpoint path defined in your validation rules.
5

Select the authentication type

Choose the appropriate Tipo de Autenticación for this connection:
Auth typeWhen to use
Sin Autenticación (Pública)Publicly accessible endpoints that require no credentials
OAuth 2.0 (Client Credentials)APIs that issue short-lived tokens via a Client ID and Client Secret
Basic Auth (User/Pass)APIs that accept HTTP Basic authentication
Bearer Token FijoAPIs that accept a fixed, long-lived bearer token
6

Enter credentials

Fill in the credential fields that appear based on your selected auth type. See the Auth types reference below.
7

Save the connection

Click Guardar Configuración de Integraciones at the bottom of the page. The connection is saved and immediately available for use in validation rules.

Auth types reference

OAuth 2.0 (Client Credentials)

The plugin negotiates a token automatically using the OAuth 2.0 Client Credentials grant (grant_type=client_credentials). The token is cached in WordPress Transient Cache. The cache TTL is set to expires_in - 60 seconds (where expires_in comes from the OAuth token response). For a standard 3600-second token, this is approximately 59 minutes. The plugin never allows an expired token to be used in a request.
FieldDescription
Client IDThe OAuth client identifier issued by the API provider
Client SecretThe OAuth client secret
Token refresh is fully automatic. You do not need to rotate tokens manually or schedule any cron jobs. The transient cache key is oauth_token_{connection_id}. The token endpoint is constructed as {api_base}/oauth/token.

Bearer Token

Enter the static token value in the Token Bearer Fijo field. The plugin adds Authorization: Bearer <token> to every request made through this connection.

Basic Auth

Enter the username in the Client ID / Username field and the password in the Client Secret / Password field. The plugin encodes these as a standard HTTP Basic Authorization header.

Creating a validation rule

Validation rules define the specific API call to execute when a form field needs to be validated. Once created, rules appear in the Form Builder’s Reglas de Validación API dropdown.
1

Open the rules section

On the Configuración API page, locate the Reglas de Validación API section and click + Agregar Regla. A new rule block appears.
2

Set the Rule ID

Enter a unique internal identifier in the ID Regla field:
validar_cedula_banner
Use lowercase letters and underscores only.
3

Set a rule name

Enter a descriptive name in Nombre (Visible en Builder), for example Validar Roles Banner. This name appears in the Form Builder’s rule picker.
4

Select an API connection

In the Conexión API dropdown, select the connection this rule should use. Only connections created in the Conexiones section are available.
5

Set the HTTP method

Choose GET or POST. Most lookup-type validations use GET.
6

Set the endpoint path

Enter the path to append to the Base URL in the Endpoint / URL Path field. Use {{variable_key}} placeholders for dynamic values:
/woocommerce/rol/{{cedula_key}}
The {{value}} placeholder always refers to the value of the form field this rule is attached to. Additional placeholders are resolved from other form fields using the Variables Extra mapping configured in the Form Builder.
7

Set extra variables (optional)

If your endpoint requires values from additional form fields beyond the primary field, list the field IDs in the Variables Extra field, separated by commas:
tipo_doc, email
These become available as {{tipo_doc}} and {{email}} in the endpoint path and POST body.
8

Set the POST body (GET requests only)

For POST requests, enter the JSON body template in the JSON Body Mapping field:
{"documento": "{{value}}", "tipo": "{{tipo_doc}}"}
9

Set the success condition

Enter the success path in the Mapeo de Éxito field. This tells the plugin which property in the API response indicates a successful validation:
data.IDENTIFICACION
If this path exists and is truthy in the JSON response, the validation passes. If it is absent or falsy, the validation fails and the form displays the error message.
10

Set the error message

Enter the user-facing error message in Mensaje de Error por Defecto, for example:
El número de documento no fue encontrado en el sistema.
11

Save

Click Guardar Configuración de Integraciones. The rule is now available in the Form Builder.

Variable interpolation syntax

All endpoint paths and POST body templates support {{variable_key}} interpolation:
PlaceholderResolved from
{{value}}The value of the form field the rule is attached to
{{field_id}}The current value of any other field on the form, where field_id is listed in Variables Extra
At runtime, the frontend RulesEngine substitutes the actual field values into the placeholders before sending the HTTP request. Values are URL-encoded when interpolated into GET paths.

Linking rules to form fields

After saving a rule, attach it to a form field in the Form Builder:
  1. Open the product in Products > Edit Product.
  2. Click the Form Builder tab in the UTB Product Builder panel.
  3. Click the field you want to validate — for example, the Cédula field.
  4. In the Properties panel, scroll to Reglas de Validación API.
  5. Select the rule from the dropdown.
  6. Map each {{variable_key}} to its source field.
  7. Click Guardar Cambios.
See Form Builder — Injecting API validation rules for the full step-by-step.

Global business rules

At the bottom of the Configuración API page, the Reglas de Negocio Globales section contains:
FieldDescription
Periodo Académico Actual (CEP)The current academic period string, for example 2026.1. Legacy calculators use this value when querying roles and discounts from Banner.
Update this value at the start of each academic period.

Build docs developers (and LLMs) love