> 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.

# Leave Record - UPSERT

POST https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90
Content-Type: application/json

This API is used to create, amend, approve and cancel leave requests in BIPO. It also covers leave-with-expiry requests (for example Leave Code LWE01), and it is the API to use when you sync leave requests from an external system into BIPO.

A leave request can be identified in two ways, chosen with `RespectField`:

| RespectField | Identifies a leave request by | What you can do |
| --- | --- | --- |
| R **(Recommended)** | `RecordID` (single key) | Blank `RecordID` creates a new request. A supplied `RecordID` amends, approves or cancels that request. |
| K (default when `RespectField` is omitted) | `EmployeeCode` + `LeaveCode` + `DateStart` + `DateEnd` (legacy) | Create a new request or cancel an existing one. It cannot amend. |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| InterfaceCode | String | Yes | `BIPO-LVR` |
| RespectField | String | No | `R` or `K`. Default is `K`. |
| RecordID | String (GUID) | Conditional | Leave request identifier. Required when `RespectField` = R and you amend, approve or cancel a request. Leave it blank to create a new request. Not used when `RespectField` = K. |
| EmployeeCode | String | Conditional | Unique employee identifier. Required when you create a request, or when `RespectField` = K. Also send it when you approve a request. |
| LeaveCode | String | Conditional | Leave Code. Required when you create a request, or when `RespectField` = K. Also send it when you approve a request. |
| DateStart | Date (yyyy-mm-dd) | Conditional | Start date of the leave request. Required when you create a request, or when `RespectField` = K. |
| DateEnd | Date (yyyy-mm-dd) | Conditional | End date of the leave request. Required when you create a request, or when `RespectField` = K. |
| HalfStart | String | Conditional | Required if Leave UnitType = D (Day). First half of the day (`"AM"` or `"PM"`). Also required when you cancel in K style. |
| HalfEnd | String | Conditional | Required if Leave UnitType = D (Day). Second half of the day (`"AM"` or `"PM"`). Also required when you cancel in K style. |
| TimeStart | String (HH:mm) | Conditional | Leave start time. Required if Leave UnitType = H (Hour). |
| TimeEnd | String (HH:mm) | Conditional | Leave end time. Required if Leave UnitType = H (Hour). |
| ApprovalStatus | String | Conditional | Send `"C"` to cancel a leave request. Leave it out in every other case. A new request is approved automatically. |
| ExternalRequestID | String | No | Your own reference number for the leave request, kept in BIPO and returned by Leave Record - LIST. |
| DateReference | Date (yyyy-mm-dd) | Conditional | Only for leave types that ask for a reference date (for example marriage or child-related leave). |
| ReferenceName | String | Conditional | Only for leave types tied to a family member or a named reference (for example marriage or child-related leave). |
| Remarks | String | No | Additional remarks |

Note: The response returns the `RecordID` of every imported leave request only when `RespectField` = R. Keep it: it is the key for a later amend, approve, cancel or delete.

Note: `ExternalRequestID` is not unique. BIPO does not stop two leave requests from carrying the same value, so store the returned `RecordID` next to your own reference.

Note: Cancelling adds a separate cancellation record and marks the leave request as cancelled. A request that is already cancelled cannot be cancelled again.

Note: This API cannot create a leave request that waits for approval. A new request is approved as soon as it is created.

Note: To approve a leave request that is waiting for approval, send its `RecordID`, `EmployeeCode` and `LeaveCode` and leave `ApprovalStatus` out. The API user must have write access to that employee.

Note: The saved examples below show create (Recommended), amend, cancel, approve, sync from an external system, leave-with-expiry, the legacy multi-key style and the common error messages.

Reference: https://developer.biposervice.com/bipo-portal/hrms-v-2/hrms-v-2-leave/leave-record-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 a string.

- `string`

## Response

### 200

OK

- `data` (IntapiInterfaceImportPostIntapiInterfaceImport90PostResponsesContentApplicationJsonSchemaData, required)
- `errors` (list of any, required)
- `messages` (list of string, required)
- `errorCode` (any, optional)

## Types

### IntapiInterfaceImportPostIntapiInterfaceImport90PostResponsesContentApplicationJsonSchemaData

- `key` (string, required)
- `validRecords` (list of IntapiInterfaceImportPostIntapiInterfaceImport90PostResponsesContentApplicationJsonSchemaDataValidRecordsItems, required)
- `invalidRecords` (list of any, required)

### IntapiInterfaceImportPostIntapiInterfaceImport90PostResponsesContentApplicationJsonSchemaDataValidRecordsItems

- `key` (string, required)
- `message` (string, required)

## Examples

### Error - leave record not found

**Request**

```json
"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        //A RecordID that does not exist\n        \"RecordID\": \"00000000-0000-0000-0000-000000000000\",\n        \"DateEnd\": \"2026-12-16\"\n    }\n  ]\n}"
```

**Response**

```json
{
  "data": {
    "key": "RecordID",
    "validRecords": [],
    "invalidRecords": [
      {
        "errorMessage": "Leave record not found.",
        "key": "00000000-0000-0000-0000-000000000000"
      }
    ]
  },
  "errors": [
    "0 record(s) imported. 1 failed record(s)."
  ],
  "messages": []
}
```

**SDK Code**

```python Error - leave record not found
import requests

url = "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

payload = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        //A RecordID that does not exist
        \"RecordID\": \"00000000-0000-0000-0000-000000000000\",
        \"DateEnd\": \"2026-12-16\"
    }
  ]
}"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Error - leave record not found
const url = 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        //A RecordID that does not exist\n        \"RecordID\": \"00000000-0000-0000-0000-000000000000\",\n        \"DateEnd\": \"2026-12-16\"\n    }\n  ]\n}"'
};

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

```go Error - leave record not found
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

	payload := strings.NewReader("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //A RecordID that does not exist\\n        \\\"RecordID\\\": \\\"00000000-0000-0000-0000-000000000000\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-16\\\"\\n    }\\n  ]\\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 Error - leave record not found
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")

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  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //A RecordID that does not exist\\n        \\\"RecordID\\\": \\\"00000000-0000-0000-0000-000000000000\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-16\\\"\\n    }\\n  ]\\n}\""

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

```java Error - leave record not found
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //A RecordID that does not exist\\n        \\\"RecordID\\\": \\\"00000000-0000-0000-0000-000000000000\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-16\\\"\\n    }\\n  ]\\n}\"")
  .asString();
```

```php Error - leave record not found
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90', [
  'body' => '"{\\n  \\"InterfaceCode\\": \\"BIPO-LVR\\",\\n  \\"RespectField\\": \\"R\\",\\n  \\"Data\\": [\\n    {\\n        //A RecordID that does not exist\\n        \\"RecordID\\": \\"00000000-0000-0000-0000-000000000000\\",\\n        \\"DateEnd\\": \\"2026-12-16\\"\\n    }\\n  ]\\n}"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Error - leave record not found
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //A RecordID that does not exist\\n        \\\"RecordID\\\": \\\"00000000-0000-0000-0000-000000000000\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-16\\\"\\n    }\\n  ]\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Error - leave record not found
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        //A RecordID that does not exist
        \"RecordID\": \"00000000-0000-0000-0000-000000000000\",
        \"DateEnd\": \"2026-12-16\"
    }
  ]
}" as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")! 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()
```

### Error - leave already cancelled

**Request**

```json
"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        //RecordID of a request that was already cancelled\n        \"RecordID\": \"a1827e86-cfbb-f111-84c3-06540fc8457d\",\n        \"ApprovalStatus\": \"C\"\n    }\n  ]\n}"
```

**Response**

```json
{
  "data": {
    "key": "RecordID",
    "validRecords": [],
    "invalidRecords": [
      {
        "errorMessage": "Leave is already canceled.",
        "key": "a1827e86-cfbb-f111-84c3-06540fc8457d"
      }
    ]
  },
  "errors": [
    "0 record(s) imported. 1 failed record(s)."
  ],
  "messages": []
}
```

**SDK Code**

```python Error - leave already cancelled
import requests

url = "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

payload = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        //RecordID of a request that was already cancelled
        \"RecordID\": \"a1827e86-cfbb-f111-84c3-06540fc8457d\",
        \"ApprovalStatus\": \"C\"
    }
  ]
}"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Error - leave already cancelled
const url = 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        //RecordID of a request that was already cancelled\n        \"RecordID\": \"a1827e86-cfbb-f111-84c3-06540fc8457d\",\n        \"ApprovalStatus\": \"C\"\n    }\n  ]\n}"'
};

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

```go Error - leave already cancelled
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

	payload := strings.NewReader("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //RecordID of a request that was already cancelled\\n        \\\"RecordID\\\": \\\"a1827e86-cfbb-f111-84c3-06540fc8457d\\\",\\n        \\\"ApprovalStatus\\\": \\\"C\\\"\\n    }\\n  ]\\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 Error - leave already cancelled
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")

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  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //RecordID of a request that was already cancelled\\n        \\\"RecordID\\\": \\\"a1827e86-cfbb-f111-84c3-06540fc8457d\\\",\\n        \\\"ApprovalStatus\\\": \\\"C\\\"\\n    }\\n  ]\\n}\""

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

```java Error - leave already cancelled
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //RecordID of a request that was already cancelled\\n        \\\"RecordID\\\": \\\"a1827e86-cfbb-f111-84c3-06540fc8457d\\\",\\n        \\\"ApprovalStatus\\\": \\\"C\\\"\\n    }\\n  ]\\n}\"")
  .asString();
```

```php Error - leave already cancelled
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90', [
  'body' => '"{\\n  \\"InterfaceCode\\": \\"BIPO-LVR\\",\\n  \\"RespectField\\": \\"R\\",\\n  \\"Data\\": [\\n    {\\n        //RecordID of a request that was already cancelled\\n        \\"RecordID\\": \\"a1827e86-cfbb-f111-84c3-06540fc8457d\\",\\n        \\"ApprovalStatus\\": \\"C\\"\\n    }\\n  ]\\n}"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Error - leave already cancelled
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //RecordID of a request that was already cancelled\\n        \\\"RecordID\\\": \\\"a1827e86-cfbb-f111-84c3-06540fc8457d\\\",\\n        \\\"ApprovalStatus\\\": \\\"C\\\"\\n    }\\n  ]\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Error - leave already cancelled
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        //RecordID of a request that was already cancelled
        \"RecordID\": \"a1827e86-cfbb-f111-84c3-06540fc8457d\",
        \"ApprovalStatus\": \"C\"
    }
  ]
}" as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")! 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()
```

### Amend leave request (Recommended)

**Request**

```json
"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        //RecordID of the request to amend\n        \"RecordID\": \"a1827e86-cfbb-f111-84c3-06540fc8457d\",\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"HK_AL\",\n        \"DateStart\": \"2026-12-11\",\n        \"DateEnd\": \"2026-12-15\",\n        \"HalfStart\": \"AM\",\n        \"HalfEnd\": \"PM\",\n        \"ExternalRequestID\": \"PORTAL-DEMO-001\",\n        \"Remarks\": \"End date extended to Tuesday\"\n    }\n  ]\n}"
```

**Response**

```json
{
  "data": {
    "key": "RecordID",
    "validRecords": [
      {
        "key": "a1827e86-cfbb-f111-84c3-06540fc8457d",
        "message": "Updated"
      }
    ],
    "invalidRecords": []
  },
  "errors": [],
  "messages": [
    "1 record(s) imported."
  ]
}
```

**SDK Code**

```python Amend leave request (Recommended)
import requests

url = "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

payload = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        //RecordID of the request to amend
        \"RecordID\": \"a1827e86-cfbb-f111-84c3-06540fc8457d\",
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"HK_AL\",
        \"DateStart\": \"2026-12-11\",
        \"DateEnd\": \"2026-12-15\",
        \"HalfStart\": \"AM\",
        \"HalfEnd\": \"PM\",
        \"ExternalRequestID\": \"PORTAL-DEMO-001\",
        \"Remarks\": \"End date extended to Tuesday\"
    }
  ]
}"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Amend leave request (Recommended)
const url = 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        //RecordID of the request to amend\n        \"RecordID\": \"a1827e86-cfbb-f111-84c3-06540fc8457d\",\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"HK_AL\",\n        \"DateStart\": \"2026-12-11\",\n        \"DateEnd\": \"2026-12-15\",\n        \"HalfStart\": \"AM\",\n        \"HalfEnd\": \"PM\",\n        \"ExternalRequestID\": \"PORTAL-DEMO-001\",\n        \"Remarks\": \"End date extended to Tuesday\"\n    }\n  ]\n}"'
};

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

```go Amend leave request (Recommended)
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

	payload := strings.NewReader("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //RecordID of the request to amend\\n        \\\"RecordID\\\": \\\"a1827e86-cfbb-f111-84c3-06540fc8457d\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-11\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-15\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"ExternalRequestID\\\": \\\"PORTAL-DEMO-001\\\",\\n        \\\"Remarks\\\": \\\"End date extended to Tuesday\\\"\\n    }\\n  ]\\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 Amend leave request (Recommended)
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")

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  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //RecordID of the request to amend\\n        \\\"RecordID\\\": \\\"a1827e86-cfbb-f111-84c3-06540fc8457d\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-11\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-15\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"ExternalRequestID\\\": \\\"PORTAL-DEMO-001\\\",\\n        \\\"Remarks\\\": \\\"End date extended to Tuesday\\\"\\n    }\\n  ]\\n}\""

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

```java Amend leave request (Recommended)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //RecordID of the request to amend\\n        \\\"RecordID\\\": \\\"a1827e86-cfbb-f111-84c3-06540fc8457d\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-11\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-15\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"ExternalRequestID\\\": \\\"PORTAL-DEMO-001\\\",\\n        \\\"Remarks\\\": \\\"End date extended to Tuesday\\\"\\n    }\\n  ]\\n}\"")
  .asString();
```

```php Amend leave request (Recommended)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90', [
  'body' => '"{\\n  \\"InterfaceCode\\": \\"BIPO-LVR\\",\\n  \\"RespectField\\": \\"R\\",\\n  \\"Data\\": [\\n    {\\n        //RecordID of the request to amend\\n        \\"RecordID\\": \\"a1827e86-cfbb-f111-84c3-06540fc8457d\\",\\n        \\"EmployeeCode\\": \\"000004\\",\\n        \\"LeaveCode\\": \\"HK_AL\\",\\n        \\"DateStart\\": \\"2026-12-11\\",\\n        \\"DateEnd\\": \\"2026-12-15\\",\\n        \\"HalfStart\\": \\"AM\\",\\n        \\"HalfEnd\\": \\"PM\\",\\n        \\"ExternalRequestID\\": \\"PORTAL-DEMO-001\\",\\n        \\"Remarks\\": \\"End date extended to Tuesday\\"\\n    }\\n  ]\\n}"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Amend leave request (Recommended)
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //RecordID of the request to amend\\n        \\\"RecordID\\\": \\\"a1827e86-cfbb-f111-84c3-06540fc8457d\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-11\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-15\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"ExternalRequestID\\\": \\\"PORTAL-DEMO-001\\\",\\n        \\\"Remarks\\\": \\\"End date extended to Tuesday\\\"\\n    }\\n  ]\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Amend leave request (Recommended)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        //RecordID of the request to amend
        \"RecordID\": \"a1827e86-cfbb-f111-84c3-06540fc8457d\",
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"HK_AL\",
        \"DateStart\": \"2026-12-11\",
        \"DateEnd\": \"2026-12-15\",
        \"HalfStart\": \"AM\",
        \"HalfEnd\": \"PM\",
        \"ExternalRequestID\": \"PORTAL-DEMO-001\",
        \"Remarks\": \"End date extended to Tuesday\"
    }
  ]
}" as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")! 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()
```

### Cancel leave request (Recommended)

**Request**

```json
"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        \"RecordID\": \"a1827e86-cfbb-f111-84c3-06540fc8457d\",\n        //C = cancel\n        \"ApprovalStatus\": \"C\",\n        \"Remarks\": \"Cancelled in the HR system\"\n    }\n  ]\n}"
```

**Response**

```json
{
  "data": {
    "key": "RecordID",
    "validRecords": [
      {
        "key": "a1827e86-cfbb-f111-84c3-06540fc8457d",
        "message": "Record has been canceled."
      }
    ],
    "invalidRecords": []
  },
  "errors": [],
  "messages": [
    "1 record(s) imported."
  ]
}
```

**SDK Code**

```python Cancel leave request (Recommended)
import requests

url = "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

payload = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        \"RecordID\": \"a1827e86-cfbb-f111-84c3-06540fc8457d\",
        //C = cancel
        \"ApprovalStatus\": \"C\",
        \"Remarks\": \"Cancelled in the HR system\"
    }
  ]
}"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Cancel leave request (Recommended)
const url = 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        \"RecordID\": \"a1827e86-cfbb-f111-84c3-06540fc8457d\",\n        //C = cancel\n        \"ApprovalStatus\": \"C\",\n        \"Remarks\": \"Cancelled in the HR system\"\n    }\n  ]\n}"'
};

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

```go Cancel leave request (Recommended)
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

	payload := strings.NewReader("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"RecordID\\\": \\\"a1827e86-cfbb-f111-84c3-06540fc8457d\\\",\\n        //C = cancel\\n        \\\"ApprovalStatus\\\": \\\"C\\\",\\n        \\\"Remarks\\\": \\\"Cancelled in the HR system\\\"\\n    }\\n  ]\\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 Cancel leave request (Recommended)
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")

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  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"RecordID\\\": \\\"a1827e86-cfbb-f111-84c3-06540fc8457d\\\",\\n        //C = cancel\\n        \\\"ApprovalStatus\\\": \\\"C\\\",\\n        \\\"Remarks\\\": \\\"Cancelled in the HR system\\\"\\n    }\\n  ]\\n}\""

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

```java Cancel leave request (Recommended)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"RecordID\\\": \\\"a1827e86-cfbb-f111-84c3-06540fc8457d\\\",\\n        //C = cancel\\n        \\\"ApprovalStatus\\\": \\\"C\\\",\\n        \\\"Remarks\\\": \\\"Cancelled in the HR system\\\"\\n    }\\n  ]\\n}\"")
  .asString();
```

```php Cancel leave request (Recommended)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90', [
  'body' => '"{\\n  \\"InterfaceCode\\": \\"BIPO-LVR\\",\\n  \\"RespectField\\": \\"R\\",\\n  \\"Data\\": [\\n    {\\n        \\"RecordID\\": \\"a1827e86-cfbb-f111-84c3-06540fc8457d\\",\\n        //C = cancel\\n        \\"ApprovalStatus\\": \\"C\\",\\n        \\"Remarks\\": \\"Cancelled in the HR system\\"\\n    }\\n  ]\\n}"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Cancel leave request (Recommended)
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"RecordID\\\": \\\"a1827e86-cfbb-f111-84c3-06540fc8457d\\\",\\n        //C = cancel\\n        \\\"ApprovalStatus\\\": \\\"C\\\",\\n        \\\"Remarks\\\": \\\"Cancelled in the HR system\\\"\\n    }\\n  ]\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Cancel leave request (Recommended)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        \"RecordID\": \"a1827e86-cfbb-f111-84c3-06540fc8457d\",
        //C = cancel
        \"ApprovalStatus\": \"C\",
        \"Remarks\": \"Cancelled in the HR system\"
    }
  ]
}" as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")! 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()
```

### Create leave request (Recommended)

**Request**

```json
"string"
```

**Response**

```json
{
  "data": {
    "key": "RecordID",
    "validRecords": [
      {
        "key": "a1827e86-cfbb-f111-84c3-06540fc8457d",
        "message": "Added"
      }
    ],
    "invalidRecords": []
  },
  "errors": [],
  "messages": [
    "1 record(s) imported."
  ]
}
```

**SDK Code**

```python Create leave request (Recommended)
import requests

url = "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

payload = "string"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Create leave request (Recommended)
const url = 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '"string"'
};

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

```go Create leave request (Recommended)
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

	payload := strings.NewReader("\"string\"")

	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 Create leave request (Recommended)
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")

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 = "\"string\""

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

```java Create leave request (Recommended)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("\"string\"")
  .asString();
```

```php Create leave request (Recommended)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90', [
  'body' => '"string"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Create leave request (Recommended)
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"string\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create leave request (Recommended)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = "string" as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")! 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()
```

### Create a leave-with-expiry request

**Request**

```json
"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        //LeaveCode of a leave-with-expiry type\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"LWE01\",\n        \"DateStart\": \"2026-12-02\",\n        \"DateEnd\": \"2026-12-02\",\n        \"HalfStart\": \"AM\",\n        \"HalfEnd\": \"PM\",\n        \"Remarks\": \"portal check\"\n    }\n  ]\n}"
```

**Response**

```json
{
  "data": {
    "key": "RecordID",
    "validRecords": [
      {
        "key": "2947dc8e-d0bb-f111-84c3-06540fc8457d",
        "message": "Added"
      }
    ],
    "invalidRecords": []
  },
  "errors": [],
  "messages": [
    "1 record(s) imported."
  ]
}
```

**SDK Code**

```python Create a leave-with-expiry request
import requests

url = "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

payload = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        //LeaveCode of a leave-with-expiry type
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"LWE01\",
        \"DateStart\": \"2026-12-02\",
        \"DateEnd\": \"2026-12-02\",
        \"HalfStart\": \"AM\",
        \"HalfEnd\": \"PM\",
        \"Remarks\": \"portal check\"
    }
  ]
}"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Create a leave-with-expiry request
const url = 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        //LeaveCode of a leave-with-expiry type\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"LWE01\",\n        \"DateStart\": \"2026-12-02\",\n        \"DateEnd\": \"2026-12-02\",\n        \"HalfStart\": \"AM\",\n        \"HalfEnd\": \"PM\",\n        \"Remarks\": \"portal check\"\n    }\n  ]\n}"'
};

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

```go Create a leave-with-expiry request
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

	payload := strings.NewReader("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //LeaveCode of a leave-with-expiry type\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"LWE01\\\",\\n        \\\"DateStart\\\": \\\"2026-12-02\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-02\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"Remarks\\\": \\\"portal check\\\"\\n    }\\n  ]\\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 Create a leave-with-expiry request
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")

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  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //LeaveCode of a leave-with-expiry type\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"LWE01\\\",\\n        \\\"DateStart\\\": \\\"2026-12-02\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-02\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"Remarks\\\": \\\"portal check\\\"\\n    }\\n  ]\\n}\""

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

```java Create a leave-with-expiry request
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //LeaveCode of a leave-with-expiry type\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"LWE01\\\",\\n        \\\"DateStart\\\": \\\"2026-12-02\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-02\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"Remarks\\\": \\\"portal check\\\"\\n    }\\n  ]\\n}\"")
  .asString();
```

```php Create a leave-with-expiry request
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90', [
  'body' => '"{\\n  \\"InterfaceCode\\": \\"BIPO-LVR\\",\\n  \\"RespectField\\": \\"R\\",\\n  \\"Data\\": [\\n    {\\n        //LeaveCode of a leave-with-expiry type\\n        \\"EmployeeCode\\": \\"000004\\",\\n        \\"LeaveCode\\": \\"LWE01\\",\\n        \\"DateStart\\": \\"2026-12-02\\",\\n        \\"DateEnd\\": \\"2026-12-02\\",\\n        \\"HalfStart\\": \\"AM\\",\\n        \\"HalfEnd\\": \\"PM\\",\\n        \\"Remarks\\": \\"portal check\\"\\n    }\\n  ]\\n}"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Create a leave-with-expiry request
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //LeaveCode of a leave-with-expiry type\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"LWE01\\\",\\n        \\\"DateStart\\\": \\\"2026-12-02\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-02\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"Remarks\\\": \\\"portal check\\\"\\n    }\\n  ]\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create a leave-with-expiry request
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        //LeaveCode of a leave-with-expiry type
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"LWE01\",
        \"DateStart\": \"2026-12-02\",
        \"DateEnd\": \"2026-12-02\",
        \"HalfStart\": \"AM\",
        \"HalfEnd\": \"PM\",
        \"Remarks\": \"portal check\"
    }
  ]
}" as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")! 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()
```

### Cancel a leave-with-expiry request (Recommended)

**Request**

```json
"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        \"RecordID\": \"2947dc8e-d0bb-f111-84c3-06540fc8457d\",\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"LWE01\",\n        \"DateStart\": \"2026-12-02\",\n        \"DateEnd\": \"2026-12-02\",\n        \"HalfStart\": \"AM\",\n        \"HalfEnd\": \"PM\",\n        //C = cancel\n        \"ApprovalStatus\": \"C\"\n    }\n  ]\n}"
```

**Response**

```json
{
  "data": {
    "key": "RecordID",
    "validRecords": [
      {
        "key": "2947dc8e-d0bb-f111-84c3-06540fc8457d",
        "message": "Record has been canceled."
      }
    ],
    "invalidRecords": []
  },
  "errors": [],
  "messages": [
    "1 record(s) imported."
  ]
}
```

**SDK Code**

```python Cancel a leave-with-expiry request (Recommended)
import requests

url = "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

payload = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        \"RecordID\": \"2947dc8e-d0bb-f111-84c3-06540fc8457d\",
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"LWE01\",
        \"DateStart\": \"2026-12-02\",
        \"DateEnd\": \"2026-12-02\",
        \"HalfStart\": \"AM\",
        \"HalfEnd\": \"PM\",
        //C = cancel
        \"ApprovalStatus\": \"C\"
    }
  ]
}"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Cancel a leave-with-expiry request (Recommended)
const url = 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        \"RecordID\": \"2947dc8e-d0bb-f111-84c3-06540fc8457d\",\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"LWE01\",\n        \"DateStart\": \"2026-12-02\",\n        \"DateEnd\": \"2026-12-02\",\n        \"HalfStart\": \"AM\",\n        \"HalfEnd\": \"PM\",\n        //C = cancel\n        \"ApprovalStatus\": \"C\"\n    }\n  ]\n}"'
};

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

```go Cancel a leave-with-expiry request (Recommended)
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

	payload := strings.NewReader("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"RecordID\\\": \\\"2947dc8e-d0bb-f111-84c3-06540fc8457d\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"LWE01\\\",\\n        \\\"DateStart\\\": \\\"2026-12-02\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-02\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        //C = cancel\\n        \\\"ApprovalStatus\\\": \\\"C\\\"\\n    }\\n  ]\\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 Cancel a leave-with-expiry request (Recommended)
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")

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  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"RecordID\\\": \\\"2947dc8e-d0bb-f111-84c3-06540fc8457d\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"LWE01\\\",\\n        \\\"DateStart\\\": \\\"2026-12-02\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-02\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        //C = cancel\\n        \\\"ApprovalStatus\\\": \\\"C\\\"\\n    }\\n  ]\\n}\""

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

```java Cancel a leave-with-expiry request (Recommended)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"RecordID\\\": \\\"2947dc8e-d0bb-f111-84c3-06540fc8457d\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"LWE01\\\",\\n        \\\"DateStart\\\": \\\"2026-12-02\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-02\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        //C = cancel\\n        \\\"ApprovalStatus\\\": \\\"C\\\"\\n    }\\n  ]\\n}\"")
  .asString();
```

```php Cancel a leave-with-expiry request (Recommended)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90', [
  'body' => '"{\\n  \\"InterfaceCode\\": \\"BIPO-LVR\\",\\n  \\"RespectField\\": \\"R\\",\\n  \\"Data\\": [\\n    {\\n        \\"RecordID\\": \\"2947dc8e-d0bb-f111-84c3-06540fc8457d\\",\\n        \\"EmployeeCode\\": \\"000004\\",\\n        \\"LeaveCode\\": \\"LWE01\\",\\n        \\"DateStart\\": \\"2026-12-02\\",\\n        \\"DateEnd\\": \\"2026-12-02\\",\\n        \\"HalfStart\\": \\"AM\\",\\n        \\"HalfEnd\\": \\"PM\\",\\n        //C = cancel\\n        \\"ApprovalStatus\\": \\"C\\"\\n    }\\n  ]\\n}"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Cancel a leave-with-expiry request (Recommended)
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"RecordID\\\": \\\"2947dc8e-d0bb-f111-84c3-06540fc8457d\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"LWE01\\\",\\n        \\\"DateStart\\\": \\\"2026-12-02\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-02\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        //C = cancel\\n        \\\"ApprovalStatus\\\": \\\"C\\\"\\n    }\\n  ]\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Cancel a leave-with-expiry request (Recommended)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        \"RecordID\": \"2947dc8e-d0bb-f111-84c3-06540fc8457d\",
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"LWE01\",
        \"DateStart\": \"2026-12-02\",
        \"DateEnd\": \"2026-12-02\",
        \"HalfStart\": \"AM\",
        \"HalfEnd\": \"PM\",
        //C = cancel
        \"ApprovalStatus\": \"C\"
    }
  ]
}" as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")! 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()
```

### Legacy - Cancel with multiple keys (RespectField K)

**Request**

```json
"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"Data\": [\n    {\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"HK_AL\",\n        \"DateStart\": \"2026-12-21\",\n        \"DateEnd\": \"2026-12-22\",\n        //HalfStart, HalfEnd are mandatory when cancelling with multiple keys\n        \"HalfStart\": \"AM\",\n        \"HalfEnd\": \"PM\",\n        //C = cancel\n        \"ApprovalStatus\": \"C\",\n        \"Remarks\": \"Cancelled in the HR system\"\n    }\n  ]\n}"
```

**Response**

```json
{
  "data": {
    "key": "EmployeeCode;LeaveCode;DateStart;DateEnd",
    "validRecords": [
      {
        "key": "000004;HK_AL;2026-12-21;2026-12-22",
        "message": "Record has been canceled."
      }
    ],
    "invalidRecords": []
  },
  "errors": [],
  "messages": [
    "1 record(s) imported."
  ]
}
```

**SDK Code**

```python Legacy - Cancel with multiple keys (RespectField K)
import requests

url = "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

payload = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"Data\": [
    {
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"HK_AL\",
        \"DateStart\": \"2026-12-21\",
        \"DateEnd\": \"2026-12-22\",
        //HalfStart, HalfEnd are mandatory when cancelling with multiple keys
        \"HalfStart\": \"AM\",
        \"HalfEnd\": \"PM\",
        //C = cancel
        \"ApprovalStatus\": \"C\",
        \"Remarks\": \"Cancelled in the HR system\"
    }
  ]
}"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Legacy - Cancel with multiple keys (RespectField K)
const url = 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"Data\": [\n    {\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"HK_AL\",\n        \"DateStart\": \"2026-12-21\",\n        \"DateEnd\": \"2026-12-22\",\n        //HalfStart, HalfEnd are mandatory when cancelling with multiple keys\n        \"HalfStart\": \"AM\",\n        \"HalfEnd\": \"PM\",\n        //C = cancel\n        \"ApprovalStatus\": \"C\",\n        \"Remarks\": \"Cancelled in the HR system\"\n    }\n  ]\n}"'
};

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

```go Legacy - Cancel with multiple keys (RespectField K)
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

	payload := strings.NewReader("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-21\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-22\\\",\\n        //HalfStart, HalfEnd are mandatory when cancelling with multiple keys\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        //C = cancel\\n        \\\"ApprovalStatus\\\": \\\"C\\\",\\n        \\\"Remarks\\\": \\\"Cancelled in the HR system\\\"\\n    }\\n  ]\\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 Legacy - Cancel with multiple keys (RespectField K)
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")

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  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-21\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-22\\\",\\n        //HalfStart, HalfEnd are mandatory when cancelling with multiple keys\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        //C = cancel\\n        \\\"ApprovalStatus\\\": \\\"C\\\",\\n        \\\"Remarks\\\": \\\"Cancelled in the HR system\\\"\\n    }\\n  ]\\n}\""

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

```java Legacy - Cancel with multiple keys (RespectField K)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-21\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-22\\\",\\n        //HalfStart, HalfEnd are mandatory when cancelling with multiple keys\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        //C = cancel\\n        \\\"ApprovalStatus\\\": \\\"C\\\",\\n        \\\"Remarks\\\": \\\"Cancelled in the HR system\\\"\\n    }\\n  ]\\n}\"")
  .asString();
```

```php Legacy - Cancel with multiple keys (RespectField K)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90', [
  'body' => '"{\\n  \\"InterfaceCode\\": \\"BIPO-LVR\\",\\n  \\"Data\\": [\\n    {\\n        \\"EmployeeCode\\": \\"000004\\",\\n        \\"LeaveCode\\": \\"HK_AL\\",\\n        \\"DateStart\\": \\"2026-12-21\\",\\n        \\"DateEnd\\": \\"2026-12-22\\",\\n        //HalfStart, HalfEnd are mandatory when cancelling with multiple keys\\n        \\"HalfStart\\": \\"AM\\",\\n        \\"HalfEnd\\": \\"PM\\",\\n        //C = cancel\\n        \\"ApprovalStatus\\": \\"C\\",\\n        \\"Remarks\\": \\"Cancelled in the HR system\\"\\n    }\\n  ]\\n}"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Legacy - Cancel with multiple keys (RespectField K)
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-21\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-22\\\",\\n        //HalfStart, HalfEnd are mandatory when cancelling with multiple keys\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        //C = cancel\\n        \\\"ApprovalStatus\\\": \\\"C\\\",\\n        \\\"Remarks\\\": \\\"Cancelled in the HR system\\\"\\n    }\\n  ]\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Legacy - Cancel with multiple keys (RespectField K)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"Data\": [
    {
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"HK_AL\",
        \"DateStart\": \"2026-12-21\",
        \"DateEnd\": \"2026-12-22\",
        //HalfStart, HalfEnd are mandatory when cancelling with multiple keys
        \"HalfStart\": \"AM\",
        \"HalfEnd\": \"PM\",
        //C = cancel
        \"ApprovalStatus\": \"C\",
        \"Remarks\": \"Cancelled in the HR system\"
    }
  ]
}" as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")! 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()
```

### Legacy - Create with multiple keys (RespectField K)

**Request**

```json
"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  //RespectField omitted = K: the request is identified by EmployeeCode + LeaveCode + DateStart + DateEnd\n  \"Data\": [\n    {\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"HK_AL\",\n        \"DateStart\": \"2026-12-21\",\n        \"DateEnd\": \"2026-12-22\",\n        \"HalfStart\": \"AM\",\n        \"HalfEnd\": \"PM\",\n        \"Remarks\": \"Annual leave booked by the HR system\"\n    }\n  ]\n}"
```

**Response**

```json
{
  "data": {
    "key": "EmployeeCode;LeaveCode;DateStart;DateEnd",
    "validRecords": [
      {
        "key": "000004;HK_AL;2026-12-21;2026-12-22",
        "message": "Added"
      }
    ],
    "invalidRecords": []
  },
  "errors": [],
  "messages": [
    "1 record(s) imported."
  ]
}
```

**SDK Code**

```python Legacy - Create with multiple keys (RespectField K)
import requests

url = "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

payload = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  //RespectField omitted = K: the request is identified by EmployeeCode + LeaveCode + DateStart + DateEnd
  \"Data\": [
    {
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"HK_AL\",
        \"DateStart\": \"2026-12-21\",
        \"DateEnd\": \"2026-12-22\",
        \"HalfStart\": \"AM\",
        \"HalfEnd\": \"PM\",
        \"Remarks\": \"Annual leave booked by the HR system\"
    }
  ]
}"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Legacy - Create with multiple keys (RespectField K)
const url = 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  //RespectField omitted = K: the request is identified by EmployeeCode + LeaveCode + DateStart + DateEnd\n  \"Data\": [\n    {\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"HK_AL\",\n        \"DateStart\": \"2026-12-21\",\n        \"DateEnd\": \"2026-12-22\",\n        \"HalfStart\": \"AM\",\n        \"HalfEnd\": \"PM\",\n        \"Remarks\": \"Annual leave booked by the HR system\"\n    }\n  ]\n}"'
};

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

```go Legacy - Create with multiple keys (RespectField K)
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

	payload := strings.NewReader("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  //RespectField omitted = K: the request is identified by EmployeeCode + LeaveCode + DateStart + DateEnd\\n  \\\"Data\\\": [\\n    {\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-21\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-22\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"Remarks\\\": \\\"Annual leave booked by the HR system\\\"\\n    }\\n  ]\\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 Legacy - Create with multiple keys (RespectField K)
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")

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  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  //RespectField omitted = K: the request is identified by EmployeeCode + LeaveCode + DateStart + DateEnd\\n  \\\"Data\\\": [\\n    {\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-21\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-22\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"Remarks\\\": \\\"Annual leave booked by the HR system\\\"\\n    }\\n  ]\\n}\""

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

```java Legacy - Create with multiple keys (RespectField K)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  //RespectField omitted = K: the request is identified by EmployeeCode + LeaveCode + DateStart + DateEnd\\n  \\\"Data\\\": [\\n    {\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-21\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-22\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"Remarks\\\": \\\"Annual leave booked by the HR system\\\"\\n    }\\n  ]\\n}\"")
  .asString();
```

```php Legacy - Create with multiple keys (RespectField K)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90', [
  'body' => '"{\\n  \\"InterfaceCode\\": \\"BIPO-LVR\\",\\n  //RespectField omitted = K: the request is identified by EmployeeCode + LeaveCode + DateStart + DateEnd\\n  \\"Data\\": [\\n    {\\n        \\"EmployeeCode\\": \\"000004\\",\\n        \\"LeaveCode\\": \\"HK_AL\\",\\n        \\"DateStart\\": \\"2026-12-21\\",\\n        \\"DateEnd\\": \\"2026-12-22\\",\\n        \\"HalfStart\\": \\"AM\\",\\n        \\"HalfEnd\\": \\"PM\\",\\n        \\"Remarks\\": \\"Annual leave booked by the HR system\\"\\n    }\\n  ]\\n}"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Legacy - Create with multiple keys (RespectField K)
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  //RespectField omitted = K: the request is identified by EmployeeCode + LeaveCode + DateStart + DateEnd\\n  \\\"Data\\\": [\\n    {\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-21\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-22\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"Remarks\\\": \\\"Annual leave booked by the HR system\\\"\\n    }\\n  ]\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Legacy - Create with multiple keys (RespectField K)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  //RespectField omitted = K: the request is identified by EmployeeCode + LeaveCode + DateStart + DateEnd
  \"Data\": [
    {
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"HK_AL\",
        \"DateStart\": \"2026-12-21\",
        \"DateEnd\": \"2026-12-22\",
        \"HalfStart\": \"AM\",
        \"HalfEnd\": \"PM\",
        \"Remarks\": \"Annual leave booked by the HR system\"
    }
  ]
}" as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")! 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()
```

### Approve leave request waiting for approval (Recommended)

**Request**

```json
"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        \"RecordID\": \"d6364b04-d8bb-f111-84c3-06540fc8457d\",\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"HK_AL\"\n        //Leave ApprovalStatus out. The request is approved as the API user, who needs write access to the employee.\n    }\n  ]\n}"
```

**Response**

```json
{
  "data": {
    "key": "RecordID",
    "validRecords": [
      {
        "key": "d6364b04-d8bb-f111-84c3-06540fc8457d",
        "message": "Record has been approved."
      }
    ],
    "invalidRecords": []
  },
  "errors": [],
  "messages": [
    "1 record(s) imported."
  ]
}
```

**SDK Code**

```python Approve leave request waiting for approval (Recommended)
import requests

url = "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

payload = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        \"RecordID\": \"d6364b04-d8bb-f111-84c3-06540fc8457d\",
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"HK_AL\"
        //Leave ApprovalStatus out. The request is approved as the API user, who needs write access to the employee.
    }
  ]
}"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Approve leave request waiting for approval (Recommended)
const url = 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        \"RecordID\": \"d6364b04-d8bb-f111-84c3-06540fc8457d\",\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"HK_AL\"\n        //Leave ApprovalStatus out. The request is approved as the API user, who needs write access to the employee.\n    }\n  ]\n}"'
};

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

```go Approve leave request waiting for approval (Recommended)
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

	payload := strings.NewReader("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"RecordID\\\": \\\"d6364b04-d8bb-f111-84c3-06540fc8457d\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\"\\n        //Leave ApprovalStatus out. The request is approved as the API user, who needs write access to the employee.\\n    }\\n  ]\\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 Approve leave request waiting for approval (Recommended)
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")

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  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"RecordID\\\": \\\"d6364b04-d8bb-f111-84c3-06540fc8457d\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\"\\n        //Leave ApprovalStatus out. The request is approved as the API user, who needs write access to the employee.\\n    }\\n  ]\\n}\""

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

```java Approve leave request waiting for approval (Recommended)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"RecordID\\\": \\\"d6364b04-d8bb-f111-84c3-06540fc8457d\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\"\\n        //Leave ApprovalStatus out. The request is approved as the API user, who needs write access to the employee.\\n    }\\n  ]\\n}\"")
  .asString();
```

```php Approve leave request waiting for approval (Recommended)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90', [
  'body' => '"{\\n  \\"InterfaceCode\\": \\"BIPO-LVR\\",\\n  \\"RespectField\\": \\"R\\",\\n  \\"Data\\": [\\n    {\\n        \\"RecordID\\": \\"d6364b04-d8bb-f111-84c3-06540fc8457d\\",\\n        \\"EmployeeCode\\": \\"000004\\",\\n        \\"LeaveCode\\": \\"HK_AL\\"\\n        //Leave ApprovalStatus out. The request is approved as the API user, who needs write access to the employee.\\n    }\\n  ]\\n}"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Approve leave request waiting for approval (Recommended)
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"RecordID\\\": \\\"d6364b04-d8bb-f111-84c3-06540fc8457d\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\"\\n        //Leave ApprovalStatus out. The request is approved as the API user, who needs write access to the employee.\\n    }\\n  ]\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Approve leave request waiting for approval (Recommended)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        \"RecordID\": \"d6364b04-d8bb-f111-84c3-06540fc8457d\",
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"HK_AL\"
        //Leave ApprovalStatus out. The request is approved as the API user, who needs write access to the employee.
    }
  ]
}" as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")! 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()
```

### Error - half day missing when cancelling with multiple keys

**Request**

```json
"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"Data\": [\n    {\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"HK_AL\",\n        \"DateStart\": \"2026-12-21\",\n        \"DateEnd\": \"2026-12-22\",\n        //HalfStart and HalfEnd left out\n        \"ApprovalStatus\": \"C\"\n    }\n  ]\n}"
```

**Response**

```json
{
  "data": {
    "key": "EmployeeCode;LeaveCode;DateStart;DateEnd",
    "validRecords": [],
    "invalidRecords": [
      {
        "errorMessage": "Mandatory Half Start must not be empty.",
        "key": "000004;HK_AL;2026-12-21;2026-12-22"
      }
    ]
  },
  "errors": [
    "0 record(s) imported. 1 failed record(s)."
  ],
  "messages": []
}
```

**SDK Code**

```python Error - half day missing when cancelling with multiple keys
import requests

url = "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

payload = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"Data\": [
    {
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"HK_AL\",
        \"DateStart\": \"2026-12-21\",
        \"DateEnd\": \"2026-12-22\",
        //HalfStart and HalfEnd left out
        \"ApprovalStatus\": \"C\"
    }
  ]
}"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Error - half day missing when cancelling with multiple keys
const url = 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"Data\": [\n    {\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"HK_AL\",\n        \"DateStart\": \"2026-12-21\",\n        \"DateEnd\": \"2026-12-22\",\n        //HalfStart and HalfEnd left out\n        \"ApprovalStatus\": \"C\"\n    }\n  ]\n}"'
};

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

```go Error - half day missing when cancelling with multiple keys
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

	payload := strings.NewReader("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-21\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-22\\\",\\n        //HalfStart and HalfEnd left out\\n        \\\"ApprovalStatus\\\": \\\"C\\\"\\n    }\\n  ]\\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 Error - half day missing when cancelling with multiple keys
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")

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  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-21\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-22\\\",\\n        //HalfStart and HalfEnd left out\\n        \\\"ApprovalStatus\\\": \\\"C\\\"\\n    }\\n  ]\\n}\""

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

```java Error - half day missing when cancelling with multiple keys
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-21\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-22\\\",\\n        //HalfStart and HalfEnd left out\\n        \\\"ApprovalStatus\\\": \\\"C\\\"\\n    }\\n  ]\\n}\"")
  .asString();
```

```php Error - half day missing when cancelling with multiple keys
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90', [
  'body' => '"{\\n  \\"InterfaceCode\\": \\"BIPO-LVR\\",\\n  \\"Data\\": [\\n    {\\n        \\"EmployeeCode\\": \\"000004\\",\\n        \\"LeaveCode\\": \\"HK_AL\\",\\n        \\"DateStart\\": \\"2026-12-21\\",\\n        \\"DateEnd\\": \\"2026-12-22\\",\\n        //HalfStart and HalfEnd left out\\n        \\"ApprovalStatus\\": \\"C\\"\\n    }\\n  ]\\n}"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Error - half day missing when cancelling with multiple keys
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"Data\\\": [\\n    {\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-21\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-22\\\",\\n        //HalfStart and HalfEnd left out\\n        \\\"ApprovalStatus\\\": \\\"C\\\"\\n    }\\n  ]\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Error - half day missing when cancelling with multiple keys
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"Data\": [
    {
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"HK_AL\",
        \"DateStart\": \"2026-12-21\",
        \"DateEnd\": \"2026-12-22\",
        //HalfStart and HalfEnd left out
        \"ApprovalStatus\": \"C\"
    }
  ]
}" as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")! 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()
```

### Sync a leave request from an external system (ExternalRequestID)

**Request**

```json
"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        //Your own leave reference number. Not unique in BIPO, so keep the returned RecordID next to it.\n        \"ExternalRequestID\": \"EXT-LV-2026-0001\",\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"HK_AL\",\n        \"DateStart\": \"2026-12-16\",\n        \"DateEnd\": \"2026-12-16\",\n        \"HalfStart\": \"AM\",\n        \"HalfEnd\": \"PM\",\n        \"Remarks\": \"Synced from external leave system\"\n    }\n  ]\n}"
```

**Response**

```json
{
  "data": {
    "key": "RecordID",
    "validRecords": [
      {
        "key": "da899677-d1bb-f111-84c3-06540fc8457d",
        "message": "Added"
      }
    ],
    "invalidRecords": []
  },
  "errors": [],
  "messages": [
    "1 record(s) imported."
  ]
}
```

**SDK Code**

```python Sync a leave request from an external system (ExternalRequestID)
import requests

url = "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

payload = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        //Your own leave reference number. Not unique in BIPO, so keep the returned RecordID next to it.
        \"ExternalRequestID\": \"EXT-LV-2026-0001\",
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"HK_AL\",
        \"DateStart\": \"2026-12-16\",
        \"DateEnd\": \"2026-12-16\",
        \"HalfStart\": \"AM\",
        \"HalfEnd\": \"PM\",
        \"Remarks\": \"Synced from external leave system\"
    }
  ]
}"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Sync a leave request from an external system (ExternalRequestID)
const url = 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '"{\n  \"InterfaceCode\": \"BIPO-LVR\",\n  \"RespectField\": \"R\",\n  \"Data\": [\n    {\n        //Your own leave reference number. Not unique in BIPO, so keep the returned RecordID next to it.\n        \"ExternalRequestID\": \"EXT-LV-2026-0001\",\n        \"EmployeeCode\": \"000004\",\n        \"LeaveCode\": \"HK_AL\",\n        \"DateStart\": \"2026-12-16\",\n        \"DateEnd\": \"2026-12-16\",\n        \"HalfStart\": \"AM\",\n        \"HalfEnd\": \"PM\",\n        \"Remarks\": \"Synced from external leave system\"\n    }\n  ]\n}"'
};

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

```go Sync a leave request from an external system (ExternalRequestID)
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90"

	payload := strings.NewReader("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //Your own leave reference number. Not unique in BIPO, so keep the returned RecordID next to it.\\n        \\\"ExternalRequestID\\\": \\\"EXT-LV-2026-0001\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-16\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-16\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"Remarks\\\": \\\"Synced from external leave system\\\"\\n    }\\n  ]\\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 Sync a leave request from an external system (ExternalRequestID)
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")

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  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //Your own leave reference number. Not unique in BIPO, so keep the returned RecordID next to it.\\n        \\\"ExternalRequestID\\\": \\\"EXT-LV-2026-0001\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-16\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-16\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"Remarks\\\": \\\"Synced from external leave system\\\"\\n    }\\n  ]\\n}\""

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

```java Sync a leave request from an external system (ExternalRequestID)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //Your own leave reference number. Not unique in BIPO, so keep the returned RecordID next to it.\\n        \\\"ExternalRequestID\\\": \\\"EXT-LV-2026-0001\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-16\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-16\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"Remarks\\\": \\\"Synced from external leave system\\\"\\n    }\\n  ]\\n}\"")
  .asString();
```

```php Sync a leave request from an external system (ExternalRequestID)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90', [
  'body' => '"{\\n  \\"InterfaceCode\\": \\"BIPO-LVR\\",\\n  \\"RespectField\\": \\"R\\",\\n  \\"Data\\": [\\n    {\\n        //Your own leave reference number. Not unique in BIPO, so keep the returned RecordID next to it.\\n        \\"ExternalRequestID\\": \\"EXT-LV-2026-0001\\",\\n        \\"EmployeeCode\\": \\"000004\\",\\n        \\"LeaveCode\\": \\"HK_AL\\",\\n        \\"DateStart\\": \\"2026-12-16\\",\\n        \\"DateEnd\\": \\"2026-12-16\\",\\n        \\"HalfStart\\": \\"AM\\",\\n        \\"HalfEnd\\": \\"PM\\",\\n        \\"Remarks\\": \\"Synced from external leave system\\"\\n    }\\n  ]\\n}"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Sync a leave request from an external system (ExternalRequestID)
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-LVR\\\",\\n  \\\"RespectField\\\": \\\"R\\\",\\n  \\\"Data\\\": [\\n    {\\n        //Your own leave reference number. Not unique in BIPO, so keep the returned RecordID next to it.\\n        \\\"ExternalRequestID\\\": \\\"EXT-LV-2026-0001\\\",\\n        \\\"EmployeeCode\\\": \\\"000004\\\",\\n        \\\"LeaveCode\\\": \\\"HK_AL\\\",\\n        \\\"DateStart\\\": \\\"2026-12-16\\\",\\n        \\\"DateEnd\\\": \\\"2026-12-16\\\",\\n        \\\"HalfStart\\\": \\\"AM\\\",\\n        \\\"HalfEnd\\\": \\\"PM\\\",\\n        \\\"Remarks\\\": \\\"Synced from external leave system\\\"\\n    }\\n  ]\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Sync a leave request from an external system (ExternalRequestID)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = "{
  \"InterfaceCode\": \"BIPO-LVR\",
  \"RespectField\": \"R\",
  \"Data\": [
    {
        //Your own leave reference number. Not unique in BIPO, so keep the returned RecordID next to it.
        \"ExternalRequestID\": \"EXT-LV-2026-0001\",
        \"EmployeeCode\": \"000004\",
        \"LeaveCode\": \"HK_AL\",
        \"DateStart\": \"2026-12-16\",
        \"DateEnd\": \"2026-12-16\",
        \"HalfStart\": \"AM\",
        \"HalfEnd\": \"PM\",
        \"Remarks\": \"Synced from external leave system\"
    }
  ]
}" as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/intapi/Interface/Import#postIntapiInterfaceImport90")! 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()
```