Skip to content

HTTP Activities

Version: 1.0.0  ·  ID: zoan-packages-http  ·  Author: Zoan Software

The HTTP package allows your automation to consume APIs and web services (REST): query data from a system, send information, integrate two applications that communicate via API. It is the most robust and fastest way to integrate with a system when it offers an API — more reliable than automating its interface with the browser.

All activities return a ZoanHttpResponse object with:

PropertyTypeDescription
.StatusCodenumberHTTP code (200, 201, 404…)
.Okbooleantrue if code is 2xx (success)
.BodyobjetoThe body of the response. If JSON, it is automatically converted to dictionary/list, ready to read with .clave
.HeadersdiccionarioThe response headers
HTTP GET url = "https://api.ejemplo.com/clientes/42" → output: resp
Log message = = "Nombre: " + resp.Body["nombre"]

Most APIs require authentication. The authorization parameter configures it — it is a JSON type field where you indicate the type and its data. There are three types supported:

TypeWhat to put in the authorization field
Bearer (token){ "type": "bearer", "token": "..." }
Basic (username/password){ "type": "basic", "username": "...", "password": "..." }
API Key{ "type": "apikey", "header": "X-API-Key", "value": "..." }

The headers parameter is another JSON field: a dictionary of extra headers to send (header name → value).

headers = { "Accept": "application/json", "X-Origen": "zoan-bot" }

In POST, PUT and PATCH you send a body (body). It can be an object (automatically converted to JSON) or text. The default contentType is application/json.

body = { "nombre": = cliente.nombre, "nit": = cliente.nit }
ActivityTypeOutputWhat it does
HTTP GEThttp-getZoanHttpResponseRead/query data from a URL
HTTP DELETEhttp-deleteZoanHttpResponseDelete a resource
ActivityTypeOutputWhat it does
HTTP POSThttp-postZoanHttpResponseCreate a resource or send data
HTTP PUThttp-putZoanHttpResponseReplaces an entire resource
HTTP PATCHhttp-patchZoanHttpResponsePartially update a resource