Skip to main content
GET
/
v1
/
products
/
{id}
Retrieve a Product
curl --request GET \
  --url https://api.leanrails.com/v1/products/{id} \
  --header 'Authorization: Basic <encoded-value>'
{
  "id": "prod_xxx",
  "object": "product",
  "active": true,
  "name": "<string>",
  "images": [
    "<string>"
  ],
  "marketing_features": [
    {
      "name": "<string>"
    }
  ],
  "metadata": {},
  "livemode": false,
  "created": 1234567890,
  "updated": 1234567890,
  "description": "<string>",
  "url": "<string>",
  "default_price": "price_xxx",
  "shippable": true,
  "statement_descriptor": "<string>",
  "unit_label": "<string>",
  "tax_code": "<string>",
  "package_dimensions": {
    "height": 1,
    "length": 1,
    "width": 1,
    "weight": 1
  }
}

Authorizations

Authorization
string
header
required

Use your secret API key as the username with an empty password.

Headers

X-API-Version
string

Override the API version for this request.

Path Parameters

id
string
required

The Product ID (prod_ prefix).

Response

The Product.

id
string
required
Example:

"prod_xxx"

object
enum<string>
required
Available options:
product
active
boolean
required

Whether the product is currently available for purchase.

name
string
required

The product's name.

images
string<uri>[]
required

Up to 8 URLs of images for this product.

marketing_features
object[]
required

Up to 15 marketing features for this product.

metadata
object
required

Set of key-value pairs for storing additional information.

livemode
boolean
required
Example:

false

created
integer
required

Unix timestamp.

Example:

1234567890

updated
integer
required

Unix timestamp.

Example:

1234567890

description
string | null

The product's description.

url
string<uri> | null

A URL of the product page.

default_price
string | null

The ID of the default price, or the expanded Price object.

Example:

"price_xxx"

shippable
boolean | null

Whether this product is shipped (i.e. a physical good).

statement_descriptor
string | null

Descriptor for card statements (max 22 characters).

unit_label
string | null

A label that represents units of this product (max 12 characters).

tax_code
string | null

A tax code ID.

package_dimensions
object

The dimensions of this product for shipping purposes.