• Register

member.update

Description

update a single member object.  Please see Updating Objects for an overview of how the update method works.

Note that many fields on the member object are marked as createonly.  This means that these fields are not changeable via the api.  The user themselves can change these fields via the my account pages in the portal.  Custom fieds can be used as a work around to overcome this limitation.

Parameters

member

An member object, as described by the object.describe call.  If a field in the member object is ommitted, no change will be made to that field.  If extra fields are passed, they will be ignored.  The primary identifier must be specified.

Response

An member object, as described by the object.describe call.  This is actual member that was updated.

Examples

This example updates the status of the member created in the member.create example to be active without requiring confirmation.

A Sample JSON-RPC Member Update Request

{
    "method": "member.update",
    "params": [
        {
            "username": "example_username",
            "area_status": "active"
        }
    ],
    "id": 1
}

The JSON-RPC Response

{
    "result": {
        "created": "2009-12-12T01:05:55Z",
        "updated": "2009-12-12T01:33:29Z",
        "username": "example_username",
        "email": "joe@example.com",
        "display_name": "Joe P. User",
        "uri": "",
        "blog": "",
        "im": "",
        "imsvc": "",
        "phone": "",
        "company": "",
        "address1": "",
        "address2": "",
        "locality": "",
        "region": "",
        "postal_code": "",
        "country_code": "",
        "first_name": "",
        "last_name": "",
        "registration_ipaddr": "",
        "area_status": "active",
        "external_id": "",
        "passwd_new": "",
        "object_type": "member"
    },
    "error": null,
    "id": 1
}

Permissions Required

The user who owns the key used to authenticate the member.update call must be a member of one of the following roles

  • Administrator
  • Program Manager
  • Community Manager

See authentication.

Errors

In addition to the standard json-rpc errors and authentication errors, member.update may also return these errors:

HTTP Status Code JSON-RPC Code Error Message Description
400 1000 Invalid Object The object could not be updated because the object would be invalid.  See Validating Objects for details on the format of this error.
400 1001 Duplicate Object The object could not be updated because a change would cause it to conflict with a different object that already exists.
400 1002 Field "x" is required. The object could not be updated because a primary identifier was not passed to enable finding the object to update.
500 2002 Update Failed The object could not be updated.  This is the error message of last resort for object updates and usually indicates a systems integration failure, invalid internal data, or a transient issue.  These errors are logged by Mashery.
400 5000 Object "type" with "key" of "value" could not be found The object could not be updated because it could not be found.

Docs Navigation