Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Dashboard API > Site transfer request

Simulate accept

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 accepting a site transfer request

Body parameters

billing_profilenull, objectOptional
address_linestringRequired
citystringRequired
countrystringRequired
zipstringRequired
vat_numbernull, stringOptional
cf_cod_fiscalenull, stringOptional
cf_cod_fiscale_partecipante_gruppo_ivanull, stringOptional
billing_profileRequired

Billing profile

Type:<a href="/docs/content-management-api/resources/per_site_pricing_billing_profile">ResourceLinkage&#x3C;"per_site_pricing_billing_profile"></a>, null

Returns

Returns a resource object of type next_invoice_estimate

Examples

import { buildClient } from "@datocms/dashboard-client";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const siteTransferId = "124";
const siteTransfer = await client.siteTransfers.rawSimulateAccept(
siteTransferId,
{
type: "site_transfer_acceptance_simulation",
relationships: {
billing_profile: {
data: { type: "per_site_pricing_billing_profile", id: "124" },
},
},
},
);
// Check the 'Returned output' tab for the result ☝️
console.log(siteTransfer);
}
run();
{
type: "next_invoice_estimate",
id: "4235",
attributes: {
amount: 20,
next_billing_at: "2016-09-20T18:50:24.914Z",
tax_label: "",
},
}