|
Name |
Description |
| api_key | Required. An arbitrary value that must be passed when invoking the Convio Client and Server APIs. The value passed by the caller must match the value in the CONVIO_API_KEY site configuration parameter, which is unique for each Convio site. |
| v | Required. API version to invoke. Must be "1.0". |
|
method |
Required. Specifies which method to perform. To invoke this method use the value "update" |
|
response_format |
Optional. Specifies the format in which to return the response. Can be either "xml" (the default value) or "json". |
|
login_name |
Required. Specifies the user name of the account to authenticate. |
|
login_password |
Required. Specifies the password of the account to authenticate. |
|
cons_id |
The internal constituent ID of the user. |
|
member_id |
The external member ID of the user. |
|
primary_email |
The email address of the user. |
|
add_center_ids |
Comma-separated list of numeric IDs of centers to add the user to. |
|
add_group_ids |
Comma-separated list of numeric IDs of groups to add the user to. Restrictions:
· Cannot be used for administrator security groups. |
|
add_interest_ids |
Comma-separated list of numeric IDs of email interests to add the user to. |
|
remove_center_ids |
Comma-separated list of numeric IDs of centers to remove the user from. |
|
remove_group_ids |
Comma-separated list of numeric IDs of groups to remove the user from. Restrictions:
|
|
remove_interest_ids |
Comma-separated list of numeric IDs of email interests to remove the user from. |
If the requester is an administrator, then one of cons_id, member_id, or primary_email must be specified in order to locate the record to update.
- If cons_id is given, then it is the only thing used to search.
- If cons_id is absent and member_id is given, then it is the only thing used to search.
- If one record matches member_id, it is updated (including changing its email address if email is also included – if the email matches a different record and the site does not allow duplicate emails, then there will be an error).
- If multiple records match member_id, then this is an error and no record is updated.
- If no records match member_id, then primary_email is searched. If exactly one match is found, then that record is updated. If that record does not have a member ID on it, then the record is updated with the member ID in the request.
- If cons_id and member_idare absent, then primary_email is searched and a record is updated if exactly one match is found.
If the requester is not an administrator, then the requester's own record is updated regardless of what cons_id is specified. If member_id or primary_email are specified, then they will become the new values of the requester's record.
Code Examples
Response
Success
A successful invocation returns the record's identifier in the specified format (XML/JSON). The HTTP status code is 200. The response is formatted as XML by default, but the response_format input parameter can be used to specify either XML or JSON formatting. For example:
XML format:<updateUserResponse
xsi:schemaLocation=http://convio.com/crm/v1.0
http://service.convio.net/xmlschema/crm.public.v1.xsd
xmlns="http://convio.com/crm/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><cons_id>1002001</cons_id>
<message>User updated.</message>
</updateUserResponse>
JSON format:
{"updateConsResponse ":{"message":"User updated.","cons_id":"1002001"}}
Error
If there is an error, the return is an error code and message. The HTTP status code is 403. For example:
<errorResponse
xsi:schemaLocation=http://convio.com/crm/v1.0
http://service.convio.net/xmlschema/crm.public.v1.xsd
xmlns="http://convio.com/crm/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><code>1</code>
<message>Update failed: Unable to update user.</message>
</errorResponse>
JSON format:
{"errorResponse":{"code":"1","message":
"Update failed: unable to update user."}}
See the complete list of HTTP Status codes and Error codes for calling from another application.


