Atualizar pessoa no folk, por uma API

Atualiza uma pessoa, alterando apenas os campos enviados. Uma lista (groups, companies, emails, phones, addresses, urls) substitui a atual, então envie-a completa. Deixar um grupo de fora remove a pessoa dele, junto com os valores dos campos personalizados nesse grupo.

Identificador
folk_update_person

A chamada

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

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

Seu sistema envia o id da conexão do cliente e os argumentos da tool. Os headers são os mesmos de toda a API do Connect: o token do seu produto e o token do cliente.

Parâmetros

As descrições dos parâmetros seguem a documentação oficial do app, em inglês.

ParâmetroTipoObrigatórioDescrição
personIdstringSimId of the person, starting with per_, from List people.
firstNamestringNãoFirst name.
lastNamestringNãoLast name.
fullNamestringNãoFull name.
jobTitlestringNãoJob title.
descriptionstringNãoShort description of the person.
birthdaystringNãoBirthday, as YYYY-MM-DD. An empty string removes it.
genderstringNãoGender.Valores: Male, Female, Unknown, Other
emailsarrayNãoAll the email addresses of the person, replacing the current list. The first one is the primary email.
phonesarrayNãoAll the phone numbers, replacing the current list. The first one is the primary phone.
addressesarrayNãoAll the postal addresses, replacing the current list. The first one is the primary address.
urlsarrayNãoAll the web addresses, replacing the current list. The first one is the primary URL.
companiesarrayNãoAll the companies of the person, replacing the current list, each with the id from List companies or a name. A name that does not exist creates the company. The first one is the primary company.
groupsarrayNãoAll the groups of the person, by the id from List groups, replacing the current list. A group left out is removed with its custom field values.
customFieldValuesobjectNãoCustom 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.

Conexões possíveis

O seu cliente conecta a conta do folk uma vez, por um dos modos abaixo. A mesma conexão serve para todas as tools do toolkit.

Chave de API

O cliente cola a chave do app numa tela do Connect, ou o seu sistema envia a chave por POST /api/customer-toolkits, sem tela.

A resposta

Em caso de sucesso, o Connect preserva o status e o corpo da resposta do app. Erros HTTP retornados pelo app usam o envelope {error, api_error}; falhas de autenticação ou validação podem ocorrer antes da execução. O header X-Toolkit-Execution-Id identifica a execução registrada, consultável em GET /api/tools/executions/{uuid}.

Pronta para agentes de IA

O input desta tool é um JSON Schema, disponível em GET /api/tools/folk_update_person. Ele vira a definição de tool do seu agente sem conversão.

Outras tools do folk

Ver as 13 tools

Toolkits da mesma categoria

Ver os 100 toolkits

Veja o Connect aplicado ao seu produto.

Teste por 15 dias sem cartão, ou mostre seu cenário ao nosso time.