API - SISTEMA | BAILEYS | OFIC...
Atualizar Empresa
1min
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://{BACKEND_URL}/api/companies',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"id": "69", //ID_EMPRESA
"status": true,
"planId": "1",
"dueDate": "2024/12/21",
"recurrence": "MENSAL"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer tokenmeu'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
JSON
{
"id": 69,
"name": "EMPRESA DE TESTE API22",
"phone": "5511989091838",
"namecomplete": "NOME DA EMPRESA22",
"pais": "BR",
"indicator": "INDICADOR DA EMPRESA",
"email": "[email protected]",
"status": true,
"importar": false,
"document": "",
"dueDate": "2024/12/21",
"recurrence": "MENSAL",
"messageCount": "0",
"schedules": [],
"planId": "1",
"createdAt": "2023-12-10T16:23:03.151Z",
"updatedAt": "2023-12-10T17:02:25.911Z"
}
Updated 10 Dec 2023
![Doc contributor](https://s3.amazonaws.com/archbee-animals/koala.png)
Did this page help you?