Update Selection Rule ALPHA
Read as Markdown Required plan: SchedulerDescription #
Selection Rules are used to resolve who should attend a Scheduling Request. This API allows you to modify existing Selection Rules.
Authentication uses a client_secret of an Internal Application linked to the Organizational Unit.
URL format #
{data_center_url}/v1/scheduler/selection_rules/{selection_rule_id}
Example Request #
PATCH /v1/scheduler/selection_rules/sel_5ebac6d468ed0fb37a1b6e4a HTTP/1.1
Host: {data_center_url}
Authorization: Bearer {API_TOKEN}
Content-Type: application/json; charset=utf-8
{
"name": "Engineers",
"required": 1,
"members": {
"add": [
{ "email": "bob@evenitron.com" },
{ "email": "eve@evenitron.com" }
],
"remove": [
{ "email": "alice@evenitron.com" },
]
}
}Example Response #
HTTP/1.1 200 OK
{
"selection_rule": {
"sub": "sel_5ebac6d468ed0fb37a1b6e4a",
"name": "Engineers",
"required": 1,
"members": [
{
"display_name": "Bob",
"email": "bob@evenitron.com",
"sub": "acc_6eac9d468e0fb111adde242"
}
]
},
"diff_applied": {
"members": {
"added": [
{
"display_name": "Bob",
"email": "bob@evenitron.com",
"sub": "acc_6eac9d468e0fb111adde242"
}
],
"removed": [
{
"display_name": "Alice",
"email": "alice@evenitron.com",
"sub": "acc_5ebac6d468ed0fb37a1b6e4a"
}
],
"not_resolved": [
{ "email": "eve@evenitron.com" }
]
}
}
}Request parameters #
data_center_url required
The URL for the data center you want to communicate with. Possible choices are:
api-au.cronofy.com- π¦πΊ Australiaapi-ca.cronofy.com- π¨π¦ Canadaapi-de.cronofy.com- π©πͺ Germanyapi-sg.cronofy.com- πΈπ¬ Singaporeapi-uk.cronofy.com- π¬π§ United Kingdomapi.cronofy.com- πΊπΈ United States
Find out more about Cronofy's data centers.
selection_rule_id required #
The selection_rule_id of the Selection Rule you wish to modify
name optional #
Set the name of the Selection Rule which will appear in the UI when creating or viewing Scheduling Requests.
members optional #
An object representing the operations you want to be applied to modify the selection rule members:
members.add optional #
A list of objects representing members to add to the selection rule. Supported keys are:
email: The email of the user you want to add to the rule
members.remove optional #
A list of objects representing members to remove from the selection rule. Supported keys are:
email: The email of the user you want to remove from the rule
required optional #
Updates the number of members that will be added to events. The value must be an integer, or can be the special value "all" if you want everyone in the rule to have to be available and added to the event.
Response parameters #
selection_rule #
An object representing the new state of the selection_rule. This is the same format as used in the Show Selection Rule endpoint.
diff_applied.members #
An object reporting the result of the members changes being applied.
diff_applied.members.added #
An array of objects containing the details of the members added to the Selection Rule.
diff_applied.members.removed #
An array of objects containing the details of the members removed from the Selection Rule.
diff_applied.members.not_resolved optional #
A list of objects containing the emails that were in the request, but could not be resolved to a Cronofy account. The user does not have an account in the Organizational Unit of the Selection Rule.