POST User
Some tooltip text!
• 12 minutes to read
• 12 minutes to read
POST /api/v1/User
Creates a new User
Calls the User agent service SaveUser.
Online Restricted: ## The User agent is not available in Online by default. User management is not allowed for partner apps.
Query String Parameters
Parameter Name | Type | Description |
---|---|---|
$select | string | Optional comma separated list of properties to include in the result. Other fields are then nulled out to reduce payload size: "Name,department,category" Default = show all fields. |
POST /api/v1/User?$select=name,department,category/id
Request Headers
Parameter Name | Description |
---|---|
Authorization | Supports 'Basic', 'SoTicket' and 'Bearer' schemes, depending on installation type. |
X-XSRF-TOKEN | If not using Authorization header, you must provide XSRF value from cookie or hidden input field |
Content-Type | Content-type of the request body: application/json , text/json , application/xml , text/xml , application/x-www-form-urlencoded , application/json-patch+json , application/merge-patch+json |
Accept | Content-type(s) you would like the response in: application/json , text/json , application/xml , text/xml , application/json-patch+json , application/merge-patch+json |
Accept-Language | Convert string references and multi-language values into a specified language (iso2) code. |
SO-Language | Convert string references and multi-language values into a specified language (iso2) code. Overrides Accept-Language value. |
SO-Culture | Number, date formatting in a specified culture (iso2 language) code. Partially overrides SO-Language/Accept-Language value. Ignored if no Language set. |
SO-TimeZone | Specify the timezone code that you would like date/time responses converted to. |
SO-AppToken | The application token that identifies the partner app. Used when calling Online WebAPI from a server. |
Request Body: newEntity
The User to be saved.
Property Name | Type | Description |
---|---|---|
AssociateId | Integer | Primary key |
Name | String | Initials, UserId - also used as login name for on-site installations. Identifies user in archives. |
Rank | Integer | Rank order |
Tooltip | String | Tooltip or other description |
LicenseOwners | Array | The restricted and unrestricted module licenses grouped by license owner. These module licenses are either assigned or unassigned to this user |
Role | Role | Users role for role-based security. Determines permissions and access rights for the user. |
UserGroup | UserGroup | The main user group that this user belongs to. |
OtherGroups | Array | The other groups this user is a member of, apart from the main user group. |
Person | Person | The person associated with this user. Detailed information about the user |
Deleted | Boolean | If true, the user is retired and should have no rights, not appear in lists, etc. |
Lastlogin | String | Last login date |
Lastlogout | String | Last logout date |
EjUserId | Integer | ID of the ej user record corresponding to this associate; 0 for associates that are not ej users |
RequestSignature | String | ej users request signature |
Type | String | User type: 1=InternalAssociate, 2=ResourceAssociate, 3=ExternalAssociate, 4=AnonymousAssociate, 5=SystemAssociate |
IsPersonRetired | Boolean | True if the user is retired and should have no rights, not appear in lists, etc. |
IsOnTravel | Boolean | True if the user is on travel. |
Credentials | Array | List of credentials registered for this user. i.e. valid authentication methods. |
UserName | String | User name, a.k.a. Login name. This might be an e-mail address. |
TicketCategories | Array | Request Ticket Categories assigned to the user. |
NickName | String | The unique nick name for this user. Used in Service as an alias, similar to Name/Initials. |
WaitingForApproval | Boolean | The user is waiting for an administrator to approve/grant her/him access. |
ExtraFields | Object | Deprecated: Use {SuperOffice.CRM.Services.User.CustomFields} instead. Extra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc. |
CustomFields | Object | Udef + Extra fields added to the carrier. Extra fields as defined by changes to database schema + user-defined fields as defined by admin. Custom fields combines user defined fields and extra fields into one bucket. The individual {SuperOffice.CRM.Services.User.ExtraFields} and |
PostSaveCommands | Array | Post custom commands the client should execute after save has completed. |
Response:
OK
Response | Description |
---|---|
200 | OK |
Response body: UserWithLinks
Property Name | Type | Description |
---|---|---|
AssociateId | int32 | Primary key |
Name | string | Initials, UserId - also used as login name for on-site installations. Identifies user in archives. |
Rank | int32 | Rank order |
Tooltip | string | Tooltip or other description |
LicenseOwners | array | The restricted and unrestricted module licenses grouped by license owner. These module licenses are either assigned or unassigned to this user |
Role | Role | Users role for role-based security. Determines permissions and access rights for the user. |
UserGroup | UserGroup | The main user group that this user belongs to. Use MDO List name "usergroup" to get list items. |
OtherGroups | array | The other groups this user is a member of, apart from the main user group. Use MDO List name "usergroup" to get list items. |
Person | Person | The person associated with this user. Detailed information about the user Use MDO List name "person_new" to get list items. |
Deleted | bool | If true, the user is retired and should have no rights, not appear in lists, etc. |
Lastlogin | date-time | Last login date |
Lastlogout | date-time | Last logout date |
EjUserId | int32 | ID of the ej user record corresponding to this associate; 0 for associates that are not ej users |
RequestSignature | string | ej users request signature |
Type | string | User type: 1=InternalAssociate, 2=ResourceAssociate, 3=ExternalAssociate, 4=AnonymousAssociate, 5=SystemAssociate |
IsPersonRetired | bool | True if the user is retired and should have no rights, not appear in lists, etc. |
IsOnTravel | bool | True if the user is on travel. |
Credentials | array | List of credentials registered for this user. i.e. valid authentication methods. |
UserName | string | User name, a.k.a. Login name. This might be an e-mail address. |
TicketCategories | array | Request Ticket Categories assigned to the user. Use MDO List name "ejCategory" to get list items. |
NickName | string | The unique nick name for this user. Used in Service as an alias, similar to Name/Initials. |
WaitingForApproval | bool | The user is waiting for an administrator to approve/grant her/him access. |
ExtraFields | object | Deprecated: Use {SuperOffice.CRM.Services.User.CustomFields} instead. Extra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc. |
CustomFields | object | Udef + Extra fields added to the carrier. Extra fields as defined by changes to database schema + user-defined fields as defined by admin. Custom fields combines user defined fields and extra fields into one bucket. The individual {SuperOffice.CRM.Services.User.ExtraFields} and UserDefinedFields properties are deprecated in favor of this combined collection. |
PostSaveCommands | array | Post custom commands the client should execute after save has completed. |
TableRight | TableRight | The carrier's table right |
FieldProperties | object | Field property dictionary mapping field names to field access rights. |
_Links | object |
Sample request
POST /api/v1/User
Authorization: Basic dGplMDpUamUw
Accept: application/json; charset=utf-8
Accept-Language: sv
Content-Type: application/json; charset=utf-8
{
"AssociateId": 22,
"Name": "Crist, Torphy and Price",
"Rank": 57,
"Tooltip": "praesentium",
"LicenseOwners": [
{
"Name": "O'Reilly Inc and Sons",
"Description": "Profit-focused assymetric groupware",
"RestrictedModuleLicenses": [
{},
{}
],
"UnrestrictedModuleLicenses": [
{},
{}
]
},
{
"Name": "O'Reilly Inc and Sons",
"Description": "Profit-focused assymetric groupware",
"RestrictedModuleLicenses": [
{},
{}
],
"UnrestrictedModuleLicenses": [
{},
{}
]
}
],
"Role": null,
"UserGroup": null,
"OtherGroups": [
{
"Value": "cupiditate",
"Tooltip": "quas",
"Id": 986,
"Rank": 792,
"Deleted": true
},
{
"Value": "cupiditate",
"Tooltip": "quas",
"Id": 986,
"Rank": 792,
"Deleted": true
}
],
"Person": null,
"Deleted": true,
"Lastlogin": "2017-07-06T17:54:08.726183+02:00",
"Lastlogout": "2006-09-07T17:54:08.726183+02:00",
"EjUserId": 608,
"RequestSignature": "reiciendis",
"Type": "AnonymousAssociate",
"IsPersonRetired": false,
"IsOnTravel": false,
"Credentials": [
{
"Type": null,
"Value": "neque",
"DisplayValue": "cum"
},
{
"Type": null,
"Value": "neque",
"DisplayValue": "cum"
}
],
"UserName": "Zulauf Inc and Sons",
"TicketCategories": [
{
"Id": 513,
"Name": "Blanda Inc and Sons",
"ToolTip": "Quia laboriosam et.",
"Deleted": true,
"Rank": 918,
"Type": "hic",
"ChildItems": [
{},
{}
],
"IconHint": "enim",
"ColorBlock": 653,
"ExtraInfo": "delectus",
"StyleHint": "ea",
"FullName": "Jensen Americo Runte IV"
}
],
"NickName": "Okuneva, Witting and Ledner",
"WaitingForApproval": false,
"ExtraFields": {
"ExtraFields1": "est",
"ExtraFields2": "omnis"
},
"CustomFields": {
"CustomFields1": "tempora",
"CustomFields2": "alias"
},
"PostSaveCommands": [
{
"Name": "Schaden Inc and Sons",
"DisplayName": "Walter Inc and Sons",
"Description": "Cross-group 3rd generation Graphic Interface",
"ToolTip": "Incidunt rerum atque illo facilis.",
"Actions": "Implicit",
"ActionData": "expedita"
},
{
"Name": "Schaden Inc and Sons",
"DisplayName": "Walter Inc and Sons",
"Description": "Cross-group 3rd generation Graphic Interface",
"ToolTip": "Incidunt rerum atque illo facilis.",
"Actions": "Implicit",
"ActionData": "expedita"
}
]
}
Sample response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"AssociateId": 605,
"Name": "Bahringer-Stehr",
"Rank": 695,
"Tooltip": "maxime",
"LicenseOwners": [
{
"Name": "Koelpin, Roob and Bosco",
"Description": "Future-proofed 5th generation functionalities",
"RestrictedModuleLicenses": [
{},
{}
],
"UnrestrictedModuleLicenses": [
{},
{}
],
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.Int32",
"FieldLength": 746
}
}
},
{
"Name": "Koelpin, Roob and Bosco",
"Description": "Future-proofed 5th generation functionalities",
"RestrictedModuleLicenses": [
{},
{}
],
"UnrestrictedModuleLicenses": [
{},
{}
],
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.Int32",
"FieldLength": 746
}
}
}
],
"Role": null,
"UserGroup": null,
"OtherGroups": [
{
"Value": "aut",
"Tooltip": "ut",
"Id": 453,
"Rank": 411,
"Deleted": true,
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.Int32",
"FieldLength": 20
}
}
}
],
"Person": null,
"Deleted": false,
"Lastlogin": "2003-06-10T17:54:08.7418072+02:00",
"Lastlogout": "2006-10-19T17:54:08.7418072+02:00",
"EjUserId": 770,
"RequestSignature": "et",
"Type": "AnonymousAssociate",
"IsPersonRetired": false,
"IsOnTravel": false,
"Credentials": [
{
"Type": null,
"Value": "quae",
"DisplayValue": "non",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.String",
"FieldLength": 363
}
}
},
{
"Type": null,
"Value": "quae",
"DisplayValue": "non",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.String",
"FieldLength": 363
}
}
}
],
"UserName": "Streich, Ortiz and Jast",
"TicketCategories": [
{
"Id": 614,
"Name": "Corkery-Little",
"ToolTip": "Amet sint dicta et sunt molestias voluptas ducimus.",
"Deleted": false,
"Rank": 255,
"Type": "sit",
"ChildItems": [
{},
{}
],
"IconHint": "quas",
"ColorBlock": 57,
"ExtraInfo": "aut",
"StyleHint": "rerum",
"FullName": "Guy Lindgren I",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.String",
"FieldLength": 849
}
}
}
],
"NickName": "Sporer, Herzog and Ryan",
"WaitingForApproval": false,
"ExtraFields": {
"ExtraFields1": "doloribus",
"ExtraFields2": "et"
},
"CustomFields": {
"CustomFields1": "magnam",
"CustomFields2": "et"
},
"PostSaveCommands": [
{
"Name": "Green, Steuber and Oberbrunner",
"DisplayName": "Stiedemann, Keeling and Botsford",
"Description": "Compatible zero defect strategy",
"ToolTip": "Error ipsa nam aut quo sapiente.",
"Actions": "Implicit",
"ActionData": "enim",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.String",
"FieldLength": 380
}
}
}
],
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.String",
"FieldLength": 36
}
},
"_Links": {
"Self": "https://www.example.com/api/v1/project/321",
"Archive": "https://www.example.com/api/v1/project"
}
}