Products
February 25, 2026 ยท View on GitHub
(products)
Overview
Available Operations
- list - List Products
- create - Create Product
- get - Get Product
- update - Update Product
- update_benefits - Update Product Benefits
list
List products.
Scopes: products:read products:write
Example Usage
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.products.list(organization_id=None, page=1, limit=10)
while res is not None:
# Handle items
res = res.next()
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | OptionalNullable[models.QueryParamProductIDFilter] | :heavy_minus_sign: | Filter by product ID. |
organization_id | OptionalNullable[models.ProductsListQueryParamOrganizationIDFilter] | :heavy_minus_sign: | Filter by organization ID. |
query | OptionalNullable[str] | :heavy_minus_sign: | Filter by product name. |
is_archived | OptionalNullable[bool] | :heavy_minus_sign: | Filter on archived products. |
is_recurring | OptionalNullable[bool] | :heavy_minus_sign: | Filter on recurring products. If true, only subscriptions tiers are returned. If false, only one-time purchase products are returned. |
benefit_id | OptionalNullable[models.BenefitIDFilter] | :heavy_minus_sign: | Filter products granting specific benefit. |
visibility | List[models.ProductVisibility] | :heavy_minus_sign: | Filter by visibility. |
page | Optional[int] | :heavy_minus_sign: | Page number, defaults to 1. |
limit | Optional[int] | :heavy_minus_sign: | Size of a page, defaults to 10. Maximum is 100. |
sorting | List[models.ProductSortProperty] | :heavy_minus_sign: | Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order. |
metadata | Dict[str, models.MetadataQuery] | :heavy_minus_sign: | Filter by metadata key-value pairs. It uses the deepObject style, e.g. ?metadata[key]=value. |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
Response
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |
create
Create a product.
Scopes: products:write
Example Usage
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.products.create(request={
"name": "<value>",
"prices": [],
"organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
"recurring_interval": "year",
})
# Handle response
print(res)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.ProductCreate | :heavy_check_mark: | The request object to use for the request. |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
Response
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |
get
Get a product by ID.
Scopes: products:read products:write
Example Usage
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.products.get(id="<value>")
# Handle response
print(res)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | str | :heavy_check_mark: | N/A |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
Response
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.ResourceNotFound | 404 | application/json |
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |
update
Update a product.
Scopes: products:write
Example Usage
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.products.update(id="<value>", product_update={})
# Handle response
print(res)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | str | :heavy_check_mark: | N/A |
product_update | models.ProductUpdate | :heavy_check_mark: | N/A |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
Response
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.NotPermitted | 403 | application/json |
| models.ResourceNotFound | 404 | application/json |
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |
update_benefits
Update benefits granted by a product.
Scopes: products:write
Example Usage
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.products.update_benefits(id="<value>", product_benefits_update={
"benefits": [
"<value 1>",
"<value 2>",
"<value 3>",
],
})
# Handle response
print(res)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | str | :heavy_check_mark: | N/A |
product_benefits_update | models.ProductBenefitsUpdate | :heavy_check_mark: | N/A |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
Response
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| models.NotPermitted | 403 | application/json |
| models.ResourceNotFound | 404 | application/json |
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |