Dashboard API > Account subscription
Simulate
Warning: Experimental API
Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.
Simulate costs for a new subscription
Body parameters
recurrenceenumRequired
Type of recurrence (yearly/monthly)
Example:
"monthly"
yearlyOptional
monthlyOptional
billing_profilenull, objectOptional
address_linestringRequired
citystringRequired
countrystringRequired
zipstringRequired
vat_numbernull, stringOptional
cf_cod_fiscalenull, stringOptional
cf_cod_fiscale_partecipante_gruppo_ivanull, stringOptional
po_numbernull, stringOptional
planRequired
Subscription plan
Type:<a href="/docs/content-management-api/resources/per_owner_pricing_plan">ResourceLinkage<"per_owner_pricing_plan"></a>
Examples
import { buildClient } from "@datocms/dashboard-client";
async function run() { const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const perOwnerPricingSubscriptions = await client.perOwnerPricingSubscription.simulate({ recurrence: "monthly", plan: { type: "per_owner_pricing_plan", id: "124" }, });
for (const perOwnerPricingSubscription of perOwnerPricingSubscriptions) { // Check the 'Returned output' tab for the result ☝️ console.log(perOwnerPricingSubscription); }}
run();{ id: "4235", amount: 20, next_billing_at: "2016-09-20T18:50:24.914Z", tax_label: "",}