{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"optional","results":{"codes":[{"language":"text","code":""}]},"settings":"","params":[],"examples":{"codes":[]},"method":"get"},"next":{"description":"","pages":[]},"title":"Retrieve User","type":"endpoint","slug":"retrieve-user-api","excerpt":"","body":"##Definition\nhttps<span>://sandbox.bluesnap.com/services/2/cp/user/<userId></span>\n\n<hr>\n\n##Documentation\n\nThe BlueSnap Retrieve User API enables you to retrieve an existing user in your BlueSnap account or any of your linked accounts. \n\n###Request Content\nNo content is required in the request body. Enter the relevant IDs in the request URL, as follows:\n\n**Retrieve based on User ID**\nEnter the `userId` into the web service URL, in the format:\n`services/2/cp/user/{userId}`\n\nFor example:\n`services/2/cp/user/1011582369`\n\n###Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response contains the details on the retrieved **userId** object.\n\n<hr>\n\n##Examples\n\n###Request Example\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Note:\",\n \"body\": \"If you need to manage an operation on behalf of a linked BlueSnap account, use the \\\"onbehalfofmid\\\" parameter.\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -v -X GET https://sandbox.bluesnap.com/services/2/cp/user/23645623\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\",\n \"language\": \"curl\",\n \"name\": \"Retrieve User\"\n },\n {\n \"code\": \"curl -v -X GET https://sandbox.bluesnap.com/services/2/cp/user/23645623?onbehalfofmid=34234\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\",\n \"language\": \"curl\",\n \"name\": \"Retrieve User on behalf of linked BlueSnap account\"\n }\n ]\n}\n[/block]\n###Response Example\n\nIf successful, the response HTTP status code is 200 OK.\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n\\t\\\"userId\\\": \\\"1111001\\\",\\n\\t\\\"firstName\\\": \\\"New\\\",\\n\\t\\\"lastName\\\": \\\"User\\\",\\n\\t\\\"email\\\": \\\"new.user:::at:::email.com\\\",\\n\\t\\\"username\\\": \\\"finance 1234\\\",\\n\\t\\\"allowViewFinancialInfo\\\": true\\n}\",\n \"language\": \"json\",\n \"name\": \"Retrieve User Response: 200 OK\"\n }\n ]\n}\n[/block]\n##Example Descriptions\n\nFor details about the above examples, see:\n\n* [Retrieve User](https://developers.bluesnap.com/v8976-Tools/docs/retrieve-user-api#section-retrieve-user)\n* [Retrieve User on behalf of linked BlueSnap account](https://developers.bluesnap.com/v8976-Tools/docs/retrieve-user-api#section-retrieve-user-on-behalf-of-linked-bluesnap-account)\n\n###Retrieve User\nThis example shows a Retrieve User request. The response returns the `userId`, `firstName`, `lastName`, `email`, and `username` values, as well as the `allowViewFinancialInfo` permission, which indicates that this user only has that permission set.\nSee [User Permissions](doc:user-permissions) for a complete list of permissions.\n\n###Retrieve User on behalf of linked BlueSnap account\nThis example shows a Retrieve User request on behalf of a linked BlueSnap account.\n\n###Parameter Reference\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"onbehalfofmid\",\n \"0-2\": \"Create users on their behalf (consists of your user's ID in numeric format)\",\n \"0-1\": \"Creates, updates, retrieves, or deletes users on behalf of a linked BlueSnap account\\n\\n**Note:** This parameter specifies the ID of the BlueSnap account that owns the user, which should be linked to the BlueSnap account executing the call.\",\n \"h-0\": \"Parameter\",\n \"h-1\": \"Description\"\n },\n \"cols\": 2,\n \"rows\": 1\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]","updates":[],"order":4,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"6197defc41c8040154bcbaa4","project":"57336fd5a6a9c40e00e13a0b","version":{"version":"8976-Tools","version_clean":"8976.0.0-Tools","codename":"3.40 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["6197defc41c8040154bcba61","6197defc41c8040154bcba62","6197defc41c8040154bcba63","6197defc41c8040154bcba64","6197defc41c8040154bcba65","6197defc41c8040154bcba66","6197defc41c8040154bcba67","6197defc41c8040154bcba68","6197defc41c8040154bcba69","6197defc41c8040154bcba6a","6197defc41c8040154bcba6b","6197defc41c8040154bcba6c","5b34c737e0dca2000311de6a","60957f4cce403c0045a031ef","6197defc41c8040154bcba6d","6197defc41c8040154bcba6e","6197defc41c8040154bcba6f","6197defc41c8040154bcba70","6197defc41c8040154bcba71","6197defc41c8040154bcba72"],"_id":"6197defc41c8040154bcbaea","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"60957f4cce403c0045a03255","createdAt":"2018-04-23T15:17:35.680Z","releaseDate":"2018-04-23T15:17:35.680Z"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"User Management","slug":"merchant-single-signon","order":17,"from_sync":false,"reference":false,"_id":"6197defc41c8040154bcba6c","project":"57336fd5a6a9c40e00e13a0b","version":"6197defc41c8040154bcbaea","createdAt":"2018-06-18T14:13:01.902Z","__v":0},"user":"5b155c2c3fbcd30003e76908","createdAt":"2018-06-18T14:15:26.303Z","githubsync":"","__v":43,"parentDoc":null}
getRetrieve User
Definition
https://sandbox.bluesnap.com/services/2/cp/user/<userId>
Documentation
The BlueSnap Retrieve User API enables you to retrieve an existing user in your BlueSnap account or any of your linked accounts.
Request Content
No content is required in the request body. Enter the relevant IDs in the request URL, as follows:
Retrieve based on User ID
Enter the userId
into the web service URL, in the format:services/2/cp/user/{userId}
For example:services/2/cp/user/1011582369
Response Details
If successful, the response HTTP status code is 200 OK.
The response contains the details on the retrieved userId object.
Examples
Request Example
Note:
If you need to manage an operation on behalf of a linked BlueSnap account, use the "onbehalfofmid" parameter.
curl -v -X GET https://sandbox.bluesnap.com/services/2/cp/user/23645623
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
curl -v -X GET https://sandbox.bluesnap.com/services/2/cp/user/23645623?onbehalfofmid=34234
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"userId": "1111001",
"firstName": "New",
"lastName": "User",
"email": "[email protected]",
"username": "finance 1234",
"allowViewFinancialInfo": true
}
Example Descriptions
For details about the above examples, see:
Retrieve User
This example shows a Retrieve User request. The response returns the userId
, firstName
, lastName
, email
, and username
values, as well as the allowViewFinancialInfo
permission, which indicates that this user only has that permission set.
See User Permissions for a complete list of permissions.
Retrieve User on behalf of linked BlueSnap account
This example shows a Retrieve User request on behalf of a linked BlueSnap account.
Parameter Reference
onbehalfofmid
Creates, updates, retrieves, or deletes users on behalf of a linked BlueSnap account
Note: This parameter specifies the ID of the BlueSnap account that owns the user, which should be linked to the BlueSnap account executing the call.