# Get a product

Returns the name, the code and the distribution setting of a product.

`GET /v1/products/{product}`

## Use cases

- Show the name of the product on a download page.
- Read the distribution setting. It tells your download page or your application whether to ask for a license key.
- Check that your application can reach the Distribution API.

## License checks

Get a product does not check the license. A known key gets the product, also when the license is suspended or expired, or when it belongs to another product in your account. So a 200 answer does not mean that the license gets the releases. To check that, use [List releases](../list-releases/) or [Check for an update](../check-for-an-update/).

Get a product changes no license and records no activity.

## Authentication

Send the license key of the customer. A product with the `open` distribution setting does not require a key. See [Authentication](../authentication/).

## Request

`{product}` is the ID of the product. The request has no body and no query parameters.

| Header | Required | Description |
| --- | --- | --- |
| `Seatify-License-Key` | For a `licensed` product | The license key of the customer. For an `open` product, a key that the request sends must be valid. |
| `Seatify-Nonce` | No | A new random value that the signature includes. See [Signed responses](../#signed-responses). |
| `Seatify-Signing-Key` | No | The key ID of the signing key in your application. See [Signed responses](../#signed-responses). |

## Response

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The ID of the product. |
| `name` | string | The name of the product. |
| `code` | string | The code of the product. |
| `distribution` | string | The [distribution](../../concepts/products/#distribution) setting of the product. The value is `licensed` or `open`. |

## Errors

| Status | Reason | Description |
| --- | --- | --- |
| 400 | `The signing key is not known.` | Your organization has no signing key with the ID in `Seatify-Signing-Key`. |
| 400 | `The nonce must be at most 255 characters.` | The value of `Seatify-Nonce` is too long. |
| 401 | `A license key is required.` | The product is `licensed`, and the request has no `Seatify-License-Key` header, or the header is empty. |
| 401 | `The license key is not valid.` | No license in your account has this key. This applies to an `open` product too. |
| 404 | `The product was not found.` | No product has this ID. |
| 429 | `There are too many requests. Try again later.` | See [Rate limits](../#rate-limits). |

See [Errors](../#errors).

## Example

{{< tabs >}}
{{< tab name="curl" >}}
```bash
curl https://dist.seatify.dev/v1/products/$PRODUCT_ID \
  -H "Seatify-License-Key: $LICENSE_KEY"
```
{{< /tab >}}
{{< tab name="Swift" >}}
```swift
import Foundation

struct Product: Decodable {
    let id: String
    let name: String
    let code: String
    let distribution: String
}

var request = URLRequest(url: URL(string: "https://dist.seatify.dev/v1/products/\(productID)")!)
request.setValue(licenseKey, forHTTPHeaderField: "Seatify-License-Key")

let (data, _) = try await URLSession.shared.data(for: request)
let product = try JSONDecoder().decode(Product.self, from: data)
```
{{< /tab >}}
{{< tab name="C#" >}}
```csharp
using System.Net.Http.Json;

using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Seatify-License-Key", licenseKey);

var product = await client.GetFromJsonAsync<Product>($"https://dist.seatify.dev/v1/products/{productId}");

record Product(string Id, string Name, string Code, string Distribution);
```
{{< /tab >}}
{{< tab name="Go" >}}
```go
req, err := http.NewRequest("GET", "https://dist.seatify.dev/v1/products/"+productID, nil)
if err != nil {
	return err
}
req.Header.Set("Seatify-License-Key", licenseKey)

res, err := http.DefaultClient.Do(req)
if err != nil {
	return err
}
defer res.Body.Close()

var product struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	Code         string `json:"code"`
	Distribution string `json:"distribution"`
}
err = json.NewDecoder(res.Body).Decode(&product)
```
{{< /tab >}}
{{< tab name="JavaScript" >}}
```javascript
const response = await fetch(`https://dist.seatify.dev/v1/products/${productId}`, {
  headers: { "Seatify-License-Key": licenseKey },
});
const product = await response.json();
```
{{< /tab >}}
{{< /tabs >}}

```json
{
  "id": "<product id>",
  "name": "Beacon Studio",
  "code": "BEACON",
  "distribution": "licensed"
}
```

