pub struct MembershipUpdate {
pub comment: Option<Option<String>>,
pub fields: Option<Option<BTreeMap<String, Value>>>,
pub group_member_status: Option<String>,
pub group_type_role_id: Option<Option<i64>>,
pub ignore_waiting_list_full: Option<bool>,
pub inform_leader: Option<bool>,
pub member_end_date: Option<Option<NaiveDate>>,
pub member_start_date: Option<Option<DateOrDateTime>>,
pub waitinglist_position: Option<Option<i64>>,
pub extra: Map<String, Value>,
}Expand description
Partial update of an existing membership. Omitted membership properties retain their current values; explicit null clears nullable values. This changes the membership, not the underlying person record.
Fields§
§comment: Option<Option<String>>Membership comment; surrounding whitespace is trimmed. Null or empty text clears it.
None leaves the field out, Some(None) sends null.
fields: Option<Option<BTreeMap<String, Value>>>Values keyed by numeric membership-field definition ID. Only submitted known fields are updated; unknown IDs are ignored. Null clears one field; an omitted/null fields container changes no fields. Field-specific validation applies: text up to 4000 characters, numeric values, dates, timestamps, checkbox booleans, option IDs or labels for select/radioselect, and arrays of option IDs or labels for multiselect.
None leaves the field out, Some(None) sends null.
group_member_status: Option<String>Target membership workflow status; omitted preserves the existing status. Explicit null is not a usable status.
Allowed values: active, requested, to_delete, waiting.
group_type_role_id: Option<Option<i64>>Role definition ID belonging to the group type. Null resets to its default role.
None leaves the field out, Some(None) sends null.
ignore_waiting_list_full: Option<bool>Allow the update even when it would exceed waiting-list capacity.
inform_leader: Option<bool>Whether membership-change processing should inform group leaders.
member_end_date: Option<Option<NaiveDate>>End date or null to clear. Must not precede the resulting start date.
None leaves the field out, Some(None) sends null.
member_start_date: Option<Option<DateOrDateTime>>Start date or UTC timestamp, not in the future. If the resulting status is active, an explicitly submitted value must not be null; omission preserves the existing value.
None leaves the field out, Some(None) sends null.
waitinglist_position: Option<Option<i64>>Waiting-list position; 0 selects the next free position, null removes it. Legacy -1 reaches a backend assertion and should be avoided. This PATCH does not automatically change status or shift other positions.
None leaves the field out, Some(None) sends null.
extra: Map<String, Value>Fields not described by the spec, e.g. instance-specific DB fields.