API - SISTEMA | BAILEYS | OFIC...
Obter Empresa
1min
PHP
1<?php
2
3$curl = curl_init();
4
5curl_setopt_array($curl, array(
6 CURLOPT_URL => 'https://{BACKEND_URL}/api/companies',
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 => 'GET',
14 CURLOPT_POSTFIELDS =>'{
15 "id":"69"
16}',
17 CURLOPT_HTTPHEADER => array(
18 'Content-Type: application/json',
19 'Authorization: Bearer tokenmeu'
20 ),
21));
22
23$response = curl_exec($curl);
24
25curl_close($curl);
26echo $response;
JSON
1{
2 "id": 69,
3 "name": "EMPRESA DE TESTE API22",
4 "phone": "5511989091838",
5 "namecomplete": "NOME DA EMPRESA22",
6 "pais": "BR",
7 "indicator": "INDICADOR DA EMPRESA",
8 "email": "[email protected]",
9 "status": true,
10 "importar": false,
11 "document": "",
12 "dueDate": "2024/12/21",
13 "recurrence": "MENSAL",
14 "messageCount": "0",
15 "schedules": [],
16 "planId": "1",
17 "createdAt": "2023-12-10T16:23:03.151Z",
18 "updatedAt": "2023-12-10T17:02:25.911Z"
19}
Updated 10 Dec 2023
Did this page help you?