curl --request PATCH \
--url https://coreapi.io/api/analytics/mrr-financials/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"movementScope": "customer",
"mrrRestatementAlertShare": "0.01"
}
'import requests
url = "https://coreapi.io/api/analytics/mrr-financials/settings"
payload = {
"movementScope": "customer",
"mrrRestatementAlertShare": "0.01"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({movementScope: 'customer', mrrRestatementAlertShare: '0.01'})
};
fetch('https://coreapi.io/api/analytics/mrr-financials/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/api/analytics/mrr-financials/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'movementScope' => 'customer',
'mrrRestatementAlertShare' => '0.01'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"movementScope": "invoice_address",
"mrrRestatementAlertShare": "0.01"
}{
"status": 409,
"type": "ANALYTICS_MRR_FINANCIALS__SNAPSHOT_MONTH_NOT_ENDED",
"title": "An error occurred",
"detail": "<string>"
}{
"status": 422,
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"violations": [
{
"propertyPath": "to",
"message": "Der Zeitraum darf höchstens 36 Monate umfassen.",
"code": "analytics.mrr_financials.range_too_long"
}
],
"title": "Validation Failed",
"detail": "<string>"
}Update the finance settings
Changes one or both settings. Fields left out keep their value. The movement scope only picks the default view: every scope is always calculated.
Required permission: analytics:write.
curl --request PATCH \
--url https://coreapi.io/api/analytics/mrr-financials/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"movementScope": "customer",
"mrrRestatementAlertShare": "0.01"
}
'import requests
url = "https://coreapi.io/api/analytics/mrr-financials/settings"
payload = {
"movementScope": "customer",
"mrrRestatementAlertShare": "0.01"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({movementScope: 'customer', mrrRestatementAlertShare: '0.01'})
};
fetch('https://coreapi.io/api/analytics/mrr-financials/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/api/analytics/mrr-financials/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'movementScope' => 'customer',
'mrrRestatementAlertShare' => '0.01'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"movementScope": "invoice_address",
"mrrRestatementAlertShare": "0.01"
}{
"status": 409,
"type": "ANALYTICS_MRR_FINANCIALS__SNAPSHOT_MONTH_NOT_ENDED",
"title": "An error occurred",
"detail": "<string>"
}{
"status": 422,
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"violations": [
{
"propertyPath": "to",
"message": "Der Zeitraum darf höchstens 36 Monate umfassen.",
"code": "analytics.mrr_financials.range_too_long"
}
],
"title": "Validation Failed",
"detail": "<string>"
}Autorisierungen
API token of the organisation. Send it as Authorization: Bearer api_... The token is bound to exactly one organisation.
Body
Partial update of the organisation-wide finance settings.
Default movement scope.
subscription, invoice_address, customer, organisation "customer"
Share of a snapshotted month's MRR above which its restatements raise one warning (decimal string between 0 and 1, 0.01 = 1 %).
"0.01"
Antwort
The updated settings.
Organisation-wide settings of the finance figures.
Default level on which MRR movements are classified. All levels are always calculated; this only picks the default view.
subscription, invoice_address, customer, organisation "invoice_address"
Share of a snapshotted month's MRR above which its restatements raise one warning (decimal string, 0.01 = 1 %).
"0.01"
War diese Seite hilfreich?