get(slug: string, options?: RequestScope): Promise<ProductResource>Reads a single product. Resolution is not a fallback chain: a value shaped like a UUID is looked up as an id only, anything else as a slug only, so a slug that happens to look like a UUID cannot be fetched this way.
A private product the key owner holds no grant on answers a not-found error instead of a permission error, which means a rejection here does not tell you whether the product exists. The response includes locked, computed against the workspace plan, and that is the flag the write methods refuse on.
Example
const product = await envless.products.get('billing')
if (product.locked) {
console.log('beyond the plan allowance, read only')
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Product slug, or the product uniqueId when the value is UUID shaped. |
options.signal | AbortSignal | No | Cancels the request. |
Returns
ProductResource with slug, isPrivate, locked and timestamps.
Worth knowing
updatedAtis null on a product that has never been patched.- Icons are upload-only from the dashboard, so
iconis null for anything created through the API.
Required scopes
products:read
Underlying endpoint
GET /products/{slug}
Request and response schema, every error code, and a live playground.
In Python
envless.products.get()
The same method in envless-sdk, the Python SDK, with the same request, retries and errors.
In Ruby
Envless.products.get
The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.
In PHP
$envless->products->get()
The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.