GET login/users/:user id/data
(Difference between revisions)
Line 1: | Line 1: | ||
− | + | == Description == | |
+ | |||
+ | Returns user custom profile information. | ||
+ | |||
+ | The profile schema can be accessed and updated through Schema APIs [[Datastore_APIs|(see APIs)]] using the schema_name "user_data". The user profile can be updated through the profile update API [[PUT_login/users/:user_id/data|(see API)]] or directly via Objects APIs [[Datastore_APIs|(see APIs)]] using the object_id returned by this API. | ||
+ | |||
+ | == Resource URL == | ||
+ | |||
+ | GET https://api.socialidnow.com/v1/marketing/login/users/:user_id/data | ||
+ | |||
+ | == Parameters == | ||
+ | |||
+ | === URL Parameters === | ||
+ | |||
+ | {| | ||
+ | ! align="left" width="200px" | user_id | ||
+ | | width="200px" | required | ||
+ | | user identifier. | ||
+ | |} | ||
+ | |||
+ | == Authentication == | ||
+ | |||
+ | This API requires Marketing Account authentication. See [[Authentication]]. | ||
+ | |||
+ | == Response == | ||
+ | |||
+ | === Response Status === | ||
+ | |||
+ | {| | ||
+ | ! align="left" width="200px" | ok (200) | ||
+ | | The request was successful. | ||
+ | |- | ||
+ | ! align="left" width="200px" | unauthorized (401) | ||
+ | | The authentication is wrong. See [[Authentication]]. | ||
+ | |- | ||
+ | ! align="left" width="200px" | forbidden (403) | ||
+ | | The Marketing Account has no permission to access this user. | ||
+ | |- | ||
+ | ! align="left" width="200px" | not_found (404) | ||
+ | | The user was not found. | ||
+ | |- | ||
+ | ! align="left" width="200px" | internal_server_error (500) | ||
+ | | An unknown error happened. | ||
+ | |} | ||
+ | |||
+ | === Response Body === | ||
+ | |||
+ | {| | ||
+ | ! align="left" width="200px" | object_id | ||
+ | | object identifier. | ||
+ | |- | ||
+ | ! align="left" width="200px" | user_id | ||
+ | | user identifier. | ||
+ | |- | ||
+ | ! align="left" width="200px" | created_at | ||
+ | | date of object creation. | ||
+ | |- | ||
+ | ! align="left" width="200px" | updated_at | ||
+ | | date of object latest update. | ||
+ | |- | ||
+ | ! align="left" width="200px" | [fields] | ||
+ | | custom fields defined in the schema. | ||
+ | |} | ||
+ | |||
+ | == Examples == | ||
+ | |||
+ | === Request === | ||
+ | |||
+ | Returns the custom profile of user "340". | ||
+ | |||
+ | curl -iX GET 'https://api.socialidnow.com/v1/marketing/login/users/340/data' \ | ||
+ | -H 'Content-type: application/json' \ | ||
+ | --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf | ||
+ | |||
+ | === Response === | ||
+ | |||
+ | ==== Response Headers ==== | ||
+ | |||
+ | HTTP/1.1 200 Ok | ||
+ | Status: 200 | ||
+ | |||
+ | ==== Response Body ==== | ||
+ | |||
+ | { | ||
+ | "object_id": "544a8e66e5cb7c6204000002", | ||
+ | "user_id": 340, | ||
+ | "created_at": "2014-10-24T15:41:05Z", | ||
+ | "updated_at": "2014-10-24T15:41:05Z", | ||
+ | "category": "premium" | ||
+ | } |
Revision as of 23:46, 3 November 2014
Contents |
Description
Returns user custom profile information.
The profile schema can be accessed and updated through Schema APIs (see APIs) using the schema_name "user_data". The user profile can be updated through the profile update API (see API) or directly via Objects APIs (see APIs) using the object_id returned by this API.
Resource URL
GET https://api.socialidnow.com/v1/marketing/login/users/:user_id/data
Parameters
URL Parameters
user_id | required | user identifier. |
---|
Authentication
This API requires Marketing Account authentication. See Authentication.
Response
Response Status
ok (200) | The request was successful. |
---|---|
unauthorized (401) | The authentication is wrong. See Authentication. |
forbidden (403) | The Marketing Account has no permission to access this user. |
not_found (404) | The user was not found. |
internal_server_error (500) | An unknown error happened. |
Response Body
object_id | object identifier. |
---|---|
user_id | user identifier. |
created_at | date of object creation. |
updated_at | date of object latest update. |
[fields] | custom fields defined in the schema. |
Examples
Request
Returns the custom profile of user "340".
curl -iX GET 'https://api.socialidnow.com/v1/marketing/login/users/340/data' \ -H 'Content-type: application/json' \ --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
Response
Response Headers
HTTP/1.1 200 Ok Status: 200
Response Body
{ "object_id": "544a8e66e5cb7c6204000002", "user_id": 340, "created_at": "2014-10-24T15:41:05Z", "updated_at": "2014-10-24T15:41:05Z", "category": "premium" }