{"_id":"5c2d24995737c6001328b931","project":"57336fd5a6a9c40e00e13a0b","version":{"_id":"5bdc633c15437b0042ed963c","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"5bc48b4f9919d4000df5ea7b","createdAt":"2018-04-23T15:17:35.680Z","releaseDate":"2018-04-23T15:17:35.680Z","categories":["5bdc633c15437b0042ed95f4","5bdc633c15437b0042ed95f5","5bdc633c15437b0042ed95f6","5bdc633c15437b0042ed95f7","5bdc633c15437b0042ed95f8","5bdc633c15437b0042ed95f9","5bdc633c15437b0042ed95fa","5bdc633c15437b0042ed95fb","5bdc633c15437b0042ed95fc","5bdc633c15437b0042ed95fd","5bdc633c15437b0042ed95fe","5bdc633c15437b0042ed95ff","5b34c737e0dca2000311de6a","5bdc633c15437b0042ed9600"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.28.0 Release","version_clean":"8976.0.0-Tools","version":"8976-Tools"},"category":{"_id":"5bdc633c15437b0042ed95ff","project":"57336fd5a6a9c40e00e13a0b","version":"5bdc633c15437b0042ed963c","__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":"5beb1b96bc2003003ecd645e","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-01-02T20:52:41.948Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[]},"settings":"","results":{"codes":[{"code":"","language":"text"}]},"auth":"optional","params":[],"url":""},"isReference":false,"order":5,"body":"##Definition\nhttps<span>://sandbox.bluesnap.com/services/2/cp/user/all?onbehalfofmid=</span>\n\n<hr>\n\n##Documentation\n\nThe BlueSnap Retrieve All Users API enables you to retrieve all existing users in your BlueSnap account or any of your linked accounts.  \n\n###Request Content\nNo content is required in the request body.\n\n###Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response contains the details on all the retrieved users.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note:\",\n  \"body\": \"The response may include [User Permissions](doc:user-permissions) information as applicable per user.\"\n}\n[/block]\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/all?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 All Users\"\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{\\n        \\\"userId: \\\"11111001\\\",\\n        \\\"firstName\\\": \\\"New\\\",\\n        \\\"lastName\\\": \\\"User\\\",\\n        \\\"email\\\": \\\"new.email:::at:::email.com\\\",\\n        \\\"username\\\": \\\"finance1234”,\\n        \\\"allowViewFinansialInfo\\\": true,\\n        \\\"allowReports\\\": false\\n    }\\n\\t{\\n\\t    \\\"userId: \\\"11111002\\\",\\n\\t\\t\\\"firstName\\\": \\\"New2\\\",\\n        \\\"lastName\\\": \\\"User2\\\",\\n        \\\"email\\\": \\\"new2.email@email.com\\\",\\n        \\\"username\\\": \\\"finance5678”,\\n        \\\"admin\\\": true\\n\\t\\t}\\n]\",\n      \"language\": \"json\",\n      \"name\": \"Retrieve User Response: 200 OK\"\n    }\n  ]\n}\n[/block]\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]","excerpt":"","slug":"retrieve-all-users-api","type":"endpoint","title":"Retrieve All Users"}

getRetrieve All Users


Definition

https://sandbox.bluesnap.com/services/2/cp/user/all?onbehalfofmid=


Documentation

The BlueSnap Retrieve All Users API enables you to retrieve all existing users in your BlueSnap account or any of your linked accounts.

Request Content

No content is required in the request body.

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the details on all the retrieved users.

Note:

The response may include User Permissions information as applicable per user.


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/all?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: "11111001",
        "firstName": "New",
        "lastName": "User",
        "email": "new.email@email.com",
        "username": "finance1234”,
        "allowViewFinansialInfo": true,
        "allowReports": false
    }
	{
	    "userId: "11111002",
		"firstName": "New2",
        "lastName": "User2",
        "email": "new2.email@email.com",
        "username": "finance5678”,
        "admin": true
		}
]

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.