curl --request POST \
--url https://api.unprice.dev/v1/plans/listPlanVersions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"onlyPublished": true,
"onlyEnterprisePlan": false,
"onlyLatest": true,
"billingInterval": "month",
"currency": "USD"
}
'{
"planVersions": [
{
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"planId": "<string>",
"description": "<string>",
"latest": true,
"title": "<string>",
"tags": [
"<string>"
],
"active": true,
"status": "draft",
"publishedAt": 123,
"publishedBy": "<string>",
"archived": true,
"archivedAt": 123,
"archivedBy": "<string>",
"paymentProvider": "stripe",
"dueBehaviour": "cancel",
"currency": "USD",
"billingConfig": {
"name": "<string>",
"billingInterval": "month",
"billingIntervalCount": 6,
"planType": "recurring",
"billingAnchor": "dayOfCreation"
},
"whenToBill": "pay_in_advance",
"gracePeriod": 123,
"collectionMethod": "charge_automatically",
"trialDays": 123,
"autoRenew": true,
"metadata": {
"externalId": "<string>"
},
"paymentMethodRequired": true,
"version": 123,
"plan": {
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"slug": "<string>",
"active": true,
"description": "<string>",
"metadata": {
"externalId": "<string>"
},
"defaultPlan": true,
"enterprisePlan": true
},
"planFeatures": [
{
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"planVersionId": "<string>",
"featureId": "<string>",
"featureType": "flat",
"config": {
"price": {
"dinero": {
"amount": 123,
"currency": {
"code": "<string>",
"base": 123,
"exponent": 123
},
"scale": 123
},
"displayAmount": "<string>"
},
"tiers": [
{
"unitPrice": {
"dinero": {
"amount": 123,
"currency": {
"code": "<string>",
"base": 123,
"exponent": 123
},
"scale": 123
},
"displayAmount": "<string>"
},
"flatPrice": {
"dinero": {
"amount": 123,
"currency": {
"code": "<string>",
"base": 123,
"exponent": 123
},
"scale": 123
},
"displayAmount": "<string>"
},
"firstUnit": 2,
"lastUnit": 2
}
],
"usageMode": "tier",
"tierMode": "volume",
"units": 2
},
"metadata": {
"stripeProductId": "<string>",
"realtime": true
},
"aggregationMethod": "sum",
"order": 123,
"hidden": true,
"displayFeatureText": "<string>",
"feature": {
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"slug": "<string>",
"code": 123,
"title": "<string>",
"description": "<string>"
},
"defaultQuantity": 1,
"limit": 123
}
],
"flatPrice": "<string>"
}
]
}List all plan versions for a project
curl --request POST \
--url https://api.unprice.dev/v1/plans/listPlanVersions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"onlyPublished": true,
"onlyEnterprisePlan": false,
"onlyLatest": true,
"billingInterval": "month",
"currency": "USD"
}
'{
"planVersions": [
{
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"planId": "<string>",
"description": "<string>",
"latest": true,
"title": "<string>",
"tags": [
"<string>"
],
"active": true,
"status": "draft",
"publishedAt": 123,
"publishedBy": "<string>",
"archived": true,
"archivedAt": 123,
"archivedBy": "<string>",
"paymentProvider": "stripe",
"dueBehaviour": "cancel",
"currency": "USD",
"billingConfig": {
"name": "<string>",
"billingInterval": "month",
"billingIntervalCount": 6,
"planType": "recurring",
"billingAnchor": "dayOfCreation"
},
"whenToBill": "pay_in_advance",
"gracePeriod": 123,
"collectionMethod": "charge_automatically",
"trialDays": 123,
"autoRenew": true,
"metadata": {
"externalId": "<string>"
},
"paymentMethodRequired": true,
"version": 123,
"plan": {
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"slug": "<string>",
"active": true,
"description": "<string>",
"metadata": {
"externalId": "<string>"
},
"defaultPlan": true,
"enterprisePlan": true
},
"planFeatures": [
{
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"planVersionId": "<string>",
"featureId": "<string>",
"featureType": "flat",
"config": {
"price": {
"dinero": {
"amount": 123,
"currency": {
"code": "<string>",
"base": 123,
"exponent": 123
},
"scale": 123
},
"displayAmount": "<string>"
},
"tiers": [
{
"unitPrice": {
"dinero": {
"amount": 123,
"currency": {
"code": "<string>",
"base": 123,
"exponent": 123
},
"scale": 123
},
"displayAmount": "<string>"
},
"flatPrice": {
"dinero": {
"amount": 123,
"currency": {
"code": "<string>",
"base": 123,
"exponent": 123
},
"scale": 123
},
"displayAmount": "<string>"
},
"firstUnit": 2,
"lastUnit": 2
}
],
"usageMode": "tier",
"tierMode": "volume",
"units": 2
},
"metadata": {
"stripeProductId": "<string>",
"realtime": true
},
"aggregationMethod": "sum",
"order": 123,
"hidden": true,
"displayFeatureText": "<string>",
"feature": {
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"slug": "<string>",
"code": 123,
"title": "<string>",
"description": "<string>"
},
"defaultQuantity": 1,
"limit": 123
}
],
"flatPrice": "<string>"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body of the request
Whether to include published plan versions
true
Whether to include enterprise plan versions
false
Whether to include the latest plan version
true
The billing interval to filter the plan versions
month, year, day, minute, onetime "month"
The currency to filter the plan versions
USD, EUR "USD"
The result of the list plan versions
Show child attributes
36363650draft, published 3636stripe, square cancel, downgrade USD, EUR The billing configuration for the plan version
Show child attributes
1month, year, day, minute, onetime 1 <= x <= 12recurring, onetime Days of the month. Pick a number between 1 and 31, if the month has less days, it will be the last day of the month
1 <= x <= 31pay_in_advance, pay_in_arrear charge_automatically, send_invoice The plan information
Show child attributes
3636Show child attributes
36363636flat, tier, package, usage Show child attributes
Show child attributes
Show child attributes
The amount of the dinero object
Show child attributes
The currency code of the dinero object
The base of the dinero object
The exponent of the dinero object
The scale of the dinero object
Show child attributes
Show child attributes
Show child attributes
The amount of the dinero object
Show child attributes
The currency code of the dinero object
The base of the dinero object
The exponent of the dinero object
The scale of the dinero object
Show child attributes
Show child attributes
The amount of the dinero object
Show child attributes
The currency code of the dinero object
The base of the dinero object
The exponent of the dinero object
The scale of the dinero object
x >= 1x >= 1tier, package, unit volume, graduated x >= 1sum, sum_all, last_during_period, count, count_all, max, max_all The text you can use to show the clients
The feature information
Show child attributes
363650Flat price of the plan