Note Update
Aktualizacja notatki
PUT /crm/{crm_id}/note/{note_id}
URL Parameters
Nazwa | Rodzaj | Przykład | Opis |
---|---|---|---|
crm_id | <STRING> |
597c789f68df7b60af68j98m | Identyfikator bazy CRM |
note_id | <STRING> |
5db85239f03d6449356e9137 | Identyfikator notatki |
Body
{
"contact_id_list": <LIST<STRING>>,
"organization_id_list": <LIST<STRING>>,
"note": <STRING>
}
Nazwa | Rodzaj | Opcjonalne | Opis | Zasób |
---|---|---|---|---|
contact_id_list | <LIST<STRING>> |
TAK | Lista identyfikatorów | CRMContact |
organization_id_list | <LIST<STRING>> |
TAK | Lista identyfikatorów | CRMOrganization |
note | <STRING> |
NIE | Treść notatki |
Wymagane jest
Response Body
{
"data": <CRMTimelineEvent>
}
Response Code
Status | Opis |
---|---|
200 | Żądanie przyjęte do realizacji |
403 | Nie można wykonać takiej akcji |
404 | Nie znaleziono zasobu |
Example
curl -X PUT \
$CONPEEK_URL/crm/597c789f68df7b60af68j98m/note/5db85239f03d6449356e9137 \
-H 'Authorization: '$CONPEEK_KEY \
-H 'Content-Type: application/json' \
-d '{
"contact_id_list": ["5dad7b80f03d64339fd8e331"],
"note": "example"
}'
import requests
import json
import os
from urllib import parse
url = parse.urljoin(os.environ["CONPEEK_URL"], "/crm/%(crm_id)s/note/%(note_id)s" % {
"crm_id": "597c789f68df7b60af68j98m",
"note_id": "5db85239f03d6449356e9137"
})
payload = {
"contact_id_list": ["5dad7b80f03d64339fd8e331"],
"note": "example"
}
headers = {
'Content-Type': "application/json",
'Authorization': os.environ["CONPEEK_KEY"]
}
response = requests.request("PUT", url, data=json.dumps(payload), headers=headers)
print(response.text)
<?php
$curl = curl_init();
$payload = array(
"contact_id_list" => array("5dad7b80f03d64339fd8e331"),
"note" => "example"
);
$crm_id = "597c789f68df7b60af68j98m";
$note_id = "5db85239f03d6449356e9137";
curl_setopt_array($curl, array(
CURLOPT_URL => getenv("CONPEEK_URL")."/crm/$crm_id/note/$note_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_PUTFIELDS => json_encode($payload),
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;
}