💡Criar Empresa
Response
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://{BACKEND_URL}/api/companies/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 =>'{
"name": "EMPRESA DE TESTE API33",
"phone": "5511989091838",
"namecomplete": "NOME DA EMPRESA33",
"pais": "BR",
"indicator": "INDICADOR DA EMPRESA",
"email": "[email protected]",
"password": "SENHA DE ACESSO",
"status": true,
"planId": "1",
"dueDate": "2024/12/01",
"recurrence": "MENSAL"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer tokenmeu'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;{
"document": "",
"id": 71,
"name": "EMPRESA DE TESTE API44",
"phone": "5511989091838",
"namecomplete": "NOME DA EMPRESA44",
"pais": "BR",
"indicator": "INDICADOR DA EMPRESA",
"email": "[email protected]",
"status": true,
"planId": 1,
"dueDate": "2024-12-01T03:00:00.000Z",
"recurrence": "MENSAL",
"importar": false,
"updatedAt": "2023-12-10T16:39:09.609Z",
"createdAt": "2023-12-10T16:39:09.609Z",
"schedules": [],
"lastLogin": null,
"paymentMethod": "",
"messageCount": ""
}Last updated