Update Association , Allows you to update labels of an associations. Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3
PUT https://services.leadconnectorhq.com/associations/{associationId}Authorization Path parameters Body Responses 200 - Successful response locationId (string, required): Example: string
id (string, required): Example: ve9EPM428h8vShlRW1KT
key (string, required): First Objects Association Label (custom_objects.children) Example: student
firstObjectLabel (object, required): First Objects Association Label (custom_objects.children) Example: student
firstObjectKey (object, required): First Objects Key Example: custom_objects.children
secondObjectLabel (object, required): Second Object Association Label (contact) Example: Teacher
secondObjectKey (object, required): Second Objects Key Example: contact
associationType (object, required): Association Type can be USER_DEFINED or SYSTEM_DEFINED Example: USER_DEFINED
{
"locationId" : "string" ,
"id" : "ve9EPM428h8vShlRW1KT" ,
"key" : "student" ,
"firstObjectLabel" : "student" ,
"firstObjectKey" : "custom_objects.children" ,
"secondObjectLabel" : "Teacher" ,
"secondObjectKey" : "contact" ,
"associationType" : "USER_DEFINED"
}400 - Bad Request 401 - Unauthorized 422 - Unprocessable Entity Example curl -X PUT 'https://services.leadconnectorhq.com/associations/YOUR_associationId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"firstObjectLabel" : "student" ,
"secondObjectLabel" : "tutor"
}'const response = await fetch ('https://services.leadconnectorhq.com/associations/YOUR_associationId' , {
method : 'PUT' ,
headers : {
Authorization : `Bearer ${process.env.LEADWAY_TOKEN}` ,
Version : '2021-07-28' ,
'Content-Type' : 'application/json' ,
},
body : JSON.stringify ({"firstObjectLabel" : "student" , "secondObjectLabel" : "tutor" }),
});
const data = await response.json ();import os, requests
response = requests.request (
'PUT' ,
'https://services.leadconnectorhq.com/associations/YOUR_associationId' ,
headers ={
'Authorization' : f"Bearer {os.environ['LEADWAY_TOKEN']}" ,
'Version' : '2021-07-28' ,
'Content-Type' : 'application/json' ,
},
json ={"firstObjectLabel" : "student" , "secondObjectLabel" : "tutor" },
)
data = response.json ()<?php
$ch = curl_init ('https://services.leadconnectorhq.com/associations/YOUR_associationId' );
curl_setopt_array ($ch, [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_CUSTOMREQUEST => 'PUT' ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv ('LEADWAY_TOKEN' ),
'Version: 2021-07-28' ,
'Content-Type: application/json' ,
],
CURLOPT_POSTFIELDS => json_encode ({'firstObjectLabel' : 'student' , 'secondObjectLabel' : 'tutor' }),
]);
$data = json_decode (curl_exec ($ch), true );