Update User

Definition

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


Documentation

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 from the user.

Request Content

Send a JSON object, with the following:

      firstName     string    optional

      lastName     string    optional

      email     string    optional

      password     string    optional (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
}

Example Descriptions

For details about the above examples, see:

Update User

This example shows an Update User request with the userId, merchantId, userfirstName, userlastName, userEmail, and userName values set. You will want to use these values to update your user's information. This example also has the allowViewFinancialInfo permissions value set to "true."

Update User on behalf of linked BlueSnap account

This example shows an Update User request on behalf of a linked BlueSnap account.

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
Language
Credentials
:
Click Try It! to start a request and see the response here!