Adds an Employee. You can leave out much of the information initially. You can update the record with corporate cards, cars, pool car associations, mobile devices, access role associations, work and home addresses and item roles by using the respective resources.
Name | Description | Additional information |
---|---|---|
request | Employee to be added |
Define this parameter in the request body. |
{ "Id": 0, "Title": "MANDATORY", "UserName": "MANDATORY", "Forename": "MANDATORY", "Surname": "MANDATORY", "EmployeeDetails": { "ContactDetails": { "ExtensionNumber": "4023", "MobileNumber": "01234567890", "PagerNumber": "01234567890", "EmailAddress": "work@business.com", "FaxNumber": "01234567890", "TelephoneNumber": "01234567890" }, "EmployeePermissions": { "DefaultSubAccountId": 0, "AccessRoles": [] }, "WorkDetails": { "CreditAccount": "Creditor", "PayRollNumber": "P00001", "Position": "Position", "NationalInsuranceNumber": "HH060666B", "HireDate": "2014-02-17T00:00:00", "TerminationDate": null, "EmployeeNumber": "E1000", "PrimaryCountryId": 0, "PrimaryCurrencyId": 0, "LineManagerUserId": 0, "StartMileage": 1000, "StartMileageDate": "2014-04-28T00:00:00", "EsrPersonId": null, "EsrEffectiveStartDate": null, "EsrEffectiveEndDate": null, "CostCentreBreakdowns": [ { "DepartmentId": 0, "DepartmentDescription": null, "CostCodeId": 0, "CostCodeDescription": null, "ProjectCodeId": 0, "ProjectCodeDescription": null, "Percentage": 100 } ] }, "NhsDetails": { "TrustId": 0, "NhsUniqueId": "Nhs123" }, "PersonalDetails": { "BasicInfo": { "Gender": "Male", "DateOfBirth": "1980-01-01T00:00:00", "MiddleName": "Middle", "MaidenName": "Maiden", "PreferredName": "Tester", "LocaleId": 0 }, "HomeContactDetails": { "EmailAddress": "test@test.com", "FaxNumber": "01234567890", "TelephoneNumber": "20202020202" } }, "ClaimSignOffDetails": { "SignOffGroupId": 0, "CreditCardSignOffGroupId": 0, "PurchaseCardSignOffGroupId": 0, "AdvancesSignOffGroupId": 0, "ItemRoles": null }, "EmailNotifications": null }, "OwnedVehicles": [ 0 ], "PoolCars": [ 0 ], "CorporateCards": [ 0 ], "WorkAddresses": [ { "IsTemporary": false, "IsActive": false, "Rotational": false, "PrimaryRotational": false, "Id": 0, "StartDate": "2014-02-02T00:00:00", "EndDate": null, "EmployeeId": 0, "AddressId": 0 } ], "HomeAddresses": [ { "Id": 0, "StartDate": "2014-02-02T00:00:00", "EndDate": null, "EmployeeId": 0, "AddressId": 0 } ], "IsActive": true, "DvlaConsentDate": null, "DriverId": null, "LastPasswordChange": "2025-01-25T17:48:58.7651972Z", "CurrentClaimReference": 0, "CurrentExpenseItemReference": 0, "UserDefinedFields": null, "ExcessMileage": 0.0, "SendPasswordKeyAndWelcomeEmail": false, "Archived": true }
<Employee xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Types.Employees"> <Archived xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Types">true</Archived> <DriverId i:nil="true" /> <DvlaConsentDate i:nil="true" /> <EmployeeDetails> <ClaimSignOffDetails> <AdvancesSignOffGroupId>0</AdvancesSignOffGroupId> <CreditCardSignOffGroupId>0</CreditCardSignOffGroupId> <PurchaseCardSignOffGroupId>0</PurchaseCardSignOffGroupId> <SignOffGroupId>0</SignOffGroupId> </ClaimSignOffDetails> <ContactDetails> <EmailAddress>work@business.com</EmailAddress> <FaxNumber>01234567890</FaxNumber> <TelephoneNumber>01234567890</TelephoneNumber> <ExtensionNumber>4023</ExtensionNumber> <MobileNumber>01234567890</MobileNumber> <PagerNumber>01234567890</PagerNumber> </ContactDetails> <EmployeePermissions> <AccessRoles xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /> <DefaultSubAccountId>0</DefaultSubAccountId> </EmployeePermissions> <NhsDetails> <NhsUniqueId>Nhs123</NhsUniqueId> <TrustId>0</TrustId> </NhsDetails> <PersonalDetails> <BasicInfo> <DateOfBirth>1980-01-01T00:00:00</DateOfBirth> <Gender>Male</Gender> <LocaleId>0</LocaleId> <MaidenName>Maiden</MaidenName> <MiddleName>Middle</MiddleName> <PreferredName>Tester</PreferredName> </BasicInfo> <HomeContactDetails> <EmailAddress>test@test.com</EmailAddress> <FaxNumber>01234567890</FaxNumber> <TelephoneNumber>20202020202</TelephoneNumber> </HomeContactDetails> </PersonalDetails> <WorkDetails> <CostCentreBreakdowns> <CostCentreBreakdown> <CostCodeDescription i:nil="true" /> <CostCodeId>0</CostCodeId> <DepartmentDescription i:nil="true" /> <DepartmentId>0</DepartmentId> <Percentage>100</Percentage> <ProjectCodeDescription i:nil="true" /> <ProjectCodeId>0</ProjectCodeId> </CostCentreBreakdown> </CostCentreBreakdowns> <CreditAccount>Creditor</CreditAccount> <EmployeeNumber>E1000</EmployeeNumber> <HireDate>2014-02-17T00:00:00</HireDate> <LineManagerUserId>0</LineManagerUserId> <NationalInsuranceNumber>HH060666B</NationalInsuranceNumber> <PayRollNumber>P00001</PayRollNumber> <Position>Position</Position> <PrimaryCountryId>0</PrimaryCountryId> <PrimaryCurrencyId>0</PrimaryCurrencyId> <StartMileage>1000</StartMileage> <StartMileageDate>2014-04-28T00:00:00</StartMileageDate> <TerminationDate i:nil="true" /> </WorkDetails> </EmployeeDetails> <ExcessMileage>0</ExcessMileage> <Forename>MANDATORY</Forename> <Id>0</Id> <IsActive>true</IsActive> <SendPasswordKeyAndWelcomeEmail>false</SendPasswordKeyAndWelcomeEmail> <Surname>MANDATORY</Surname> <Title>MANDATORY</Title> <UserDefinedFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Types" i:nil="true" /> <UserName>MANDATORY</UserName> </Employee>
Sample not available.
{ "Item": { "Id": 1, "Title": "sample string 2", "UserName": "sample string 3", "Forename": "sample string 4", "Surname": "sample string 5", "EmployeeDetails": { "ContactDetails": { "ExtensionNumber": "sample string 1", "MobileNumber": "sample string 2", "PagerNumber": "sample string 3", "EmailAddress": "sample string 4", "FaxNumber": "sample string 5", "TelephoneNumber": "sample string 6" }, "EmployeePermissions": { "DefaultSubAccountId": 1, "AccessRoles": [ 1, 2, 3 ] }, "WorkDetails": { "CreditAccount": "sample string 1", "PayRollNumber": "sample string 2", "Position": "sample string 3", "NationalInsuranceNumber": "sample string 4", "HireDate": "2025-01-26T06:59:56.529289+00:00", "TerminationDate": "2025-01-26T06:59:56.529289+00:00", "EmployeeNumber": "sample string 5", "PrimaryCountryId": 1, "PrimaryCurrencyId": 1, "LineManagerUserId": 1, "StartMileage": 6, "StartMileageDate": "2025-01-26T06:59:56.529289+00:00", "EsrPersonId": 1, "EsrEffectiveStartDate": "2025-01-26T06:59:56.529289+00:00", "EsrEffectiveEndDate": "2025-01-26T06:59:56.529289+00:00", "CostCentreBreakdowns": [ { "DepartmentId": 1, "DepartmentDescription": "sample string 1", "CostCodeId": 1, "CostCodeDescription": "sample string 2", "ProjectCodeId": 1, "ProjectCodeDescription": "sample string 3", "Percentage": 4 }, { "DepartmentId": 1, "DepartmentDescription": "sample string 1", "CostCodeId": 1, "CostCodeDescription": "sample string 2", "ProjectCodeId": 1, "ProjectCodeDescription": "sample string 3", "Percentage": 4 }, { "DepartmentId": 1, "DepartmentDescription": "sample string 1", "CostCodeId": 1, "CostCodeDescription": "sample string 2", "ProjectCodeId": 1, "ProjectCodeDescription": "sample string 3", "Percentage": 4 } ] }, "NhsDetails": { "TrustId": 1, "NhsUniqueId": "sample string 1" }, "PersonalDetails": { "BasicInfo": { "Gender": "sample string 1", "DateOfBirth": "2025-01-26T06:59:56.529289+00:00", "MiddleName": "sample string 2", "MaidenName": "sample string 3", "PreferredName": "sample string 4", "LocaleId": 1 }, "HomeContactDetails": { "EmailAddress": "sample string 1", "FaxNumber": "sample string 2", "TelephoneNumber": "sample string 3" } }, "ClaimSignOffDetails": { "SignOffGroupId": 1, "CreditCardSignOffGroupId": 1, "PurchaseCardSignOffGroupId": 1, "AdvancesSignOffGroupId": 1, "ItemRoles": [ 1, 2, 3 ] }, "EmailNotifications": [ 1, 2, 3 ] }, "OwnedVehicles": [ 1, 2, 3 ], "PoolCars": [ 1, 2, 3 ], "CorporateCards": [ 1, 2, 3 ], "WorkAddresses": [ { "IsTemporary": true, "IsActive": true, "Rotational": true, "PrimaryRotational": true, "Id": 5, "StartDate": "2025-01-26T06:59:56.529289+00:00", "EndDate": "2025-01-26T06:59:56.529289+00:00", "EmployeeId": 6, "AddressId": 7 }, { "IsTemporary": true, "IsActive": true, "Rotational": true, "PrimaryRotational": true, "Id": 5, "StartDate": "2025-01-26T06:59:56.529289+00:00", "EndDate": "2025-01-26T06:59:56.529289+00:00", "EmployeeId": 6, "AddressId": 7 }, { "IsTemporary": true, "IsActive": true, "Rotational": true, "PrimaryRotational": true, "Id": 5, "StartDate": "2025-01-26T06:59:56.529289+00:00", "EndDate": "2025-01-26T06:59:56.529289+00:00", "EmployeeId": 6, "AddressId": 7 } ], "HomeAddresses": [ { "Id": 1, "StartDate": "2025-01-26T06:59:56.529289+00:00", "EndDate": "2025-01-26T06:59:56.529289+00:00", "EmployeeId": 2, "AddressId": 3 }, { "Id": 1, "StartDate": "2025-01-26T06:59:56.529289+00:00", "EndDate": "2025-01-26T06:59:56.529289+00:00", "EmployeeId": 2, "AddressId": 3 }, { "Id": 1, "StartDate": "2025-01-26T06:59:56.529289+00:00", "EndDate": "2025-01-26T06:59:56.529289+00:00", "EmployeeId": 2, "AddressId": 3 } ], "IsActive": true, "DvlaConsentDate": "2025-01-26T06:59:56.529289+00:00", "DriverId": 1, "LastPasswordChange": "2025-01-26T06:59:56.529289+00:00", "CurrentClaimReference": 1, "CurrentExpenseItemReference": 1, "UserDefinedFields": null, "ExcessMileage": 8.1, "SendPasswordKeyAndWelcomeEmail": true, "Archived": true }, "ResponseInformation": { "Errors": [ { "ErrorCode": "sample string 1", "Message": "sample string 2" }, { "ErrorCode": "sample string 1", "Message": "sample string 2" }, { "ErrorCode": "sample string 1", "Message": "sample string 2" } ], "Status": 0, "Links": [ { "Rel": "sample string 1", "Href": "sample string 2", "Title": "sample string 3", "IsTemplated": true }, { "Rel": "sample string 1", "Href": "sample string 2", "Title": "sample string 3", "IsTemplated": true }, { "Rel": "sample string 1", "Href": "sample string 2", "Title": "sample string 3", "IsTemplated": true } ] } }
<EmployeeResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Responses"> <ResponseInformation xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Common"> <Errors> <ApiErrorDetail> <ErrorCode>sample string 1</ErrorCode> <Message>sample string 2</Message> </ApiErrorDetail> <ApiErrorDetail> <ErrorCode>sample string 1</ErrorCode> <Message>sample string 2</Message> </ApiErrorDetail> <ApiErrorDetail> <ErrorCode>sample string 1</ErrorCode> <Message>sample string 2</Message> </ApiErrorDetail> </Errors> <Links> <Link> <Href>sample string 2</Href> <IsTemplated>true</IsTemplated> <Rel>sample string 1</Rel> <Title>sample string 3</Title> </Link> <Link> <Href>sample string 2</Href> <IsTemplated>true</IsTemplated> <Rel>sample string 1</Rel> <Title>sample string 3</Title> </Link> <Link> <Href>sample string 2</Href> <IsTemplated>true</IsTemplated> <Rel>sample string 1</Rel> <Title>sample string 3</Title> </Link> </Links> <Status>Failure</Status> </ResponseInformation> <Item xmlns:d2p1="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Types.Employees" xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Common"> <Archived xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Types">true</Archived> <d2p1:DriverId>1</d2p1:DriverId> <d2p1:DvlaConsentDate>2025-01-26T06:59:56.529289+00:00</d2p1:DvlaConsentDate> <d2p1:EmployeeDetails> <d2p1:ClaimSignOffDetails> <d2p1:AdvancesSignOffGroupId>1</d2p1:AdvancesSignOffGroupId> <d2p1:CreditCardSignOffGroupId>1</d2p1:CreditCardSignOffGroupId> <d2p1:PurchaseCardSignOffGroupId>1</d2p1:PurchaseCardSignOffGroupId> <d2p1:SignOffGroupId>1</d2p1:SignOffGroupId> </d2p1:ClaimSignOffDetails> <d2p1:ContactDetails> <d2p1:EmailAddress>sample string 4</d2p1:EmailAddress> <d2p1:FaxNumber>sample string 5</d2p1:FaxNumber> <d2p1:TelephoneNumber>sample string 6</d2p1:TelephoneNumber> <d2p1:ExtensionNumber>sample string 1</d2p1:ExtensionNumber> <d2p1:MobileNumber>sample string 2</d2p1:MobileNumber> <d2p1:PagerNumber>sample string 3</d2p1:PagerNumber> </d2p1:ContactDetails> <d2p1:EmployeePermissions> <d2p1:AccessRoles xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:int>1</d5p1:int> <d5p1:int>2</d5p1:int> <d5p1:int>3</d5p1:int> </d2p1:AccessRoles> <d2p1:DefaultSubAccountId>1</d2p1:DefaultSubAccountId> </d2p1:EmployeePermissions> <d2p1:NhsDetails> <d2p1:NhsUniqueId>sample string 1</d2p1:NhsUniqueId> <d2p1:TrustId>1</d2p1:TrustId> </d2p1:NhsDetails> <d2p1:PersonalDetails> <d2p1:BasicInfo> <d2p1:DateOfBirth>2025-01-26T06:59:56.529289+00:00</d2p1:DateOfBirth> <d2p1:Gender>sample string 1</d2p1:Gender> <d2p1:LocaleId>1</d2p1:LocaleId> <d2p1:MaidenName>sample string 3</d2p1:MaidenName> <d2p1:MiddleName>sample string 2</d2p1:MiddleName> <d2p1:PreferredName>sample string 4</d2p1:PreferredName> </d2p1:BasicInfo> <d2p1:HomeContactDetails> <d2p1:EmailAddress>sample string 1</d2p1:EmailAddress> <d2p1:FaxNumber>sample string 2</d2p1:FaxNumber> <d2p1:TelephoneNumber>sample string 3</d2p1:TelephoneNumber> </d2p1:HomeContactDetails> </d2p1:PersonalDetails> <d2p1:WorkDetails> <d2p1:CostCentreBreakdowns> <d2p1:CostCentreBreakdown> <d2p1:CostCodeDescription>sample string 2</d2p1:CostCodeDescription> <d2p1:CostCodeId>1</d2p1:CostCodeId> <d2p1:DepartmentDescription>sample string 1</d2p1:DepartmentDescription> <d2p1:DepartmentId>1</d2p1:DepartmentId> <d2p1:Percentage>4</d2p1:Percentage> <d2p1:ProjectCodeDescription>sample string 3</d2p1:ProjectCodeDescription> <d2p1:ProjectCodeId>1</d2p1:ProjectCodeId> </d2p1:CostCentreBreakdown> <d2p1:CostCentreBreakdown> <d2p1:CostCodeDescription>sample string 2</d2p1:CostCodeDescription> <d2p1:CostCodeId>1</d2p1:CostCodeId> <d2p1:DepartmentDescription>sample string 1</d2p1:DepartmentDescription> <d2p1:DepartmentId>1</d2p1:DepartmentId> <d2p1:Percentage>4</d2p1:Percentage> <d2p1:ProjectCodeDescription>sample string 3</d2p1:ProjectCodeDescription> <d2p1:ProjectCodeId>1</d2p1:ProjectCodeId> </d2p1:CostCentreBreakdown> <d2p1:CostCentreBreakdown> <d2p1:CostCodeDescription>sample string 2</d2p1:CostCodeDescription> <d2p1:CostCodeId>1</d2p1:CostCodeId> <d2p1:DepartmentDescription>sample string 1</d2p1:DepartmentDescription> <d2p1:DepartmentId>1</d2p1:DepartmentId> <d2p1:Percentage>4</d2p1:Percentage> <d2p1:ProjectCodeDescription>sample string 3</d2p1:ProjectCodeDescription> <d2p1:ProjectCodeId>1</d2p1:ProjectCodeId> </d2p1:CostCentreBreakdown> </d2p1:CostCentreBreakdowns> <d2p1:CreditAccount>sample string 1</d2p1:CreditAccount> <d2p1:EmployeeNumber>sample string 5</d2p1:EmployeeNumber> <d2p1:HireDate>2025-01-26T06:59:56.529289+00:00</d2p1:HireDate> <d2p1:LineManagerUserId>1</d2p1:LineManagerUserId> <d2p1:NationalInsuranceNumber>sample string 4</d2p1:NationalInsuranceNumber> <d2p1:PayRollNumber>sample string 2</d2p1:PayRollNumber> <d2p1:Position>sample string 3</d2p1:Position> <d2p1:PrimaryCountryId>1</d2p1:PrimaryCountryId> <d2p1:PrimaryCurrencyId>1</d2p1:PrimaryCurrencyId> <d2p1:StartMileage>6</d2p1:StartMileage> <d2p1:StartMileageDate>2025-01-26T06:59:56.529289+00:00</d2p1:StartMileageDate> <d2p1:TerminationDate>2025-01-26T06:59:56.529289+00:00</d2p1:TerminationDate> </d2p1:WorkDetails> </d2p1:EmployeeDetails> <d2p1:ExcessMileage>8.1</d2p1:ExcessMileage> <d2p1:Forename>sample string 4</d2p1:Forename> <d2p1:Id>1</d2p1:Id> <d2p1:IsActive>true</d2p1:IsActive> <d2p1:SendPasswordKeyAndWelcomeEmail>true</d2p1:SendPasswordKeyAndWelcomeEmail> <d2p1:Surname>sample string 5</d2p1:Surname> <d2p1:Title>sample string 2</d2p1:Title> <d2p1:UserDefinedFields xmlns:d3p1="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Types" i:nil="true" /> <d2p1:UserName>sample string 3</d2p1:UserName> </Item> </EmployeeResponse>