Description

You have to call this method when you have T&Cs and/or consents that have been requested from other systems and you want to migrate them to DruID users. This method only assigns those T&C and/or consents that the user does NOT have associated, the rest will be ignored. To perform updates, please review the user update method.

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/migration/assertions

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 this requestLocaleno

Request example

ParameterDescriptionTypeRequiredValue
actor.idapp_id of the application you are usingstringyesapp id
actor.objectTypeType of the object which represents the actorstringyes‘application’
verbVerb used for the assertions acceptstringyes‘accept’
object.objectTypeObjectType represents the objectstringyes‘collection’
object.itemsDynamic list of users to migrate assertions to. The limit of users per request is 1000.arrayyesarray
object.totalItemsNumber of users to migrate assertions tointyes3
object.items.objectIdUserID generated by DruID. Necessary to identify the user to migrate assertions tostringyesobjectId
object.items.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: 200 OK

ParameterDescriptionType
contentList of data received with the response to each of the users sent.array
content.statusHTTP status code for each userint
content.messageResponse message describing the status of the operation for that userstring
content.objectIdUserID identifying the user of that operationstring
result.statusHTTP status codeint
errors.messageErrors descriptionstring

Response KO: User must accept T&C and fill consents

ParameterDescriptionType
contentList of data received with the response to each of the users sent.array
content.statusHTTP status code for each userint
content.messageResponse message describing the status of the operation for that userstring
content.objectIdUserID identifying the user of that operationstring
result.statusHTTP status codeint
errors.messageErrors descriptionstring

Response KO: User doesn’t have any consent that must be filled

ParameterDescriptionType
contentList of data received with the response to each of the users sent.array
content.statusHTTP status code for each userint
content.messageResponse message describing the status of the operation for that userstring
content.objectIdUserID identifying the user of that operationstring
result.statusHTTP status codeint
errors.messageErrors descriptionstring

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)
403ErrorForbidden: user id or password are invalid
410ErrorGone: User doesn’t have any consent that must be filled
451ErrorUnavailable For Legal Reasons: user must accept new terms and conditions
500ErrorInternal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request
504ErrorGateway TimeoutService can not contact with oauth server to do some internal operations
200SucessAssertions set correctly