Retrieve a billing profile
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.
Query parameters
Comma-separated list of relationship paths. A relationship path is a dot-separated list of relationship names. Allowed relationship paths: item_types, item_types.fields, item_types.fieldsets, item_types.singleton_item, account.
"active_subscriptions,active_subscriptions.plan,active_subscriptions.site"
Returns
Returns a resource object of type per_site_pricing_billing_profile
Examples
import { buildClient } from "@datocms/dashboard-client";
async function run() { const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const perSitePricingBillingProfileId = "124";
const perSitePricingBillingProfile = await client.perSitePricingBillingProfiles.find( perSitePricingBillingProfileId, );
// Check the 'Returned output' tab for the result ☝️ console.log(perSitePricingBillingProfile);}
run();{ id: "124", billing_profile: { first_name: "Mark", last_name: "Smith", company: "Acme Inc.", card_last_4: "4242", next_billing_at: "2020-04-21T07:57:11.124Z", card_type: "visa", card_expiry_month: 4, card_expiry_year: 2024, address_line: "One Infinite Loop", city: "Cupertino", email: "invoices@acmeinc.com", country: "US", state: "California", zip: "95014", vat_number: null, defaulting: false, defaulting_since: null, credits: 0, cf_cod_fiscale: null, cf_cod_fiscale_partecipante_gruppo_iva: null, coupons: "COUPON-ABC", is_active: true, next_monthly_billing_at: "2020-04-21T07:57:11.124Z", next_yearly_billing_at: "2020-04-21T07:57:11.124Z", total_dues: 0, }, active_subscriptions: [{ type: "site_subscription", id: "124" }],}