Threecolts Single Sign On (3C SSO) / API Callbacks / Create a user

Create a user

POST /sso/organizations/{ssoOrganizationId}/accounts/{ssoAccountId}/users/{ssoUserId}

Version Change
v1.0 Initial version
v1.2 DB Structure changes, validations

<v1.2>

{ssoOrganizationId} - integer - this will be a number which we need to match to hub_alpha>threecolts_organization>organization_id

{ssoAccountId} - integer - this will be a number which we need to match to hub_alpha>client>threecolts_account_id

{ssoUserId} - integer - this will be a number which we need to match to hub_alpha>user>threecots_user_id

If hub_alpha>client>deleted is equal to 1 it is considered not existent

Adds a user to an existing account. Should return 201 OK and the id of the user created. With body { "id": "{product_user_id}" } Where {product_user_id} is the newly created hub_alpha>user>id

Returns 200 even if an existing user was added to the account. 404 if {ssoOrganizationId} or {ssoAccountId} are not in the database.

If hub_alpha>user>deleted is equal to 1 we consider it non existent

</v1.2>

Connection between user and client_user is by the field client_user>user_id and user>id. If the provided {ssoUserId} does not match we need to create this connection.

Example request:

{
    "email": "rcastro@threecolts.com",
    "user_name": "tacticalarbitrage",
    "first_name": "Rodrigo",
    "last_name": "Castro",
    "time_zone": "America/Chicago",
    "account_settings": {
        "account_type": {
            "id": 1,
            "name": "live_pro"
            // or
            "id": 2,
            "name": "live"
        }
    }
}
Key in request Value from field/hardoced Extra info
email hub_alpha>user>email
user_name hub_alpha>user>username <v1.2> Added value. Default null if empty</v1.2>
first_name hub_alpha>user>names Concatenation between first_name and last_name to be saved in the field. With an empty space between both
last_name hub_alpha>user>names Concatenation between first_name and last_name to be saved in the field. With an empty space between both
time_zone hub_alpha>user>timezone v1.2> Default value is UTC if empty Send the value from the database.</v1.2>
account_settings N/A This will be managed in a later stage. No setting for hemi as of now.
Is this article helpful?
0 0 0