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

# Daily Attendance - LIST

POST https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84
Content-Type: application/json

Extract employees' daily attendance records for a date range.

Returns one row per employee per day that has a daily attendance record — the same record shown on the Daily Attendance screen after processing. Days with no record are not returned.

**Read-only** — this interface code has no UPSERT or DELETE counterpart.

### Request fields

| Field | Type | Mandatory | Notes |
| --- | --- | --- | --- |
| `InterfaceCode` | string | **Yes** | Always `BIPO-DL` |
| `EmployeeCode` | string(16) | Conditional | One employee. Either `EmployeeCode` or `EmployeeCodes` must be sent |
| `EmployeeCodes` | array of string | Conditional | Up to **30** employees per call by default. The limit can be changed in System Configuration **Base > Interface > `DailyAttendanceAPIMaxEmployee`** (1–999). An empty array counts as not sent |
| `ClockDateFrom` | date | **Yes** | Start of range, in `yyyy-MM-dd` format, e.g. `2026-10-01` |
| `ClockDateTo` | date | **Yes** | End of range, in `yyyy-MM-dd` format. Must not be earlier than `ClockDateFrom`, and must not exceed `ClockDateFrom` + **1 calendar month** |
| `Fields` | array of string | No | The columns to return, e.g. `["EmployeeCode", "ClockDate", "ClockIn"]`. Not case-sensitive. Omit to return all fields |

### Response fields

One object per employee per day, sorted by `EmployeeCode` then `ClockDate`. With no `Fields`, every row carries all standard fields (about 375). The main ones:

| Field | Type | Notes |
| --- | --- | --- |
| `EmployeeCode` | string(16) |  |
| `ClockDate` | string | `yyyy-MM-ddT00:00:00` |
| `CalendarCode` | string | Work Calendar applied for the day |
| `ShiftCode` / `ShiftCode2` | string | Shift for the day; `ShiftCode2` on a split-shift day |
| `WorkStatus` | string | e.g. `W` work day |
| `Holiday` | string | `Y` / `N` |
| `ClockIn` / `ClockOut` | string | `HH:mm`. `null` when there is no clocking |
| `ClockTime1` … `ClockTime9` | string | Individual clock times, in order |
| `ShiftHours`, `BreakHours` | decimal | Hours |
| `WorkHoursActual`, `WorkHoursPaid` | decimal | Hours |
| `LatenessActualMinutes`, `UndertimeActualMinutes` | decimal | Minutes |
| `OTActual`, `OTAuthorised` | decimal | Overtime hours, actual and authorised |
| `Absent` | string | `Y` / `N` |
| `LeaveCode`, `LeaveHours` | string, decimal | Leave taken on the day |
| `ApprovalStatus` | string |  |
| `Locked`, `Endorsed` | number | `0` = no |
| `ProcessOn`, `LastProcessOn` | string | `yyyy-MM-ddTHH:mm:ss.fff`. When the day was last processed |
| `OT01`–`OT99`, `TE01`–`TE99`, `DFC01`–`DFC20`, `OTR01`–`OTR10` | decimal / string | Numbered fields. What each one holds depends on your site's attendance setup. |

### Errors

Business-rule rejections (missing date, missing employee, range over 1 month, too many employees, unknown parameter) return **HTTP 200** with the error message as a plain JSON string, not an object.

**Note:**

- Use `yyyy-MM-dd` for both dates. Other formats may be read differently .
    
- An employee code that does not exist returns an empty list, not an error.
    
- If both `EmployeeCode` and `EmployeeCodes` are sent, only employees in both are returned. Send one or the other.
    
- A name in `Fields` that is not a valid field is skipped without an error. If none of the names are valid, all fields are returned. Any other unknown request field is rejected.
    
- The API user must be granted interface code `BIPO-DL`.
    
- Without `Fields`, each row is large. For regular feeds, list only the fields you need.

Reference: https://developer.biposervice.com/bipo-portal/hrms-v-1/hrms-v-1-attendance/hrms-v-1-hrms-v-1-attendance-attendance/hrms-v-1-hrms-v-1-attendance-hrms-v-1-hrms-v-1-attendance-attendance-daily/daily-attendance-list

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

- `list of Api2BipoExportGetListItemPostApi2BipoexportGetlistitem84PostResponsesContentApplicationJsonSchemaItems`

## Types

### Api2BipoExportGetListItemPostApi2BipoexportGetlistitem84PostResponsesContentApplicationJsonSchemaItems

- `Absent` (string, required)
- `Locked` (integer, required)
- `ClockIn` (string, required)
- `Holiday` (string, required)
- `ClockOut` (string, required)
- `Endorsed` (integer, required)
- `OTActual` (integer, required)
- `ClockDate` (datetime, required)
- `ShiftCode` (string, required)
- `WorkStatus` (string, required)
- `CalendarCode` (string, required)
- `EmployeeCode` (string, required)
- `OTAuthorised` (integer, required)
- `LastProcessOn` (datetime, required)
- `WorkHoursPaid` (integer, required)
- `WorkHoursActual` (integer, required)
- `LatenessActualMinutes` (integer, required)
- `LeaveCode` (any, optional)

## Examples

### Daily Attendance - LIST

**Request**

```json
"{\n  \"InterfaceCode\": \"BIPO-DL\",\n  // \"EmployeeCode\": \"XG092\",   // one employee - send this or EmployeeCodes, not both\n  \"EmployeeCodes\": [\"XG092\"],   // up to 30 employees\n  \"ClockDateFrom\": \"2026-10-05\",\n  \"ClockDateTo\": \"2026-10-06\",\n  \"Fields\": [\"EmployeeCode\", \"ClockDate\", \"CalendarCode\", \"ShiftCode\", \"WorkStatus\", \"Holiday\", \"ClockIn\", \"ClockOut\", \"WorkHoursActual\", \"WorkHoursPaid\", \"LatenessActualMinutes\", \"OTActual\", \"OTAuthorised\", \"Absent\", \"LeaveCode\", \"Locked\", \"Endorsed\", \"LastProcessOn\"]\n}"
```

**Response**

```json
[
  {
    "Absent": "N",
    "Locked": 0,
    "ClockIn": "08:52",
    "Holiday": "N",
    "ClockOut": "18:07",
    "Endorsed": 0,
    "OTActual": 0,
    "ClockDate": "2026-10-05T00:00:00",
    "ShiftCode": "W1",
    "WorkStatus": "W",
    "CalendarCode": "07666495B5400000",
    "EmployeeCode": "XG092",
    "OTAuthorised": 0,
    "LastProcessOn": "2026-11-04T09:22:19.03",
    "WorkHoursPaid": 0,
    "WorkHoursActual": 0,
    "LatenessActualMinutes": 0
  },
  {
    "Absent": "N",
    "Locked": 0,
    "ClockIn": "08:47",
    "Holiday": "N",
    "ClockOut": "18:15",
    "Endorsed": 0,
    "OTActual": 0,
    "ClockDate": "2026-10-06T00:00:00",
    "ShiftCode": "W1",
    "WorkStatus": "W",
    "CalendarCode": "07666495B5400000",
    "EmployeeCode": "XG092",
    "OTAuthorised": 0,
    "LastProcessOn": "2026-11-04T09:22:37.297",
    "WorkHoursPaid": 0,
    "WorkHoursActual": 0,
    "LatenessActualMinutes": 0
  }
]
```

**SDK Code**

```python Daily Attendance - LIST
import requests

url = "https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84"

payload = "{
  \"InterfaceCode\": \"BIPO-DL\",
  // \"EmployeeCode\": \"XG092\",   // one employee - send this or EmployeeCodes, not both
  \"EmployeeCodes\": [\"XG092\"],   // up to 30 employees
  \"ClockDateFrom\": \"2026-10-05\",
  \"ClockDateTo\": \"2026-10-06\",
  \"Fields\": [\"EmployeeCode\", \"ClockDate\", \"CalendarCode\", \"ShiftCode\", \"WorkStatus\", \"Holiday\", \"ClockIn\", \"ClockOut\", \"WorkHoursActual\", \"WorkHoursPaid\", \"LatenessActualMinutes\", \"OTActual\", \"OTAuthorised\", \"Absent\", \"LeaveCode\", \"Locked\", \"Endorsed\", \"LastProcessOn\"]
}"
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Daily Attendance - LIST
const url = 'https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '"{\n  \"InterfaceCode\": \"BIPO-DL\",\n  // \"EmployeeCode\": \"XG092\",   // one employee - send this or EmployeeCodes, not both\n  \"EmployeeCodes\": [\"XG092\"],   // up to 30 employees\n  \"ClockDateFrom\": \"2026-10-05\",\n  \"ClockDateTo\": \"2026-10-06\",\n  \"Fields\": [\"EmployeeCode\", \"ClockDate\", \"CalendarCode\", \"ShiftCode\", \"WorkStatus\", \"Holiday\", \"ClockIn\", \"ClockOut\", \"WorkHoursActual\", \"WorkHoursPaid\", \"LatenessActualMinutes\", \"OTActual\", \"OTAuthorised\", \"Absent\", \"LeaveCode\", \"Locked\", \"Endorsed\", \"LastProcessOn\"]\n}"'
};

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

```go Daily Attendance - LIST
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84"

	payload := strings.NewReader("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-DL\\\",\\n  // \\\"EmployeeCode\\\": \\\"XG092\\\",   // one employee - send this or EmployeeCodes, not both\\n  \\\"EmployeeCodes\\\": [\\\"XG092\\\"],   // up to 30 employees\\n  \\\"ClockDateFrom\\\": \\\"2026-10-05\\\",\\n  \\\"ClockDateTo\\\": \\\"2026-10-06\\\",\\n  \\\"Fields\\\": [\\\"EmployeeCode\\\", \\\"ClockDate\\\", \\\"CalendarCode\\\", \\\"ShiftCode\\\", \\\"WorkStatus\\\", \\\"Holiday\\\", \\\"ClockIn\\\", \\\"ClockOut\\\", \\\"WorkHoursActual\\\", \\\"WorkHoursPaid\\\", \\\"LatenessActualMinutes\\\", \\\"OTActual\\\", \\\"OTAuthorised\\\", \\\"Absent\\\", \\\"LeaveCode\\\", \\\"Locked\\\", \\\"Endorsed\\\", \\\"LastProcessOn\\\"]\\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 Daily Attendance - LIST
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84")

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-DL\\\",\\n  // \\\"EmployeeCode\\\": \\\"XG092\\\",   // one employee - send this or EmployeeCodes, not both\\n  \\\"EmployeeCodes\\\": [\\\"XG092\\\"],   // up to 30 employees\\n  \\\"ClockDateFrom\\\": \\\"2026-10-05\\\",\\n  \\\"ClockDateTo\\\": \\\"2026-10-06\\\",\\n  \\\"Fields\\\": [\\\"EmployeeCode\\\", \\\"ClockDate\\\", \\\"CalendarCode\\\", \\\"ShiftCode\\\", \\\"WorkStatus\\\", \\\"Holiday\\\", \\\"ClockIn\\\", \\\"ClockOut\\\", \\\"WorkHoursActual\\\", \\\"WorkHoursPaid\\\", \\\"LatenessActualMinutes\\\", \\\"OTActual\\\", \\\"OTAuthorised\\\", \\\"Absent\\\", \\\"LeaveCode\\\", \\\"Locked\\\", \\\"Endorsed\\\", \\\"LastProcessOn\\\"]\\n}\""

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

```java Daily Attendance - LIST
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-DL\\\",\\n  // \\\"EmployeeCode\\\": \\\"XG092\\\",   // one employee - send this or EmployeeCodes, not both\\n  \\\"EmployeeCodes\\\": [\\\"XG092\\\"],   // up to 30 employees\\n  \\\"ClockDateFrom\\\": \\\"2026-10-05\\\",\\n  \\\"ClockDateTo\\\": \\\"2026-10-06\\\",\\n  \\\"Fields\\\": [\\\"EmployeeCode\\\", \\\"ClockDate\\\", \\\"CalendarCode\\\", \\\"ShiftCode\\\", \\\"WorkStatus\\\", \\\"Holiday\\\", \\\"ClockIn\\\", \\\"ClockOut\\\", \\\"WorkHoursActual\\\", \\\"WorkHoursPaid\\\", \\\"LatenessActualMinutes\\\", \\\"OTActual\\\", \\\"OTAuthorised\\\", \\\"Absent\\\", \\\"LeaveCode\\\", \\\"Locked\\\", \\\"Endorsed\\\", \\\"LastProcessOn\\\"]\\n}\"")
  .asString();
```

```php Daily Attendance - LIST
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84', [
  'body' => '"{\\n  \\"InterfaceCode\\": \\"BIPO-DL\\",\\n  // \\"EmployeeCode\\": \\"XG092\\",   // one employee - send this or EmployeeCodes, not both\\n  \\"EmployeeCodes\\": [\\"XG092\\"],   // up to 30 employees\\n  \\"ClockDateFrom\\": \\"2026-10-05\\",\\n  \\"ClockDateTo\\": \\"2026-10-06\\",\\n  \\"Fields\\": [\\"EmployeeCode\\", \\"ClockDate\\", \\"CalendarCode\\", \\"ShiftCode\\", \\"WorkStatus\\", \\"Holiday\\", \\"ClockIn\\", \\"ClockOut\\", \\"WorkHoursActual\\", \\"WorkHoursPaid\\", \\"LatenessActualMinutes\\", \\"OTActual\\", \\"OTAuthorised\\", \\"Absent\\", \\"LeaveCode\\", \\"Locked\\", \\"Endorsed\\", \\"LastProcessOn\\"]\\n}"',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Daily Attendance - LIST
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "\"{\\n  \\\"InterfaceCode\\\": \\\"BIPO-DL\\\",\\n  // \\\"EmployeeCode\\\": \\\"XG092\\\",   // one employee - send this or EmployeeCodes, not both\\n  \\\"EmployeeCodes\\\": [\\\"XG092\\\"],   // up to 30 employees\\n  \\\"ClockDateFrom\\\": \\\"2026-10-05\\\",\\n  \\\"ClockDateTo\\\": \\\"2026-10-06\\\",\\n  \\\"Fields\\\": [\\\"EmployeeCode\\\", \\\"ClockDate\\\", \\\"CalendarCode\\\", \\\"ShiftCode\\\", \\\"WorkStatus\\\", \\\"Holiday\\\", \\\"ClockIn\\\", \\\"ClockOut\\\", \\\"WorkHoursActual\\\", \\\"WorkHoursPaid\\\", \\\"LatenessActualMinutes\\\", \\\"OTActual\\\", \\\"OTAuthorised\\\", \\\"Absent\\\", \\\"LeaveCode\\\", \\\"Locked\\\", \\\"Endorsed\\\", \\\"LastProcessOn\\\"]\\n}\"", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Daily Attendance - LIST
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = "{
  \"InterfaceCode\": \"BIPO-DL\",
  // \"EmployeeCode\": \"XG092\",   // one employee - send this or EmployeeCodes, not both
  \"EmployeeCodes\": [\"XG092\"],   // up to 30 employees
  \"ClockDateFrom\": \"2026-10-05\",
  \"ClockDateTo\": \"2026-10-06\",
  \"Fields\": [\"EmployeeCode\", \"ClockDate\", \"CalendarCode\", \"ShiftCode\", \"WorkStatus\", \"Holiday\", \"ClockIn\", \"ClockOut\", \"WorkHoursActual\", \"WorkHoursPaid\", \"LatenessActualMinutes\", \"OTActual\", \"OTAuthorised\", \"Absent\", \"LeaveCode\", \"Locked\", \"Endorsed\", \"LastProcessOn\"]
}" as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84")! 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()
```

### Daily Attendance - LIST (Validation error: range exceeds 1 month)

**Request**

```json
"string"
```

**Response**

```json
[
  {
    "Absent": "string",
    "Locked": 1,
    "ClockIn": "string",
    "Holiday": "string",
    "ClockOut": "string",
    "Endorsed": 1,
    "OTActual": 1,
    "ClockDate": "2024-01-15T09:30:00Z",
    "ShiftCode": "string",
    "WorkStatus": "string",
    "CalendarCode": "string",
    "EmployeeCode": "string",
    "OTAuthorised": 1,
    "LastProcessOn": "2024-01-15T09:30:00Z",
    "WorkHoursPaid": 1,
    "WorkHoursActual": 1,
    "LatenessActualMinutes": 1
  }
]
```

**SDK Code**

```python Daily Attendance - LIST (Validation error: range exceeds 1 month)
import requests

url = "https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84"

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

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

print(response.json())
```

```javascript Daily Attendance - LIST (Validation error: range exceeds 1 month)
const url = 'https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84';
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 Daily Attendance - LIST (Validation error: range exceeds 1 month)
package main

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

func main() {

	url := "https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84"

	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 Daily Attendance - LIST (Validation error: range exceeds 1 month)
require 'uri'
require 'net/http'

url = URI("https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84")

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 Daily Attendance - LIST (Validation error: range exceeds 1 month)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

```php Daily Attendance - LIST (Validation error: range exceeds 1 month)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Daily Attendance - LIST (Validation error: range exceeds 1 month)
using RestSharp;

var client = new RestClient("https://server.bipocloud.com/tenant/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84");
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 Daily Attendance - LIST (Validation error: range exceeds 1 month)
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/api2/BIPOExport/GetListItem#postApi2BipoexportGetlistitem84")! 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()
```