Update Cohort
curl --request PUT \
--url https://api.decodahealth.com/comms/cohorts/{cohort_id} \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"name": "<string>",
"description": "<string>",
"filterCriteria": {
"customList": {
"emails": [
"<string>"
],
"phoneNumbers": [
"<string>"
]
},
"id": "<string>",
"externalId": "<string>",
"name": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"dateOfBirth": [
"2023-11-07T05:31:56Z"
],
"birthday": [
"<string>"
],
"createdDate": [
"2023-11-07T05:31:56Z"
],
"tagIds": [
"<string>"
],
"tagIdsExclude": [
"<string>"
],
"locationIds": [
"<string>"
],
"locationIdsExclude": [
"<string>"
],
"leadSource": [
"<string>"
],
"leadSourceExclude": [
"<string>"
],
"smsOptOut": [
"<string>"
],
"onSchedulingBlacklist": [
"<string>"
],
"optedInToSmsMarketing": [
"<string>"
],
"optedInToEmailMarketing": [
"<string>"
],
"optedInToSocialMedia": [
"<string>"
],
"appointmentCount": [
123
],
"lastAppointmentDays": [
123
],
"lastAppointmentServiceIds": [
"<string>"
],
"visitSpanDays": [
123
],
"totalSpent": [
123
],
"membershipIds": [
"<string>"
],
"membershipIdsExclude": [
"<string>"
],
"packageIds": [
"<string>"
],
"packageIdsExclude": [
"<string>"
],
"appointmentTypeIds": [
"<string>"
],
"appointmentTypeIdsExclude": [
"<string>"
],
"appointmentDateRange": [
"2023-11-07T05:31:56Z"
],
"completedAppointmentServiceIds": [
"<string>"
],
"completedAppointmentDateRange": [
"2023-11-07T05:31:56Z"
],
"createdAppointmentServiceIds": [
"<string>"
],
"createdAppointmentDateRange": [
"2023-11-07T05:31:56Z"
],
"noAppointmentServiceIds": [
"<string>"
],
"noAppointmentDateRange": [
"2023-11-07T05:31:56Z"
],
"weight": [
123
],
"gender": [
"<string>"
],
"genderExclude": [
"<string>"
],
"patientSource": [
"<string>"
],
"patientSourceExclude": [
"<string>"
],
"preferredProviderId": [
"<string>"
],
"preferredProviderIdExclude": [
"<string>"
],
"mostRecentProviderId": [
"<string>"
],
"mostRecentProviderIdExclude": [
"<string>"
],
"mostRecentProviderMissing": [
"<string>"
],
"creditBalance": [
123
],
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"lastActiveDays": [
123
],
"optedOutOfEmail": [
"<string>"
],
"age": [
123
],
"height": [
123
],
"goalWeight": [
123
],
"systolicBp": [
123
],
"diastolicBp": [
123
],
"waistCircumference": [
123
],
"pulse": [
123
],
"temperature": [
123
],
"hasProfilePicture": [
"<string>"
],
"pronouns": "<string>",
"preferredName": "<string>",
"surchargeDisabled": [
"<string>"
],
"hasNotes": [
"<string>"
],
"hasActiveChat": [
"<string>"
],
"medicationCount": [
123
],
"hasEmail": [
"<string>"
],
"hasPhoneNumber": [
"<string>"
],
"hasMembership": [
"<string>"
],
"hasTags": [
"<string>"
],
"hasFutureAppointments": [
"<string>"
],
"cancelledAppointmentDateRange": [
"2023-11-07T05:31:56Z"
],
"cancelledAppointmentDays": [
123
],
"lastAppointmentStatus": [
"<string>"
],
"outstandingBalance": [
123
],
"outstandingBalanceDays": [
123
],
"purchasedItemIds": [
"<string>"
],
"purchasedItemIdsExclude": [
"<string>"
],
"hasPaymentPlan": [
"<string>"
],
"lastPaymentDays": [
123
],
"lastPaymentStatus": [],
"lastPaymentStatusExclude": [],
"hasPaymentMethod": [
"<string>"
],
"membershipStatuses": [],
"membershipStatusesExclude": [],
"discountTypes": [],
"discountTypesExclude": [],
"discountTemplateIds": [
"<string>"
],
"discountTemplateIdsExclude": [
"<string>"
],
"discountBenefitItemIds": [
"<string>"
],
"discountBenefitItemIdsExclude": [
"<string>"
]
}
}
'import requests
url = "https://api.decodahealth.com/comms/cohorts/{cohort_id}"
payload = {
"name": "<string>",
"description": "<string>",
"filterCriteria": {
"customList": {
"emails": ["<string>"],
"phoneNumbers": ["<string>"]
},
"id": "<string>",
"externalId": "<string>",
"name": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"dateOfBirth": ["2023-11-07T05:31:56Z"],
"birthday": ["<string>"],
"createdDate": ["2023-11-07T05:31:56Z"],
"tagIds": ["<string>"],
"tagIdsExclude": ["<string>"],
"locationIds": ["<string>"],
"locationIdsExclude": ["<string>"],
"leadSource": ["<string>"],
"leadSourceExclude": ["<string>"],
"smsOptOut": ["<string>"],
"onSchedulingBlacklist": ["<string>"],
"optedInToSmsMarketing": ["<string>"],
"optedInToEmailMarketing": ["<string>"],
"optedInToSocialMedia": ["<string>"],
"appointmentCount": [123],
"lastAppointmentDays": [123],
"lastAppointmentServiceIds": ["<string>"],
"visitSpanDays": [123],
"totalSpent": [123],
"membershipIds": ["<string>"],
"membershipIdsExclude": ["<string>"],
"packageIds": ["<string>"],
"packageIdsExclude": ["<string>"],
"appointmentTypeIds": ["<string>"],
"appointmentTypeIdsExclude": ["<string>"],
"appointmentDateRange": ["2023-11-07T05:31:56Z"],
"completedAppointmentServiceIds": ["<string>"],
"completedAppointmentDateRange": ["2023-11-07T05:31:56Z"],
"createdAppointmentServiceIds": ["<string>"],
"createdAppointmentDateRange": ["2023-11-07T05:31:56Z"],
"noAppointmentServiceIds": ["<string>"],
"noAppointmentDateRange": ["2023-11-07T05:31:56Z"],
"weight": [123],
"gender": ["<string>"],
"genderExclude": ["<string>"],
"patientSource": ["<string>"],
"patientSourceExclude": ["<string>"],
"preferredProviderId": ["<string>"],
"preferredProviderIdExclude": ["<string>"],
"mostRecentProviderId": ["<string>"],
"mostRecentProviderIdExclude": ["<string>"],
"mostRecentProviderMissing": ["<string>"],
"creditBalance": [123],
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"lastActiveDays": [123],
"optedOutOfEmail": ["<string>"],
"age": [123],
"height": [123],
"goalWeight": [123],
"systolicBp": [123],
"diastolicBp": [123],
"waistCircumference": [123],
"pulse": [123],
"temperature": [123],
"hasProfilePicture": ["<string>"],
"pronouns": "<string>",
"preferredName": "<string>",
"surchargeDisabled": ["<string>"],
"hasNotes": ["<string>"],
"hasActiveChat": ["<string>"],
"medicationCount": [123],
"hasEmail": ["<string>"],
"hasPhoneNumber": ["<string>"],
"hasMembership": ["<string>"],
"hasTags": ["<string>"],
"hasFutureAppointments": ["<string>"],
"cancelledAppointmentDateRange": ["2023-11-07T05:31:56Z"],
"cancelledAppointmentDays": [123],
"lastAppointmentStatus": ["<string>"],
"outstandingBalance": [123],
"outstandingBalanceDays": [123],
"purchasedItemIds": ["<string>"],
"purchasedItemIdsExclude": ["<string>"],
"hasPaymentPlan": ["<string>"],
"lastPaymentDays": [123],
"lastPaymentStatus": [],
"lastPaymentStatusExclude": [],
"hasPaymentMethod": ["<string>"],
"membershipStatuses": [],
"membershipStatusesExclude": [],
"discountTypes": [],
"discountTypesExclude": [],
"discountTemplateIds": ["<string>"],
"discountTemplateIdsExclude": ["<string>"],
"discountBenefitItemIds": ["<string>"],
"discountBenefitItemIdsExclude": ["<string>"]
}
}
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
filterCriteria: {
customList: {emails: ['<string>'], phoneNumbers: ['<string>']},
id: '<string>',
externalId: '<string>',
name: '<string>',
email: '<string>',
phoneNumber: '<string>',
dateOfBirth: ['2023-11-07T05:31:56Z'],
birthday: ['<string>'],
createdDate: ['2023-11-07T05:31:56Z'],
tagIds: ['<string>'],
tagIdsExclude: ['<string>'],
locationIds: ['<string>'],
locationIdsExclude: ['<string>'],
leadSource: ['<string>'],
leadSourceExclude: ['<string>'],
smsOptOut: ['<string>'],
onSchedulingBlacklist: ['<string>'],
optedInToSmsMarketing: ['<string>'],
optedInToEmailMarketing: ['<string>'],
optedInToSocialMedia: ['<string>'],
appointmentCount: [123],
lastAppointmentDays: [123],
lastAppointmentServiceIds: ['<string>'],
visitSpanDays: [123],
totalSpent: [123],
membershipIds: ['<string>'],
membershipIdsExclude: ['<string>'],
packageIds: ['<string>'],
packageIdsExclude: ['<string>'],
appointmentTypeIds: ['<string>'],
appointmentTypeIdsExclude: ['<string>'],
appointmentDateRange: ['2023-11-07T05:31:56Z'],
completedAppointmentServiceIds: ['<string>'],
completedAppointmentDateRange: ['2023-11-07T05:31:56Z'],
createdAppointmentServiceIds: ['<string>'],
createdAppointmentDateRange: ['2023-11-07T05:31:56Z'],
noAppointmentServiceIds: ['<string>'],
noAppointmentDateRange: ['2023-11-07T05:31:56Z'],
weight: [123],
gender: ['<string>'],
genderExclude: ['<string>'],
patientSource: ['<string>'],
patientSourceExclude: ['<string>'],
preferredProviderId: ['<string>'],
preferredProviderIdExclude: ['<string>'],
mostRecentProviderId: ['<string>'],
mostRecentProviderIdExclude: ['<string>'],
mostRecentProviderMissing: ['<string>'],
creditBalance: [123],
city: '<string>',
state: '<string>',
zipCode: '<string>',
lastActiveDays: [123],
optedOutOfEmail: ['<string>'],
age: [123],
height: [123],
goalWeight: [123],
systolicBp: [123],
diastolicBp: [123],
waistCircumference: [123],
pulse: [123],
temperature: [123],
hasProfilePicture: ['<string>'],
pronouns: '<string>',
preferredName: '<string>',
surchargeDisabled: ['<string>'],
hasNotes: ['<string>'],
hasActiveChat: ['<string>'],
medicationCount: [123],
hasEmail: ['<string>'],
hasPhoneNumber: ['<string>'],
hasMembership: ['<string>'],
hasTags: ['<string>'],
hasFutureAppointments: ['<string>'],
cancelledAppointmentDateRange: ['2023-11-07T05:31:56Z'],
cancelledAppointmentDays: [123],
lastAppointmentStatus: ['<string>'],
outstandingBalance: [123],
outstandingBalanceDays: [123],
purchasedItemIds: ['<string>'],
purchasedItemIdsExclude: ['<string>'],
hasPaymentPlan: ['<string>'],
lastPaymentDays: [123],
lastPaymentStatus: [],
lastPaymentStatusExclude: [],
hasPaymentMethod: ['<string>'],
membershipStatuses: [],
membershipStatusesExclude: [],
discountTypes: [],
discountTypesExclude: [],
discountTemplateIds: ['<string>'],
discountTemplateIdsExclude: ['<string>'],
discountBenefitItemIds: ['<string>'],
discountBenefitItemIdsExclude: ['<string>']
}
})
};
fetch('https://api.decodahealth.com/comms/cohorts/{cohort_id}', 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://api.decodahealth.com/comms/cohorts/{cohort_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'filterCriteria' => [
'customList' => [
'emails' => [
'<string>'
],
'phoneNumbers' => [
'<string>'
]
],
'id' => '<string>',
'externalId' => '<string>',
'name' => '<string>',
'email' => '<string>',
'phoneNumber' => '<string>',
'dateOfBirth' => [
'2023-11-07T05:31:56Z'
],
'birthday' => [
'<string>'
],
'createdDate' => [
'2023-11-07T05:31:56Z'
],
'tagIds' => [
'<string>'
],
'tagIdsExclude' => [
'<string>'
],
'locationIds' => [
'<string>'
],
'locationIdsExclude' => [
'<string>'
],
'leadSource' => [
'<string>'
],
'leadSourceExclude' => [
'<string>'
],
'smsOptOut' => [
'<string>'
],
'onSchedulingBlacklist' => [
'<string>'
],
'optedInToSmsMarketing' => [
'<string>'
],
'optedInToEmailMarketing' => [
'<string>'
],
'optedInToSocialMedia' => [
'<string>'
],
'appointmentCount' => [
123
],
'lastAppointmentDays' => [
123
],
'lastAppointmentServiceIds' => [
'<string>'
],
'visitSpanDays' => [
123
],
'totalSpent' => [
123
],
'membershipIds' => [
'<string>'
],
'membershipIdsExclude' => [
'<string>'
],
'packageIds' => [
'<string>'
],
'packageIdsExclude' => [
'<string>'
],
'appointmentTypeIds' => [
'<string>'
],
'appointmentTypeIdsExclude' => [
'<string>'
],
'appointmentDateRange' => [
'2023-11-07T05:31:56Z'
],
'completedAppointmentServiceIds' => [
'<string>'
],
'completedAppointmentDateRange' => [
'2023-11-07T05:31:56Z'
],
'createdAppointmentServiceIds' => [
'<string>'
],
'createdAppointmentDateRange' => [
'2023-11-07T05:31:56Z'
],
'noAppointmentServiceIds' => [
'<string>'
],
'noAppointmentDateRange' => [
'2023-11-07T05:31:56Z'
],
'weight' => [
123
],
'gender' => [
'<string>'
],
'genderExclude' => [
'<string>'
],
'patientSource' => [
'<string>'
],
'patientSourceExclude' => [
'<string>'
],
'preferredProviderId' => [
'<string>'
],
'preferredProviderIdExclude' => [
'<string>'
],
'mostRecentProviderId' => [
'<string>'
],
'mostRecentProviderIdExclude' => [
'<string>'
],
'mostRecentProviderMissing' => [
'<string>'
],
'creditBalance' => [
123
],
'city' => '<string>',
'state' => '<string>',
'zipCode' => '<string>',
'lastActiveDays' => [
123
],
'optedOutOfEmail' => [
'<string>'
],
'age' => [
123
],
'height' => [
123
],
'goalWeight' => [
123
],
'systolicBp' => [
123
],
'diastolicBp' => [
123
],
'waistCircumference' => [
123
],
'pulse' => [
123
],
'temperature' => [
123
],
'hasProfilePicture' => [
'<string>'
],
'pronouns' => '<string>',
'preferredName' => '<string>',
'surchargeDisabled' => [
'<string>'
],
'hasNotes' => [
'<string>'
],
'hasActiveChat' => [
'<string>'
],
'medicationCount' => [
123
],
'hasEmail' => [
'<string>'
],
'hasPhoneNumber' => [
'<string>'
],
'hasMembership' => [
'<string>'
],
'hasTags' => [
'<string>'
],
'hasFutureAppointments' => [
'<string>'
],
'cancelledAppointmentDateRange' => [
'2023-11-07T05:31:56Z'
],
'cancelledAppointmentDays' => [
123
],
'lastAppointmentStatus' => [
'<string>'
],
'outstandingBalance' => [
123
],
'outstandingBalanceDays' => [
123
],
'purchasedItemIds' => [
'<string>'
],
'purchasedItemIdsExclude' => [
'<string>'
],
'hasPaymentPlan' => [
'<string>'
],
'lastPaymentDays' => [
123
],
'lastPaymentStatus' => [
],
'lastPaymentStatusExclude' => [
],
'hasPaymentMethod' => [
'<string>'
],
'membershipStatuses' => [
],
'membershipStatusesExclude' => [
],
'discountTypes' => [
],
'discountTypesExclude' => [
],
'discountTemplateIds' => [
'<string>'
],
'discountTemplateIdsExclude' => [
'<string>'
],
'discountBenefitItemIds' => [
'<string>'
],
'discountBenefitItemIdsExclude' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$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://api.decodahealth.com/comms/cohorts/{cohort_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"filterCriteria\": {\n \"customList\": {\n \"emails\": [\n \"<string>\"\n ],\n \"phoneNumbers\": [\n \"<string>\"\n ]\n },\n \"id\": \"<string>\",\n \"externalId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"dateOfBirth\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"birthday\": [\n \"<string>\"\n ],\n \"createdDate\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"tagIds\": [\n \"<string>\"\n ],\n \"tagIdsExclude\": [\n \"<string>\"\n ],\n \"locationIds\": [\n \"<string>\"\n ],\n \"locationIdsExclude\": [\n \"<string>\"\n ],\n \"leadSource\": [\n \"<string>\"\n ],\n \"leadSourceExclude\": [\n \"<string>\"\n ],\n \"smsOptOut\": [\n \"<string>\"\n ],\n \"onSchedulingBlacklist\": [\n \"<string>\"\n ],\n \"optedInToSmsMarketing\": [\n \"<string>\"\n ],\n \"optedInToEmailMarketing\": [\n \"<string>\"\n ],\n \"optedInToSocialMedia\": [\n \"<string>\"\n ],\n \"appointmentCount\": [\n 123\n ],\n \"lastAppointmentDays\": [\n 123\n ],\n \"lastAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"visitSpanDays\": [\n 123\n ],\n \"totalSpent\": [\n 123\n ],\n \"membershipIds\": [\n \"<string>\"\n ],\n \"membershipIdsExclude\": [\n \"<string>\"\n ],\n \"packageIds\": [\n \"<string>\"\n ],\n \"packageIdsExclude\": [\n \"<string>\"\n ],\n \"appointmentTypeIds\": [\n \"<string>\"\n ],\n \"appointmentTypeIdsExclude\": [\n \"<string>\"\n ],\n \"appointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"completedAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"completedAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"createdAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"createdAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"noAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"noAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"weight\": [\n 123\n ],\n \"gender\": [\n \"<string>\"\n ],\n \"genderExclude\": [\n \"<string>\"\n ],\n \"patientSource\": [\n \"<string>\"\n ],\n \"patientSourceExclude\": [\n \"<string>\"\n ],\n \"preferredProviderId\": [\n \"<string>\"\n ],\n \"preferredProviderIdExclude\": [\n \"<string>\"\n ],\n \"mostRecentProviderId\": [\n \"<string>\"\n ],\n \"mostRecentProviderIdExclude\": [\n \"<string>\"\n ],\n \"mostRecentProviderMissing\": [\n \"<string>\"\n ],\n \"creditBalance\": [\n 123\n ],\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"lastActiveDays\": [\n 123\n ],\n \"optedOutOfEmail\": [\n \"<string>\"\n ],\n \"age\": [\n 123\n ],\n \"height\": [\n 123\n ],\n \"goalWeight\": [\n 123\n ],\n \"systolicBp\": [\n 123\n ],\n \"diastolicBp\": [\n 123\n ],\n \"waistCircumference\": [\n 123\n ],\n \"pulse\": [\n 123\n ],\n \"temperature\": [\n 123\n ],\n \"hasProfilePicture\": [\n \"<string>\"\n ],\n \"pronouns\": \"<string>\",\n \"preferredName\": \"<string>\",\n \"surchargeDisabled\": [\n \"<string>\"\n ],\n \"hasNotes\": [\n \"<string>\"\n ],\n \"hasActiveChat\": [\n \"<string>\"\n ],\n \"medicationCount\": [\n 123\n ],\n \"hasEmail\": [\n \"<string>\"\n ],\n \"hasPhoneNumber\": [\n \"<string>\"\n ],\n \"hasMembership\": [\n \"<string>\"\n ],\n \"hasTags\": [\n \"<string>\"\n ],\n \"hasFutureAppointments\": [\n \"<string>\"\n ],\n \"cancelledAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"cancelledAppointmentDays\": [\n 123\n ],\n \"lastAppointmentStatus\": [\n \"<string>\"\n ],\n \"outstandingBalance\": [\n 123\n ],\n \"outstandingBalanceDays\": [\n 123\n ],\n \"purchasedItemIds\": [\n \"<string>\"\n ],\n \"purchasedItemIdsExclude\": [\n \"<string>\"\n ],\n \"hasPaymentPlan\": [\n \"<string>\"\n ],\n \"lastPaymentDays\": [\n 123\n ],\n \"lastPaymentStatus\": [],\n \"lastPaymentStatusExclude\": [],\n \"hasPaymentMethod\": [\n \"<string>\"\n ],\n \"membershipStatuses\": [],\n \"membershipStatusesExclude\": [],\n \"discountTypes\": [],\n \"discountTypesExclude\": [],\n \"discountTemplateIds\": [\n \"<string>\"\n ],\n \"discountTemplateIdsExclude\": [\n \"<string>\"\n ],\n \"discountBenefitItemIds\": [\n \"<string>\"\n ],\n \"discountBenefitItemIdsExclude\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
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.put("https://api.decodahealth.com/comms/cohorts/{cohort_id}")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"filterCriteria\": {\n \"customList\": {\n \"emails\": [\n \"<string>\"\n ],\n \"phoneNumbers\": [\n \"<string>\"\n ]\n },\n \"id\": \"<string>\",\n \"externalId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"dateOfBirth\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"birthday\": [\n \"<string>\"\n ],\n \"createdDate\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"tagIds\": [\n \"<string>\"\n ],\n \"tagIdsExclude\": [\n \"<string>\"\n ],\n \"locationIds\": [\n \"<string>\"\n ],\n \"locationIdsExclude\": [\n \"<string>\"\n ],\n \"leadSource\": [\n \"<string>\"\n ],\n \"leadSourceExclude\": [\n \"<string>\"\n ],\n \"smsOptOut\": [\n \"<string>\"\n ],\n \"onSchedulingBlacklist\": [\n \"<string>\"\n ],\n \"optedInToSmsMarketing\": [\n \"<string>\"\n ],\n \"optedInToEmailMarketing\": [\n \"<string>\"\n ],\n \"optedInToSocialMedia\": [\n \"<string>\"\n ],\n \"appointmentCount\": [\n 123\n ],\n \"lastAppointmentDays\": [\n 123\n ],\n \"lastAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"visitSpanDays\": [\n 123\n ],\n \"totalSpent\": [\n 123\n ],\n \"membershipIds\": [\n \"<string>\"\n ],\n \"membershipIdsExclude\": [\n \"<string>\"\n ],\n \"packageIds\": [\n \"<string>\"\n ],\n \"packageIdsExclude\": [\n \"<string>\"\n ],\n \"appointmentTypeIds\": [\n \"<string>\"\n ],\n \"appointmentTypeIdsExclude\": [\n \"<string>\"\n ],\n \"appointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"completedAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"completedAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"createdAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"createdAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"noAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"noAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"weight\": [\n 123\n ],\n \"gender\": [\n \"<string>\"\n ],\n \"genderExclude\": [\n \"<string>\"\n ],\n \"patientSource\": [\n \"<string>\"\n ],\n \"patientSourceExclude\": [\n \"<string>\"\n ],\n \"preferredProviderId\": [\n \"<string>\"\n ],\n \"preferredProviderIdExclude\": [\n \"<string>\"\n ],\n \"mostRecentProviderId\": [\n \"<string>\"\n ],\n \"mostRecentProviderIdExclude\": [\n \"<string>\"\n ],\n \"mostRecentProviderMissing\": [\n \"<string>\"\n ],\n \"creditBalance\": [\n 123\n ],\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"lastActiveDays\": [\n 123\n ],\n \"optedOutOfEmail\": [\n \"<string>\"\n ],\n \"age\": [\n 123\n ],\n \"height\": [\n 123\n ],\n \"goalWeight\": [\n 123\n ],\n \"systolicBp\": [\n 123\n ],\n \"diastolicBp\": [\n 123\n ],\n \"waistCircumference\": [\n 123\n ],\n \"pulse\": [\n 123\n ],\n \"temperature\": [\n 123\n ],\n \"hasProfilePicture\": [\n \"<string>\"\n ],\n \"pronouns\": \"<string>\",\n \"preferredName\": \"<string>\",\n \"surchargeDisabled\": [\n \"<string>\"\n ],\n \"hasNotes\": [\n \"<string>\"\n ],\n \"hasActiveChat\": [\n \"<string>\"\n ],\n \"medicationCount\": [\n 123\n ],\n \"hasEmail\": [\n \"<string>\"\n ],\n \"hasPhoneNumber\": [\n \"<string>\"\n ],\n \"hasMembership\": [\n \"<string>\"\n ],\n \"hasTags\": [\n \"<string>\"\n ],\n \"hasFutureAppointments\": [\n \"<string>\"\n ],\n \"cancelledAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"cancelledAppointmentDays\": [\n 123\n ],\n \"lastAppointmentStatus\": [\n \"<string>\"\n ],\n \"outstandingBalance\": [\n 123\n ],\n \"outstandingBalanceDays\": [\n 123\n ],\n \"purchasedItemIds\": [\n \"<string>\"\n ],\n \"purchasedItemIdsExclude\": [\n \"<string>\"\n ],\n \"hasPaymentPlan\": [\n \"<string>\"\n ],\n \"lastPaymentDays\": [\n 123\n ],\n \"lastPaymentStatus\": [],\n \"lastPaymentStatusExclude\": [],\n \"hasPaymentMethod\": [\n \"<string>\"\n ],\n \"membershipStatuses\": [],\n \"membershipStatusesExclude\": [],\n \"discountTypes\": [],\n \"discountTypesExclude\": [],\n \"discountTemplateIds\": [\n \"<string>\"\n ],\n \"discountTemplateIdsExclude\": [\n \"<string>\"\n ],\n \"discountBenefitItemIds\": [\n \"<string>\"\n ],\n \"discountBenefitItemIdsExclude\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/comms/cohorts/{cohort_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"filterCriteria\": {\n \"customList\": {\n \"emails\": [\n \"<string>\"\n ],\n \"phoneNumbers\": [\n \"<string>\"\n ]\n },\n \"id\": \"<string>\",\n \"externalId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"dateOfBirth\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"birthday\": [\n \"<string>\"\n ],\n \"createdDate\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"tagIds\": [\n \"<string>\"\n ],\n \"tagIdsExclude\": [\n \"<string>\"\n ],\n \"locationIds\": [\n \"<string>\"\n ],\n \"locationIdsExclude\": [\n \"<string>\"\n ],\n \"leadSource\": [\n \"<string>\"\n ],\n \"leadSourceExclude\": [\n \"<string>\"\n ],\n \"smsOptOut\": [\n \"<string>\"\n ],\n \"onSchedulingBlacklist\": [\n \"<string>\"\n ],\n \"optedInToSmsMarketing\": [\n \"<string>\"\n ],\n \"optedInToEmailMarketing\": [\n \"<string>\"\n ],\n \"optedInToSocialMedia\": [\n \"<string>\"\n ],\n \"appointmentCount\": [\n 123\n ],\n \"lastAppointmentDays\": [\n 123\n ],\n \"lastAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"visitSpanDays\": [\n 123\n ],\n \"totalSpent\": [\n 123\n ],\n \"membershipIds\": [\n \"<string>\"\n ],\n \"membershipIdsExclude\": [\n \"<string>\"\n ],\n \"packageIds\": [\n \"<string>\"\n ],\n \"packageIdsExclude\": [\n \"<string>\"\n ],\n \"appointmentTypeIds\": [\n \"<string>\"\n ],\n \"appointmentTypeIdsExclude\": [\n \"<string>\"\n ],\n \"appointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"completedAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"completedAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"createdAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"createdAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"noAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"noAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"weight\": [\n 123\n ],\n \"gender\": [\n \"<string>\"\n ],\n \"genderExclude\": [\n \"<string>\"\n ],\n \"patientSource\": [\n \"<string>\"\n ],\n \"patientSourceExclude\": [\n \"<string>\"\n ],\n \"preferredProviderId\": [\n \"<string>\"\n ],\n \"preferredProviderIdExclude\": [\n \"<string>\"\n ],\n \"mostRecentProviderId\": [\n \"<string>\"\n ],\n \"mostRecentProviderIdExclude\": [\n \"<string>\"\n ],\n \"mostRecentProviderMissing\": [\n \"<string>\"\n ],\n \"creditBalance\": [\n 123\n ],\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"lastActiveDays\": [\n 123\n ],\n \"optedOutOfEmail\": [\n \"<string>\"\n ],\n \"age\": [\n 123\n ],\n \"height\": [\n 123\n ],\n \"goalWeight\": [\n 123\n ],\n \"systolicBp\": [\n 123\n ],\n \"diastolicBp\": [\n 123\n ],\n \"waistCircumference\": [\n 123\n ],\n \"pulse\": [\n 123\n ],\n \"temperature\": [\n 123\n ],\n \"hasProfilePicture\": [\n \"<string>\"\n ],\n \"pronouns\": \"<string>\",\n \"preferredName\": \"<string>\",\n \"surchargeDisabled\": [\n \"<string>\"\n ],\n \"hasNotes\": [\n \"<string>\"\n ],\n \"hasActiveChat\": [\n \"<string>\"\n ],\n \"medicationCount\": [\n 123\n ],\n \"hasEmail\": [\n \"<string>\"\n ],\n \"hasPhoneNumber\": [\n \"<string>\"\n ],\n \"hasMembership\": [\n \"<string>\"\n ],\n \"hasTags\": [\n \"<string>\"\n ],\n \"hasFutureAppointments\": [\n \"<string>\"\n ],\n \"cancelledAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"cancelledAppointmentDays\": [\n 123\n ],\n \"lastAppointmentStatus\": [\n \"<string>\"\n ],\n \"outstandingBalance\": [\n 123\n ],\n \"outstandingBalanceDays\": [\n 123\n ],\n \"purchasedItemIds\": [\n \"<string>\"\n ],\n \"purchasedItemIdsExclude\": [\n \"<string>\"\n ],\n \"hasPaymentPlan\": [\n \"<string>\"\n ],\n \"lastPaymentDays\": [\n 123\n ],\n \"lastPaymentStatus\": [],\n \"lastPaymentStatusExclude\": [],\n \"hasPaymentMethod\": [\n \"<string>\"\n ],\n \"membershipStatuses\": [],\n \"membershipStatusesExclude\": [],\n \"discountTypes\": [],\n \"discountTypesExclude\": [],\n \"discountTemplateIds\": [\n \"<string>\"\n ],\n \"discountTemplateIdsExclude\": [\n \"<string>\"\n ],\n \"discountBenefitItemIds\": [\n \"<string>\"\n ],\n \"discountBenefitItemIdsExclude\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"filterCriteria": {},
"createdById": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"description": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Audience Cohorts
Update Cohort
PUT
/
comms
/
cohorts
/
{cohort_id}
Update Cohort
curl --request PUT \
--url https://api.decodahealth.com/comms/cohorts/{cohort_id} \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"name": "<string>",
"description": "<string>",
"filterCriteria": {
"customList": {
"emails": [
"<string>"
],
"phoneNumbers": [
"<string>"
]
},
"id": "<string>",
"externalId": "<string>",
"name": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"dateOfBirth": [
"2023-11-07T05:31:56Z"
],
"birthday": [
"<string>"
],
"createdDate": [
"2023-11-07T05:31:56Z"
],
"tagIds": [
"<string>"
],
"tagIdsExclude": [
"<string>"
],
"locationIds": [
"<string>"
],
"locationIdsExclude": [
"<string>"
],
"leadSource": [
"<string>"
],
"leadSourceExclude": [
"<string>"
],
"smsOptOut": [
"<string>"
],
"onSchedulingBlacklist": [
"<string>"
],
"optedInToSmsMarketing": [
"<string>"
],
"optedInToEmailMarketing": [
"<string>"
],
"optedInToSocialMedia": [
"<string>"
],
"appointmentCount": [
123
],
"lastAppointmentDays": [
123
],
"lastAppointmentServiceIds": [
"<string>"
],
"visitSpanDays": [
123
],
"totalSpent": [
123
],
"membershipIds": [
"<string>"
],
"membershipIdsExclude": [
"<string>"
],
"packageIds": [
"<string>"
],
"packageIdsExclude": [
"<string>"
],
"appointmentTypeIds": [
"<string>"
],
"appointmentTypeIdsExclude": [
"<string>"
],
"appointmentDateRange": [
"2023-11-07T05:31:56Z"
],
"completedAppointmentServiceIds": [
"<string>"
],
"completedAppointmentDateRange": [
"2023-11-07T05:31:56Z"
],
"createdAppointmentServiceIds": [
"<string>"
],
"createdAppointmentDateRange": [
"2023-11-07T05:31:56Z"
],
"noAppointmentServiceIds": [
"<string>"
],
"noAppointmentDateRange": [
"2023-11-07T05:31:56Z"
],
"weight": [
123
],
"gender": [
"<string>"
],
"genderExclude": [
"<string>"
],
"patientSource": [
"<string>"
],
"patientSourceExclude": [
"<string>"
],
"preferredProviderId": [
"<string>"
],
"preferredProviderIdExclude": [
"<string>"
],
"mostRecentProviderId": [
"<string>"
],
"mostRecentProviderIdExclude": [
"<string>"
],
"mostRecentProviderMissing": [
"<string>"
],
"creditBalance": [
123
],
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"lastActiveDays": [
123
],
"optedOutOfEmail": [
"<string>"
],
"age": [
123
],
"height": [
123
],
"goalWeight": [
123
],
"systolicBp": [
123
],
"diastolicBp": [
123
],
"waistCircumference": [
123
],
"pulse": [
123
],
"temperature": [
123
],
"hasProfilePicture": [
"<string>"
],
"pronouns": "<string>",
"preferredName": "<string>",
"surchargeDisabled": [
"<string>"
],
"hasNotes": [
"<string>"
],
"hasActiveChat": [
"<string>"
],
"medicationCount": [
123
],
"hasEmail": [
"<string>"
],
"hasPhoneNumber": [
"<string>"
],
"hasMembership": [
"<string>"
],
"hasTags": [
"<string>"
],
"hasFutureAppointments": [
"<string>"
],
"cancelledAppointmentDateRange": [
"2023-11-07T05:31:56Z"
],
"cancelledAppointmentDays": [
123
],
"lastAppointmentStatus": [
"<string>"
],
"outstandingBalance": [
123
],
"outstandingBalanceDays": [
123
],
"purchasedItemIds": [
"<string>"
],
"purchasedItemIdsExclude": [
"<string>"
],
"hasPaymentPlan": [
"<string>"
],
"lastPaymentDays": [
123
],
"lastPaymentStatus": [],
"lastPaymentStatusExclude": [],
"hasPaymentMethod": [
"<string>"
],
"membershipStatuses": [],
"membershipStatusesExclude": [],
"discountTypes": [],
"discountTypesExclude": [],
"discountTemplateIds": [
"<string>"
],
"discountTemplateIdsExclude": [
"<string>"
],
"discountBenefitItemIds": [
"<string>"
],
"discountBenefitItemIdsExclude": [
"<string>"
]
}
}
'import requests
url = "https://api.decodahealth.com/comms/cohorts/{cohort_id}"
payload = {
"name": "<string>",
"description": "<string>",
"filterCriteria": {
"customList": {
"emails": ["<string>"],
"phoneNumbers": ["<string>"]
},
"id": "<string>",
"externalId": "<string>",
"name": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"dateOfBirth": ["2023-11-07T05:31:56Z"],
"birthday": ["<string>"],
"createdDate": ["2023-11-07T05:31:56Z"],
"tagIds": ["<string>"],
"tagIdsExclude": ["<string>"],
"locationIds": ["<string>"],
"locationIdsExclude": ["<string>"],
"leadSource": ["<string>"],
"leadSourceExclude": ["<string>"],
"smsOptOut": ["<string>"],
"onSchedulingBlacklist": ["<string>"],
"optedInToSmsMarketing": ["<string>"],
"optedInToEmailMarketing": ["<string>"],
"optedInToSocialMedia": ["<string>"],
"appointmentCount": [123],
"lastAppointmentDays": [123],
"lastAppointmentServiceIds": ["<string>"],
"visitSpanDays": [123],
"totalSpent": [123],
"membershipIds": ["<string>"],
"membershipIdsExclude": ["<string>"],
"packageIds": ["<string>"],
"packageIdsExclude": ["<string>"],
"appointmentTypeIds": ["<string>"],
"appointmentTypeIdsExclude": ["<string>"],
"appointmentDateRange": ["2023-11-07T05:31:56Z"],
"completedAppointmentServiceIds": ["<string>"],
"completedAppointmentDateRange": ["2023-11-07T05:31:56Z"],
"createdAppointmentServiceIds": ["<string>"],
"createdAppointmentDateRange": ["2023-11-07T05:31:56Z"],
"noAppointmentServiceIds": ["<string>"],
"noAppointmentDateRange": ["2023-11-07T05:31:56Z"],
"weight": [123],
"gender": ["<string>"],
"genderExclude": ["<string>"],
"patientSource": ["<string>"],
"patientSourceExclude": ["<string>"],
"preferredProviderId": ["<string>"],
"preferredProviderIdExclude": ["<string>"],
"mostRecentProviderId": ["<string>"],
"mostRecentProviderIdExclude": ["<string>"],
"mostRecentProviderMissing": ["<string>"],
"creditBalance": [123],
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"lastActiveDays": [123],
"optedOutOfEmail": ["<string>"],
"age": [123],
"height": [123],
"goalWeight": [123],
"systolicBp": [123],
"diastolicBp": [123],
"waistCircumference": [123],
"pulse": [123],
"temperature": [123],
"hasProfilePicture": ["<string>"],
"pronouns": "<string>",
"preferredName": "<string>",
"surchargeDisabled": ["<string>"],
"hasNotes": ["<string>"],
"hasActiveChat": ["<string>"],
"medicationCount": [123],
"hasEmail": ["<string>"],
"hasPhoneNumber": ["<string>"],
"hasMembership": ["<string>"],
"hasTags": ["<string>"],
"hasFutureAppointments": ["<string>"],
"cancelledAppointmentDateRange": ["2023-11-07T05:31:56Z"],
"cancelledAppointmentDays": [123],
"lastAppointmentStatus": ["<string>"],
"outstandingBalance": [123],
"outstandingBalanceDays": [123],
"purchasedItemIds": ["<string>"],
"purchasedItemIdsExclude": ["<string>"],
"hasPaymentPlan": ["<string>"],
"lastPaymentDays": [123],
"lastPaymentStatus": [],
"lastPaymentStatusExclude": [],
"hasPaymentMethod": ["<string>"],
"membershipStatuses": [],
"membershipStatusesExclude": [],
"discountTypes": [],
"discountTypesExclude": [],
"discountTemplateIds": ["<string>"],
"discountTemplateIdsExclude": ["<string>"],
"discountBenefitItemIds": ["<string>"],
"discountBenefitItemIdsExclude": ["<string>"]
}
}
headers = {
"TENANT": "<tenant>",
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {TENANT: '<tenant>', 'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
filterCriteria: {
customList: {emails: ['<string>'], phoneNumbers: ['<string>']},
id: '<string>',
externalId: '<string>',
name: '<string>',
email: '<string>',
phoneNumber: '<string>',
dateOfBirth: ['2023-11-07T05:31:56Z'],
birthday: ['<string>'],
createdDate: ['2023-11-07T05:31:56Z'],
tagIds: ['<string>'],
tagIdsExclude: ['<string>'],
locationIds: ['<string>'],
locationIdsExclude: ['<string>'],
leadSource: ['<string>'],
leadSourceExclude: ['<string>'],
smsOptOut: ['<string>'],
onSchedulingBlacklist: ['<string>'],
optedInToSmsMarketing: ['<string>'],
optedInToEmailMarketing: ['<string>'],
optedInToSocialMedia: ['<string>'],
appointmentCount: [123],
lastAppointmentDays: [123],
lastAppointmentServiceIds: ['<string>'],
visitSpanDays: [123],
totalSpent: [123],
membershipIds: ['<string>'],
membershipIdsExclude: ['<string>'],
packageIds: ['<string>'],
packageIdsExclude: ['<string>'],
appointmentTypeIds: ['<string>'],
appointmentTypeIdsExclude: ['<string>'],
appointmentDateRange: ['2023-11-07T05:31:56Z'],
completedAppointmentServiceIds: ['<string>'],
completedAppointmentDateRange: ['2023-11-07T05:31:56Z'],
createdAppointmentServiceIds: ['<string>'],
createdAppointmentDateRange: ['2023-11-07T05:31:56Z'],
noAppointmentServiceIds: ['<string>'],
noAppointmentDateRange: ['2023-11-07T05:31:56Z'],
weight: [123],
gender: ['<string>'],
genderExclude: ['<string>'],
patientSource: ['<string>'],
patientSourceExclude: ['<string>'],
preferredProviderId: ['<string>'],
preferredProviderIdExclude: ['<string>'],
mostRecentProviderId: ['<string>'],
mostRecentProviderIdExclude: ['<string>'],
mostRecentProviderMissing: ['<string>'],
creditBalance: [123],
city: '<string>',
state: '<string>',
zipCode: '<string>',
lastActiveDays: [123],
optedOutOfEmail: ['<string>'],
age: [123],
height: [123],
goalWeight: [123],
systolicBp: [123],
diastolicBp: [123],
waistCircumference: [123],
pulse: [123],
temperature: [123],
hasProfilePicture: ['<string>'],
pronouns: '<string>',
preferredName: '<string>',
surchargeDisabled: ['<string>'],
hasNotes: ['<string>'],
hasActiveChat: ['<string>'],
medicationCount: [123],
hasEmail: ['<string>'],
hasPhoneNumber: ['<string>'],
hasMembership: ['<string>'],
hasTags: ['<string>'],
hasFutureAppointments: ['<string>'],
cancelledAppointmentDateRange: ['2023-11-07T05:31:56Z'],
cancelledAppointmentDays: [123],
lastAppointmentStatus: ['<string>'],
outstandingBalance: [123],
outstandingBalanceDays: [123],
purchasedItemIds: ['<string>'],
purchasedItemIdsExclude: ['<string>'],
hasPaymentPlan: ['<string>'],
lastPaymentDays: [123],
lastPaymentStatus: [],
lastPaymentStatusExclude: [],
hasPaymentMethod: ['<string>'],
membershipStatuses: [],
membershipStatusesExclude: [],
discountTypes: [],
discountTypesExclude: [],
discountTemplateIds: ['<string>'],
discountTemplateIdsExclude: ['<string>'],
discountBenefitItemIds: ['<string>'],
discountBenefitItemIdsExclude: ['<string>']
}
})
};
fetch('https://api.decodahealth.com/comms/cohorts/{cohort_id}', 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://api.decodahealth.com/comms/cohorts/{cohort_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'filterCriteria' => [
'customList' => [
'emails' => [
'<string>'
],
'phoneNumbers' => [
'<string>'
]
],
'id' => '<string>',
'externalId' => '<string>',
'name' => '<string>',
'email' => '<string>',
'phoneNumber' => '<string>',
'dateOfBirth' => [
'2023-11-07T05:31:56Z'
],
'birthday' => [
'<string>'
],
'createdDate' => [
'2023-11-07T05:31:56Z'
],
'tagIds' => [
'<string>'
],
'tagIdsExclude' => [
'<string>'
],
'locationIds' => [
'<string>'
],
'locationIdsExclude' => [
'<string>'
],
'leadSource' => [
'<string>'
],
'leadSourceExclude' => [
'<string>'
],
'smsOptOut' => [
'<string>'
],
'onSchedulingBlacklist' => [
'<string>'
],
'optedInToSmsMarketing' => [
'<string>'
],
'optedInToEmailMarketing' => [
'<string>'
],
'optedInToSocialMedia' => [
'<string>'
],
'appointmentCount' => [
123
],
'lastAppointmentDays' => [
123
],
'lastAppointmentServiceIds' => [
'<string>'
],
'visitSpanDays' => [
123
],
'totalSpent' => [
123
],
'membershipIds' => [
'<string>'
],
'membershipIdsExclude' => [
'<string>'
],
'packageIds' => [
'<string>'
],
'packageIdsExclude' => [
'<string>'
],
'appointmentTypeIds' => [
'<string>'
],
'appointmentTypeIdsExclude' => [
'<string>'
],
'appointmentDateRange' => [
'2023-11-07T05:31:56Z'
],
'completedAppointmentServiceIds' => [
'<string>'
],
'completedAppointmentDateRange' => [
'2023-11-07T05:31:56Z'
],
'createdAppointmentServiceIds' => [
'<string>'
],
'createdAppointmentDateRange' => [
'2023-11-07T05:31:56Z'
],
'noAppointmentServiceIds' => [
'<string>'
],
'noAppointmentDateRange' => [
'2023-11-07T05:31:56Z'
],
'weight' => [
123
],
'gender' => [
'<string>'
],
'genderExclude' => [
'<string>'
],
'patientSource' => [
'<string>'
],
'patientSourceExclude' => [
'<string>'
],
'preferredProviderId' => [
'<string>'
],
'preferredProviderIdExclude' => [
'<string>'
],
'mostRecentProviderId' => [
'<string>'
],
'mostRecentProviderIdExclude' => [
'<string>'
],
'mostRecentProviderMissing' => [
'<string>'
],
'creditBalance' => [
123
],
'city' => '<string>',
'state' => '<string>',
'zipCode' => '<string>',
'lastActiveDays' => [
123
],
'optedOutOfEmail' => [
'<string>'
],
'age' => [
123
],
'height' => [
123
],
'goalWeight' => [
123
],
'systolicBp' => [
123
],
'diastolicBp' => [
123
],
'waistCircumference' => [
123
],
'pulse' => [
123
],
'temperature' => [
123
],
'hasProfilePicture' => [
'<string>'
],
'pronouns' => '<string>',
'preferredName' => '<string>',
'surchargeDisabled' => [
'<string>'
],
'hasNotes' => [
'<string>'
],
'hasActiveChat' => [
'<string>'
],
'medicationCount' => [
123
],
'hasEmail' => [
'<string>'
],
'hasPhoneNumber' => [
'<string>'
],
'hasMembership' => [
'<string>'
],
'hasTags' => [
'<string>'
],
'hasFutureAppointments' => [
'<string>'
],
'cancelledAppointmentDateRange' => [
'2023-11-07T05:31:56Z'
],
'cancelledAppointmentDays' => [
123
],
'lastAppointmentStatus' => [
'<string>'
],
'outstandingBalance' => [
123
],
'outstandingBalanceDays' => [
123
],
'purchasedItemIds' => [
'<string>'
],
'purchasedItemIdsExclude' => [
'<string>'
],
'hasPaymentPlan' => [
'<string>'
],
'lastPaymentDays' => [
123
],
'lastPaymentStatus' => [
],
'lastPaymentStatusExclude' => [
],
'hasPaymentMethod' => [
'<string>'
],
'membershipStatuses' => [
],
'membershipStatusesExclude' => [
],
'discountTypes' => [
],
'discountTypesExclude' => [
],
'discountTemplateIds' => [
'<string>'
],
'discountTemplateIdsExclude' => [
'<string>'
],
'discountBenefitItemIds' => [
'<string>'
],
'discountBenefitItemIdsExclude' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: application/json",
"TENANT: <tenant>"
],
]);
$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://api.decodahealth.com/comms/cohorts/{cohort_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"filterCriteria\": {\n \"customList\": {\n \"emails\": [\n \"<string>\"\n ],\n \"phoneNumbers\": [\n \"<string>\"\n ]\n },\n \"id\": \"<string>\",\n \"externalId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"dateOfBirth\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"birthday\": [\n \"<string>\"\n ],\n \"createdDate\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"tagIds\": [\n \"<string>\"\n ],\n \"tagIdsExclude\": [\n \"<string>\"\n ],\n \"locationIds\": [\n \"<string>\"\n ],\n \"locationIdsExclude\": [\n \"<string>\"\n ],\n \"leadSource\": [\n \"<string>\"\n ],\n \"leadSourceExclude\": [\n \"<string>\"\n ],\n \"smsOptOut\": [\n \"<string>\"\n ],\n \"onSchedulingBlacklist\": [\n \"<string>\"\n ],\n \"optedInToSmsMarketing\": [\n \"<string>\"\n ],\n \"optedInToEmailMarketing\": [\n \"<string>\"\n ],\n \"optedInToSocialMedia\": [\n \"<string>\"\n ],\n \"appointmentCount\": [\n 123\n ],\n \"lastAppointmentDays\": [\n 123\n ],\n \"lastAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"visitSpanDays\": [\n 123\n ],\n \"totalSpent\": [\n 123\n ],\n \"membershipIds\": [\n \"<string>\"\n ],\n \"membershipIdsExclude\": [\n \"<string>\"\n ],\n \"packageIds\": [\n \"<string>\"\n ],\n \"packageIdsExclude\": [\n \"<string>\"\n ],\n \"appointmentTypeIds\": [\n \"<string>\"\n ],\n \"appointmentTypeIdsExclude\": [\n \"<string>\"\n ],\n \"appointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"completedAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"completedAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"createdAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"createdAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"noAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"noAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"weight\": [\n 123\n ],\n \"gender\": [\n \"<string>\"\n ],\n \"genderExclude\": [\n \"<string>\"\n ],\n \"patientSource\": [\n \"<string>\"\n ],\n \"patientSourceExclude\": [\n \"<string>\"\n ],\n \"preferredProviderId\": [\n \"<string>\"\n ],\n \"preferredProviderIdExclude\": [\n \"<string>\"\n ],\n \"mostRecentProviderId\": [\n \"<string>\"\n ],\n \"mostRecentProviderIdExclude\": [\n \"<string>\"\n ],\n \"mostRecentProviderMissing\": [\n \"<string>\"\n ],\n \"creditBalance\": [\n 123\n ],\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"lastActiveDays\": [\n 123\n ],\n \"optedOutOfEmail\": [\n \"<string>\"\n ],\n \"age\": [\n 123\n ],\n \"height\": [\n 123\n ],\n \"goalWeight\": [\n 123\n ],\n \"systolicBp\": [\n 123\n ],\n \"diastolicBp\": [\n 123\n ],\n \"waistCircumference\": [\n 123\n ],\n \"pulse\": [\n 123\n ],\n \"temperature\": [\n 123\n ],\n \"hasProfilePicture\": [\n \"<string>\"\n ],\n \"pronouns\": \"<string>\",\n \"preferredName\": \"<string>\",\n \"surchargeDisabled\": [\n \"<string>\"\n ],\n \"hasNotes\": [\n \"<string>\"\n ],\n \"hasActiveChat\": [\n \"<string>\"\n ],\n \"medicationCount\": [\n 123\n ],\n \"hasEmail\": [\n \"<string>\"\n ],\n \"hasPhoneNumber\": [\n \"<string>\"\n ],\n \"hasMembership\": [\n \"<string>\"\n ],\n \"hasTags\": [\n \"<string>\"\n ],\n \"hasFutureAppointments\": [\n \"<string>\"\n ],\n \"cancelledAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"cancelledAppointmentDays\": [\n 123\n ],\n \"lastAppointmentStatus\": [\n \"<string>\"\n ],\n \"outstandingBalance\": [\n 123\n ],\n \"outstandingBalanceDays\": [\n 123\n ],\n \"purchasedItemIds\": [\n \"<string>\"\n ],\n \"purchasedItemIdsExclude\": [\n \"<string>\"\n ],\n \"hasPaymentPlan\": [\n \"<string>\"\n ],\n \"lastPaymentDays\": [\n 123\n ],\n \"lastPaymentStatus\": [],\n \"lastPaymentStatusExclude\": [],\n \"hasPaymentMethod\": [\n \"<string>\"\n ],\n \"membershipStatuses\": [],\n \"membershipStatusesExclude\": [],\n \"discountTypes\": [],\n \"discountTypesExclude\": [],\n \"discountTemplateIds\": [\n \"<string>\"\n ],\n \"discountTemplateIdsExclude\": [\n \"<string>\"\n ],\n \"discountBenefitItemIds\": [\n \"<string>\"\n ],\n \"discountBenefitItemIdsExclude\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("TENANT", "<tenant>")
req.Header.Add("API-KEY", "<api-key>")
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.put("https://api.decodahealth.com/comms/cohorts/{cohort_id}")
.header("TENANT", "<tenant>")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"filterCriteria\": {\n \"customList\": {\n \"emails\": [\n \"<string>\"\n ],\n \"phoneNumbers\": [\n \"<string>\"\n ]\n },\n \"id\": \"<string>\",\n \"externalId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"dateOfBirth\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"birthday\": [\n \"<string>\"\n ],\n \"createdDate\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"tagIds\": [\n \"<string>\"\n ],\n \"tagIdsExclude\": [\n \"<string>\"\n ],\n \"locationIds\": [\n \"<string>\"\n ],\n \"locationIdsExclude\": [\n \"<string>\"\n ],\n \"leadSource\": [\n \"<string>\"\n ],\n \"leadSourceExclude\": [\n \"<string>\"\n ],\n \"smsOptOut\": [\n \"<string>\"\n ],\n \"onSchedulingBlacklist\": [\n \"<string>\"\n ],\n \"optedInToSmsMarketing\": [\n \"<string>\"\n ],\n \"optedInToEmailMarketing\": [\n \"<string>\"\n ],\n \"optedInToSocialMedia\": [\n \"<string>\"\n ],\n \"appointmentCount\": [\n 123\n ],\n \"lastAppointmentDays\": [\n 123\n ],\n \"lastAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"visitSpanDays\": [\n 123\n ],\n \"totalSpent\": [\n 123\n ],\n \"membershipIds\": [\n \"<string>\"\n ],\n \"membershipIdsExclude\": [\n \"<string>\"\n ],\n \"packageIds\": [\n \"<string>\"\n ],\n \"packageIdsExclude\": [\n \"<string>\"\n ],\n \"appointmentTypeIds\": [\n \"<string>\"\n ],\n \"appointmentTypeIdsExclude\": [\n \"<string>\"\n ],\n \"appointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"completedAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"completedAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"createdAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"createdAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"noAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"noAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"weight\": [\n 123\n ],\n \"gender\": [\n \"<string>\"\n ],\n \"genderExclude\": [\n \"<string>\"\n ],\n \"patientSource\": [\n \"<string>\"\n ],\n \"patientSourceExclude\": [\n \"<string>\"\n ],\n \"preferredProviderId\": [\n \"<string>\"\n ],\n \"preferredProviderIdExclude\": [\n \"<string>\"\n ],\n \"mostRecentProviderId\": [\n \"<string>\"\n ],\n \"mostRecentProviderIdExclude\": [\n \"<string>\"\n ],\n \"mostRecentProviderMissing\": [\n \"<string>\"\n ],\n \"creditBalance\": [\n 123\n ],\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"lastActiveDays\": [\n 123\n ],\n \"optedOutOfEmail\": [\n \"<string>\"\n ],\n \"age\": [\n 123\n ],\n \"height\": [\n 123\n ],\n \"goalWeight\": [\n 123\n ],\n \"systolicBp\": [\n 123\n ],\n \"diastolicBp\": [\n 123\n ],\n \"waistCircumference\": [\n 123\n ],\n \"pulse\": [\n 123\n ],\n \"temperature\": [\n 123\n ],\n \"hasProfilePicture\": [\n \"<string>\"\n ],\n \"pronouns\": \"<string>\",\n \"preferredName\": \"<string>\",\n \"surchargeDisabled\": [\n \"<string>\"\n ],\n \"hasNotes\": [\n \"<string>\"\n ],\n \"hasActiveChat\": [\n \"<string>\"\n ],\n \"medicationCount\": [\n 123\n ],\n \"hasEmail\": [\n \"<string>\"\n ],\n \"hasPhoneNumber\": [\n \"<string>\"\n ],\n \"hasMembership\": [\n \"<string>\"\n ],\n \"hasTags\": [\n \"<string>\"\n ],\n \"hasFutureAppointments\": [\n \"<string>\"\n ],\n \"cancelledAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"cancelledAppointmentDays\": [\n 123\n ],\n \"lastAppointmentStatus\": [\n \"<string>\"\n ],\n \"outstandingBalance\": [\n 123\n ],\n \"outstandingBalanceDays\": [\n 123\n ],\n \"purchasedItemIds\": [\n \"<string>\"\n ],\n \"purchasedItemIdsExclude\": [\n \"<string>\"\n ],\n \"hasPaymentPlan\": [\n \"<string>\"\n ],\n \"lastPaymentDays\": [\n 123\n ],\n \"lastPaymentStatus\": [],\n \"lastPaymentStatusExclude\": [],\n \"hasPaymentMethod\": [\n \"<string>\"\n ],\n \"membershipStatuses\": [],\n \"membershipStatusesExclude\": [],\n \"discountTypes\": [],\n \"discountTypesExclude\": [],\n \"discountTemplateIds\": [\n \"<string>\"\n ],\n \"discountTemplateIdsExclude\": [\n \"<string>\"\n ],\n \"discountBenefitItemIds\": [\n \"<string>\"\n ],\n \"discountBenefitItemIdsExclude\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decodahealth.com/comms/cohorts/{cohort_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["TENANT"] = '<tenant>'
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"filterCriteria\": {\n \"customList\": {\n \"emails\": [\n \"<string>\"\n ],\n \"phoneNumbers\": [\n \"<string>\"\n ]\n },\n \"id\": \"<string>\",\n \"externalId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"dateOfBirth\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"birthday\": [\n \"<string>\"\n ],\n \"createdDate\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"tagIds\": [\n \"<string>\"\n ],\n \"tagIdsExclude\": [\n \"<string>\"\n ],\n \"locationIds\": [\n \"<string>\"\n ],\n \"locationIdsExclude\": [\n \"<string>\"\n ],\n \"leadSource\": [\n \"<string>\"\n ],\n \"leadSourceExclude\": [\n \"<string>\"\n ],\n \"smsOptOut\": [\n \"<string>\"\n ],\n \"onSchedulingBlacklist\": [\n \"<string>\"\n ],\n \"optedInToSmsMarketing\": [\n \"<string>\"\n ],\n \"optedInToEmailMarketing\": [\n \"<string>\"\n ],\n \"optedInToSocialMedia\": [\n \"<string>\"\n ],\n \"appointmentCount\": [\n 123\n ],\n \"lastAppointmentDays\": [\n 123\n ],\n \"lastAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"visitSpanDays\": [\n 123\n ],\n \"totalSpent\": [\n 123\n ],\n \"membershipIds\": [\n \"<string>\"\n ],\n \"membershipIdsExclude\": [\n \"<string>\"\n ],\n \"packageIds\": [\n \"<string>\"\n ],\n \"packageIdsExclude\": [\n \"<string>\"\n ],\n \"appointmentTypeIds\": [\n \"<string>\"\n ],\n \"appointmentTypeIdsExclude\": [\n \"<string>\"\n ],\n \"appointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"completedAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"completedAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"createdAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"createdAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"noAppointmentServiceIds\": [\n \"<string>\"\n ],\n \"noAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"weight\": [\n 123\n ],\n \"gender\": [\n \"<string>\"\n ],\n \"genderExclude\": [\n \"<string>\"\n ],\n \"patientSource\": [\n \"<string>\"\n ],\n \"patientSourceExclude\": [\n \"<string>\"\n ],\n \"preferredProviderId\": [\n \"<string>\"\n ],\n \"preferredProviderIdExclude\": [\n \"<string>\"\n ],\n \"mostRecentProviderId\": [\n \"<string>\"\n ],\n \"mostRecentProviderIdExclude\": [\n \"<string>\"\n ],\n \"mostRecentProviderMissing\": [\n \"<string>\"\n ],\n \"creditBalance\": [\n 123\n ],\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipCode\": \"<string>\",\n \"lastActiveDays\": [\n 123\n ],\n \"optedOutOfEmail\": [\n \"<string>\"\n ],\n \"age\": [\n 123\n ],\n \"height\": [\n 123\n ],\n \"goalWeight\": [\n 123\n ],\n \"systolicBp\": [\n 123\n ],\n \"diastolicBp\": [\n 123\n ],\n \"waistCircumference\": [\n 123\n ],\n \"pulse\": [\n 123\n ],\n \"temperature\": [\n 123\n ],\n \"hasProfilePicture\": [\n \"<string>\"\n ],\n \"pronouns\": \"<string>\",\n \"preferredName\": \"<string>\",\n \"surchargeDisabled\": [\n \"<string>\"\n ],\n \"hasNotes\": [\n \"<string>\"\n ],\n \"hasActiveChat\": [\n \"<string>\"\n ],\n \"medicationCount\": [\n 123\n ],\n \"hasEmail\": [\n \"<string>\"\n ],\n \"hasPhoneNumber\": [\n \"<string>\"\n ],\n \"hasMembership\": [\n \"<string>\"\n ],\n \"hasTags\": [\n \"<string>\"\n ],\n \"hasFutureAppointments\": [\n \"<string>\"\n ],\n \"cancelledAppointmentDateRange\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"cancelledAppointmentDays\": [\n 123\n ],\n \"lastAppointmentStatus\": [\n \"<string>\"\n ],\n \"outstandingBalance\": [\n 123\n ],\n \"outstandingBalanceDays\": [\n 123\n ],\n \"purchasedItemIds\": [\n \"<string>\"\n ],\n \"purchasedItemIdsExclude\": [\n \"<string>\"\n ],\n \"hasPaymentPlan\": [\n \"<string>\"\n ],\n \"lastPaymentDays\": [\n 123\n ],\n \"lastPaymentStatus\": [],\n \"lastPaymentStatusExclude\": [],\n \"hasPaymentMethod\": [\n \"<string>\"\n ],\n \"membershipStatuses\": [],\n \"membershipStatusesExclude\": [],\n \"discountTypes\": [],\n \"discountTypesExclude\": [],\n \"discountTemplateIds\": [\n \"<string>\"\n ],\n \"discountTemplateIdsExclude\": [\n \"<string>\"\n ],\n \"discountBenefitItemIds\": [\n \"<string>\"\n ],\n \"discountBenefitItemIdsExclude\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"filterCriteria": {},
"createdById": "<string>",
"createdDate": "2023-11-07T05:31:56Z",
"description": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
The tenant you are making this request on behalf of
Your api key
Path Parameters
Body
application/json
Maximum string length:
255Reusable cohort filter fields (no pagination/sort/transport).
Field list mirrors PatientFetchParams in decoda/schemas/patient.py;
keep in sync or explicitly diverge. The two schemas are intentionally
decoupled so cohort and patient-table can evolve independently.
Show child attributes
Show child attributes
⌘I
