API - SISTEMA | BAILEYS | OFIC...
Atribuir Tags
1min
\<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //{backend url}/api/tags/add', 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 =>'{ "ticketid" 383, // id do ticket "tags" \[ { "id" 100 // id da tag }, { "id" 98 // id da tag } ] }', curlopt httpheader => array( 'content type application/json', 'authorization bearer seutokenaqui' ), )); $response = curl exec($curl); curl close($curl); echo $response; { "id" 383, "status" "open", "unreadmessages" 0, "lastmessage" "apos a primeira", "isgroup" false, "userid" 1, "contactid" 4300, "whatsappid" 1, "queueid" 1, "chatbot" false, "channel" "whatsapp", "queueoptionid" null, "companyid" 1, "uuid" "ea7407a7 4f55 4a8c 907e 8e8b29466bee", "createdat" "2023 09 04t08 13 17 451z", "updatedat" "2023 09 14t22 12 44 180z", "tags" \[ { "id" 56, "name" "10 conexoes", "color" "#a4cccc", "kanban" 0, "prioridade" 0, "conversao" null, "companyid" 1, "createdat" "2023 08 07t21 19 34 178z", "updatedat" "2023 08 07t21 19 34 178z", "tickettag" { "ticketid" 383, "tagid" 56, "createdat" "2023 09 15t00 59 04 965z", "updatedat" "2023 09 15t00 59 04 965z" } } ] }