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

# Get Coupon

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

Retrieves the details of a specific coupon by its system ID.

Reference: https://docs.navipartner.com/apis/api-reference/coupon/service-coupon/get-coupon

## 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)
- `id` (UUID, required) — The unique system identifier for the coupon.

## Response

### 200

- `id` (UUID, required) — The unique system identifier for the coupon.
- `no` (string, required) — The internal coupon number from the number series.
- `couponType` (string, required) — The type of coupon, which carries the setup in NP Retail.
- `description` (string, required) — A short description of the coupon.
- `referenceNo` (string, required) — A unique, human-readable reference number, often used for barcodes.
- `status` (enum, required) — The current status of the coupon.
  - Allowed values: `ACTIVE`, `CONSUMED`
- `discountType` (enum, required) — The type of discount the coupon provides.
  - Allowed values: `AMOUNT`, `PERCENTAGE`
- `maxUsesPerSale` (integer, required) — The maximum number of times this coupon can be used in a single sale.
- `issueDate` (date, required) — The date the coupon was first issued.
- `discountAmount` (double, optional) — The fixed discount amount, if applicable.
- `discountPercent` (double, optional) — The discount as a percentage, if applicable.
- `maxDiscountAmount` (double, optional) — The maximum discount amount that can be applied.
- `validFrom` (datetime, optional) — The date and time from which the coupon is valid.
- `validUntil` (datetime, optional) — The date and time when the coupon expires.
- `customerNo` (string, optional) — The customer number this coupon is assigned to, if any.
- `remainingQuantity` (double, optional) — The remaining times the coupon can be used, if applicable.

## Examples

**Response**

```json
{
  "id": "77a1b3c2-d5e6-f7a8-b9c0-d1e2f3a4b5c6",
  "no": "COUP00123",
  "couponType": "WELCOME",
  "description": "Welcome Discount",
  "referenceNo": "9876543210987",
  "status": "ACTIVE",
  "discountType": "PERCENTAGE",
  "maxUsesPerSale": 1,
  "issueDate": "2025-06-01",
  "discountAmount": null,
  "discountPercent": 10,
  "maxDiscountAmount": 100,
  "validFrom": "2025-06-01T00:00:00Z",
  "validUntil": "2025-08-31T23:59:59Z",
  "customerNo": "C00120",
  "remainingQuantity": 1
}
```

**SDK Code**

```python Get a coupon
import requests

url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./coupon/77a1b3c2-d5e6-f7a8-b9c0-d1e2f3a4b5c6"

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

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

print(response.json())
```

```javascript Get a coupon
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./coupon/77a1b3c2-d5e6-f7a8-b9c0-d1e2f3a4b5c6';
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 Get a coupon
package main

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

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./coupon/77a1b3c2-d5e6-f7a8-b9c0-d1e2f3a4b5c6"

	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 Get a coupon
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./coupon/77a1b3c2-d5e6-f7a8-b9c0-d1e2f3a4b5c6")

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 Get a coupon
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./coupon/77a1b3c2-d5e6-f7a8-b9c0-d1e2f3a4b5c6")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php Get a coupon
<?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./coupon/77a1b3c2-d5e6-f7a8-b9c0-d1e2f3a4b5c6', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp Get a coupon
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./coupon/77a1b3c2-d5e6-f7a8-b9c0-d1e2f3a4b5c6");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift Get a coupon
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./coupon/77a1b3c2-d5e6-f7a8-b9c0-d1e2f3a4b5c6")! 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()
```