{"_id":"5b27be7e6814190003f63e26","project":"57336fd5a6a9c40e00e13a0b","version":{"_id":"5b197473be7bb50003d5dbd6","project":"57336fd5a6a9c40e00e13a0b","__v":2,"forked_from":"5addf90f94fe9d0003cd9d29","createdAt":"2018-04-23T15:17:35.680Z","releaseDate":"2018-04-23T15:17:35.680Z","categories":["5b197473be7bb50003d5db9c","5b197473be7bb50003d5db9d","5b197473be7bb50003d5db9e","5b197473be7bb50003d5db9f","5b197473be7bb50003d5dba0","5b197473be7bb50003d5dba1","5b197473be7bb50003d5dba2","5b197473be7bb50003d5dba3","5b197473be7bb50003d5dba4","5b197473be7bb50003d5dba5","5b197473be7bb50003d5dba6","5b27bded4799c70003f36389","5b34c737e0dca2000311de6a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.26 Release","version_clean":"8976.0.0-Tools","version":"8976-Tools"},"category":{"_id":"5b27bded4799c70003f36389","project":"57336fd5a6a9c40e00e13a0b","version":"5b197473be7bb50003d5dbd6","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2018-06-18T14:13:01.902Z","from_sync":false,"order":11,"slug":"merchant-single-signon","title":"User Management"},"user":"5b155c2c3fbcd30003e76908","__v":43,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-18T14:15:26.303Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"code":"","language":"text"}]},"settings":"","examples":{"codes":[]},"method":"get","auth":"optional","params":[],"url":""},"isReference":false,"order":4,"body":"##Definition\nhttps<span>://sandbox.bluesnap.com/services/2/cp/user/<userId>?onbehalfofmid=</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?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\"\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]","excerpt":"","slug":"retrieve-user-api","type":"endpoint","title":"Retrieve User"}

Definition

https://sandbox.bluesnap.com/services/2/cp/user/<userId>?onbehalfofmid=


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?onbehalfofmid=34234
-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 '

Response Example

If successful, the response HTTP status code is 200 OK.

{
	"userId": "1111001",
	"firstName": "New",
	"lastName": "User",
	"email": "new.user@email.com",
	"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

Parameter
Description

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.