Definition
https://sandbox.bluesnap.com/services/2/cp/user?onbehalfofmid=
The BlueSnap Create User API is a RESTful web service enabling you to create a user in your BlueSnap account or any of your linked accounts. After creating your user, that user will have access to the Merchant Portal.
Request Content
Send a JSON object, with the following:
Property | Type | Required |
---|---|---|
firstName | string | required |
lastName | string | required |
email | string | required |
username | string | required |
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.
The response contains the user's attributes, one of which is the ID.
The userId
appears in the response body and the location header.
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 POST https://sandbox.bluesnap.com/services/2/cp/user \
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
{
"firstName": "New",
"lastName": "User",
"email": "[email protected]",
"username": "finance1234"
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/cp/user \
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
{
"firstName": "New",
"lastName": "User",
"email": "[email protected]",
"username": "finance1234",
"password": "passQ!W@E1",
"admin": "true"
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/cp/user?onbehalfofmid=12345
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
{
"firstName": "New",
"lastName": "User",
"email": "[email protected]",
"username": "finance1234"
}'
Response Example
If successful, the response HTTP status code is 200 OK.
{
"userId": "1111001",
"firstName": "New",
"lastName": "User",
"email": "[email protected]",
"username": "finance1234",
"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. |
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 | |
username | Unique name per BlueSnap account, consisting of 4 to 20 characters Note: This name must begin with a letter, followed by any letter, number, or dot combination. |
password | Consists of 6 to 20 characters, in any letter or number combination; allowed characters: a-z A-Z 0-9 _~!@#&$%^*()|'- |
permissions | If sent, value should be true or false (otherwise, WS call fails) Note: This is an optional setting. Can be used to include as many permissions as necessary. |