Products

In Lemon Squeezy, products describe the digital goods you offer to your customers.

A product belongs to a Store and can have many Variants.

The product object

Attributes

store_id

The ID of the store this product belongs to.

name

The name of the product.

slug

The slug used to identify the product.

description

The description of the product in HTML.

status

The status of the product. Either draft or published.

status_formatted

The formatted status of the product.

thumb_url

A URL to the thumbnail image for this product (if one exists). The image will be 100x100px in size.

large_thumb_url

A URL to the large thumbnail image for this product (if one exists). The image will be 1000x1000px in size.

price

A positive integer in cents representing the price of the product.

pay_what_you_want

Has the value true if this is a “pay what you want” product where the price can be set by the customer at checkout.

from_price

If this product has multiple variants, this will be a positive integer in cents representing the price of the cheapest variant. Otherwise, it will be null.

to_price

If this product has multiple variants, this will be a positive integer in cents representing the price of the most expensive variant. Otherwise, it will be null.

buy_now_url

A URL to purchase this product using the Lemon Squeezy checkout.

price_formatted

A human-readable string representing the price of the product (e.g. $9.99).

created_at

An ISO-8601 formatted date-time string indicating when the object was created.

updated_at

An ISO-8601 formatted date-time string indicating when the object was last updated.

Product object

{
  "type": "products",
  "id": "1",
  "attributes": {
    "store_id": 1,
    "name": "Example Product",
    "slug": "example-product",
    "description": "<p>Lorem ipsum...<\/p>",
    "status": "published",
    "status_formatted": "Published",
    "thumb_url": "https:\/\/app.lemonsqueezy.com\/storage\/media\/1\/1c40f227-aed5-4321-9ffc-62f37a06c9a0.jpg",
    "large_thumb_url": "https:\/\/app.lemonsqueezy.com\/storage\/media\/1\/1c40f227-aed5-4321-9ffc-62f37a06c9a0.jpg",
    "price": 999,
    "pay_what_you_want": false,
    "from_price": null,
    "to_price": null,
    "buy_now_url": "https:\/\/my-store.lemonsqueezy.com\/checkout\/buy\/0a841cf5-4cc2-4bbb-ae5d-9529d97deec6",
    "price_formatted": "$9.99",
    "created_at": "2021-05-27T12:54:47.000000Z",
    "updated_at": "2021-07-14T11:25:24.000000Z"
  }
}

Retrieve a product

Retrieves the product with the given ID.

Returns

Returns a product object.

GET /v1/products/:id

curl "https://api.lemonsqueezy.com/v1/products/1" \
     -H 'Accept: application/vnd.api+json' \
     -H 'Content-Type: application/vnd.api+json' \
     -H 'Authorization: Bearer {api_key}'

Response

{
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "self": "https:\/\/api.lemonsqueezy.com\/v1\/products\/1"
  },
  "data": {
    "type": "products",
    "id": "1",
    "attributes": {
      "store_id": 1,
      "name": "Example Product",
      "slug": "example-product",
      "description": "<p>Lorem ipsum...<\/p>",
      "status": "published",
      "status_formatted": "Published",
      "thumb_url": "https:\/\/app.lemonsqueezy.com\/storage\/media\/1\/1c40f227-aed5-4321-9ffc-62f37a06c9a0.jpg",
      "large_thumb_url": "https:\/\/app.lemonsqueezy.com\/storage\/media\/1\/1c40f227-aed5-4321-9ffc-62f37a06c9a0.jpg",
      "price": 999,
      "pay_what_you_want": false,
      "from_price": null,
      "to_price": null,
      "buy_now_url": "https:\/\/my-store.lemonsqueezy.com\/checkout\/buy\/0a841cf5-4cc2-4bbb-ae5d-9529d97deec6",
      "price_formatted": "$9.99",
      "created_at": "2021-05-27T12:54:47.000000Z",
      "updated_at": "2021-07-14T11:25:24.000000Z"
    }
    "relationships": {
      "store": {
        "links": {
          "related": "https:\/\/api.lemonsqueezy.com\/v1\/products\/1\/store",
          "self": "https:\/\/api.lemonsqueezy.com\/v1\/products\/1\/relationships\/store"
        }
      },
      "variants": {
        "links": {
          "related": "https:\/\/api.lemonsqueezy.com\/v1\/products\/1\/variants",
          "self": "https:\/\/api.lemonsqueezy.com\/v1\/products\/1\/relationships\/variants"
        }
      }
    },
    "links": {
      "self": "https:\/\/api.lemonsqueezy.com\/v1\/products\/1"
    }
  }
}

List all products

Returns a paginated list of products.

Parameters

store_id

Only return products belonging to the store with this ID.

Returns

Returns a paginated list of product objects ordered by name.

GET /v1/products

curl "https://api.lemonsqueezy.com/v1/products" \
     -H 'Accept: application/vnd.api+json' \
     -H 'Content-Type: application/vnd.api+json' \
     -H 'Authorization: Bearer {api_key}'

Response

{
  "meta": {
    "page": {
      "currentPage": 1,
      "from": 1,
      "lastPage": 1,
      "perPage": 10,
      "to": 10,
      "total": 10
    }
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https:\/\/api.lemonsqueezy.com\/v1\/products?page%5Bnumber%5D=1&page%5Bsize%5D=10&sort=name",
    "last": "https:\/\/api.lemonsqueezy.com\/v1\/products?page%5Bnumber%5D=1&page%5Bsize%5D=10&sort=name"
  },
  "data": [
    {
      "type": "products",
      "id": "1",
      "attributes": {
        "store_id": 1,
        "name": "Example Product",
        "slug": "example-product",
        "description": "<p>Lorem ipsum...<\/p>",
        "status": "published",
        "status_formatted": "Published",
        "thumb_url": "https:\/\/app.lemonsqueezy.com\/storage\/media\/1\/1c40f227-aed5-4321-9ffc-62f37a06c9a0.jpg",
        "large_thumb_url": "https:\/\/app.lemonsqueezy.com\/storage\/media\/1\/1c40f227-aed5-4321-9ffc-62f37a06c9a0.jpg",
        "price": 999,
        "pay_what_you_want": false,
        "from_price": null,
        "to_price": null,
        "buy_now_url": "https:\/\/my-store.lemonsqueezy.com\/checkout\/buy\/0a841cf5-4cc2-4bbb-ae5d-9529d97deec6",
        "price_formatted": "$9.99",
        "created_at": "2021-05-27T12:54:47.000000Z",
        "updated_at": "2021-07-14T11:25:24.000000Z"
      },
      "relationships": {
        "store": {
          "links": {
            "related": "https:\/\/api.lemonsqueezy.com\/v1\/products\/1\/store",
            "self": "https:\/\/api.lemonsqueezy.com\/v1\/products\/1\/relationships\/store"
          }
        },
        "variants": {
          "links": {
            "related": "https:\/\/api.lemonsqueezy.com\/v1\/products\/1\/variants",
            "self": "https:\/\/api.lemonsqueezy.com\/v1\/products\/1\/relationships\/variants"
          }
        }
      },
      "links": {
        "self": "https:\/\/api.lemonsqueezy.com\/v1\/products\/1"
      }
    },
    {...},
    {...},
  ]
}