> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://open-api-docs.dice.tech/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://open-api-docs.dice.tech/_mcp/server.

# Patch Employee

PATCH https://heimdall.eka.io/apis/external/employee/{code}
Content-Type: application/json

### Patch Employee

This API is used to update employee information by providing the employee code in the endpoint URL. The request body should contain the updated employee details in JSON format.

### Request Body

| Params               | Required | Type    | Description                                                     |
| -------------------- | -------- | ------- | --------------------------------------------------------------- |
| name.first           | Optional | String  | The first name of the employee.                                 |
| name.last            | Optional | String  | The last name of the employee.                                  |
| email                | Optional | String  | The email address of the employee.                              |
| mobile               | Optional | String  | The mobile number of the employee.                              |
| dob                  | Optional | Integer | The date of birth of the employee in Unix timestamp format.     |
| managerCode          | Optional | String  | The code of the manager for the employee.                       |
| alternateManagerCode | Optional | String  | The code of the alternate manager for the employee.             |
| hrHeadCode           | Optional | String  | The code of the HR head for the employee.                       |
| officeIds            | Optional | Array   | An array of office IDs associated with the employee.            |
| eaCode               | Optional | String  | The EA code of the employee.                                    |
| customFields         | Optional | Object  | Additional custom fields for the employee.                      |
| qrDisabled           | Optional | Boolean | A flag to indicate if the QR code is disabled for the employee. |

### Response

The response will contain a `success` field indicating whether the update was successful.

#### Example

```json
{
    "success": true
}

```

Reference: https://open-api-docs.dice.tech/dice-standardized-ap-is-v-2-copy/employee/patch-employee

## Servers

- `https://heimdall.eka.io` (https://heimdall.eka.io, default)
- `https://heimdall.eka.ioapis` (https://heimdall.eka.ioapis)

## Request

### Path parameters

- `code` (string, required)

### Headers

- `DICE-APP-ID` (string, optional) — Company Code of client
- `X-CLIENT-ID` (string, optional) — API Client ID
- `X-CLIENT-SECRET` (string, optional) — API Client Secret

### Body (application/json)

- `name` (object, required)
  - `first` (string, required)
  - `last` (string, required)
- `email` (string, required)
- `mobile` (string, required)
- `dob` (integer, required)
- `managerCode` (string, required)
- `alternateManagerCode` (string, required)
- `hrHeadCode` (string, required)
- `officeIds` (list of any, required)
- `eaCode` (string, required)
- `customFields` (object, required)
- `qrDisabled` (boolean, required)

## Response

### 200

OK

- `success` (boolean, required)

## Examples

**Request**

```json
{
  "name": {
    "first": "test",
    "last": "user 123"
  },
  "email": "Diceuser122333@gmail.com",
  "mobile": "0099887766",
  "dob": 0,
  "managerCode": "",
  "alternateManagerCode": "",
  "hrHeadCode": "",
  "officeIds": [],
  "eaCode": "",
  "qrDisabled": false
}
```

**Response**

```json
{
  "success": true
}
```

**SDK Code**

```python Employee_Patch Employee_example
import requests

url = "https://heimdall.eka.io/apis/external/employee/000069"

payload = {
    "name": {
        "first": "test",
        "last": "user 123"
    },
    "email": "Diceuser122333@gmail.com",
    "mobile": "0099887766",
    "dob": 0,
    "managerCode": "",
    "alternateManagerCode": "",
    "hrHeadCode": "",
    "officeIds": [],
    "eaCode": "",
    "qrDisabled": False
}
headers = {
    "DICE-APP-ID": "{{Company Code}}",
    "X-CLIENT-ID": "{{API Client ID}}",
    "X-CLIENT-SECRET": "{{API Client Secret}}",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Employee_Patch Employee_example
const url = 'https://heimdall.eka.io/apis/external/employee/000069';
const options = {
  method: 'PATCH',
  headers: {
    'DICE-APP-ID': '{{Company Code}}',
    'X-CLIENT-ID': '{{API Client ID}}',
    'X-CLIENT-SECRET': '{{API Client Secret}}',
    'Content-Type': 'application/json'
  },
  body: '{"name":{"first":"test","last":"user 123"},"email":"Diceuser122333@gmail.com","mobile":"0099887766","dob":0,"managerCode":"","alternateManagerCode":"","hrHeadCode":"","officeIds":[],"eaCode":"","qrDisabled":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Employee_Patch Employee_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://heimdall.eka.io/apis/external/employee/000069"

	payload := strings.NewReader("{\n  \"name\": {\n    \"first\": \"test\",\n    \"last\": \"user 123\"\n  },\n  \"email\": \"Diceuser122333@gmail.com\",\n  \"mobile\": \"0099887766\",\n  \"dob\": 0,\n  \"managerCode\": \"\",\n  \"alternateManagerCode\": \"\",\n  \"hrHeadCode\": \"\",\n  \"officeIds\": [],\n  \"eaCode\": \"\",\n  \"qrDisabled\": false\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("DICE-APP-ID", "{{Company Code}}")
	req.Header.Add("X-CLIENT-ID", "{{API Client ID}}")
	req.Header.Add("X-CLIENT-SECRET", "{{API Client Secret}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Employee_Patch Employee_example
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/employee/000069")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["DICE-APP-ID"] = '{{Company Code}}'
request["X-CLIENT-ID"] = '{{API Client ID}}'
request["X-CLIENT-SECRET"] = '{{API Client Secret}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": {\n    \"first\": \"test\",\n    \"last\": \"user 123\"\n  },\n  \"email\": \"Diceuser122333@gmail.com\",\n  \"mobile\": \"0099887766\",\n  \"dob\": 0,\n  \"managerCode\": \"\",\n  \"alternateManagerCode\": \"\",\n  \"hrHeadCode\": \"\",\n  \"officeIds\": [],\n  \"eaCode\": \"\",\n  \"qrDisabled\": false\n}"

response = http.request(request)
puts response.read_body
```

```java Employee_Patch Employee_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://heimdall.eka.io/apis/external/employee/000069")
  .header("DICE-APP-ID", "{{Company Code}}")
  .header("X-CLIENT-ID", "{{API Client ID}}")
  .header("X-CLIENT-SECRET", "{{API Client Secret}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": {\n    \"first\": \"test\",\n    \"last\": \"user 123\"\n  },\n  \"email\": \"Diceuser122333@gmail.com\",\n  \"mobile\": \"0099887766\",\n  \"dob\": 0,\n  \"managerCode\": \"\",\n  \"alternateManagerCode\": \"\",\n  \"hrHeadCode\": \"\",\n  \"officeIds\": [],\n  \"eaCode\": \"\",\n  \"qrDisabled\": false\n}")
  .asString();
```

```php Employee_Patch Employee_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://heimdall.eka.io/apis/external/employee/000069', [
  'body' => '{
  "name": {
    "first": "test",
    "last": "user 123"
  },
  "email": "Diceuser122333@gmail.com",
  "mobile": "0099887766",
  "dob": 0,
  "managerCode": "",
  "alternateManagerCode": "",
  "hrHeadCode": "",
  "officeIds": [],
  "eaCode": "",
  "qrDisabled": false
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'DICE-APP-ID' => '{{Company Code}}',
    'X-CLIENT-ID' => '{{API Client ID}}',
    'X-CLIENT-SECRET' => '{{API Client Secret}}',
  ],
]);

echo $response->getBody();
```

```csharp Employee_Patch Employee_example
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/employee/000069");
var request = new RestRequest(Method.PATCH);
request.AddHeader("DICE-APP-ID", "{{Company Code}}");
request.AddHeader("X-CLIENT-ID", "{{API Client ID}}");
request.AddHeader("X-CLIENT-SECRET", "{{API Client Secret}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": {\n    \"first\": \"test\",\n    \"last\": \"user 123\"\n  },\n  \"email\": \"Diceuser122333@gmail.com\",\n  \"mobile\": \"0099887766\",\n  \"dob\": 0,\n  \"managerCode\": \"\",\n  \"alternateManagerCode\": \"\",\n  \"hrHeadCode\": \"\",\n  \"officeIds\": [],\n  \"eaCode\": \"\",\n  \"qrDisabled\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Employee_Patch Employee_example
import Foundation

let headers = [
  "DICE-APP-ID": "{{Company Code}}",
  "X-CLIENT-ID": "{{API Client ID}}",
  "X-CLIENT-SECRET": "{{API Client Secret}}",
  "Content-Type": "application/json"
]
let parameters = [
  "name": [
    "first": "test",
    "last": "user 123"
  ],
  "email": "Diceuser122333@gmail.com",
  "mobile": "0099887766",
  "dob": 0,
  "managerCode": "",
  "alternateManagerCode": "",
  "hrHeadCode": "",
  "officeIds": [],
  "eaCode": "",
  "qrDisabled": false
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://heimdall.eka.io/apis/external/employee/000069")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```