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
Parameter | Description | Type | Required |
---|---|---|---|
Authorization | “Bearer app_token” Literal text Bearer followed by app_token that is the token obtained from /oauth2/token endpoint | string | yes |
Content-Type | The type of content that will be used for requests to be JSON | string | yes |
Accept | The type of content that will be used for responses to be JSON | string | yes |
From | Name of the entry point | string | yes |
Accept-Language | Language of the request | Locale | no |
Request example
Parameter | Description | Type | Required | Value |
---|---|---|---|---|
actor.id | app_id of the application you are using to log user | string | yes | app id |
actor.objectType | Type of the object which represents the actor. | string | yes | ‘person’ |
verb | Verb used for complete | string | yes | ‘complete’ |
object.objectType | ObjectType represents the user | string | yes | ‘user’ |
object.ids.email | Structure of email identifier. node name must be “email” | struct | yes | |
object.ids.email.objectType | ObjectType represents the id of the user | string | yes | ‘user_id’ |
object.ids.email.value | Email value | string | yes | |
source.id | Type of device doing the activity | string | yes | ‘unknown’ | ‘pc’ | ‘mobile’ | ‘tablet’ | ‘game_console’ | ‘itv’ |
source.objectType | Type of source | string | yes | ‘device’ |
Response examples
Response: mandatory user data completed
Parameter | Description | Type |
---|---|---|
result.status | HTTP status code | int |
result.elapsed | Time in millis taken to complete the request | int |
Response KO: user not complete due to validations errors
Parameter | Description | Type |
---|---|---|
result.status | HTTP status code | int |
result.elapsed | Time in millis taken to complete the request | int |
result.errors | Struct for errors | array |
result.errors[].message | Error message | string |
result.errors[].detail | Error detail | string |
Response KO: user data completed and notification failed
Parameter | Description | Type |
---|---|---|
result.status | HTTP status code | int |
result.elapsed | Time in millis taken to complete the request | int |
results | Struct of result | array |
result.status | HTTP status code | int |
result.errors | Struct for errors | array |
result.errors[].message | Error message | string |
Response codes
Code | Type | Description |
---|---|---|
400 | Error | Bad Request: The request could not be understood by the server due to malformed syntax |
401 | Error | Unauthorized: authentication is required and has failed or has not yet been provided (token is invalid, etc) |
409 | Error | Incompatible parameters: User can’t be completed because there are some errors with the parameters used in the request |
412 | Error | Precondition failed: User needs to confirm a identifier |
416 | Error | Requested Range Not Satisfiable: user need some data to be completed |
500 | Error | Internal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request |
502 | Error | Bad Gateway: notification service has failed |
200 | Sucess | User data completed successfully. |
202 | Success | User don’t need to complete any data |
207 | Partial success | Multi-Status: user datas and ids are complete succesfully, but confirmation notification could not be sent |