API - SISTEMA | BAILEYS | OFIC...
Atualizar Contato
1min
\<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //{backend url}/api/contact/update', curlopt returntransfer => true, curlopt encoding => '', curlopt maxredirs => 10, curlopt timeout => 0, curlopt followlocation => true, curlopt http version => curl http version 1 1, curlopt customrequest => 'post', curlopt postfields =>'{ "id" "24294", "name" "teste atualizando nome", "number" "5521995027350", "email" "email\@email com", "carteiraid" "", // null ou vazio para não utilizar "extrainfo" \[ { "name" "código", "value" "43242er32" }, { "name" "valor do lead", "value" "100,00" }, { "name" "cep", "value" "91130720" } ] }', curlopt httpheader => array( 'content type application/json', 'authorization bearer tokenmeu' ), )); $response = curl exec($curl); curl close($curl); echo $response; { "id" 24294, "name" "teste atualizando nome", "number" "5521995027350", "email" "email\@email com", "companyid" 1, "acceptaudiomessage" true, "active" true, "profilepicurl" "", "extrainfo" \[ { "id" 21, "name" "código", "value" "43242er32", "contactid" 24294, "createdat" "2023 12 10t20 03 51 633z", "updatedat" "2023 12 10t20 03 51 633z" }, { "id" 20, "name" "cep", "value" "91130720", "contactid" 24294, "createdat" "2023 12 10t20 03 51 633z", "updatedat" "2023 12 10t20 03 51 633z" }, { "id" 22, "name" "valor do lead", "value" "100,00", "contactid" 24294, "createdat" "2023 12 10t20 03 51 633z", "updatedat" "2023 12 10t20 03 51 633z" } ] }