API - SISTEMA | BAILEYS | OFIC...
Migrar Tickets de Conexão
1min
PHP
1<?php
2
3$curl = curl_init();
4
5curl_setopt_array($curl, array(
6 CURLOPT_URL => 'https://{BACKEND_URL}/api/tickets/changeconnection',
7 CURLOPT_RETURNTRANSFER => true,
8 CURLOPT_ENCODING => '',
9 CURLOPT_MAXREDIRS => 10,
10 CURLOPT_TIMEOUT => 0,
11 CURLOPT_FOLLOWLOCATION => true,
12 CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13 CURLOPT_CUSTOMREQUEST => 'POST',
14 CURLOPT_POSTFIELDS =>'{
15 "OLD_connectionId":158,
16 "NEW_connectionId":159
17 }',
18 CURLOPT_HTTPHEADER => array(
19 'Content-Type: application/json',
20 'Authorization: Bearer seutokenaqui' //Token cadastrado na conexão
21 ),
22));
23
24$response = curl_exec($curl);
25
26curl_close($curl);
27echo $response;
28
JSON
1{
2 "total": 1,
3 "migrated": 0,
4 "skipped": 1,
5 "failed": 0,
6 "errors": []
7}
Updated 06 Apr 2025

Did this page help you?