Description

You have to call this method when you want to edit info of an existing user in DRUID.

If you edit any confirmable id (email, mobile), and user had that id previously confirmed, new id need to be confirmed. The user’s new email/mobile will not be established until the confirmation process is completed.

Please, read first https://dru-id.com/developers/apis/oauth-2/ to learn about Oauth2 protocol and the meaning of each token.

Warning!: this is a replacement operation. Any data that the user already has and is not sent in the request will be removed from the user. Please check that the json is well formed before making the call to avoid possible unwanted data loss.

Endpoint URL:

POST https://{your-endpoint-domain.com}/activityid/v1/user/update

Request parameters

ParameterDescriptionTypeRequired
AuthorizationBearer ${access_token}

Literal text Bearer followed by access_token that is the token for current logged user obtained from login endpoint

stringyes
Content-Typeapplication/jsonstringyes
Acceptapplication/jsonstringyes
FromId of the entry pointstringyes
Accept-LanguageLanguage of this requestLocaleno

Query string parameters

ParameterDescriptionTypeRequired

Request example

ParameterDescriptionTypeRequiredValue
actor.idapp_id of the application you are using to log userstringyesapp id
actor.objectTypeType of the object which represents the actor.stringyes‘application’
verbVerb used for create userstringyes‘create’
object.objectTypeObjectType represents the userstringyes‘user’
object.passwordPassword of the user. it must be send plainstringyesuser password
object.idsUser identifiers. More info about user identifiers User Infostructyesstruct
object.datasUser datas. More info about user datas User Infostructyesstruct
object.addressesUser addresses. More info about user addresses User Infostructnostruct
object.assertionsStruct that defines legalities manage by the user. More info about user assertions User Infostructyesstruct
source.idType of device doing the activitystringyes‘unknown’ | ‘pc’ | ‘mobile’ | ‘tablet’ | ‘game_console’ | ‘itv’
source.objectTypeType of sourcestringyes‘device’

Response examples

Response: user updated successfully

Response: user updated successfully, and email or mobile needs confirmation

Response: no changes in update

You will receive Http Response  304 Not Modified

Response: Errors in request

Response codes

CodeTypeDescription
200SuccessUser updated successfully. You will get ‘user logged JSON response’
206SuccessPartial content: User updated successfully but needs some data to be completed
304SuccessUser not modified. There is no need to apply any changes.
400ErrorBad Request: The request could not be understood by the server due to malformed syntax
401ErrorUnauthorized: authentication is required and has failed or has not yet been provided (token is invalid, etc)
403ErrorForbidden: user id or password are invalid
404ErrorUser not found
416ErrorSome of the fields to update do not comply with the required specifications
428ErrorPrecondition required: User need to configure MFA or needs to send a MFA code. Check the MFA API
500ErrorInternal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request