Description

You have to call this method when you want to check if user needs to complete data, or complete the user datas in DRUID.

As you know, DRUID defines a set of mandatory data for the user depending of the entry point you are using; be aware that if you send more data than defined in complete data configuration, not needed data will be discarded and it will be not persisted nor validated.

To complete data user must be logged, you must first log user with Login service.

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

Endpoint URL:

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

Request parameters

ParameterDescriptionTypeRequired
Authorization“Bearer app_token” Literal text Bearer followed by app_token that is the token obtained from /oauth2/token endpointstringyes
Content-TypeThe type of content that will be used for requests to be JSONstringyes
AcceptThe type of content that will be used for responses to be JSONstringyes
FromName of the entry pointstringyes
Accept-LanguageLanguage of the requestLocaleno

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‘person’
verbVerb used for completestringyes‘complete’
object.objectTypeObjectType represents the userstringyes‘user’
object.ids.emailStructure of email identifier. node name must be “email”structyesemail
object.ids.email.objectTypeObjectType represents the id of the userstringyes‘user_id’
object.ids.email.valueEmail valuestringyesemail
source.idType of device doing the activitystringyes‘unknown’ | ‘pc’ | ‘mobile’ | ‘tablet’ | ‘game_console’ | ‘itv’
source.objectTypeType of sourcestringyes‘device’

Response examples

Response: mandatory user data completed

ParameterDescriptionType
result.statusHTTP status codeint
result.elapsedTime in millis taken to complete the requestint

Response KO: user not complete due to validations errors

ParameterDescriptionType
result.statusHTTP status codeint
result.elapsedTime in millis taken to complete the requestint
result.errorsStruct for errorsarray
result.errors[].messageError messagestring
result.errors[].detailError detailstring

Response KO: user data completed and notification failed

ParameterDescriptionType
result.statusHTTP status codeint
result.elapsedTime in millis taken to complete the requestint
resultsStruct of resultarray
result.statusHTTP status codeint
result.errorsStruct for errorsarray
result.errors[].messageError messagestring

Response codes

CodeTypeDescription
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)
409ErrorIncompatible parameters: User can’t be completed because there are some errors with the parameters used in the request
412ErrorPrecondition failed: User needs to confirm a identifier
416ErrorRequested Range Not Satisfiable: user need some data to be completed
500ErrorInternal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request
502ErrorBad Gateway: notification service has failed
200SucessUser data completed successfully.
202SuccessUser don’t need to complete any data
207Partial successMulti-Status: user datas and ids are complete succesfully, but confirmation notification could not be sent