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

GET https://api.npretail.app/{tenant}/{environment}/{company}/membership/{membershipId}/subscription/

Use this endpoint to get the subscription information about a membership.

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

## 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)
- `membershipId` (UUID, required) — Unique identifier for a membership.

## Response

### 200

- `id` (UUID, required) — Unique identifier for a subscription.
- `blocked` (boolean, required) — Defines if the subscription is blocked and therefore not useable for renewing the membership.
- `autoRenew` (enum, required) — Indicates the auto-renewal state
  - Allowed values: `NO`, `YES_INTERNAL`, `YES_EXTERNAL`, `TERMINATION_REQUESTED`
- `startedAt` (datetime, optional) — Defines the date the subscription was started.
- `committedUntil` (date, optional) — Defines the date that the subscription is committed until. It's not possible to terminate the subscription before this date.
- `terminateAt` (date, optional) — Defines the date the membership will be terminated if it has been requested to terminate.
- `terminationRequestedAt` (datetime, optional) — Defines the date and time termination was requested.
- `terminationReason` (enum, optional) — Defines the reason for a termination.
  - Allowed values: `CUSTOMER_INITIATED`, `FORCED_TERMINATION`
- `usableUntilDate` (date, optional) — The last date the membership remains usable if auto-renewal is cancelled now, inclusive. Terminating only switches auto-renewal off and does not shorten the period already paid for, so this is the end of that period, or of the last period a notice period forces a renewal into. It is not the date the termination itself takes effect: that is reported separately as terminateAt. Null when it cannot be determined, for example when auto-renewal is off or is managed externally. Informational only: do not send this value back as a terminationDate when terminating - omit that field and the server applies its own earliest acceptable date.
- `renewalRequiredBeforeTermination` (boolean, optional) — True when the notice period runs past the end of the paid period, so the membership renews, and is charged, once more before it can be terminated. Null whenever usableUntilDate is null, since there is then no termination to describe.
- `nextRenewalAttemptDate` (date, optional) — The next date an automatic renewal payment will be attempted. Null when no further attempt is planned, for example when auto-renewal is off or every scheduled attempt is already in the past.

## Examples

### SubscriptionActive

**Response**

```json
{
  "id": "7322dddf-af86-42ea-8d85-f0d377e2a3b2",
  "blocked": false,
  "autoRenew": "YES_INTERNAL",
  "startedAt": "2025-06-17T16:34:00.000Z",
  "committedUntil": "2025-12-17",
  "usableUntilDate": "2025-12-17",
  "renewalRequiredBeforeTermination": false,
  "nextRenewalAttemptDate": "2025-12-12"
}
```

**SDK Code**

```python SubscriptionActive
import requests

url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/"

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

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

print(response.json())
```

```javascript SubscriptionActive
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/';
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 SubscriptionActive
package main

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

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/"

	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 SubscriptionActive
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/")

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 SubscriptionActive
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./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php SubscriptionActive
<?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./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp SubscriptionActive
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift SubscriptionActive
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./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/")! 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()
```

### SubscriptionPendingTermination

**Response**

```json
{
  "id": "7b6e8265-70f2-4429-a536-4a455f07c296",
  "blocked": false,
  "autoRenew": "TERMINATION_REQUESTED",
  "startedAt": "2025-06-17T16:34:00.000Z",
  "committedUntil": "2025-12-17",
  "terminateAt": "2025-12-17",
  "terminationRequestedAt": "2025-06-17T15:47:00Z",
  "terminationReason": "CUSTOMER_INITIATED",
  "usableUntilDate": "2025-12-17",
  "renewalRequiredBeforeTermination": false
}
```

**SDK Code**

```python SubscriptionPendingTermination
import requests

url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/9f6ccdd4-b5d7-4c22-ba41-51dbb95353ca/subscription/"

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

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

print(response.json())
```

```javascript SubscriptionPendingTermination
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/9f6ccdd4-b5d7-4c22-ba41-51dbb95353ca/subscription/';
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 SubscriptionPendingTermination
package main

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

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/9f6ccdd4-b5d7-4c22-ba41-51dbb95353ca/subscription/"

	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 SubscriptionPendingTermination
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/9f6ccdd4-b5d7-4c22-ba41-51dbb95353ca/subscription/")

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 SubscriptionPendingTermination
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./membership/9f6ccdd4-b5d7-4c22-ba41-51dbb95353ca/subscription/")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php SubscriptionPendingTermination
<?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./membership/9f6ccdd4-b5d7-4c22-ba41-51dbb95353ca/subscription/', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp SubscriptionPendingTermination
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/9f6ccdd4-b5d7-4c22-ba41-51dbb95353ca/subscription/");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift SubscriptionPendingTermination
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./membership/9f6ccdd4-b5d7-4c22-ba41-51dbb95353ca/subscription/")! 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()
```

### SubscriptionTerminated

**Response**

```json
{
  "id": "cc2221d9-eb28-4db9-9c8e-146230688615",
  "blocked": false,
  "autoRenew": "NO",
  "startedAt": "2024-05-27",
  "terminateAt": "2025-04-30",
  "terminationRequestedAt": "2025-03-15",
  "terminationReason": "CUSTOMER_INITIATED"
}
```

**SDK Code**

```python SubscriptionTerminated
import requests

url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/1800f420-5c87-4c51-8140-414b02cbf989/subscription/"

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

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

print(response.json())
```

```javascript SubscriptionTerminated
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/1800f420-5c87-4c51-8140-414b02cbf989/subscription/';
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 SubscriptionTerminated
package main

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

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/1800f420-5c87-4c51-8140-414b02cbf989/subscription/"

	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 SubscriptionTerminated
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/1800f420-5c87-4c51-8140-414b02cbf989/subscription/")

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 SubscriptionTerminated
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./membership/1800f420-5c87-4c51-8140-414b02cbf989/subscription/")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php SubscriptionTerminated
<?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./membership/1800f420-5c87-4c51-8140-414b02cbf989/subscription/', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp SubscriptionTerminated
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/1800f420-5c87-4c51-8140-414b02cbf989/subscription/");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift SubscriptionTerminated
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./membership/1800f420-5c87-4c51-8140-414b02cbf989/subscription/")! 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()
```