POST Employee/Post?accountId={accountId}

Creates a normal employee. Omit accountId or pass zero to use the authenticated account.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
accountId

Optional account selector. The authenticated caller must be allowed to select the account.

integer

Default value is 0

Body Parameters

The employee fields to create.

EmployeePostDto
NameDescriptionTypeAdditional information
Name

Employee surname. Required for creation; a supplied update value cannot be blank.

string

None.

FirstName

Optional first name. Null or whitespace clears it on update.

string

None.

FamilyNamePrefix

Optional family-name prefix. Null or whitespace clears it on update.

string

None.

Initials

Optional initials. Null or whitespace clears them on update.

string

None.

Gender

Employee gender: Male, Female, or Unknown. Omission defaults to Unknown on creation.

Gender2

None.

EmployeeNumber

Optional employee number. Nonblank values are trimmed; the value is not required to be unique.

string

None.

GroupId

Optional group ID. Null explicitly creates or leaves the employee without a group.

integer

None.

EmailAddress

Optional email address. A linked user or active subscription requires a valid address.

string

None.

PhoneNumber

Optional phone number. Null or whitespace clears it on update.

string

None.

MobileNumber

Optional mobile number. Active driving licences require it to start with a country-code plus sign.

string

None.

Type

Employee type: Default or Driver. Omission defaults to Default on creation.

DefaultEmployeeType

None.

ResignationDate

Optional employee-local resignation date and time, for example 2030-01-31T14:30:00. Send a local time without a timezone suffix; null clears it on update.

date

None.

Request Formats

application/json

Sample: {"Name":"Example"}

Response Information

Resource Description

The ID of the created employee.

integer