Actualizar empresa en folk, con una API

Actualiza una empresa, cambiando solo los campos enviados. Una lista (groups, emails, phones, addresses, urls) sustituye a la actual, así que envíala completa. Dejar un grupo fuera quita a la empresa de él, junto con los valores de sus campos personalizados en ese grupo. Un nombre ya usado por otra empresa falla.

Identificador
folk_update_company

La llamada

POST https://connect.reportei.com/api/tools/folk_update_company/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json

{
  "customer_toolkit": "<connection UUID>",
  "arguments": {
    "companyId": "<companyId>"
  }
}

Tu sistema envía el id de la conexión de tu cliente y los argumentos de la tool. Los headers son los mismos de toda la API de Connect: el token de tu producto y el token de tu cliente.

Parámetros

Las descripciones de los parámetros siguen la documentación oficial de la app, en inglés.

ParámetroTipoObligatorioDescripción
companyIdstringSíId of the company, starting with com_, from List companies.
namestringNoName of the company, unique in the workspace.
descriptionstringNoShort description of the company.
industrystringNoIndustry, like Technology.
employeeRangestringNoNumber of employees.Valores: 1-10, 11-50, 51-200, 201-500, 501-1000, 1001-5000, 5001-10000, 10000+
emailsarrayNoAll the email addresses of the company, replacing the current list. The first one is the primary email.
phonesarrayNoAll the phone numbers, replacing the current list. The first one is the primary phone.
addressesarrayNoAll the postal addresses, replacing the current list. The first one is the primary address.
urlsarrayNoAll the web addresses, replacing the current list. The first one is the primary URL.
groupsarrayNoAll the groups of the company, by the id from List groups, replacing the current list. A group left out is removed with its custom field values.
customFieldValuesobjectNoCustom field values by group id, each group also listed in groups: a map from field name (List group custom fields) to value. Text, number, YYYY-MM-DD date, the exact option label of a single select or a list of labels (an unknown label creates a new option), and a list of objects with id, or with id or email for user fields. null clears a value.

Conexiones posibles

Tu cliente conecta su cuenta de folk una sola vez, con uno de los modos de abajo. La misma conexión sirve para todas las tools del toolkit.

Clave de API

Tu cliente pega la clave de la app en una pantalla de Connect, o tu sistema envía la clave con POST /api/customer-toolkits, sin pantalla.

La respuesta

Si la llamada tiene éxito, Connect conserva el status y el cuerpo de la respuesta de la app. Los errores HTTP devueltos por la app usan el objeto {error, api_error}; la autenticación o validación pueden fallar antes de la ejecución. El header X-Toolkit-Execution-Id identifica la ejecución registrada, disponible en GET /api/tools/executions/{uuid}.

Lista para agentes de IA

El input de esta tool es un JSON Schema, disponible en GET /api/tools/folk_update_company. Se convierte en la definición de tool de tu agente sin conversión.

Otras tools de folk

Ver las 13 tools

Toolkits de la misma categoría

Ver los 100 toolkits

Mira Connect aplicado a tu producto.

Pruébalo durante 15 días sin tarjeta, o cuéntale tu caso a nuestro equipo.