API - SISTEMA | BAILEYS | OFIC...
Criar Empresa
1 min
\<?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" "email33\@email com", "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" "email44\@email com", "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" "" }