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:
Property | Type | Required |
---|---|---|
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
}
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. |
firstName | Consists of 2 to 100 characters Note: Cannot contain the following symbols: <>! |
lastName | Consists of 2 to 100 characters Note: Cannot contain the following symbols: <>! |
Consists of 4 to 100 characters | |
password | Consists 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