GET Companies
This will get all the companies from the database.
Location
Permissions required
customer-companies RO.
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| builder[0][where][0] | string | no | |
| builder[0][where][1] | string | no |
Example Body (json)
None.
Example Request
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $baseUrl . '/api/v1/customers/companies/' .
'?builder[0][where][0]=company_state'.
'&builder[0][where][1]=active',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
],
]);
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($response === false) {
echo curl_error($curl);
}
curl_close($curl);
Example Response
[
{
"company_uuid":"0f6a9c83-809b-4d54-8b16-a8197ac64ab4",
"source_uuid":"3c318a1f-a976-485e-8785-74eb3ec8030d",
"company_source_id":"1001",
"company_source_id2":"facadaka",
"company_name":"Meteo",
"company_state":"active",
"company_create_timestamp":1780172782,
"company_modified_timestamp":null
},
{
"company_uuid":"5e0fe765-6dae-11f1-8c62-bc2411125ba4",
"source_uuid":"3c318a1f-a976-485e-8785-74eb3ec8030d",
"company_source_id":"1003",
"company_source_id2":"facadaka",
"company_name":"Test",
"company_state":"active",
"company_create_timestamp":1780172782,
"company_modified_timestamp":null
}
]
Known errors or issues.
None are known at the time If you do encounter issues and get an http code in return, check the response codes on this page.