Update delegation condition
curl --request PATCH \
--url https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conditionName": "test condition",
"conditionDescription": "description of condition",
"isActive": "true"
}
'import requests
url = "https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId}"
payload = {
"conditionName": "test condition",
"conditionDescription": "description of condition",
"isActive": "true"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
conditionName: 'test condition',
conditionDescription: 'description of condition',
isActive: 'true'
})
};
fetch('https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'conditionName' => 'test condition',
'conditionDescription' => 'description of condition',
'isActive' => 'true'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId}"
payload := strings.NewReader("{\n \"conditionName\": \"test condition\",\n \"conditionDescription\": \"description of condition\",\n \"isActive\": \"true\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conditionName\": \"test condition\",\n \"conditionDescription\": \"description of condition\",\n \"isActive\": \"true\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"conditionName\": \"test condition\",\n \"conditionDescription\": \"description of condition\",\n \"isActive\": \"true\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"timestamp": "2026-01-08T06:33:50.384Z",
"message": "Success",
"data": {
"id": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"delegationId": "2sf90da4-0634-40b9-abf5-6e97a222rds8",
"conditionId": "7sf90da4-0634-40b9-abf5-6e97a222ttt8",
"isActive": "true/false",
"updatedAt": "2025-03-05T11:49:50.577Z",
"createdAt": "2025-03-05T11:49:50.577Z",
"conditionDetails": {
"id": "7sf90da4-0634-40b9-abf5-6e97a222ttt8",
"conditionName": "test condition",
"conditionDescription": "description of condition",
"updatedAt": "2025-03-05T11:49:50.577Z",
"createdAt": "2025-03-05T11:49:50.577Z"
}
}
}Delegations
Update delegation condition
PATCH
/
v1
/
delegations
/
{delegationId}
/
conditions
/
{conditionId}
Update delegation condition
curl --request PATCH \
--url https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conditionName": "test condition",
"conditionDescription": "description of condition",
"isActive": "true"
}
'import requests
url = "https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId}"
payload = {
"conditionName": "test condition",
"conditionDescription": "description of condition",
"isActive": "true"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
conditionName: 'test condition',
conditionDescription: 'description of condition',
isActive: 'true'
})
};
fetch('https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'conditionName' => 'test condition',
'conditionDescription' => 'description of condition',
'isActive' => 'true'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId}"
payload := strings.NewReader("{\n \"conditionName\": \"test condition\",\n \"conditionDescription\": \"description of condition\",\n \"isActive\": \"true\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conditionName\": \"test condition\",\n \"conditionDescription\": \"description of condition\",\n \"isActive\": \"true\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/decision/v1/delegations/{delegationId}/conditions/{conditionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"conditionName\": \"test condition\",\n \"conditionDescription\": \"description of condition\",\n \"isActive\": \"true\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"timestamp": "2026-01-08T06:33:50.384Z",
"message": "Success",
"data": {
"id": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"delegationId": "2sf90da4-0634-40b9-abf5-6e97a222rds8",
"conditionId": "7sf90da4-0634-40b9-abf5-6e97a222ttt8",
"isActive": "true/false",
"updatedAt": "2025-03-05T11:49:50.577Z",
"createdAt": "2025-03-05T11:49:50.577Z",
"conditionDetails": {
"id": "7sf90da4-0634-40b9-abf5-6e97a222ttt8",
"conditionName": "test condition",
"conditionDescription": "description of condition",
"updatedAt": "2025-03-05T11:49:50.577Z",
"createdAt": "2025-03-05T11:49:50.577Z"
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
200 - application/json
Condition delegations updated successfully
Was this page helpful?
āI