| Requires any of the roles: | Admin, TenantAdmin |
| POST | /user | Creates a business user. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| OrganizationId | body | string | Yes | The user's organization Id (GUID). |
| Image | body | ImageDto | No | Image object for setting image name, content and mime type. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| FirstName | form | string | Yes | The user's first name. |
| LastName | form | string | Yes | The user's last name. |
| form | string | Yes | The user's email address. | |
| PhoneNumber | form | string | No | The user's phone number. |
| Roles | form | array | Yes | The user's roles. |
| ViviotId | form | string | No | Optional association to a Viviot user. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Version | form | integer | No | Api version |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| FileName | form | string | No | |
| Content | form | string | No | |
| MimeType | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Data | form | BusinessUserProfileDataView | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ResponseStatus | form | ResponseStatus | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | int | No | |
| ActivationStatus | form | ActivationStatus | No | |
| UserName | form | string | No | |
| FirstName | form | string | No | |
| LastName | form | string | No | |
| form | string | No | ||
| TemporaryEmail | form | string | No | |
| EmailConfirmed | form | bool | No | |
| PhoneNumber | form | string | No | |
| TemporaryPhoneNumber | form | string | No | |
| PhoneNumberConfirmed | form | bool | No | |
| Roles | form | List<string> | No | |
| OrganizationId | form | Guid? | No | |
| BusinessOrganizations | form | HashSet<OrganizationBasicView> | No | |
| ViviotId | form | string | No | |
| ImageContent | form | string | No | |
| ImageUrl | form | string | No |
| Name | Value |
|---|---|
| Unconfirmed | 0 |
| Temporary | 10 |
| OwnershipConfirmed | 20 |
| IdentityConfirmed | 30 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Name | form | string | No | |
| Type | form | OrganizationType | No | |
| SubOrganizations | form | List<OrganizationBasicView> | No |
| Name | Value |
|---|---|
| Unknown | 0 |
| Admin | 10 |
| Tenant | 20 |
| Location | 30 |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /user HTTP/1.1
Host: api.4spaces.io
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
organizationId: 00000000000000000000000000000000,
image:
{
fileName: String,
content: String,
mimeType: String
},
firstName: String,
lastName: String,
email: String,
phoneNumber: String,
roles:
[
String
],
viviotId: String,
version: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
data:
{
id: 0,
activationStatus: 0,
userName: String,
firstName: String,
lastName: String,
email: String,
temporaryEmail: String,
emailConfirmed: False,
phoneNumber: String,
temporaryPhoneNumber: String,
phoneNumberConfirmed: False,
roles:
[
String
],
organizationId: 00000000000000000000000000000000,
businessOrganizations:
[
{
id: 00000000000000000000000000000000,
name: String,
type: 0,
organizations:
[
{
id: 00000000000000000000000000000000,
name: String,
type: 0,
organizations:
[
{
id: 00000000000000000000000000000000,
name: String,
type: 0,
organizations:
[
{
}
]
}
]
}
]
}
],
viviotId: String,
imageContent: String,
imageUrl: String
},
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}