DELETE Employees/{id}

Deletes an Employee.


Parameters

NameDescriptionAdditional information
id
Employee Id

Define this parameter in the request URI.

Response body formats

An EmployeeResponse with the item set to null upon a successful delete.

application/json, text/json

Sample:
{
  "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-26T03:47:41.3892093+00:00",
        "TerminationDate": "2025-01-26T03:47:41.3892093+00:00",
        "EmployeeNumber": "sample string 5",
        "PrimaryCountryId": 1,
        "PrimaryCurrencyId": 1,
        "LineManagerUserId": 1,
        "StartMileage": 6,
        "StartMileageDate": "2025-01-26T03:47:41.3892093+00:00",
        "EsrPersonId": 1,
        "EsrEffectiveStartDate": "2025-01-26T03:47:41.3892093+00:00",
        "EsrEffectiveEndDate": "2025-01-26T03:47:41.3892093+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-26T03:47:41.3892093+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-26T03:47:41.3892093+00:00",
        "EndDate": "2025-01-26T03:47:41.3892093+00:00",
        "EmployeeId": 6,
        "AddressId": 7
      },
      {
        "IsTemporary": true,
        "IsActive": true,
        "Rotational": true,
        "PrimaryRotational": true,
        "Id": 5,
        "StartDate": "2025-01-26T03:47:41.3892093+00:00",
        "EndDate": "2025-01-26T03:47:41.3892093+00:00",
        "EmployeeId": 6,
        "AddressId": 7
      },
      {
        "IsTemporary": true,
        "IsActive": true,
        "Rotational": true,
        "PrimaryRotational": true,
        "Id": 5,
        "StartDate": "2025-01-26T03:47:41.3892093+00:00",
        "EndDate": "2025-01-26T03:47:41.3892093+00:00",
        "EmployeeId": 6,
        "AddressId": 7
      }
    ],
    "HomeAddresses": [
      {
        "Id": 1,
        "StartDate": "2025-01-26T03:47:41.3892093+00:00",
        "EndDate": "2025-01-26T03:47:41.3892093+00:00",
        "EmployeeId": 2,
        "AddressId": 3
      },
      {
        "Id": 1,
        "StartDate": "2025-01-26T03:47:41.3892093+00:00",
        "EndDate": "2025-01-26T03:47:41.3892093+00:00",
        "EmployeeId": 2,
        "AddressId": 3
      },
      {
        "Id": 1,
        "StartDate": "2025-01-26T03:47:41.3892093+00:00",
        "EndDate": "2025-01-26T03:47:41.3892093+00:00",
        "EmployeeId": 2,
        "AddressId": 3
      }
    ],
    "IsActive": true,
    "DvlaConsentDate": "2025-01-26T03:47:41.3892093+00:00",
    "DriverId": 1,
    "LastPasswordChange": "2025-01-26T03:47:41.3892093+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
      }
    ]
  }
}

application/xml, text/xml

Sample:
<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-26T03:47:41.3892093+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-26T03:47:41.3892093+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-26T03:47:41.3892093+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-26T03:47:41.3892093+00:00</d2p1:StartMileageDate>
        <d2p1:TerminationDate>2025-01-26T03:47:41.3892093+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>
URI parameters
=
Headers | Add header
: Delete
Body
Samples:
Status
Headers
Body