Read Organization
Pobranie danych konkretnej organizacji
GET /crm/{crm_id}/organization/{organization_id}
URL Parameters
Nazwa | Rodzaj | Przykład | Opis |
---|---|---|---|
crm_id | <STRING> |
597c789f68df7b60af68j98m | Identyfikator bazy CRM |
organization_id | <STRING> |
5dea685ef03d6443e10efa15 | Identyfikator Organizacji |
Response Body
{
"data": <CRMOrganization>
}
Nazwa | Rodzaj | Opis | Zasób |
---|---|---|---|
data | <CRMOrganization> |
Obiekt | CRMContact |
Response Code
Status | Opis |
---|---|
200 | Rekordy zostały pobrane pomyślnie |
403 | Nie można wykonać takiej akcji |
404 | Nie znaleziono zasobu |
Example
curl -X GET \
$CONPEEK_URL/crm/597c789f68df7b60af68j98m/organization/5dea685ef03d6443e10efa15 \
-H 'Authorization: '$CONPEEK_KEY \
-H 'Content-Type: application/json'
import requests
import os
from urllib import parse
url = parse.urljoin(os.environ["CONPEEK_URL"], "/crm/%(crm_id)s/organization/%(organization_id)s" % {
"crm_id": "597c789f68df7b60af68j98m",
"organization_id": "5dea685ef03d6443e10efa15"
})
headers = {
'Content-Type': "application/json",
'Authorization': os.environ["CONPEEK_KEY"]
}
response = requests.request("GET", url, headers=headers)
print(response.text)
<?php
$curl = curl_init();
$crm_id = "597c789f68df7b60af68j98m";
$organization_id = "5dea685ef03d6443e10efa15";
curl_setopt_array($curl, array(
CURLOPT_URL => getenv("CONPEEK_URL")."/crm/$crm_id/organization/$organization_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: ".getenv("CONPEEK_KEY"),
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}