> This page is for API Reference.

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

# Find Vouchers

GET https://api.npretail.app/{tenant}/{environment}/{company}/voucher

Search for vouchers based on customer number,email address or reference number.

Reference: https://docs.navipartner.com/apis/api-reference/vouchers/voucher/find-vouchers

## Authentication

- `x-np-api-key` header (required) — API Key authentication via header

## Request

### Path parameters

- `tenant` (string, required) — Your Entra Tenant ID. [More details.](/paths#1-tenant)
- `environment` (string, required) — Your Business Central Environment. [More details.](/paths#2-environment)
- `company` (string, required) — Your Business Central Company. [More details.](/paths#3-company)

### Query parameters

- `customerNumber` (string, optional) — Customer number associated with the voucher.
- `email` (string, optional) — the email address of the buying customer
- `referenceNo` (string, optional) — A unique reference number for the voucher

## Response

### 200

- `vouchers` (list of FindVouchersDTO, required)

## Types

### FindVouchersDTO

- `address` (string, required) — The address of the buying customer
- `address2` (string, required) — The address of the buying customer
- `allowTopUp` (boolean, required) — Indicates if value of a voucher can be increased after the initial purchase by the amount provided by the customer
- `amount` (double, required) — The amount remaining on the voucher
- `city` (string, required) — The city of the buying customer
- `countryCode` (string, required) — The country where the buying customer resides.
- `county` (string, required) — The county of the buying customer
- `description` (string, required) — A description of the voucher, usually includes Voucher Type and Voucher Number
- `email` (string, required) — the email address of the buying customer
- `endingDate` (datetime, required) — The datetime as from which the voucher is no longer valid
- `initialAmount` (double, required) — The initial amount of the voucher
- `name` (string, required) — The name of the customer who purchased the voucher
- `name2` (string, required) — Other name of the buying customer
- `open` (boolean, required) — Indicates if the voucher has a remaining amount to be used
- `phoneNo` (string, required) — The phone number of the buying customer.
- `postCode` (string, required) — The postal code of the buying customer
- `referenceNo` (string, required) — A unique reference number for the voucher
- `reservedAmount` (double, required) — The amount reserved in the voucher
- `startingDate` (datetime, required) — The datetime as from which the voucher is valid
- `voucherId` (UUID, required) — A unique identifier for the voucher
- `voucherMessage` (string, required) — indicates message on voucher
- `voucherType` (string, required) — The type of the voucher
- `voucherTypeDescription` (string, required) — A description of the voucher type
- `items` (list of VoucherPOSPaymentMethodItemsDTO, optional)

### VoucherPOSPaymentMethodItemsDTO

List of POS Payment Method Items linked to payment type of Voucher

- `Type` (string, required) — The type of the POS Payment Method Item, can be Item or Category
- `Number` (string, required) — The number of the POS Payment Method Item
- `Description` (string, required) — The description of the POS Payment Method Item

## Examples

**Response**

```json
{
  "vouchers": [
    {
      "address": "Main Building, 1st Floor",
      "address2": "1234 Main Street",
      "allowTopUp": true,
      "amount": 850,
      "city": "New York",
      "countryCode": "US",
      "county": "Manhattan",
      "description": "Credit Voucher 000002",
      "email": "john.doe@acme.com",
      "endingDate": "2024-09-17T00:00:00",
      "initialAmount": 1000,
      "name": "Spotsmeyer's Furnishings",
      "name2": "Spotsmeyer's Furnishings",
      "open": true,
      "phoneNo": "+1234567890",
      "postCode": "0011",
      "referenceNo": "2802000002460",
      "reservedAmount": 200,
      "startingDate": "2024-09-17T00:00:00",
      "voucherId": "59adfec5-eca9-47b5-b6bf-6f4222db8de8",
      "voucherMessage": "This is a voucher message",
      "voucherType": "CREDITVOUCHER",
      "voucherTypeDescription": "Credit Voucher",
      "items": [
        {
          "Type": "Item",
          "Number": "1000",
          "Description": "Bicyle"
        }
      ]
    }
  ]
}
```

**SDK Code**

```python Example list of Vouchers
import requests

url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./voucher"

querystring = {"customerNumber":"D000188","email":"john.doe@acme.com","referenceNo":"2802000002460"}

headers = {"x-np-api-key": "<NaviPartner API Key>"}

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

print(response.json())
```

```javascript Example list of Vouchers
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./voucher?customerNumber=D000188&email=john.doe%40acme.com&referenceNo=2802000002460';
const options = {method: 'GET', headers: {'x-np-api-key': '<NaviPartner API Key>'}};

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

```go Example list of Vouchers
package main

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

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./voucher?customerNumber=D000188&email=john.doe%40acme.com&referenceNo=2802000002460"

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

	req.Header.Add("x-np-api-key", "<NaviPartner API Key>")

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

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

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

}
```

```ruby Example list of Vouchers
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./voucher?customerNumber=D000188&email=john.doe%40acme.com&referenceNo=2802000002460")

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

request = Net::HTTP::Get.new(url)
request["x-np-api-key"] = '<NaviPartner API Key>'

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

```java Example list of Vouchers
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./voucher?customerNumber=D000188&email=john.doe%40acme.com&referenceNo=2802000002460")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php Example list of Vouchers
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./voucher?customerNumber=D000188&email=john.doe%40acme.com&referenceNo=2802000002460', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp Example list of Vouchers
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./voucher?customerNumber=D000188&email=john.doe%40acme.com&referenceNo=2802000002460");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift Example list of Vouchers
import Foundation

let headers = ["x-np-api-key": "<NaviPartner API Key>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./voucher?customerNumber=D000188&email=john.doe%40acme.com&referenceNo=2802000002460")! 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()
```