Update User

Definition

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


The Update User API enables you to update a user in your BlueSnap account or any of your linked accounts. As part of the update functionality you can add or remove [permissions](ref:user-permissions) from the user.

Request Content

Send a JSON object, with the following:

PropertyTypeRequired
firstNamestringoptional
lastNamestringoptional
emailstringoptional
passwordstringoptional (if empty, a new password is generated)

📘

Note:

Any of the permissions described in User Permissions can be included with a value of "true."

Response Details

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


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 PUT https://sandbox.bluesnap.com/services/2/cp/user/23645623
-H 'Content-Type: application/json' 
-H 'Accept: application/json' 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
{
	"userfirstName": "New",
	"userlastName": "User",
	"userEmail": "[email protected]" ,
	"userName": "finance 1234",  
	"allowViewFinancialInfo": true,
	"allowReports": false
}'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/cp/user/23645623?onbehalfofmid=34234
-H 'Content-Type: application/json' 
-H 'Accept: application/json' 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
{
	"userEmail": "[email protected]" ,
	"allowViewFinancialInfo": true,
	"allowReports": false
}'

Response Example

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

{
	"userId": "23645623",
	"merchantId": "1111111111",
	"userfirstName": "New",
	"userlastName": "User",
	"userEmail": "[email protected]",
	"userName": "finance 1234",
	"allowViewFinancialInfo": true
}

Parameter Reference

ParameterDescription
onbehalfofmidCreates, 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.
firstNameConsists of 2 to 100 characters

Note: Cannot contain the following symbols: <>!
lastNameConsists of 2 to 100 characters

Note: Cannot contain the following symbols: <>!
emailConsists of 4 to 100 characters
passwordConsists of 6 to 20 characters, in any letter or number combination

Note: The password is only returned in the response, if it was included in the request.

📘

Parameter rules

  • Username: Unique name; 4 to 20 characters
  • Password: 6 to 20 characters; allowed characters: a-z A-Z 0-9 _~!@#&$%^*()|'-
  • Email: 4 to 100 characters