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

typestringRequired

Must be exactly "site_transfer_acceptance_simulation".

attributes.billing_profilenull, objectOptional
address_linestringRequired
citystringRequired
countrystringRequired
zipstringRequired
vat_numbernull, stringOptional
cf_cod_fiscalenull, stringOptional
cf_cod_fiscale_partecipante_gruppo_ivanull, stringOptional
relationships.billing_profile.dataRequired

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

PUT https://site-api.datocms.com/site-transfers/:field_id_or_api_key/simulate-accept HTTP/1.1
Authorization: Bearer YOUR-API-TOKEN
Accept: application/json
X-Api-Version: 3
Content-Type: application/vnd.api+json
{
"data": {
"type": "site_transfer_acceptance_simulation",
"relationships": {
"billing_profile": {
"data": {
"type": "per_site_pricing_billing_profile",
"id": "124"
}
}
}
}
}
Terminal window
curl -g 'https://site-api.datocms.com/site-transfers/:field_id_or_api_key/simulate-accept' \
-X PUT \
-H "Authorization: Bearer YOUR-API-TOKEN" \
-H "Accept: application/json" \
-H "X-Api-Version: 3" \
-H "Content-Type: application/vnd.api+json" \
--data-binary '{"data":{"type":"site_transfer_acceptance_simulation","relationships":{"billing_profile":{"data":{"type":"per_site_pricing_billing_profile","id":"124"}}}}}'
await fetch(
"https://site-api.datocms.com/site-transfers/:field_id_or_api_key/simulate-accept",
{
method: "PUT",
headers: {
Authorization: "Bearer YOUR-API-TOKEN",
Accept: "application/json",
"X-Api-Version": "3",
"Content-Type": "application/vnd.api+json",
},
body: JSON.stringify({
data: {
type: "site_transfer_acceptance_simulation",
relationships: {
billing_profile: {
data: { type: "per_site_pricing_billing_profile", id: "124" },
},
},
},
}),
},
);
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: cache-control: max-age=0, private, must-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 28
{
"data": {
"type": "next_invoice_estimate",
"id": "4235",
"attributes": {
"amount": 20,
"next_billing_at": "2016-09-20T18:50:24.914Z",
"tax_label": ""
}
}
}