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

# Spare Employee Info XX - UPSERT

POST https://server.bipocloud.com/tenant/api2/BIPOImport/Update#postApi2BipoimportUpdate59
Content-Type: application/json

Insert and update Employee Spare Info.  
Employee Spare Info table, support BIPO-EMP-SXX (XX: 01-20)

Reference: https://developer.biposervice.com/bipo-portal/hrms-v-1/hrms-v-1-personnel/hrms-v-1-hrms-v-1-personnel-reference/hrms-v-1-hrms-v-1-personnel-hrms-v-1-hrms-v-1-personnel-reference-spare-tables/spare-employee-info-xx-upsert

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an object.

- `Data` (list of Api2BipoImportUpdatePostApi2BipoimportUpdate59PostRequestBodyContentApplicationJsonSchemaDataItems, required)
- `InterfaceCode` (string, required)

## Response

### 200

OK

- `ok` (boolean, required)
- `msg` (string, required)

## Types

### Api2BipoImportUpdatePostApi2BipoimportUpdate59PostRequestBodyContentApplicationJsonSchemaDataItems

- `ESM01D01` (datetime, required)
- `ESM01D02` (datetime, required)
- `ESM01N01` (integer, required)
- `ESM01N02` (integer, required)
- `ESM01N03` (integer, required)
- `ESM01N04` (integer, required)
- `ESM01N05` (integer, required)
- `ESM01N06` (integer, required)
- `ESM01N07` (integer, required)
- `ESM01N08` (integer, required)
- `ESM01N09` (integer, required)
- `ESM01N10` (integer, required)
- `ESM01N11` (integer, required)
- `ESM01N12` (integer, required)
- `ESM01N13` (integer, required)
- `ESM01N14` (integer, required)
- `ESM01N15` (integer, required)
- `ESM01N16` (integer, required)
- `ESM01N17` (integer, required)
- `ESM01N18` (integer, required)
- `ESM01N19` (integer, required)
- `ESM01N20` (integer, required)
- `ESM01R01` (string, required)
- `DateStart` (datetime, required)
- `EmployeeCode` (string, required)
- `ESM01A01` (any, optional)
- `ESM01C01` (any, optional)
- `ESM01C02` (any, optional)
- `ESM01C03` (any, optional)
- `ESM01C04` (any, optional)
- `ESM01C05` (any, optional)
- `ESM01C06` (any, optional)
- `ESM01C07` (any, optional)
- `ESM01C08` (any, optional)
- `ESM01C09` (any, optional)
- `ESM01C10` (any, optional)
- `ESM01C11` (any, optional)
- `ESM01C12` (any, optional)
- `ESM01C13` (any, optional)
- `ESM01C14` (any, optional)
- `ESM01C15` (any, optional)
- `ESM01C16` (any, optional)
- `ESM01C17` (any, optional)
- `ESM01C18` (any, optional)
- `ESM01C19` (any, optional)
- `ESM01C20` (any, optional)
- `ESM01C21` (any, optional)
- `ESM01C22` (any, optional)
- `ESM01C23` (any, optional)
- `ESM01C24` (any, optional)
- `ESM01C25` (any, optional)
- `ESM01D03` (any, optional)
- `ESM01D04` (any, optional)
- `ESM01D05` (any, optional)
- `ESM01D06` (any, optional)
- `ESM01D07` (any, optional)
- `ESM01D08` (any, optional)
- `ESM01D09` (any, optional)
- `ESM01D10` (any, optional)
- `ESM01D11` (any, optional)
- `ESM01D12` (any, optional)
- `ESM01D13` (any, optional)
- `ESM01D14` (any, optional)
- `ESM01D15` (any, optional)
- `ESM01D16` (any, optional)
- `ESM01D17` (any, optional)
- `ESM01D18` (any, optional)
- `ESM01D19` (any, optional)
- `ESM01D20` (any, optional)
- `ESM01L01` (any, optional)
- `ESM01L02` (any, optional)
- `ESM01L03` (any, optional)
- `ESM01L04` (any, optional)
- `ESM01L05` (any, optional)
- `ESM01R02` (any, optional)
- `ESM01R03` (any, optional)
- `ESM01R04` (any, optional)
- `ESM01R05` (any, optional)
- `ESM01R06` (any, optional)
- `ESM01R07` (any, optional)
- `ESM01R08` (any, optional)
- `ESM01R09` (any, optional)
- `ESM01R10` (any, optional)
- `ESM01R11` (any, optional)
- `ESM01R12` (any, optional)
- `ESM01R13` (any, optional)
- `ESM01R14` (any, optional)
- `ESM01R15` (any, optional)
- `ESM01R16` (any, optional)
- `ESM01R17` (any, optional)
- `ESM01R18` (any, optional)
- `ESM01R19` (any, optional)
- `ESM01R20` (any, optional)
- `ESM01Z01` (any, optional)

## Examples

**Request**

```json
{
  "Data": [
    {
      "ESM01D01": "2023-02-01T00:00:00",
      "ESM01D02": "2023-04-30T00:00:00",
      "ESM01N01": 0,
      "ESM01N02": 0,
      "ESM01N03": 0,
      "ESM01N04": 0,
      "ESM01N05": 0,
      "ESM01N06": 0,
      "ESM01N07": 0,
      "ESM01N08": 0,
      "ESM01N09": 0,
      "ESM01N10": 0,
      "ESM01N11": 0,
      "ESM01N12": 0,
      "ESM01N13": 0,
      "ESM01N14": 0,
      "ESM01N15": 0,
      "ESM01N16": 0,
      "ESM01N17": 0,
      "ESM01N18": 0,
      "ESM01N19": 0,
      "ESM01N20": 0,
      "ESM01R01": "WGC01",
      "DateStart": "2023-02-01T00:00:00",
      "EmployeeCode": "000002"
    }
  ],
  "InterfaceCode": "BIPO-EMP-S01"
}
```

**Response**

```json
{
  "ok": true,
  "msg": "Import Succeed."
}
```

**SDK Code**

```python Spare Employee Info XX - UPSERT
import requests

url = "https://server.bipocloud.com/tenant/api2/BIPOImport/Update#postApi2BipoimportUpdate59"

payload = {
    "Data": [
        {
            "ESM01D01": "2023-02-01T00:00:00",
            "ESM01D02": "2023-04-30T00:00:00",
            "ESM01N01": 0,
            "ESM01N02": 0,
            "ESM01N03": 0,
            "ESM01N04": 0,
            "ESM01N05": 0,
            "ESM01N06": 0,
            "ESM01N07": 0,
            "ESM01N08": 0,
            "ESM01N09": 0,
            "ESM01N10": 0,
            "ESM01N11": 0,
            "ESM01N12": 0,
            "ESM01N13": 0,
            "ESM01N14": 0,
            "ESM01N15": 0,
            "ESM01N16": 0,
            "ESM01N17": 0,
            "ESM01N18": 0,
            "ESM01N19": 0,
            "ESM01N20": 0,
            "ESM01R01": "WGC01",
            "DateStart": "2023-02-01T00:00:00",
            "EmployeeCode": "000002"
        }
    ],
    "InterfaceCode": "BIPO-EMP-S01"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Spare Employee Info XX - UPSERT
const url = 'https://server.bipocloud.com/tenant/api2/BIPOImport/Update#postApi2BipoimportUpdate59';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"Data":[{"ESM01D01":"2023-02-01T00:00:00","ESM01D02":"2023-04-30T00:00:00","ESM01N01":0,"ESM01N02":0,"ESM01N03":0,"ESM01N04":0,"ESM01N05":0,"ESM01N06":0,"ESM01N07":0,"ESM01N08":0,"ESM01N09":0,"ESM01N10":0,"ESM01N11":0,"ESM01N12":0,"ESM01N13":0,"ESM01N14":0,"ESM01N15":0,"ESM01N16":0,"ESM01N17":0,"ESM01N18":0,"ESM01N19":0,"ESM01N20":0,"ESM01R01":"WGC01","DateStart":"2023-02-01T00:00:00","EmployeeCode":"000002"}],"InterfaceCode":"BIPO-EMP-S01"}'
};

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

```go Spare Employee Info XX - UPSERT
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/api2/BIPOImport/Update#postApi2BipoimportUpdate59"

	payload := strings.NewReader("{\n  \"Data\": [\n    {\n      \"ESM01D01\": \"2023-02-01T00:00:00\",\n      \"ESM01D02\": \"2023-04-30T00:00:00\",\n      \"ESM01N01\": 0,\n      \"ESM01N02\": 0,\n      \"ESM01N03\": 0,\n      \"ESM01N04\": 0,\n      \"ESM01N05\": 0,\n      \"ESM01N06\": 0,\n      \"ESM01N07\": 0,\n      \"ESM01N08\": 0,\n      \"ESM01N09\": 0,\n      \"ESM01N10\": 0,\n      \"ESM01N11\": 0,\n      \"ESM01N12\": 0,\n      \"ESM01N13\": 0,\n      \"ESM01N14\": 0,\n      \"ESM01N15\": 0,\n      \"ESM01N16\": 0,\n      \"ESM01N17\": 0,\n      \"ESM01N18\": 0,\n      \"ESM01N19\": 0,\n      \"ESM01N20\": 0,\n      \"ESM01R01\": \"WGC01\",\n      \"DateStart\": \"2023-02-01T00:00:00\",\n      \"EmployeeCode\": \"000002\"\n    }\n  ],\n  \"InterfaceCode\": \"BIPO-EMP-S01\"\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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 Spare Employee Info XX - UPSERT
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/api2/BIPOImport/Update#postApi2BipoimportUpdate59")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"Data\": [\n    {\n      \"ESM01D01\": \"2023-02-01T00:00:00\",\n      \"ESM01D02\": \"2023-04-30T00:00:00\",\n      \"ESM01N01\": 0,\n      \"ESM01N02\": 0,\n      \"ESM01N03\": 0,\n      \"ESM01N04\": 0,\n      \"ESM01N05\": 0,\n      \"ESM01N06\": 0,\n      \"ESM01N07\": 0,\n      \"ESM01N08\": 0,\n      \"ESM01N09\": 0,\n      \"ESM01N10\": 0,\n      \"ESM01N11\": 0,\n      \"ESM01N12\": 0,\n      \"ESM01N13\": 0,\n      \"ESM01N14\": 0,\n      \"ESM01N15\": 0,\n      \"ESM01N16\": 0,\n      \"ESM01N17\": 0,\n      \"ESM01N18\": 0,\n      \"ESM01N19\": 0,\n      \"ESM01N20\": 0,\n      \"ESM01R01\": \"WGC01\",\n      \"DateStart\": \"2023-02-01T00:00:00\",\n      \"EmployeeCode\": \"000002\"\n    }\n  ],\n  \"InterfaceCode\": \"BIPO-EMP-S01\"\n}"

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

```java Spare Employee Info XX - UPSERT
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/api2/BIPOImport/Update#postApi2BipoimportUpdate59")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"Data\": [\n    {\n      \"ESM01D01\": \"2023-02-01T00:00:00\",\n      \"ESM01D02\": \"2023-04-30T00:00:00\",\n      \"ESM01N01\": 0,\n      \"ESM01N02\": 0,\n      \"ESM01N03\": 0,\n      \"ESM01N04\": 0,\n      \"ESM01N05\": 0,\n      \"ESM01N06\": 0,\n      \"ESM01N07\": 0,\n      \"ESM01N08\": 0,\n      \"ESM01N09\": 0,\n      \"ESM01N10\": 0,\n      \"ESM01N11\": 0,\n      \"ESM01N12\": 0,\n      \"ESM01N13\": 0,\n      \"ESM01N14\": 0,\n      \"ESM01N15\": 0,\n      \"ESM01N16\": 0,\n      \"ESM01N17\": 0,\n      \"ESM01N18\": 0,\n      \"ESM01N19\": 0,\n      \"ESM01N20\": 0,\n      \"ESM01R01\": \"WGC01\",\n      \"DateStart\": \"2023-02-01T00:00:00\",\n      \"EmployeeCode\": \"000002\"\n    }\n  ],\n  \"InterfaceCode\": \"BIPO-EMP-S01\"\n}")
  .asString();
```

```php Spare Employee Info XX - UPSERT
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/api2/BIPOImport/Update#postApi2BipoimportUpdate59', [
  'body' => '{
  "Data": [
    {
      "ESM01D01": "2023-02-01T00:00:00",
      "ESM01D02": "2023-04-30T00:00:00",
      "ESM01N01": 0,
      "ESM01N02": 0,
      "ESM01N03": 0,
      "ESM01N04": 0,
      "ESM01N05": 0,
      "ESM01N06": 0,
      "ESM01N07": 0,
      "ESM01N08": 0,
      "ESM01N09": 0,
      "ESM01N10": 0,
      "ESM01N11": 0,
      "ESM01N12": 0,
      "ESM01N13": 0,
      "ESM01N14": 0,
      "ESM01N15": 0,
      "ESM01N16": 0,
      "ESM01N17": 0,
      "ESM01N18": 0,
      "ESM01N19": 0,
      "ESM01N20": 0,
      "ESM01R01": "WGC01",
      "DateStart": "2023-02-01T00:00:00",
      "EmployeeCode": "000002"
    }
  ],
  "InterfaceCode": "BIPO-EMP-S01"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Spare Employee Info XX - UPSERT
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/api2/BIPOImport/Update#postApi2BipoimportUpdate59");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"Data\": [\n    {\n      \"ESM01D01\": \"2023-02-01T00:00:00\",\n      \"ESM01D02\": \"2023-04-30T00:00:00\",\n      \"ESM01N01\": 0,\n      \"ESM01N02\": 0,\n      \"ESM01N03\": 0,\n      \"ESM01N04\": 0,\n      \"ESM01N05\": 0,\n      \"ESM01N06\": 0,\n      \"ESM01N07\": 0,\n      \"ESM01N08\": 0,\n      \"ESM01N09\": 0,\n      \"ESM01N10\": 0,\n      \"ESM01N11\": 0,\n      \"ESM01N12\": 0,\n      \"ESM01N13\": 0,\n      \"ESM01N14\": 0,\n      \"ESM01N15\": 0,\n      \"ESM01N16\": 0,\n      \"ESM01N17\": 0,\n      \"ESM01N18\": 0,\n      \"ESM01N19\": 0,\n      \"ESM01N20\": 0,\n      \"ESM01R01\": \"WGC01\",\n      \"DateStart\": \"2023-02-01T00:00:00\",\n      \"EmployeeCode\": \"000002\"\n    }\n  ],\n  \"InterfaceCode\": \"BIPO-EMP-S01\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Spare Employee Info XX - UPSERT
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "Data": [
    [
      "ESM01D01": "2023-02-01T00:00:00",
      "ESM01D02": "2023-04-30T00:00:00",
      "ESM01N01": 0,
      "ESM01N02": 0,
      "ESM01N03": 0,
      "ESM01N04": 0,
      "ESM01N05": 0,
      "ESM01N06": 0,
      "ESM01N07": 0,
      "ESM01N08": 0,
      "ESM01N09": 0,
      "ESM01N10": 0,
      "ESM01N11": 0,
      "ESM01N12": 0,
      "ESM01N13": 0,
      "ESM01N14": 0,
      "ESM01N15": 0,
      "ESM01N16": 0,
      "ESM01N17": 0,
      "ESM01N18": 0,
      "ESM01N19": 0,
      "ESM01N20": 0,
      "ESM01R01": "WGC01",
      "DateStart": "2023-02-01T00:00:00",
      "EmployeeCode": "000002"
    ]
  ],
  "InterfaceCode": "BIPO-EMP-S01"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/api2/BIPOImport/Update#postApi2BipoimportUpdate59")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```