API - SISTEMA | BAILEYS | OFIC...

Obter Tickets do Contato

1min
\<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //{backend url}/api/contacts/alltickets', curlopt returntransfer => true, curlopt encoding => '', curlopt maxredirs => 10, curlopt timeout => 0, curlopt followlocation => true, curlopt http version => curl http version 1 1, curlopt customrequest => 'get', curlopt postfields =>'{ "number" "5511989091838" }', curlopt httpheader => array( 'content type application/json', 'authorization bearer tokenmeu' ), )); $response = curl exec($curl); curl close($curl); echo $response; \[ { "id" 4305, "status" "pending", "unreadmessages" 0, "lastmessage" "pagamento recebido para renovação do sistema app supersac com br por 1 mês", "protocolo" "6170", "typebot sessionid" null, "typebot status" null, "customa" null, "repeatcount" 1, "customb" null, "isgroup" false, "userid" null, "contactid" 24729, "whatsappid" 1, "queueid" 20, "chatbot" false, "channel" "whatsapp", "queueoptionid" null, "companyid" 1, "uuid" "ba6a3ddf 0cb7 419b a4c1 5f3b86855acb", "promptid" null, "createdat" "2024 01 13t09 30 02 803z", "updatedat" "2024 03 09t18 54 15 556z", "tags" \[ { "id" 100, "name" "abra", "color" "#a4cccc", "tickettag" { "ticketid" 4305, "tagid" 100, "createdat" "2024 02 22t20 45 09 501z", "updatedat" "2024 02 22t20 45 09 501z" } }, { "id" 56, "name" "10 conexoes", "color" "#a4cccc", "tickettag" { "ticketid" 4305, "tagid" 56, "createdat" "2024 02 22t20 45 09 501z", "updatedat" "2024 02 22t20 45 09 501z" } } ] }, { "id" 4402, "status" "closed", "unreadmessages" 0, "lastmessage" "por falta de interação, encerramos este atendimento ", "protocolo" "5580", "typebot sessionid" null, "typebot status" "on", "customa" null, "repeatcount" 0, "customb" null, "isgroup" false, "userid" null, "contactid" 24729, "whatsappid" 67, "queueid" null, "chatbot" false, "channel" "whatsapp", "queueoptionid" null, "companyid" 1, "uuid" "342bf193 090b 4528 9dcc 04a44d388e47", "promptid" null, "createdat" "2024 01 29t23 04 04 806z", "updatedat" "2024 02 13t18 59 00 852z", "tags" \[] }, { "id" 4733, "status" "pending", "unreadmessages" 1, "lastmessage" "dsadsa", "protocolo" "6120", "typebot sessionid" null, "typebot status" null, "customa" null, "repeatcount" null, "customb" null, "isgroup" false, "userid" null, "contactid" 24729, "whatsappid" 17, "queueid" 21, "chatbot" false, "channel" "whatsapp", "queueoptionid" null, "companyid" 1, "uuid" "e6c13ac9 4afc 4264 86d2 f3c1d7d99e7f", "promptid" null, "createdat" "2024 03 01t23 17 46 035z", "updatedat" "2024 03 01t23 17 46 228z", "tags" \[] }, { "id" 4579, "status" "open", "unreadmessages" null, "lastmessage" "audio record site 1709583841792 mp3", "protocolo" "6143", "typebot sessionid" null, "typebot status" null, "customa" null, "repeatcount" 0, "customb" null, "isgroup" false, "userid" 1, "contactid" 24729, "whatsappid" 130, "queueid" 63, "chatbot" false, "channel" "whatsapp business account", "queueoptionid" null, "companyid" 1, "uuid" "8939c24b 8eb7 455b b6be 07cc8e493715", "promptid" null, "createdat" "2024 02 23t01 26 11 726z", "updatedat" "2024 03 04t20 24 05 052z", "tags" \[] }, { "id" 4307, "status" "open", "unreadmessages" 12, "lastmessage" " esta mensagem foi editada pelo contato \n\nadsadas dsadas", "protocolo" "5461", "typebot sessionid" null, "typebot status" "on", "customa" null, "repeatcount" 0, "customb" null, "isgroup" false, "userid" 1, "contactid" 24729, "whatsappid" 2, "queueid" 1, "chatbot" false, "channel" "whatsapp", "queueoptionid" null, "companyid" 1, "uuid" "92cede83 16e6 4f76 8d4b 7bb2221520f2", "promptid" null, "createdat" "2024 01 13t14 12 00 133z", "updatedat" "2024 03 09t19 00 10 165z", "tags" \[] }, { "id" 4377, "status" "open", "unreadmessages" 0, "lastmessage" "dsadas", "protocolo" "5246", "typebot sessionid" null, "typebot status" "on", "customa" null, "repeatcount" null, "customb" null, "isgroup" false, "userid" 1, "contactid" 24729, "whatsappid" 115, "queueid" null, "chatbot" false, "channel" "whatsapp", "queueoptionid" null, "companyid" 1, "uuid" "e3588aaa d980 47fa ba5d 0cd9ac69e392", "promptid" null, "createdat" "2024 01 24t22 55 15 658z", "updatedat" "2024 01 25t13 21 30 120z", "tags" \[] } ]