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

# Fetch Vouchers API

GET https://heimdall.eka.io/apis/external/voucher/getVouchers

### Fetch Vouchers API

This API endpoint makes an HTTP GET request to retrieve vouchers from Dice.

### Request Parameters

| **Params**  | **Required** | **Description**                                                                                                                                                             |
| ----------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| start\_date | Mandatory    | Date filter, from which date the voucher needs to be fetched.    Format - **dd-MM-yyyy**                                                                                    |
| end\_date   | Mandatory    | Date filter, till which date the voucher need to be fetched.    Format - **dd-MM-yyyy**                                                                                     |
| offset      | Mandatory    | Page Number                                                                                                                                                                 |
| pageSize    | Optional     | Number of vouchers to be fetched in a single page. Value cannot be greater than 5000.    If not provided along with the request then default value will be 1000 considered. |

#### Example

```
{{host}}/apis/external/voucher/getVouchers?offset=0&pageSize=1000&start_date=01-06-2023&end_date=30-12-2023

```

### Response

The response returns a status code of 200 along with a JSON object containing an array of vouchers and additional metadata.

#### Response Object

* `vouchers` (array): Contains the list of vouchers with various details such as ID, employee information, currency, amounts, status, and other attributes.
* `total` (integer): Represents the total number of vouchers available.
* `currentPage` (integer): Indicates the current page number.
* `totalPages` (integer): Specifies the total number of pages based on the pageSize.

The `vouchers` array includes objects with details about each voucher, including ID, employee information, currency, amounts, status, transaction details, creation and update timestamps, and additional attributes.

Each voucher object also includes a `forms` array, which contains key-value pairs representing the form data associated with the voucher.

#### Example Response

```json
{
    "vouchers": [
        {
            "id": 0,
            "voucherId": "",
            "employee": {
                "id": 0,
                "code": "",
                "name": "",
                "email": "",
                "office": "",
                "department": "",
                "team": ""
            },
            "currency": "",
            "initialAmount": 0,
            "totalAmount": 0,
            "approvedAt": 0,
            "claimedAmount": 0,
            "pettyAmount": 0,
            "size": 0,
            "voucherStatus": "",
            "initialTxns": [""],
            "currentTxns": [""],
            "createdAt": 0,
            "updatedAt": 0,
            "attrs": {
                "approved": "",
                "auto": "",
                "reimbursed": "",
                "created": "",
                "settlement_ledger_id": "",
                "admin": "",
                "title": "",
                "type": ""
            },
            "forms": [
                {
                    "key": "",
                    "id": "",
                    "value": ""
                }
            ]
        }
    ],
    "total": 0,
    "currentPage": 0,
    "totalPages": 0
}

```

Reference: https://open-api-docs.dice.tech/dice-standardized-ap-is-v-2-copy/voucher/fetch-vouchers-api

## Servers

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

## Request

### Query parameters

- `offset` (integer, optional)
- `pageSize` (integer, optional)
- `start_date` (string, optional)
- `end_date` (string, optional)

### Headers

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

## Response

### 200

OK

- `vouchers` (list of object, required)
  - `id` (integer, required)
  - `voucherId` (string, required)
  - `employee` (object, required)
    - `id` (integer, required)
    - `code` (string, required)
    - `name` (string, required)
    - `email` (string, required)
    - `office` (string, required)
    - `department` (string, required)
    - `team` (string, required)
  - `currency` (string, required)
  - `initialAmount` (integer, required)
  - `totalAmount` (integer, required)
  - `approvedAt` (integer, required)
  - `claimedAmount` (integer, required)
  - `pettyAmount` (integer, required)
  - `size` (integer, required)
  - `voucherStatus` (string, required)
  - `initialTxns` (list of string, required)
  - `currentTxns` (list of string, required)
  - `createdAt` (integer, required)
  - `updatedAt` (integer, required)
  - `attrs` (object, required)
    - `approved` (string, required)
    - `auto` (string, required)
    - `reimbursed` (string, required)
    - `created` (string, required)
    - `settlement_ledger_id` (string, required)
    - `admin` (string, required)
    - `title` (string, required)
    - `type` (string, required)
  - `forms` (list of object, required)
    - `key` (string, required)
    - `id` (string, required)
    - `value` (string, required)
- `total` (integer, required)
- `currentPage` (integer, required)
- `totalPages` (integer, required)

## Examples

**Response**

```json
{
  "vouchers": [
    {
      "id": 1798509,
      "voucherId": "V-INDIAN-000000462",
      "employee": {
        "id": 17255,
        "code": "0003",
        "name": "Satakshi Apte",
        "email": "vibhuti.old@buildrun.app",
        "office": "HI_KARAN",
        "department": "DMan_Sales-2",
        "team": "Sales"
      },
      "currency": "INR",
      "initialAmount": 250,
      "totalAmount": 250,
      "approvedAt": 1685433391233,
      "claimedAmount": 250,
      "pettyAmount": 0,
      "size": 1,
      "voucherStatus": "REIMBURSED",
      "initialTxns": [
        "O-INDIAN-0000051"
      ],
      "currentTxns": [
        "O-INDIAN-0000051"
      ],
      "createdAt": 1685433391201,
      "updatedAt": 1694421504015,
      "attrs": {
        "approved": "1685433391233",
        "auto": "yes",
        "reimbursed": "1694421504015",
        "created": "1685433391197",
        "settlement_ledger_id": "LEDGER-INDIAN-000000739",
        "admin": "karanshrm44@gmail.com",
        "title": "tyu",
        "type": "Yash Testing 2"
      },
      "forms": [
        {
          "key": "reason",
          "id": "na",
          "value": "tyj"
        },
        {
          "key": "Voucher Type",
          "id": "",
          "value": "Yash Testing 2"
        }
      ]
    },
    {
      "id": 2171459,
      "voucherId": "V-INDIAN-000000594",
      "employee": {
        "id": 282674,
        "code": "001",
        "name": "Yash Rahate",
        "email": "testuserrr3@yopmail.com",
        "office": "YASH Technologies",
        "department": "IT",
        "team": "Developer"
      },
      "currency": "INR",
      "initialAmount": 6276,
      "totalAmount": 6276,
      "approvedAt": 1693218740000,
      "claimedAmount": 1876,
      "pettyAmount": 0,
      "size": 4,
      "voucherStatus": "REIMBURSED",
      "initialTxns": [
        "O-INDIAN-000001474",
        "O-INDIAN-000001475",
        "O-INDIAN-000001476",
        "O-INDIAN-000000790"
      ],
      "currentTxns": [
        "O-INDIAN-000001474",
        "O-INDIAN-000001475",
        "O-INDIAN-000001476",
        "O-INDIAN-000000790"
      ],
      "createdAt": 1693218739957,
      "updatedAt": 1694421499599,
      "attrs": {
        "approved": "1693218740000",
        "auto": "yes",
        "reimbursed": "1694421499599",
        "created": "1693218739951",
        "settlement_ledger_id": "LEDGER-INDIAN-000000738",
        "admin": "karanshrm44@gmail.com",
        "title": "Test notif",
        "type": "two",
        "tqwo": "Fg"
      },
      "forms": [
        {
          "key": "two",
          "id": "tqwo",
          "value": "Fg"
        },
        {
          "key": "Voucher Type",
          "id": "",
          "value": "two"
        }
      ]
    },
    {
      "id": 2479573,
      "voucherId": "V-INDIAN-000000700",
      "employee": {
        "id": 17256,
        "code": "0004",
        "name": "Kaushal Rai",
        "email": "srinivas12@yopmail.com",
        "office": "Bangalore",
        "department": "Basic",
        "team": "Level A"
      },
      "currency": "INR",
      "initialAmount": 100,
      "totalAmount": 100,
      "approvedAt": 1698744705848,
      "claimedAmount": 100,
      "pettyAmount": 0,
      "size": 1,
      "voucherStatus": "REIMBURSED",
      "initialTxns": [
        "O-INDIAN-000001683"
      ],
      "currentTxns": [
        "O-INDIAN-000001683"
      ],
      "createdAt": 1698744705833,
      "updatedAt": 1698745052838,
      "attrs": {
        "approved": "1698744705848",
        "auto": "yes",
        "reimbursed": "1698745052838",
        "created": "1698744705828",
        "settlement_ledger_id": "LEDGER-INDIAN-000000875",
        "admin": "karanshrm44@gmail.com",
        "title": "Reimburse",
        "type": "fdsafdsa"
      },
      "forms": [
        {
          "key": "Voucher Type",
          "id": "",
          "value": "fdsafdsa"
        }
      ]
    },
    {
      "id": 2518005,
      "voucherId": "V-INDIAN-000000717",
      "employee": {
        "id": 17256,
        "code": "0004",
        "name": "Kaushal Rai",
        "email": "srinivas12@yopmail.com",
        "office": "Bangalore",
        "department": "Basic",
        "team": "Level A"
      },
      "currency": "INR",
      "initialAmount": 2000,
      "totalAmount": 2000,
      "approvedAt": 1699269004976,
      "claimedAmount": 2000,
      "pettyAmount": 0,
      "size": 1,
      "voucherStatus": "REIMBURSED",
      "initialTxns": [
        "O-INDIAN-000001682"
      ],
      "currentTxns": [
        "O-INDIAN-000001682"
      ],
      "createdAt": 1699269004926,
      "updatedAt": 1699270417550,
      "attrs": {
        "approved": "1699269004976",
        "auto": "yes",
        "reimbursed": "1699269598735",
        "created": "1699269004914",
        "settlement_ledger_id": "LEDGER-INDIAN-000000886",
        "admin": "karanshrm44@gmail.com",
        "title": "test c clarification",
        "type": "fdsfafsda"
      },
      "forms": [
        {
          "key": "Voucher Type",
          "id": "",
          "value": "fdsfafsda"
        }
      ]
    },
    {
      "id": 2522843,
      "voucherId": "V-INDIAN-000000718",
      "employee": {
        "id": 17256,
        "code": "0004",
        "name": "Kaushal Rai",
        "email": "srinivas12@yopmail.com",
        "office": "Bangalore",
        "department": "Basic",
        "team": "Level A"
      },
      "currency": "INR",
      "initialAmount": 4500,
      "totalAmount": 4500,
      "approvedAt": 1699336710325,
      "claimedAmount": 4500,
      "pettyAmount": 0,
      "size": 1,
      "voucherStatus": "REIMBURSED",
      "initialTxns": [
        "O-INDIAN-000001701"
      ],
      "currentTxns": [
        "O-INDIAN-000001701"
      ],
      "createdAt": 1699336433608,
      "updatedAt": 1699337872839,
      "attrs": {
        "approved": "1699336710325",
        "auto": "string",
        "reimbursed": "1699337872839",
        "created": "1699336433594",
        "settlement_ledger_id": "LEDGER-INDIAN-000000887",
        "admin": "karanshrm44@gmail.com",
        "title": "voucher seek clarification",
        "type": "fdsfafsda"
      },
      "forms": [
        {
          "key": "Voucher Type",
          "id": "",
          "value": "fdsfafsda"
        }
      ]
    },
    {
      "id": 2524297,
      "voucherId": "V-INDIAN-000000725",
      "employee": {
        "id": 445840,
        "code": "0009",
        "name": "Milind Verma",
        "email": "milindv814@gmail.com",
        "office": "Bhilai",
        "department": "Dev&QA",
        "team": "Dev"
      },
      "currency": "INR",
      "initialAmount": 100,
      "totalAmount": 100,
      "approvedAt": 1699351046528,
      "claimedAmount": 100,
      "pettyAmount": 0,
      "size": 1,
      "voucherStatus": "REIMBURSED",
      "initialTxns": [
        "O-INDIAN-000001699"
      ],
      "currentTxns": [
        "O-INDIAN-000001699"
      ],
      "createdAt": 1699351046482,
      "updatedAt": 1699435976738,
      "attrs": {
        "approved": "1699351046528",
        "auto": "yes",
        "reimbursed": "1699435976738",
        "created": "1699351046460",
        "settlement_ledger_id": "LEDGER-INDIAN-000000899",
        "admin": "karanshrm44@gmail.com",
        "title": "milinf-test",
        "type": "fdsfafsda"
      },
      "forms": [
        {
          "key": "Voucher Type",
          "id": "",
          "value": "fdsfafsda"
        }
      ]
    },
    {
      "id": 2529852,
      "voucherId": "V-INDIAN-000000727",
      "employee": {
        "id": 17256,
        "code": "0004",
        "name": "Kaushal Rai",
        "email": "srinivas12@yopmail.com",
        "office": "Bangalore",
        "department": "Basic",
        "team": "Level A"
      },
      "currency": "INR",
      "initialAmount": 975,
      "totalAmount": 975,
      "approvedAt": 1699426708526,
      "claimedAmount": 850,
      "pettyAmount": 0,
      "size": 1,
      "voucherStatus": "REIMBURSED",
      "initialTxns": [
        "O-INDIAN-000001656-SPT-2"
      ],
      "currentTxns": [
        "O-INDIAN-000001656-SPT-2"
      ],
      "createdAt": 1699426399914,
      "updatedAt": 1699426807811,
      "attrs": {
        "approved": "1699426708526",
        "auto": "string",
        "reimbursed": "1699426807811",
        "created": "1699426399904",
        "settlement_ledger_id": "LEDGER-INDIAN-000000895",
        "admin": "karanshrm44@gmail.com",
        "title": "test voucher title edit",
        "type": "fdsfafsda"
      },
      "forms": [
        {
          "key": "Voucher Type",
          "id": "",
          "value": "fdsfafsda"
        }
      ]
    },
    {
      "id": 2560756,
      "voucherId": "V-INDIAN-000000738",
      "employee": {
        "id": 17253,
        "code": "0001",
        "name": "karanss kumar",
        "email": "testuser3@antrepriz.com",
        "office": "Mumbaij",
        "department": "Basic",
        "team": "Level A"
      },
      "currency": "INR",
      "initialAmount": 1,
      "totalAmount": 1,
      "approvedAt": 1699883602392,
      "claimedAmount": 0,
      "pettyAmount": 0,
      "size": 1,
      "voucherStatus": "REIMBURSED",
      "initialTxns": [
        "AQ-INDIAN-000001668"
      ],
      "currentTxns": [
        "AQ-INDIAN-000001668"
      ],
      "createdAt": 1699883602361,
      "updatedAt": 1701249600070,
      "attrs": {
        "approved": "1699883602392",
        "auto": "yes",
        "reimbursed": "1701249600070",
        "created": "1699883602350",
        "settlement_ledger_id": "LEDGER-INDIAN-000000921",
        "admin": "karanshrm44@gmail.com",
        "title": "fds",
        "type": "fdsfafsda"
      },
      "forms": [
        {
          "key": "Voucher Type",
          "id": "",
          "value": "fdsfafsda"
        }
      ]
    },
    {
      "id": 2590111,
      "voucherId": "V-INDIAN-000000755",
      "employee": {
        "id": 17256,
        "code": "0004",
        "name": "Kaushal Rai",
        "email": "srinivas12@yopmail.com",
        "office": "Bangalore",
        "department": "Basic",
        "team": "Level A"
      },
      "currency": "INR",
      "initialAmount": 142,
      "totalAmount": 142,
      "approvedAt": 1700465148388,
      "claimedAmount": 142,
      "pettyAmount": 0,
      "size": 1,
      "voucherStatus": "REIMBURSED",
      "initialTxns": [
        "O-INDIAN-000001063-SPT-2"
      ],
      "currentTxns": [
        "O-INDIAN-000001063-SPT-2"
      ],
      "createdAt": 1700465070282,
      "updatedAt": 1700465309026,
      "attrs": {
        "approved": "1700465148388",
        "auto": "string",
        "reimbursed": "1700465309022",
        "created": "1700465070272",
        "settlement_ledger_id": "LEDGER-INDIAN-000000919",
        "admin": "karanshrm44@gmail.com",
        "title": "test vou sri",
        "type": "fdsfafsda"
      },
      "forms": [
        {
          "key": "Voucher Type",
          "id": "",
          "value": "fdsfafsda"
        }
      ]
    },
    {
      "id": 2665061,
      "voucherId": "V-INDIAN-000000794",
      "employee": {
        "id": 17256,
        "code": "0004",
        "name": "Kaushal Rai",
        "email": "srinivas12@yopmail.com",
        "office": "Bangalore",
        "department": "Basic",
        "team": "Level A"
      },
      "currency": "INR",
      "initialAmount": 1001,
      "totalAmount": 1001,
      "approvedAt": 1701425877096,
      "claimedAmount": 1001,
      "pettyAmount": 0,
      "size": 1,
      "voucherStatus": "REIMBURSED",
      "initialTxns": [
        "O-INDIAN-000001767"
      ],
      "currentTxns": [
        "O-INDIAN-000001767"
      ],
      "createdAt": 1701423589965,
      "updatedAt": 1701426060647,
      "attrs": {
        "approved": "1701425877096",
        "auto": "string",
        "reimbursed": "1701426060647",
        "created": "1701423589956",
        "settlement_ledger_id": "LEDGER-INDIAN-000000928",
        "admin": "karanshrm44@gmail.com",
        "title": "sdcsd",
        "type": "fdsfafsda"
      },
      "forms": [
        {
          "key": "Voucher Type",
          "id": "",
          "value": "fdsfafsda"
        }
      ]
    },
    {
      "id": 2680340,
      "voucherId": "V-INDIAN-000000796",
      "employee": {
        "id": 17256,
        "code": "0004",
        "name": "Kaushal Rai",
        "email": "srinivas12@yopmail.com",
        "office": "Bangalore",
        "department": "Basic",
        "team": "Level A"
      },
      "currency": "INR",
      "initialAmount": 1,
      "totalAmount": 1,
      "approvedAt": 1701681107504,
      "claimedAmount": 1,
      "pettyAmount": 0,
      "size": 1,
      "voucherStatus": "REIMBURSED",
      "initialTxns": [
        "O-INDIAN-000001772"
      ],
      "currentTxns": [
        "O-INDIAN-000001772"
      ],
      "createdAt": 1701680637575,
      "updatedAt": 1701681208983,
      "attrs": {
        "approved": "1701681107504",
        "auto": "string",
        "reimbursed": "1701681208983",
        "created": "1701680637565",
        "settlement_ledger_id": "LEDGER-INDIAN-000000929",
        "admin": "karanshrm44@gmail.com",
        "title": "km",
        "type": "fdsfafsda"
      },
      "forms": [
        {
          "key": "Voucher Type",
          "id": "",
          "value": "fdsfafsda"
        }
      ]
    },
    {
      "id": 2758731,
      "voucherId": "V-INDIAN-000000814",
      "employee": {
        "id": 17253,
        "code": "0001",
        "name": "karanss kumar",
        "email": "testuser3@antrepriz.com",
        "office": "Mumbaij",
        "department": "Basic",
        "team": "Level A"
      },
      "currency": "INR",
      "initialAmount": 1,
      "totalAmount": 1,
      "approvedAt": 1702902019200,
      "claimedAmount": 0,
      "pettyAmount": 0,
      "size": 1,
      "voucherStatus": "REIMBURSED",
      "initialTxns": [
        "AQ-INDIAN-000001807"
      ],
      "currentTxns": [
        "AQ-INDIAN-000001807"
      ],
      "createdAt": 1702902019177,
      "updatedAt": 1702902244023,
      "attrs": {
        "approved": "1702902019200",
        "auto": "yes",
        "reimbursed": "1702902244023",
        "created": "1702902019172",
        "settlement_ledger_id": "LEDGER-INDIAN-000000938",
        "admin": "karanshrm44@gmail.com",
        "title": "ravin",
        "type": "Yash Test "
      },
      "forms": [
        {
          "key": "Voucher Type",
          "id": "",
          "value": "Yash Test "
        }
      ]
    }
  ],
  "total": 12,
  "currentPage": 0,
  "totalPages": 1
}
```

**SDK Code**

```python Voucher_Fetch Vouchers API_example
import requests

url = "https://heimdall.eka.io/apis/external/voucher/getVouchers"

querystring = {"end_date":"30-12-2023","offset":"0","pageSize":"1000","start_date":"01-06-2023"}

headers = {
    "DICE-APP-ID": "{{Company Code}}",
    "X-CLIENT-ID": "{{API Client ID}}",
    "X-CLIENT-SECRET": "{{API Client Secret}}"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Voucher_Fetch Vouchers API_example
const url = 'https://heimdall.eka.io/apis/external/voucher/getVouchers?end_date=30-12-2023&offset=0&pageSize=1000&start_date=01-06-2023';
const options = {
  method: 'GET',
  headers: {
    'DICE-APP-ID': '{{Company Code}}',
    'X-CLIENT-ID': '{{API Client ID}}',
    'X-CLIENT-SECRET': '{{API Client Secret}}'
  }
};

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

```go Voucher_Fetch Vouchers API_example
package main

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

func main() {

	url := "https://heimdall.eka.io/apis/external/voucher/getVouchers?end_date=30-12-2023&offset=0&pageSize=1000&start_date=01-06-2023"

	req, _ := http.NewRequest("GET", url, nil)

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

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

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

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

}
```

```ruby Voucher_Fetch Vouchers API_example
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/voucher/getVouchers?end_date=30-12-2023&offset=0&pageSize=1000&start_date=01-06-2023")

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

request = Net::HTTP::Get.new(url)
request["DICE-APP-ID"] = '{{Company Code}}'
request["X-CLIENT-ID"] = '{{API Client ID}}'
request["X-CLIENT-SECRET"] = '{{API Client Secret}}'

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

```java Voucher_Fetch Vouchers API_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://heimdall.eka.io/apis/external/voucher/getVouchers?end_date=30-12-2023&offset=0&pageSize=1000&start_date=01-06-2023")
  .header("DICE-APP-ID", "{{Company Code}}")
  .header("X-CLIENT-ID", "{{API Client ID}}")
  .header("X-CLIENT-SECRET", "{{API Client Secret}}")
  .asString();
```

```php Voucher_Fetch Vouchers API_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://heimdall.eka.io/apis/external/voucher/getVouchers?end_date=30-12-2023&offset=0&pageSize=1000&start_date=01-06-2023', [
  'headers' => [
    'DICE-APP-ID' => '{{Company Code}}',
    'X-CLIENT-ID' => '{{API Client ID}}',
    'X-CLIENT-SECRET' => '{{API Client Secret}}',
  ],
]);

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

```csharp Voucher_Fetch Vouchers API_example
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/voucher/getVouchers?end_date=30-12-2023&offset=0&pageSize=1000&start_date=01-06-2023");
var request = new RestRequest(Method.GET);
request.AddHeader("DICE-APP-ID", "{{Company Code}}");
request.AddHeader("X-CLIENT-ID", "{{API Client ID}}");
request.AddHeader("X-CLIENT-SECRET", "{{API Client Secret}}");
IRestResponse response = client.Execute(request);
```

```swift Voucher_Fetch Vouchers API_example
import Foundation

let headers = [
  "DICE-APP-ID": "{{Company Code}}",
  "X-CLIENT-ID": "{{API Client ID}}",
  "X-CLIENT-SECRET": "{{API Client Secret}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://heimdall.eka.io/apis/external/voucher/getVouchers?end_date=30-12-2023&offset=0&pageSize=1000&start_date=01-06-2023")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```