Description
Before using this endpoint, please review the OAuth2 authentication protocol and the purpose of each token by visiting: https://dru-id.com/developers/apis/oauth-2/.
To successfully invoke this service, a valid client_token
associated with an authorized API client is required. Ensure that your application is properly registered and has been granted the necessary permissions to obtain and use this token.
Associates a specific typology with a user, enabling customized behavior or categorization.
Endpoint URL:
POST https://{your-endpoint-domain.com}/activityid/v1/typology/assign
Request Headers
Parameter | Description | Type | Required |
---|---|---|---|
Authorization | “Bearer ” Literal text Bearer followed by client_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 for this request | Locale | no |
Query string parameters
None
Request Example
Parameter | Description | Type | Required | Value |
---|---|---|---|---|
actor.id | app_id of the application you are using to create the tipology | string | yes | app id |
actor.objectType | Type of the object which represents the actor. | string | yes | ‘application’ |
verb | Verb used for the assignment | string | yes | ‘assign’ |
object.objectType | ObjectType represents the typology | string | yes | ‘typology’ |
object.name | Name or key of the typology to be assigned. | string | yes | ‘My Typology’ |
target | The user who is going to receive the new typology | struct | yes | User with ids |
target.objectType | Type of the object which represents the target. | string | yes | ‘user’ |
target.ids.obejct_id | The object ID of the user | struct | 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: Typology assigned to the user
Parameter | Description | Type |
---|---|---|
result | Common http result | struct |
result.status | Http code | integer |
content | User with the new typology added. Please refer to the User Info to see the full detail of the content. | struct |
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) |
412 | Error | Precondition failed: Typology not found |
500 | Error | Internal Server Error: The server encountered an unexpected condition which prevented it from fulfilling the request |
504 | Error | Gateway TimeoutService can not contact with oauth server to do some internal operations |
304 | Success | Not Modified: The user already had that typology |
200 | Success | Typology assigned succesfully |