Create User

Definition

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


Documentation

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:

      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"
}

Example Descriptions

For details about the above examples, see:

Create User

This example shows a Create User request with the firstName, lastName, email, and username values set. You will want to use these values to define your user's information.

Create User with permission

This example shows a Create User request with the admin permissions value set to "true".

Create User on behalf of linked BlueSnap account

This example shows a Create 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
usernameUnique 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.
passwordConsists of 6 to 20 characters, in any letter or number combination; allowed characters: a-z A-Z 0-9 _~!@#&$%^*()|'-
permissionsIf 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.
Language
Authorization
:
Click Try It! to start a request and see the response here!