Updates one or more constituent records
2020 Update: Beginning with the LWS 1.32 release, you must include the AcceptsEmail parameter set to true to opt new constituents into email. When this parameter is not included, new constituents are opted-out of email by default.
The Update operation attempts to update a record with the values supplied in the request. Only fields which contain values or which specify the attribute xsi:nil="true" are updated. Fields missing from the request, or not containing a value, are not changed. Records to be updated must be uniquely identified by ConsId or by a unique MemberId or PrimaryEmail.
One of ConsId, MemberId, or PrimaryEmail must be specified in order to locate the record to update.
The order of precedence of the search terms is (a) ConsId (b) MemberId, then (c) PrimaryEmail. If a record is not found (RECORD_NOT_FOUND) or if multiple records are returned (UPDATE_MATCH_AMBIGUOUS) by any specified search term evaluated in this order, the method returns an error.
If a request specifies more than one search parameter, then the system will attempt to update the values of lower-precedence parameters using the values provided. This may result in an error if a duplicate value exists in the database for a specified MemberId (MATCH_EXISTING) or PrimaryEmail (DUPLICATE_EMAIL).
To delete the value of a given field on Update, you must specify the field in the Update request and explicitly set it null.
For example:
SOAP Request | Result |
---|---|
<MiddleName xsi:nil="true"/> | middle_name set to null |
<MiddleName /> | middle_name unchanged |
<MiddleName>John</MiddleName> | middle_name changed to "John" |
The response may contain zero or more response elements
<?xml version='1.0' encoding='UTF-8'?> <soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> <soap:Header> <Session xmlns='urn:soap.convio.com'> <SessionId> 87b595b8e3c82928155dc5f424849a00f32e761d:JServSessionIdr005=0jqh43iip1.app8007:1001021:318:2010-03-09T18:08:02.856Z </SessionId> </Session> </soap:Header> <soap:Body> <Update xmlns='urn:soap.convio.com'> <PartitionId>1001</PartitionId> <Constituent> <ConsId>1001081</ConsId> <ConsName> <MiddleName>Williamson</MiddleName> </ConsName> </Constituent> </Update> </soap:Body> </soap:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <UpdateResponse xmlns="urn:soap.convio.com" xmlns:ens="urn:object.soap.convio.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Result> <ResultCode>OK</ResultCode> <Message>User updated.</Message> <Record xsi:type="ens:Constituent"> <ens:ConsId>1001081</ens:ConsId> <ens:MemberId xsi:nil="true"/> <ens:PrimaryEmail>jwcenter@convio.com</ens:PrimaryEmail> </Record> </Result> </UpdateResponse> </soap:Body> </soap:Envelope>