> For the complete documentation index, see [llms.txt](https://docs.licensespring.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.licensespring.com/license-api/products/get-product-details.md).

# Get Product Details

### Endpoint

* Method: `GET`
* Path: `/api/v4/product_details`
* Description: Returns metadata and flags for a product.

### Authentication

See [License API Authorization](/license-api/license-api-authorization.md).

#### Required headers

* `Date` (string) — RFC7231 GMT date string
* `Authorization` (string)

#### Recommended headers

* `Accept: application/json`

### Request

#### Query parameters

Required:

* `product` (string) — Product short code

Optional:

* `include_latest_version` (boolean) — Default: `false`
* `include_custom_fields` (boolean) — Default: `false`
* `env` (string) — Filter by installation file environment

### Examples

{% tabs %}
{% tab title="curl" %}

```bash
curl --location --request GET '/api/v4/product_details?product=string' \
--header 'Accept: application/json' \
--header 'Date: string' \
--header 'Authorization: string'
```

{% endtab %}

{% tab title="nodejs" %}

```javascript
var request = require('request');
var options = {
  method: 'GET',
  url: '/api/v4/product_details?product=string',
  headers: {
    'Accept': 'application/json',
    'Date': 'string',
    'Authorization': 'string'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
```

{% endtab %}

{% tab title="javascript (fetch)" %}

```javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Date", "string");
myHeaders.append("Authorization", "string");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("/api/v4/product_details?product=string", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% endtab %}

{% tab title="python" %}

```python
import requests

url = "/api/v4/product_details?product=string"

headers = {
  "Accept": "application/json",
  "Date": "string",
  "Authorization": "string"
}

response = requests.get(url, headers=headers)
print(response.text)
```

{% endtab %}

{% tab title="ruby" %}

```ruby
require "uri"
require "net/http"

url = URI("/api/v4/product_details?product=string")

http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Date"] = "string"
request["Authorization"] = "string"

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

{% endtab %}
{% endtabs %}

### Schema

<details>

<summary><strong>Request schema (TypeScript + JSON Schema)</strong></summary>

**TypeScript**

```typescript
type ProductDetailsRequestParameters = {
  
  // required parameters:
  product: string,
  
  // optional parameters:
  include_latest_version?: boolean | undefined,
  include_custom_fields?: boolean | undefined,
  env?: string | undefined,
}
```

**JSON Schema**

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "product": { "type": "string" },
    "include_latest_version": { "type": "boolean" },
    "include_custom_fields": { "type": "boolean" },
    "env": { "type": "string" }
  },
  "required": ["product"],
  "additionalProperties": false
}
```

</details>

<details>

<summary><strong>Response schema (TypeScript + JSON Schema)</strong></summary>

**TypeScript**

```typescript
type ProductDetailsResponseBody = {
    product_id: number;
    product_name: string;
    short_code: string;
    authorization_method: "license-key" | "user";
    floating_timeout: number;
    max_overages: number;
    trial_days: number;
    allow_overages: boolean;
    allow_trial: boolean;
    prevent_vm: boolean;
    metadata: JSON;
    
    // this property is only present if "include_custom_fields" query param is true
    custom_fields?: {
        id: number;
        name: string;
        default_value: string;
    }[] | undefined;
    
    // this property is only present if "include_latest_version" query param is true
    latest_version?: {
        version: string | null;
        environment: string | null;
        hash_md5: string | null;
        eula_link: string | null;
        release_notes_link: string | null;
        size: string | null;
        requires_version: string | null;
        channel: string | null;
        release_date: string | null;
        id: number;
        product_id: number;
        enabled: boolean;
        full_link: string | null;
        filename: string | null;
        created_at: string;
        updated_at: string;
    } | undefined;
}
```

**JSON Schema**

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "product_id": { "type": "number" },
    "product_name": { "type": "string" },
    "short_code": { "type": "string" },
    "authorization_method": { "type": "string", "enum": ["license-key", "user"] },
    "metadata": { "type": "object" },
    "custom_fields": { "type": "array" },
    "latest_version": { "type": ["object", "null"] }
  },
  "required": ["product_id", "product_name", "short_code", "authorization_method", "metadata"],
  "additionalProperties": true
}
```

</details>

{% hint style="info" %} If product does not have a version defined, it will return null {% endhint %}

{% hint style="info" %} If product does not have any custom fields defined, it will return an empty array {% endhint %}

### Errors

If an error occurs, the response will have an HTTP status code of 400 or higher, and the response body will contain an error description in the following format:

```typescript
{
  status: number,
  code: string,
  message: string
}
```

JSON Schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": { "type": "number" },
    "code": { "type": "string" },
    "message": { "type": "string" }
  },
  "required": [
    "status",
    "code",
    "message"
  ],
  "additionalProperties": false
}
```

List of exceptions

<details>

<summary><strong>unknown_product</strong> (400)</summary>

Provided product was not found

</details>

<details>

<summary><strong>missing_headers</strong> (400)</summary>

Some headers are missing

</details>

<details>

<summary><strong>missing_parameters</strong> (400)</summary>

Some parameters are missing in the request: { params }

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.licensespring.com/license-api/products/get-product-details.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
